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-02-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	// ID - Resource ID.
37	ID *string `json:"id,omitempty"`
38	// Name - READ-ONLY; Resource name.
39	Name *string `json:"name,omitempty"`
40	// Type - READ-ONLY; Resource type.
41	Type *string `json:"type,omitempty"`
42	// Location - Resource location.
43	Location *string `json:"location,omitempty"`
44	// Tags - Resource tags.
45	Tags map[string]*string `json:"tags"`
46}
47
48// MarshalJSON is the custom marshaler for ApplicationGateway.
49func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
50	objectMap := make(map[string]interface{})
51	if ag.ApplicationGatewayPropertiesFormat != nil {
52		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
53	}
54	if ag.Etag != nil {
55		objectMap["etag"] = ag.Etag
56	}
57	if ag.ID != nil {
58		objectMap["id"] = ag.ID
59	}
60	if ag.Location != nil {
61		objectMap["location"] = ag.Location
62	}
63	if ag.Tags != nil {
64		objectMap["tags"] = ag.Tags
65	}
66	return json.Marshal(objectMap)
67}
68
69// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
70func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
71	var m map[string]*json.RawMessage
72	err := json.Unmarshal(body, &m)
73	if err != nil {
74		return err
75	}
76	for k, v := range m {
77		switch k {
78		case "properties":
79			if v != nil {
80				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
81				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
82				if err != nil {
83					return err
84				}
85				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
86			}
87		case "etag":
88			if v != nil {
89				var etag string
90				err = json.Unmarshal(*v, &etag)
91				if err != nil {
92					return err
93				}
94				ag.Etag = &etag
95			}
96		case "id":
97			if v != nil {
98				var ID string
99				err = json.Unmarshal(*v, &ID)
100				if err != nil {
101					return err
102				}
103				ag.ID = &ID
104			}
105		case "name":
106			if v != nil {
107				var name string
108				err = json.Unmarshal(*v, &name)
109				if err != nil {
110					return err
111				}
112				ag.Name = &name
113			}
114		case "type":
115			if v != nil {
116				var typeVar string
117				err = json.Unmarshal(*v, &typeVar)
118				if err != nil {
119					return err
120				}
121				ag.Type = &typeVar
122			}
123		case "location":
124			if v != nil {
125				var location string
126				err = json.Unmarshal(*v, &location)
127				if err != nil {
128					return err
129				}
130				ag.Location = &location
131			}
132		case "tags":
133			if v != nil {
134				var tags map[string]*string
135				err = json.Unmarshal(*v, &tags)
136				if err != nil {
137					return err
138				}
139				ag.Tags = tags
140			}
141		}
142	}
143
144	return nil
145}
146
147// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
148type ApplicationGatewayAuthenticationCertificate struct {
149	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
150	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
151	Name *string `json:"name,omitempty"`
152	// Etag - A unique read-only string that changes whenever the resource is updated.
153	Etag *string `json:"etag,omitempty"`
154	// Type - Type of the resource.
155	Type *string `json:"type,omitempty"`
156	// ID - Resource ID.
157	ID *string `json:"id,omitempty"`
158}
159
160// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
161func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
162	objectMap := make(map[string]interface{})
163	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
164		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
165	}
166	if agac.Name != nil {
167		objectMap["name"] = agac.Name
168	}
169	if agac.Etag != nil {
170		objectMap["etag"] = agac.Etag
171	}
172	if agac.Type != nil {
173		objectMap["type"] = agac.Type
174	}
175	if agac.ID != nil {
176		objectMap["id"] = agac.ID
177	}
178	return json.Marshal(objectMap)
179}
180
181// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
182func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
183	var m map[string]*json.RawMessage
184	err := json.Unmarshal(body, &m)
185	if err != nil {
186		return err
187	}
188	for k, v := range m {
189		switch k {
190		case "properties":
191			if v != nil {
192				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
193				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
194				if err != nil {
195					return err
196				}
197				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
198			}
199		case "name":
200			if v != nil {
201				var name string
202				err = json.Unmarshal(*v, &name)
203				if err != nil {
204					return err
205				}
206				agac.Name = &name
207			}
208		case "etag":
209			if v != nil {
210				var etag string
211				err = json.Unmarshal(*v, &etag)
212				if err != nil {
213					return err
214				}
215				agac.Etag = &etag
216			}
217		case "type":
218			if v != nil {
219				var typeVar string
220				err = json.Unmarshal(*v, &typeVar)
221				if err != nil {
222					return err
223				}
224				agac.Type = &typeVar
225			}
226		case "id":
227			if v != nil {
228				var ID string
229				err = json.Unmarshal(*v, &ID)
230				if err != nil {
231					return err
232				}
233				agac.ID = &ID
234			}
235		}
236	}
237
238	return nil
239}
240
241// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
242// application gateway.
243type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
244	// Data - Certificate public data.
245	Data *string `json:"data,omitempty"`
246	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
247	ProvisioningState *string `json:"provisioningState,omitempty"`
248}
249
250// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
251// call.
252type ApplicationGatewayAvailableSslOptions struct {
253	autorest.Response                                      `json:"-"`
254	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
255	// ID - Resource ID.
256	ID *string `json:"id,omitempty"`
257	// Name - READ-ONLY; Resource name.
258	Name *string `json:"name,omitempty"`
259	// Type - READ-ONLY; Resource type.
260	Type *string `json:"type,omitempty"`
261	// Location - Resource location.
262	Location *string `json:"location,omitempty"`
263	// Tags - Resource tags.
264	Tags map[string]*string `json:"tags"`
265}
266
267// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
268func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
269	objectMap := make(map[string]interface{})
270	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
271		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
272	}
273	if agaso.ID != nil {
274		objectMap["id"] = agaso.ID
275	}
276	if agaso.Location != nil {
277		objectMap["location"] = agaso.Location
278	}
279	if agaso.Tags != nil {
280		objectMap["tags"] = agaso.Tags
281	}
282	return json.Marshal(objectMap)
283}
284
285// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
286func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
287	var m map[string]*json.RawMessage
288	err := json.Unmarshal(body, &m)
289	if err != nil {
290		return err
291	}
292	for k, v := range m {
293		switch k {
294		case "properties":
295			if v != nil {
296				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
297				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
298				if err != nil {
299					return err
300				}
301				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
302			}
303		case "id":
304			if v != nil {
305				var ID string
306				err = json.Unmarshal(*v, &ID)
307				if err != nil {
308					return err
309				}
310				agaso.ID = &ID
311			}
312		case "name":
313			if v != nil {
314				var name string
315				err = json.Unmarshal(*v, &name)
316				if err != nil {
317					return err
318				}
319				agaso.Name = &name
320			}
321		case "type":
322			if v != nil {
323				var typeVar string
324				err = json.Unmarshal(*v, &typeVar)
325				if err != nil {
326					return err
327				}
328				agaso.Type = &typeVar
329			}
330		case "location":
331			if v != nil {
332				var location string
333				err = json.Unmarshal(*v, &location)
334				if err != nil {
335					return err
336				}
337				agaso.Location = &location
338			}
339		case "tags":
340			if v != nil {
341				var tags map[string]*string
342				err = json.Unmarshal(*v, &tags)
343				if err != nil {
344					return err
345				}
346				agaso.Tags = tags
347			}
348		}
349	}
350
351	return nil
352}
353
354// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
355// ApplicationGatewayAvailableSslOptions
356type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
357	// PredefinedPolicies - List of available Ssl predefined policy.
358	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
359	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
360	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
361	// AvailableCipherSuites - List of available Ssl cipher suites.
362	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
363	// AvailableProtocols - List of available Ssl protocols.
364	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
365}
366
367// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
368// service call.
369type ApplicationGatewayAvailableSslPredefinedPolicies struct {
370	autorest.Response `json:"-"`
371	// Value - List of available Ssl predefined policy.
372	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
373	// NextLink - URL to get the next set of results.
374	NextLink *string `json:"nextLink,omitempty"`
375}
376
377// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
378// ApplicationGatewaySslPredefinedPolicy values.
379type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
380	i    int
381	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
382}
383
384// NextWithContext advances to the next value.  If there was an error making
385// the request the iterator does not advance and the error is returned.
386func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
387	if tracing.IsEnabled() {
388		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
389		defer func() {
390			sc := -1
391			if iter.Response().Response.Response != nil {
392				sc = iter.Response().Response.Response.StatusCode
393			}
394			tracing.EndSpan(ctx, sc, err)
395		}()
396	}
397	iter.i++
398	if iter.i < len(iter.page.Values()) {
399		return nil
400	}
401	err = iter.page.NextWithContext(ctx)
402	if err != nil {
403		iter.i--
404		return err
405	}
406	iter.i = 0
407	return nil
408}
409
410// Next advances to the next value.  If there was an error making
411// the request the iterator does not advance and the error is returned.
412// Deprecated: Use NextWithContext() instead.
413func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
414	return iter.NextWithContext(context.Background())
415}
416
417// NotDone returns true if the enumeration should be started or is not yet complete.
418func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
420}
421
422// Response returns the raw server response from the last page request.
423func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
424	return iter.page.Response()
425}
426
427// Value returns the current value or a zero-initialized value if the
428// iterator has advanced beyond the end of the collection.
429func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
430	if !iter.page.NotDone() {
431		return ApplicationGatewaySslPredefinedPolicy{}
432	}
433	return iter.page.Values()[iter.i]
434}
435
436// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
437func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
438	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
439}
440
441// IsEmpty returns true if the ListResult contains no values.
442func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
443	return agaspp.Value == nil || len(*agaspp.Value) == 0
444}
445
446// hasNextLink returns true if the NextLink is not empty.
447func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
448	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
449}
450
451// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
452// It returns nil if no more results exist.
453func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
454	if !agaspp.hasNextLink() {
455		return nil, nil
456	}
457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
458		autorest.AsJSON(),
459		autorest.AsGet(),
460		autorest.WithBaseURL(to.String(agaspp.NextLink)))
461}
462
463// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
464// ApplicationGatewaySslPredefinedPolicy values.
465type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
466	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
467	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
468}
469
470// NextWithContext advances to the next page of values.  If there was an error making
471// the request the page does not advance and the error is returned.
472func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
473	if tracing.IsEnabled() {
474		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
475		defer func() {
476			sc := -1
477			if page.Response().Response.Response != nil {
478				sc = page.Response().Response.Response.StatusCode
479			}
480			tracing.EndSpan(ctx, sc, err)
481		}()
482	}
483	for {
484		next, err := page.fn(ctx, page.agaspp)
485		if err != nil {
486			return err
487		}
488		page.agaspp = next
489		if !next.hasNextLink() || !next.IsEmpty() {
490			break
491		}
492	}
493	return nil
494}
495
496// Next advances to the next page of values.  If there was an error making
497// the request the page does not advance and the error is returned.
498// Deprecated: Use NextWithContext() instead.
499func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
500	return page.NextWithContext(context.Background())
501}
502
503// NotDone returns true if the page enumeration should be started or is not yet complete.
504func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
505	return !page.agaspp.IsEmpty()
506}
507
508// Response returns the raw server response from the last page request.
509func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
510	return page.agaspp
511}
512
513// Values returns the slice of values for the current page or nil if there are no values.
514func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
515	if page.agaspp.IsEmpty() {
516		return nil
517	}
518	return *page.agaspp.Value
519}
520
521// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
522func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
523	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
524		fn:     getNextPage,
525		agaspp: cur,
526	}
527}
528
529// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
530// service call.
531type ApplicationGatewayAvailableWafRuleSetsResult struct {
532	autorest.Response `json:"-"`
533	// Value - The list of application gateway rule sets.
534	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
535}
536
537// ApplicationGatewayBackendAddress backend address of an application gateway.
538type ApplicationGatewayBackendAddress struct {
539	// Fqdn - Fully qualified domain name (FQDN).
540	Fqdn *string `json:"fqdn,omitempty"`
541	// IPAddress - IP address
542	IPAddress *string `json:"ipAddress,omitempty"`
543}
544
545// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
546type ApplicationGatewayBackendAddressPool struct {
547	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
548	// Name - Resource that is unique within a resource group. This name can be used to access the resource.
549	Name *string `json:"name,omitempty"`
550	// Etag - A unique read-only string that changes whenever the resource is updated.
551	Etag *string `json:"etag,omitempty"`
552	// Type - Type of the resource.
553	Type *string `json:"type,omitempty"`
554	// ID - Resource ID.
555	ID *string `json:"id,omitempty"`
556}
557
558// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
559func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
560	objectMap := make(map[string]interface{})
561	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
562		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
563	}
564	if agbap.Name != nil {
565		objectMap["name"] = agbap.Name
566	}
567	if agbap.Etag != nil {
568		objectMap["etag"] = agbap.Etag
569	}
570	if agbap.Type != nil {
571		objectMap["type"] = agbap.Type
572	}
573	if agbap.ID != nil {
574		objectMap["id"] = agbap.ID
575	}
576	return json.Marshal(objectMap)
577}
578
579// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
580func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
581	var m map[string]*json.RawMessage
582	err := json.Unmarshal(body, &m)
583	if err != nil {
584		return err
585	}
586	for k, v := range m {
587		switch k {
588		case "properties":
589			if v != nil {
590				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
591				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
592				if err != nil {
593					return err
594				}
595				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
596			}
597		case "name":
598			if v != nil {
599				var name string
600				err = json.Unmarshal(*v, &name)
601				if err != nil {
602					return err
603				}
604				agbap.Name = &name
605			}
606		case "etag":
607			if v != nil {
608				var etag string
609				err = json.Unmarshal(*v, &etag)
610				if err != nil {
611					return err
612				}
613				agbap.Etag = &etag
614			}
615		case "type":
616			if v != nil {
617				var typeVar string
618				err = json.Unmarshal(*v, &typeVar)
619				if err != nil {
620					return err
621				}
622				agbap.Type = &typeVar
623			}
624		case "id":
625			if v != nil {
626				var ID string
627				err = json.Unmarshal(*v, &ID)
628				if err != nil {
629					return err
630				}
631				agbap.ID = &ID
632			}
633		}
634	}
635
636	return nil
637}
638
639// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
640// application gateway.
641type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
642	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
643	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
644	// BackendAddresses - Backend addresses
645	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
646	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
647	ProvisioningState *string `json:"provisioningState,omitempty"`
648}
649
650// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
651type ApplicationGatewayBackendHealth struct {
652	autorest.Response   `json:"-"`
653	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
654}
655
656// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
657type ApplicationGatewayBackendHealthHTTPSettings struct {
658	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
659	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
660	// Servers - List of ApplicationGatewayBackendHealthServer resources.
661	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
662}
663
664// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
665type ApplicationGatewayBackendHealthPool struct {
666	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
667	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
668	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
669	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
670}
671
672// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
673type ApplicationGatewayBackendHealthServer struct {
674	// Address - IP address or FQDN of backend server.
675	Address *string `json:"address,omitempty"`
676	// IPConfiguration - Reference of IP configuration of backend server.
677	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
678	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
679	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
680}
681
682// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
683type ApplicationGatewayBackendHTTPSettings struct {
684	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
685	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
686	Name *string `json:"name,omitempty"`
687	// Etag - A unique read-only string that changes whenever the resource is updated.
688	Etag *string `json:"etag,omitempty"`
689	// Type - Type of the resource.
690	Type *string `json:"type,omitempty"`
691	// ID - Resource ID.
692	ID *string `json:"id,omitempty"`
693}
694
695// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
696func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
697	objectMap := make(map[string]interface{})
698	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
699		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
700	}
701	if agbhs.Name != nil {
702		objectMap["name"] = agbhs.Name
703	}
704	if agbhs.Etag != nil {
705		objectMap["etag"] = agbhs.Etag
706	}
707	if agbhs.Type != nil {
708		objectMap["type"] = agbhs.Type
709	}
710	if agbhs.ID != nil {
711		objectMap["id"] = agbhs.ID
712	}
713	return json.Marshal(objectMap)
714}
715
716// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
717func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
718	var m map[string]*json.RawMessage
719	err := json.Unmarshal(body, &m)
720	if err != nil {
721		return err
722	}
723	for k, v := range m {
724		switch k {
725		case "properties":
726			if v != nil {
727				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
728				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
729				if err != nil {
730					return err
731				}
732				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
733			}
734		case "name":
735			if v != nil {
736				var name string
737				err = json.Unmarshal(*v, &name)
738				if err != nil {
739					return err
740				}
741				agbhs.Name = &name
742			}
743		case "etag":
744			if v != nil {
745				var etag string
746				err = json.Unmarshal(*v, &etag)
747				if err != nil {
748					return err
749				}
750				agbhs.Etag = &etag
751			}
752		case "type":
753			if v != nil {
754				var typeVar string
755				err = json.Unmarshal(*v, &typeVar)
756				if err != nil {
757					return err
758				}
759				agbhs.Type = &typeVar
760			}
761		case "id":
762			if v != nil {
763				var ID string
764				err = json.Unmarshal(*v, &ID)
765				if err != nil {
766					return err
767				}
768				agbhs.ID = &ID
769			}
770		}
771	}
772
773	return nil
774}
775
776// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
777// application gateway.
778type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
779	// Port - Port
780	Port *int32 `json:"port,omitempty"`
781	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
782	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
783	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
784	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
785	// 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.
786	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
787	// Probe - Probe resource of an application gateway.
788	Probe *SubResource `json:"probe,omitempty"`
789	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
790	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
791	// ConnectionDraining - Connection draining of the backend http settings resource.
792	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
793	// HostName - Host header to be sent to the backend servers.
794	HostName *string `json:"hostName,omitempty"`
795	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
796	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
797	// AffinityCookieName - Cookie name to use for the affinity cookie.
798	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
799	// ProbeEnabled - Whether the probe is enabled. Default value is false.
800	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
801	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
802	Path *string `json:"path,omitempty"`
803	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
804	ProvisioningState *string `json:"provisioningState,omitempty"`
805}
806
807// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
808// be active for a specified time after the backend server got removed from the configuration.
809type ApplicationGatewayConnectionDraining struct {
810	// Enabled - Whether connection draining is enabled or not.
811	Enabled *bool `json:"enabled,omitempty"`
812	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
813	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
814}
815
816// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
817// rule group.
818type ApplicationGatewayFirewallDisabledRuleGroup struct {
819	// RuleGroupName - The name of the rule group that will be disabled.
820	RuleGroupName *string `json:"ruleGroupName,omitempty"`
821	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
822	Rules *[]int32 `json:"rules,omitempty"`
823}
824
825// ApplicationGatewayFirewallRule a web application firewall rule.
826type ApplicationGatewayFirewallRule struct {
827	// RuleID - The identifier of the web application firewall rule.
828	RuleID *int32 `json:"ruleId,omitempty"`
829	// Description - The description of the web application firewall rule.
830	Description *string `json:"description,omitempty"`
831}
832
833// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
834type ApplicationGatewayFirewallRuleGroup struct {
835	// RuleGroupName - The name of the web application firewall rule group.
836	RuleGroupName *string `json:"ruleGroupName,omitempty"`
837	// Description - The description of the web application firewall rule group.
838	Description *string `json:"description,omitempty"`
839	// Rules - The rules of the web application firewall rule group.
840	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
841}
842
843// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
844type ApplicationGatewayFirewallRuleSet struct {
845	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
846	// ID - Resource ID.
847	ID *string `json:"id,omitempty"`
848	// Name - READ-ONLY; Resource name.
849	Name *string `json:"name,omitempty"`
850	// Type - READ-ONLY; Resource type.
851	Type *string `json:"type,omitempty"`
852	// Location - Resource location.
853	Location *string `json:"location,omitempty"`
854	// Tags - Resource tags.
855	Tags map[string]*string `json:"tags"`
856}
857
858// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
859func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
860	objectMap := make(map[string]interface{})
861	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
862		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
863	}
864	if agfrs.ID != nil {
865		objectMap["id"] = agfrs.ID
866	}
867	if agfrs.Location != nil {
868		objectMap["location"] = agfrs.Location
869	}
870	if agfrs.Tags != nil {
871		objectMap["tags"] = agfrs.Tags
872	}
873	return json.Marshal(objectMap)
874}
875
876// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
877func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
878	var m map[string]*json.RawMessage
879	err := json.Unmarshal(body, &m)
880	if err != nil {
881		return err
882	}
883	for k, v := range m {
884		switch k {
885		case "properties":
886			if v != nil {
887				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
888				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
889				if err != nil {
890					return err
891				}
892				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
893			}
894		case "id":
895			if v != nil {
896				var ID string
897				err = json.Unmarshal(*v, &ID)
898				if err != nil {
899					return err
900				}
901				agfrs.ID = &ID
902			}
903		case "name":
904			if v != nil {
905				var name string
906				err = json.Unmarshal(*v, &name)
907				if err != nil {
908					return err
909				}
910				agfrs.Name = &name
911			}
912		case "type":
913			if v != nil {
914				var typeVar string
915				err = json.Unmarshal(*v, &typeVar)
916				if err != nil {
917					return err
918				}
919				agfrs.Type = &typeVar
920			}
921		case "location":
922			if v != nil {
923				var location string
924				err = json.Unmarshal(*v, &location)
925				if err != nil {
926					return err
927				}
928				agfrs.Location = &location
929			}
930		case "tags":
931			if v != nil {
932				var tags map[string]*string
933				err = json.Unmarshal(*v, &tags)
934				if err != nil {
935					return err
936				}
937				agfrs.Tags = tags
938			}
939		}
940	}
941
942	return nil
943}
944
945// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
946type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
947	// ProvisioningState - The provisioning state of the web application firewall rule set.
948	ProvisioningState *string `json:"provisioningState,omitempty"`
949	// RuleSetType - The type of the web application firewall rule set.
950	RuleSetType *string `json:"ruleSetType,omitempty"`
951	// RuleSetVersion - The version of the web application firewall rule set type.
952	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
953	// RuleGroups - The rule groups of the web application firewall rule set.
954	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
955}
956
957// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
958type ApplicationGatewayFrontendIPConfiguration struct {
959	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
960	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
961	Name *string `json:"name,omitempty"`
962	// Etag - A unique read-only string that changes whenever the resource is updated.
963	Etag *string `json:"etag,omitempty"`
964	// Type - Type of the resource.
965	Type *string `json:"type,omitempty"`
966	// ID - Resource ID.
967	ID *string `json:"id,omitempty"`
968}
969
970// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
971func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
972	objectMap := make(map[string]interface{})
973	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
974		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
975	}
976	if agfic.Name != nil {
977		objectMap["name"] = agfic.Name
978	}
979	if agfic.Etag != nil {
980		objectMap["etag"] = agfic.Etag
981	}
982	if agfic.Type != nil {
983		objectMap["type"] = agfic.Type
984	}
985	if agfic.ID != nil {
986		objectMap["id"] = agfic.ID
987	}
988	return json.Marshal(objectMap)
989}
990
991// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
992func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
993	var m map[string]*json.RawMessage
994	err := json.Unmarshal(body, &m)
995	if err != nil {
996		return err
997	}
998	for k, v := range m {
999		switch k {
1000		case "properties":
1001			if v != nil {
1002				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1003				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1004				if err != nil {
1005					return err
1006				}
1007				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1008			}
1009		case "name":
1010			if v != nil {
1011				var name string
1012				err = json.Unmarshal(*v, &name)
1013				if err != nil {
1014					return err
1015				}
1016				agfic.Name = &name
1017			}
1018		case "etag":
1019			if v != nil {
1020				var etag string
1021				err = json.Unmarshal(*v, &etag)
1022				if err != nil {
1023					return err
1024				}
1025				agfic.Etag = &etag
1026			}
1027		case "type":
1028			if v != nil {
1029				var typeVar string
1030				err = json.Unmarshal(*v, &typeVar)
1031				if err != nil {
1032					return err
1033				}
1034				agfic.Type = &typeVar
1035			}
1036		case "id":
1037			if v != nil {
1038				var ID string
1039				err = json.Unmarshal(*v, &ID)
1040				if err != nil {
1041					return err
1042				}
1043				agfic.ID = &ID
1044			}
1045		}
1046	}
1047
1048	return nil
1049}
1050
1051// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1052// application gateway.
1053type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1054	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1055	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1056	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1057	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1058	// Subnet - Reference of the subnet resource.
1059	Subnet *SubResource `json:"subnet,omitempty"`
1060	// PublicIPAddress - Reference of the PublicIP resource.
1061	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1062	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1063	ProvisioningState *string `json:"provisioningState,omitempty"`
1064}
1065
1066// ApplicationGatewayFrontendPort frontend port of an application gateway.
1067type ApplicationGatewayFrontendPort struct {
1068	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1069	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1070	Name *string `json:"name,omitempty"`
1071	// Etag - A unique read-only string that changes whenever the resource is updated.
1072	Etag *string `json:"etag,omitempty"`
1073	// Type - Type of the resource.
1074	Type *string `json:"type,omitempty"`
1075	// ID - Resource ID.
1076	ID *string `json:"id,omitempty"`
1077}
1078
1079// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1080func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1081	objectMap := make(map[string]interface{})
1082	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1083		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1084	}
1085	if agfp.Name != nil {
1086		objectMap["name"] = agfp.Name
1087	}
1088	if agfp.Etag != nil {
1089		objectMap["etag"] = agfp.Etag
1090	}
1091	if agfp.Type != nil {
1092		objectMap["type"] = agfp.Type
1093	}
1094	if agfp.ID != nil {
1095		objectMap["id"] = agfp.ID
1096	}
1097	return json.Marshal(objectMap)
1098}
1099
1100// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1101func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1102	var m map[string]*json.RawMessage
1103	err := json.Unmarshal(body, &m)
1104	if err != nil {
1105		return err
1106	}
1107	for k, v := range m {
1108		switch k {
1109		case "properties":
1110			if v != nil {
1111				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1112				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1113				if err != nil {
1114					return err
1115				}
1116				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1117			}
1118		case "name":
1119			if v != nil {
1120				var name string
1121				err = json.Unmarshal(*v, &name)
1122				if err != nil {
1123					return err
1124				}
1125				agfp.Name = &name
1126			}
1127		case "etag":
1128			if v != nil {
1129				var etag string
1130				err = json.Unmarshal(*v, &etag)
1131				if err != nil {
1132					return err
1133				}
1134				agfp.Etag = &etag
1135			}
1136		case "type":
1137			if v != nil {
1138				var typeVar string
1139				err = json.Unmarshal(*v, &typeVar)
1140				if err != nil {
1141					return err
1142				}
1143				agfp.Type = &typeVar
1144			}
1145		case "id":
1146			if v != nil {
1147				var ID string
1148				err = json.Unmarshal(*v, &ID)
1149				if err != nil {
1150					return err
1151				}
1152				agfp.ID = &ID
1153			}
1154		}
1155	}
1156
1157	return nil
1158}
1159
1160// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1161type ApplicationGatewayFrontendPortPropertiesFormat struct {
1162	// Port - Frontend port
1163	Port *int32 `json:"port,omitempty"`
1164	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1165	ProvisioningState *string `json:"provisioningState,omitempty"`
1166}
1167
1168// ApplicationGatewayHTTPListener http listener of an application gateway.
1169type ApplicationGatewayHTTPListener struct {
1170	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1171	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1172	Name *string `json:"name,omitempty"`
1173	// Etag - A unique read-only string that changes whenever the resource is updated.
1174	Etag *string `json:"etag,omitempty"`
1175	// Type - Type of the resource.
1176	Type *string `json:"type,omitempty"`
1177	// ID - Resource ID.
1178	ID *string `json:"id,omitempty"`
1179}
1180
1181// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1182func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1183	objectMap := make(map[string]interface{})
1184	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1185		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1186	}
1187	if aghl.Name != nil {
1188		objectMap["name"] = aghl.Name
1189	}
1190	if aghl.Etag != nil {
1191		objectMap["etag"] = aghl.Etag
1192	}
1193	if aghl.Type != nil {
1194		objectMap["type"] = aghl.Type
1195	}
1196	if aghl.ID != nil {
1197		objectMap["id"] = aghl.ID
1198	}
1199	return json.Marshal(objectMap)
1200}
1201
1202// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1203func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1204	var m map[string]*json.RawMessage
1205	err := json.Unmarshal(body, &m)
1206	if err != nil {
1207		return err
1208	}
1209	for k, v := range m {
1210		switch k {
1211		case "properties":
1212			if v != nil {
1213				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1214				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1215				if err != nil {
1216					return err
1217				}
1218				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1219			}
1220		case "name":
1221			if v != nil {
1222				var name string
1223				err = json.Unmarshal(*v, &name)
1224				if err != nil {
1225					return err
1226				}
1227				aghl.Name = &name
1228			}
1229		case "etag":
1230			if v != nil {
1231				var etag string
1232				err = json.Unmarshal(*v, &etag)
1233				if err != nil {
1234					return err
1235				}
1236				aghl.Etag = &etag
1237			}
1238		case "type":
1239			if v != nil {
1240				var typeVar string
1241				err = json.Unmarshal(*v, &typeVar)
1242				if err != nil {
1243					return err
1244				}
1245				aghl.Type = &typeVar
1246			}
1247		case "id":
1248			if v != nil {
1249				var ID string
1250				err = json.Unmarshal(*v, &ID)
1251				if err != nil {
1252					return err
1253				}
1254				aghl.ID = &ID
1255			}
1256		}
1257	}
1258
1259	return nil
1260}
1261
1262// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1263type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1264	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1265	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1266	// FrontendPort - Frontend port resource of an application gateway.
1267	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1268	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1269	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1270	// HostName - Host name of HTTP listener.
1271	HostName *string `json:"hostName,omitempty"`
1272	// SslCertificate - SSL certificate resource of an application gateway.
1273	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1274	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1275	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1276	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1277	ProvisioningState *string `json:"provisioningState,omitempty"`
1278}
1279
1280// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1281// private IP configuration is allowed.
1282type ApplicationGatewayIPConfiguration struct {
1283	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1284	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1285	Name *string `json:"name,omitempty"`
1286	// Etag - A unique read-only string that changes whenever the resource is updated.
1287	Etag *string `json:"etag,omitempty"`
1288	// Type - Type of the resource.
1289	Type *string `json:"type,omitempty"`
1290	// ID - Resource ID.
1291	ID *string `json:"id,omitempty"`
1292}
1293
1294// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1295func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1296	objectMap := make(map[string]interface{})
1297	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1298		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1299	}
1300	if agic.Name != nil {
1301		objectMap["name"] = agic.Name
1302	}
1303	if agic.Etag != nil {
1304		objectMap["etag"] = agic.Etag
1305	}
1306	if agic.Type != nil {
1307		objectMap["type"] = agic.Type
1308	}
1309	if agic.ID != nil {
1310		objectMap["id"] = agic.ID
1311	}
1312	return json.Marshal(objectMap)
1313}
1314
1315// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1316func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1317	var m map[string]*json.RawMessage
1318	err := json.Unmarshal(body, &m)
1319	if err != nil {
1320		return err
1321	}
1322	for k, v := range m {
1323		switch k {
1324		case "properties":
1325			if v != nil {
1326				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1327				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1328				if err != nil {
1329					return err
1330				}
1331				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1332			}
1333		case "name":
1334			if v != nil {
1335				var name string
1336				err = json.Unmarshal(*v, &name)
1337				if err != nil {
1338					return err
1339				}
1340				agic.Name = &name
1341			}
1342		case "etag":
1343			if v != nil {
1344				var etag string
1345				err = json.Unmarshal(*v, &etag)
1346				if err != nil {
1347					return err
1348				}
1349				agic.Etag = &etag
1350			}
1351		case "type":
1352			if v != nil {
1353				var typeVar string
1354				err = json.Unmarshal(*v, &typeVar)
1355				if err != nil {
1356					return err
1357				}
1358				agic.Type = &typeVar
1359			}
1360		case "id":
1361			if v != nil {
1362				var ID string
1363				err = json.Unmarshal(*v, &ID)
1364				if err != nil {
1365					return err
1366				}
1367				agic.ID = &ID
1368			}
1369		}
1370	}
1371
1372	return nil
1373}
1374
1375// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1376// gateway.
1377type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1378	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1379	Subnet *SubResource `json:"subnet,omitempty"`
1380	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1381	ProvisioningState *string `json:"provisioningState,omitempty"`
1382}
1383
1384// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1385type ApplicationGatewayListResult struct {
1386	autorest.Response `json:"-"`
1387	// Value - List of an application gateways in a resource group.
1388	Value *[]ApplicationGateway `json:"value,omitempty"`
1389	// NextLink - URL to get the next set of results.
1390	NextLink *string `json:"nextLink,omitempty"`
1391}
1392
1393// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1394type ApplicationGatewayListResultIterator struct {
1395	i    int
1396	page ApplicationGatewayListResultPage
1397}
1398
1399// NextWithContext advances to the next value.  If there was an error making
1400// the request the iterator does not advance and the error is returned.
1401func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1402	if tracing.IsEnabled() {
1403		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1404		defer func() {
1405			sc := -1
1406			if iter.Response().Response.Response != nil {
1407				sc = iter.Response().Response.Response.StatusCode
1408			}
1409			tracing.EndSpan(ctx, sc, err)
1410		}()
1411	}
1412	iter.i++
1413	if iter.i < len(iter.page.Values()) {
1414		return nil
1415	}
1416	err = iter.page.NextWithContext(ctx)
1417	if err != nil {
1418		iter.i--
1419		return err
1420	}
1421	iter.i = 0
1422	return nil
1423}
1424
1425// Next advances to the next value.  If there was an error making
1426// the request the iterator does not advance and the error is returned.
1427// Deprecated: Use NextWithContext() instead.
1428func (iter *ApplicationGatewayListResultIterator) Next() error {
1429	return iter.NextWithContext(context.Background())
1430}
1431
1432// NotDone returns true if the enumeration should be started or is not yet complete.
1433func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1434	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1435}
1436
1437// Response returns the raw server response from the last page request.
1438func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1439	return iter.page.Response()
1440}
1441
1442// Value returns the current value or a zero-initialized value if the
1443// iterator has advanced beyond the end of the collection.
1444func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1445	if !iter.page.NotDone() {
1446		return ApplicationGateway{}
1447	}
1448	return iter.page.Values()[iter.i]
1449}
1450
1451// Creates a new instance of the ApplicationGatewayListResultIterator type.
1452func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1453	return ApplicationGatewayListResultIterator{page: page}
1454}
1455
1456// IsEmpty returns true if the ListResult contains no values.
1457func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1458	return aglr.Value == nil || len(*aglr.Value) == 0
1459}
1460
1461// hasNextLink returns true if the NextLink is not empty.
1462func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1463	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1464}
1465
1466// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1467// It returns nil if no more results exist.
1468func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1469	if !aglr.hasNextLink() {
1470		return nil, nil
1471	}
1472	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1473		autorest.AsJSON(),
1474		autorest.AsGet(),
1475		autorest.WithBaseURL(to.String(aglr.NextLink)))
1476}
1477
1478// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1479type ApplicationGatewayListResultPage struct {
1480	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1481	aglr ApplicationGatewayListResult
1482}
1483
1484// NextWithContext advances to the next page of values.  If there was an error making
1485// the request the page does not advance and the error is returned.
1486func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1487	if tracing.IsEnabled() {
1488		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1489		defer func() {
1490			sc := -1
1491			if page.Response().Response.Response != nil {
1492				sc = page.Response().Response.Response.StatusCode
1493			}
1494			tracing.EndSpan(ctx, sc, err)
1495		}()
1496	}
1497	for {
1498		next, err := page.fn(ctx, page.aglr)
1499		if err != nil {
1500			return err
1501		}
1502		page.aglr = next
1503		if !next.hasNextLink() || !next.IsEmpty() {
1504			break
1505		}
1506	}
1507	return nil
1508}
1509
1510// Next advances to the next page of values.  If there was an error making
1511// the request the page does not advance and the error is returned.
1512// Deprecated: Use NextWithContext() instead.
1513func (page *ApplicationGatewayListResultPage) Next() error {
1514	return page.NextWithContext(context.Background())
1515}
1516
1517// NotDone returns true if the page enumeration should be started or is not yet complete.
1518func (page ApplicationGatewayListResultPage) NotDone() bool {
1519	return !page.aglr.IsEmpty()
1520}
1521
1522// Response returns the raw server response from the last page request.
1523func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1524	return page.aglr
1525}
1526
1527// Values returns the slice of values for the current page or nil if there are no values.
1528func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1529	if page.aglr.IsEmpty() {
1530		return nil
1531	}
1532	return *page.aglr.Value
1533}
1534
1535// Creates a new instance of the ApplicationGatewayListResultPage type.
1536func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1537	return ApplicationGatewayListResultPage{
1538		fn:   getNextPage,
1539		aglr: cur,
1540	}
1541}
1542
1543// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1544type ApplicationGatewayPathRule struct {
1545	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1546	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1547	Name *string `json:"name,omitempty"`
1548	// Etag - A unique read-only string that changes whenever the resource is updated.
1549	Etag *string `json:"etag,omitempty"`
1550	// Type - Type of the resource.
1551	Type *string `json:"type,omitempty"`
1552	// ID - Resource ID.
1553	ID *string `json:"id,omitempty"`
1554}
1555
1556// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1557func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1558	objectMap := make(map[string]interface{})
1559	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1560		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1561	}
1562	if agpr.Name != nil {
1563		objectMap["name"] = agpr.Name
1564	}
1565	if agpr.Etag != nil {
1566		objectMap["etag"] = agpr.Etag
1567	}
1568	if agpr.Type != nil {
1569		objectMap["type"] = agpr.Type
1570	}
1571	if agpr.ID != nil {
1572		objectMap["id"] = agpr.ID
1573	}
1574	return json.Marshal(objectMap)
1575}
1576
1577// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1578func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1579	var m map[string]*json.RawMessage
1580	err := json.Unmarshal(body, &m)
1581	if err != nil {
1582		return err
1583	}
1584	for k, v := range m {
1585		switch k {
1586		case "properties":
1587			if v != nil {
1588				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1589				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1590				if err != nil {
1591					return err
1592				}
1593				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1594			}
1595		case "name":
1596			if v != nil {
1597				var name string
1598				err = json.Unmarshal(*v, &name)
1599				if err != nil {
1600					return err
1601				}
1602				agpr.Name = &name
1603			}
1604		case "etag":
1605			if v != nil {
1606				var etag string
1607				err = json.Unmarshal(*v, &etag)
1608				if err != nil {
1609					return err
1610				}
1611				agpr.Etag = &etag
1612			}
1613		case "type":
1614			if v != nil {
1615				var typeVar string
1616				err = json.Unmarshal(*v, &typeVar)
1617				if err != nil {
1618					return err
1619				}
1620				agpr.Type = &typeVar
1621			}
1622		case "id":
1623			if v != nil {
1624				var ID string
1625				err = json.Unmarshal(*v, &ID)
1626				if err != nil {
1627					return err
1628				}
1629				agpr.ID = &ID
1630			}
1631		}
1632	}
1633
1634	return nil
1635}
1636
1637// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1638type ApplicationGatewayPathRulePropertiesFormat struct {
1639	// Paths - Path rules of URL path map.
1640	Paths *[]string `json:"paths,omitempty"`
1641	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1642	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1643	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1644	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1645	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1646	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1647	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1648	ProvisioningState *string `json:"provisioningState,omitempty"`
1649}
1650
1651// ApplicationGatewayProbe probe of the application gateway.
1652type ApplicationGatewayProbe struct {
1653	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1654	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1655	Name *string `json:"name,omitempty"`
1656	// Etag - A unique read-only string that changes whenever the resource is updated.
1657	Etag *string `json:"etag,omitempty"`
1658	// Type - Type of the resource.
1659	Type *string `json:"type,omitempty"`
1660	// ID - Resource ID.
1661	ID *string `json:"id,omitempty"`
1662}
1663
1664// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1665func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1666	objectMap := make(map[string]interface{})
1667	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1668		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1669	}
1670	if agp.Name != nil {
1671		objectMap["name"] = agp.Name
1672	}
1673	if agp.Etag != nil {
1674		objectMap["etag"] = agp.Etag
1675	}
1676	if agp.Type != nil {
1677		objectMap["type"] = agp.Type
1678	}
1679	if agp.ID != nil {
1680		objectMap["id"] = agp.ID
1681	}
1682	return json.Marshal(objectMap)
1683}
1684
1685// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1686func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1687	var m map[string]*json.RawMessage
1688	err := json.Unmarshal(body, &m)
1689	if err != nil {
1690		return err
1691	}
1692	for k, v := range m {
1693		switch k {
1694		case "properties":
1695			if v != nil {
1696				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1697				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1698				if err != nil {
1699					return err
1700				}
1701				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1702			}
1703		case "name":
1704			if v != nil {
1705				var name string
1706				err = json.Unmarshal(*v, &name)
1707				if err != nil {
1708					return err
1709				}
1710				agp.Name = &name
1711			}
1712		case "etag":
1713			if v != nil {
1714				var etag string
1715				err = json.Unmarshal(*v, &etag)
1716				if err != nil {
1717					return err
1718				}
1719				agp.Etag = &etag
1720			}
1721		case "type":
1722			if v != nil {
1723				var typeVar string
1724				err = json.Unmarshal(*v, &typeVar)
1725				if err != nil {
1726					return err
1727				}
1728				agp.Type = &typeVar
1729			}
1730		case "id":
1731			if v != nil {
1732				var ID string
1733				err = json.Unmarshal(*v, &ID)
1734				if err != nil {
1735					return err
1736				}
1737				agp.ID = &ID
1738			}
1739		}
1740	}
1741
1742	return nil
1743}
1744
1745// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1746type ApplicationGatewayProbeHealthResponseMatch struct {
1747	// Body - Body that must be contained in the health response. Default value is empty.
1748	Body *string `json:"body,omitempty"`
1749	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1750	StatusCodes *[]string `json:"statusCodes,omitempty"`
1751}
1752
1753// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1754type ApplicationGatewayProbePropertiesFormat struct {
1755	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1756	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1757	// Host - Host name to send the probe to.
1758	Host *string `json:"host,omitempty"`
1759	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1760	Path *string `json:"path,omitempty"`
1761	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1762	Interval *int32 `json:"interval,omitempty"`
1763	// 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.
1764	Timeout *int32 `json:"timeout,omitempty"`
1765	// 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.
1766	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1767	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1768	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1769	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1770	MinServers *int32 `json:"minServers,omitempty"`
1771	// Match - Criterion for classifying a healthy probe response.
1772	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1773	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1774	ProvisioningState *string `json:"provisioningState,omitempty"`
1775}
1776
1777// ApplicationGatewayPropertiesFormat properties of the application gateway.
1778type ApplicationGatewayPropertiesFormat struct {
1779	// Sku - SKU of the application gateway resource.
1780	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1781	// SslPolicy - SSL policy of the application gateway resource.
1782	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1783	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1784	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1785	// GatewayIPConfigurations - Subnets of application the gateway resource.
1786	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1787	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1788	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1789	// SslCertificates - SSL certificates of the application gateway resource.
1790	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1791	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1792	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1793	// FrontendPorts - Frontend ports of the application gateway resource.
1794	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1795	// Probes - Probes of the application gateway resource.
1796	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1797	// BackendAddressPools - Backend address pool of the application gateway resource.
1798	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1799	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1800	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1801	// HTTPListeners - Http listeners of the application gateway resource.
1802	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1803	// URLPathMaps - URL path map of the application gateway resource.
1804	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1805	// RequestRoutingRules - Request routing rules of the application gateway resource.
1806	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1807	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1808	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1809	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1810	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1811	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1812	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1813	// ResourceGUID - Resource GUID property of the application gateway resource.
1814	ResourceGUID *string `json:"resourceGuid,omitempty"`
1815	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1816	ProvisioningState *string `json:"provisioningState,omitempty"`
1817}
1818
1819// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1820func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1821	objectMap := make(map[string]interface{})
1822	if agpf.Sku != nil {
1823		objectMap["sku"] = agpf.Sku
1824	}
1825	if agpf.SslPolicy != nil {
1826		objectMap["sslPolicy"] = agpf.SslPolicy
1827	}
1828	if agpf.GatewayIPConfigurations != nil {
1829		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1830	}
1831	if agpf.AuthenticationCertificates != nil {
1832		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1833	}
1834	if agpf.SslCertificates != nil {
1835		objectMap["sslCertificates"] = agpf.SslCertificates
1836	}
1837	if agpf.FrontendIPConfigurations != nil {
1838		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1839	}
1840	if agpf.FrontendPorts != nil {
1841		objectMap["frontendPorts"] = agpf.FrontendPorts
1842	}
1843	if agpf.Probes != nil {
1844		objectMap["probes"] = agpf.Probes
1845	}
1846	if agpf.BackendAddressPools != nil {
1847		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1848	}
1849	if agpf.BackendHTTPSettingsCollection != nil {
1850		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1851	}
1852	if agpf.HTTPListeners != nil {
1853		objectMap["httpListeners"] = agpf.HTTPListeners
1854	}
1855	if agpf.URLPathMaps != nil {
1856		objectMap["urlPathMaps"] = agpf.URLPathMaps
1857	}
1858	if agpf.RequestRoutingRules != nil {
1859		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1860	}
1861	if agpf.RedirectConfigurations != nil {
1862		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1863	}
1864	if agpf.WebApplicationFirewallConfiguration != nil {
1865		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1866	}
1867	if agpf.EnableHTTP2 != nil {
1868		objectMap["enableHttp2"] = agpf.EnableHTTP2
1869	}
1870	if agpf.ResourceGUID != nil {
1871		objectMap["resourceGuid"] = agpf.ResourceGUID
1872	}
1873	if agpf.ProvisioningState != nil {
1874		objectMap["provisioningState"] = agpf.ProvisioningState
1875	}
1876	return json.Marshal(objectMap)
1877}
1878
1879// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1880type ApplicationGatewayRedirectConfiguration struct {
1881	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1882	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1883	Name *string `json:"name,omitempty"`
1884	// Etag - A unique read-only string that changes whenever the resource is updated.
1885	Etag *string `json:"etag,omitempty"`
1886	// Type - Type of the resource.
1887	Type *string `json:"type,omitempty"`
1888	// ID - Resource ID.
1889	ID *string `json:"id,omitempty"`
1890}
1891
1892// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1893func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1894	objectMap := make(map[string]interface{})
1895	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1896		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1897	}
1898	if agrc.Name != nil {
1899		objectMap["name"] = agrc.Name
1900	}
1901	if agrc.Etag != nil {
1902		objectMap["etag"] = agrc.Etag
1903	}
1904	if agrc.Type != nil {
1905		objectMap["type"] = agrc.Type
1906	}
1907	if agrc.ID != nil {
1908		objectMap["id"] = agrc.ID
1909	}
1910	return json.Marshal(objectMap)
1911}
1912
1913// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1914func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1915	var m map[string]*json.RawMessage
1916	err := json.Unmarshal(body, &m)
1917	if err != nil {
1918		return err
1919	}
1920	for k, v := range m {
1921		switch k {
1922		case "properties":
1923			if v != nil {
1924				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1925				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1926				if err != nil {
1927					return err
1928				}
1929				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1930			}
1931		case "name":
1932			if v != nil {
1933				var name string
1934				err = json.Unmarshal(*v, &name)
1935				if err != nil {
1936					return err
1937				}
1938				agrc.Name = &name
1939			}
1940		case "etag":
1941			if v != nil {
1942				var etag string
1943				err = json.Unmarshal(*v, &etag)
1944				if err != nil {
1945					return err
1946				}
1947				agrc.Etag = &etag
1948			}
1949		case "type":
1950			if v != nil {
1951				var typeVar string
1952				err = json.Unmarshal(*v, &typeVar)
1953				if err != nil {
1954					return err
1955				}
1956				agrc.Type = &typeVar
1957			}
1958		case "id":
1959			if v != nil {
1960				var ID string
1961				err = json.Unmarshal(*v, &ID)
1962				if err != nil {
1963					return err
1964				}
1965				agrc.ID = &ID
1966			}
1967		}
1968	}
1969
1970	return nil
1971}
1972
1973// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1974// application gateway.
1975type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1976	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1977	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1978	// TargetListener - Reference to a listener to redirect the request to.
1979	TargetListener *SubResource `json:"targetListener,omitempty"`
1980	// TargetURL - Url to redirect the request to.
1981	TargetURL *string `json:"targetUrl,omitempty"`
1982	// IncludePath - Include path in the redirected url.
1983	IncludePath *bool `json:"includePath,omitempty"`
1984	// IncludeQueryString - Include query string in the redirected url.
1985	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1986	// RequestRoutingRules - Request routing specifying redirect configuration.
1987	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1988	// URLPathMaps - Url path maps specifying default redirect configuration.
1989	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
1990	// PathRules - Path rules specifying redirect configuration.
1991	PathRules *[]SubResource `json:"pathRules,omitempty"`
1992}
1993
1994// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
1995type ApplicationGatewayRequestRoutingRule struct {
1996	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
1997	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1998	Name *string `json:"name,omitempty"`
1999	// Etag - A unique read-only string that changes whenever the resource is updated.
2000	Etag *string `json:"etag,omitempty"`
2001	// Type - Type of the resource.
2002	Type *string `json:"type,omitempty"`
2003	// ID - Resource ID.
2004	ID *string `json:"id,omitempty"`
2005}
2006
2007// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2008func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2009	objectMap := make(map[string]interface{})
2010	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2011		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2012	}
2013	if agrrr.Name != nil {
2014		objectMap["name"] = agrrr.Name
2015	}
2016	if agrrr.Etag != nil {
2017		objectMap["etag"] = agrrr.Etag
2018	}
2019	if agrrr.Type != nil {
2020		objectMap["type"] = agrrr.Type
2021	}
2022	if agrrr.ID != nil {
2023		objectMap["id"] = agrrr.ID
2024	}
2025	return json.Marshal(objectMap)
2026}
2027
2028// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2029func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2030	var m map[string]*json.RawMessage
2031	err := json.Unmarshal(body, &m)
2032	if err != nil {
2033		return err
2034	}
2035	for k, v := range m {
2036		switch k {
2037		case "properties":
2038			if v != nil {
2039				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2040				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2041				if err != nil {
2042					return err
2043				}
2044				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2045			}
2046		case "name":
2047			if v != nil {
2048				var name string
2049				err = json.Unmarshal(*v, &name)
2050				if err != nil {
2051					return err
2052				}
2053				agrrr.Name = &name
2054			}
2055		case "etag":
2056			if v != nil {
2057				var etag string
2058				err = json.Unmarshal(*v, &etag)
2059				if err != nil {
2060					return err
2061				}
2062				agrrr.Etag = &etag
2063			}
2064		case "type":
2065			if v != nil {
2066				var typeVar string
2067				err = json.Unmarshal(*v, &typeVar)
2068				if err != nil {
2069					return err
2070				}
2071				agrrr.Type = &typeVar
2072			}
2073		case "id":
2074			if v != nil {
2075				var ID string
2076				err = json.Unmarshal(*v, &ID)
2077				if err != nil {
2078					return err
2079				}
2080				agrrr.ID = &ID
2081			}
2082		}
2083	}
2084
2085	return nil
2086}
2087
2088// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2089// application gateway.
2090type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2091	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2092	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2093	// BackendAddressPool - Backend address pool resource of the application gateway.
2094	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2095	// BackendHTTPSettings - Frontend port resource of the application gateway.
2096	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2097	// HTTPListener - Http listener resource of the application gateway.
2098	HTTPListener *SubResource `json:"httpListener,omitempty"`
2099	// URLPathMap - URL path map resource of the application gateway.
2100	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2101	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2102	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2103	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2104	ProvisioningState *string `json:"provisioningState,omitempty"`
2105}
2106
2107// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2108// long-running operation.
2109type ApplicationGatewaysBackendHealthFuture struct {
2110	azure.FutureAPI
2111	// Result returns the result of the asynchronous operation.
2112	// If the operation has not completed it will return an error.
2113	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2114}
2115
2116// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2117func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2118	var azFuture azure.Future
2119	if err := json.Unmarshal(body, &azFuture); err != nil {
2120		return err
2121	}
2122	future.FutureAPI = &azFuture
2123	future.Result = future.result
2124	return nil
2125}
2126
2127// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2128func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2129	var done bool
2130	done, err = future.DoneWithContext(context.Background(), client)
2131	if err != nil {
2132		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2133		return
2134	}
2135	if !done {
2136		agbh.Response.Response = future.Response()
2137		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2138		return
2139	}
2140	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2141	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2142		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2143		if err != nil {
2144			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2145		}
2146	}
2147	return
2148}
2149
2150// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2151// long-running operation.
2152type ApplicationGatewaysCreateOrUpdateFuture struct {
2153	azure.FutureAPI
2154	// Result returns the result of the asynchronous operation.
2155	// If the operation has not completed it will return an error.
2156	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2157}
2158
2159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2160func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2161	var azFuture azure.Future
2162	if err := json.Unmarshal(body, &azFuture); err != nil {
2163		return err
2164	}
2165	future.FutureAPI = &azFuture
2166	future.Result = future.result
2167	return nil
2168}
2169
2170// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2171func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2172	var done bool
2173	done, err = future.DoneWithContext(context.Background(), client)
2174	if err != nil {
2175		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2176		return
2177	}
2178	if !done {
2179		ag.Response.Response = future.Response()
2180		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2181		return
2182	}
2183	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2184	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2185		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2186		if err != nil {
2187			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2188		}
2189	}
2190	return
2191}
2192
2193// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2194// long-running operation.
2195type ApplicationGatewaysDeleteFuture struct {
2196	azure.FutureAPI
2197	// Result returns the result of the asynchronous operation.
2198	// If the operation has not completed it will return an error.
2199	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2200}
2201
2202// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2203func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2204	var azFuture azure.Future
2205	if err := json.Unmarshal(body, &azFuture); err != nil {
2206		return err
2207	}
2208	future.FutureAPI = &azFuture
2209	future.Result = future.result
2210	return nil
2211}
2212
2213// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2214func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2215	var done bool
2216	done, err = future.DoneWithContext(context.Background(), client)
2217	if err != nil {
2218		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2219		return
2220	}
2221	if !done {
2222		ar.Response = future.Response()
2223		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2224		return
2225	}
2226	ar.Response = future.Response()
2227	return
2228}
2229
2230// ApplicationGatewaySku SKU of an application gateway
2231type ApplicationGatewaySku struct {
2232	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2233	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2234	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2235	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2236	// Capacity - Capacity (instance count) of an application gateway.
2237	Capacity *int32 `json:"capacity,omitempty"`
2238}
2239
2240// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2241type ApplicationGatewaySslCertificate struct {
2242	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2243	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2244	Name *string `json:"name,omitempty"`
2245	// Etag - A unique read-only string that changes whenever the resource is updated.
2246	Etag *string `json:"etag,omitempty"`
2247	// Type - Type of the resource.
2248	Type *string `json:"type,omitempty"`
2249	// ID - Resource ID.
2250	ID *string `json:"id,omitempty"`
2251}
2252
2253// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2254func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2255	objectMap := make(map[string]interface{})
2256	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2257		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2258	}
2259	if agsc.Name != nil {
2260		objectMap["name"] = agsc.Name
2261	}
2262	if agsc.Etag != nil {
2263		objectMap["etag"] = agsc.Etag
2264	}
2265	if agsc.Type != nil {
2266		objectMap["type"] = agsc.Type
2267	}
2268	if agsc.ID != nil {
2269		objectMap["id"] = agsc.ID
2270	}
2271	return json.Marshal(objectMap)
2272}
2273
2274// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2275func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2276	var m map[string]*json.RawMessage
2277	err := json.Unmarshal(body, &m)
2278	if err != nil {
2279		return err
2280	}
2281	for k, v := range m {
2282		switch k {
2283		case "properties":
2284			if v != nil {
2285				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2286				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2287				if err != nil {
2288					return err
2289				}
2290				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2291			}
2292		case "name":
2293			if v != nil {
2294				var name string
2295				err = json.Unmarshal(*v, &name)
2296				if err != nil {
2297					return err
2298				}
2299				agsc.Name = &name
2300			}
2301		case "etag":
2302			if v != nil {
2303				var etag string
2304				err = json.Unmarshal(*v, &etag)
2305				if err != nil {
2306					return err
2307				}
2308				agsc.Etag = &etag
2309			}
2310		case "type":
2311			if v != nil {
2312				var typeVar string
2313				err = json.Unmarshal(*v, &typeVar)
2314				if err != nil {
2315					return err
2316				}
2317				agsc.Type = &typeVar
2318			}
2319		case "id":
2320			if v != nil {
2321				var ID string
2322				err = json.Unmarshal(*v, &ID)
2323				if err != nil {
2324					return err
2325				}
2326				agsc.ID = &ID
2327			}
2328		}
2329	}
2330
2331	return nil
2332}
2333
2334// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2335// gateway.
2336type ApplicationGatewaySslCertificatePropertiesFormat struct {
2337	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2338	Data *string `json:"data,omitempty"`
2339	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2340	Password *string `json:"password,omitempty"`
2341	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2342	PublicCertData *string `json:"publicCertData,omitempty"`
2343	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2344	ProvisioningState *string `json:"provisioningState,omitempty"`
2345}
2346
2347// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2348type ApplicationGatewaySslPolicy struct {
2349	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2350	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2351	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2352	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2353	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2354	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2355	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2356	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2357	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2358	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2359}
2360
2361// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2362type ApplicationGatewaySslPredefinedPolicy struct {
2363	autorest.Response `json:"-"`
2364	// Name - Name of Ssl predefined policy.
2365	Name                                                   *string `json:"name,omitempty"`
2366	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2367	// ID - Resource ID.
2368	ID *string `json:"id,omitempty"`
2369}
2370
2371// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2372func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2373	objectMap := make(map[string]interface{})
2374	if agspp.Name != nil {
2375		objectMap["name"] = agspp.Name
2376	}
2377	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2378		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2379	}
2380	if agspp.ID != nil {
2381		objectMap["id"] = agspp.ID
2382	}
2383	return json.Marshal(objectMap)
2384}
2385
2386// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2387func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2388	var m map[string]*json.RawMessage
2389	err := json.Unmarshal(body, &m)
2390	if err != nil {
2391		return err
2392	}
2393	for k, v := range m {
2394		switch k {
2395		case "name":
2396			if v != nil {
2397				var name string
2398				err = json.Unmarshal(*v, &name)
2399				if err != nil {
2400					return err
2401				}
2402				agspp.Name = &name
2403			}
2404		case "properties":
2405			if v != nil {
2406				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2407				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2408				if err != nil {
2409					return err
2410				}
2411				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2412			}
2413		case "id":
2414			if v != nil {
2415				var ID string
2416				err = json.Unmarshal(*v, &ID)
2417				if err != nil {
2418					return err
2419				}
2420				agspp.ID = &ID
2421			}
2422		}
2423	}
2424
2425	return nil
2426}
2427
2428// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2429// ApplicationGatewaySslPredefinedPolicy
2430type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2431	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2432	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2433	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2434	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2435}
2436
2437// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2438// long-running operation.
2439type ApplicationGatewaysStartFuture struct {
2440	azure.FutureAPI
2441	// Result returns the result of the asynchronous operation.
2442	// If the operation has not completed it will return an error.
2443	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2444}
2445
2446// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2447func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2448	var azFuture azure.Future
2449	if err := json.Unmarshal(body, &azFuture); err != nil {
2450		return err
2451	}
2452	future.FutureAPI = &azFuture
2453	future.Result = future.result
2454	return nil
2455}
2456
2457// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2458func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2459	var done bool
2460	done, err = future.DoneWithContext(context.Background(), client)
2461	if err != nil {
2462		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2463		return
2464	}
2465	if !done {
2466		ar.Response = future.Response()
2467		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2468		return
2469	}
2470	ar.Response = future.Response()
2471	return
2472}
2473
2474// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2475// operation.
2476type ApplicationGatewaysStopFuture struct {
2477	azure.FutureAPI
2478	// Result returns the result of the asynchronous operation.
2479	// If the operation has not completed it will return an error.
2480	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2481}
2482
2483// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2484func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2485	var azFuture azure.Future
2486	if err := json.Unmarshal(body, &azFuture); err != nil {
2487		return err
2488	}
2489	future.FutureAPI = &azFuture
2490	future.Result = future.result
2491	return nil
2492}
2493
2494// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2495func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2496	var done bool
2497	done, err = future.DoneWithContext(context.Background(), client)
2498	if err != nil {
2499		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2500		return
2501	}
2502	if !done {
2503		ar.Response = future.Response()
2504		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2505		return
2506	}
2507	ar.Response = future.Response()
2508	return
2509}
2510
2511// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2512// long-running operation.
2513type ApplicationGatewaysUpdateTagsFuture struct {
2514	azure.FutureAPI
2515	// Result returns the result of the asynchronous operation.
2516	// If the operation has not completed it will return an error.
2517	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2518}
2519
2520// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2521func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2522	var azFuture azure.Future
2523	if err := json.Unmarshal(body, &azFuture); err != nil {
2524		return err
2525	}
2526	future.FutureAPI = &azFuture
2527	future.Result = future.result
2528	return nil
2529}
2530
2531// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2532func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2533	var done bool
2534	done, err = future.DoneWithContext(context.Background(), client)
2535	if err != nil {
2536		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2537		return
2538	}
2539	if !done {
2540		ag.Response.Response = future.Response()
2541		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2542		return
2543	}
2544	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2545	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2546		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2547		if err != nil {
2548			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2549		}
2550	}
2551	return
2552}
2553
2554// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2555// PathBasedRouting.
2556type ApplicationGatewayURLPathMap struct {
2557	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2558	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2559	Name *string `json:"name,omitempty"`
2560	// Etag - A unique read-only string that changes whenever the resource is updated.
2561	Etag *string `json:"etag,omitempty"`
2562	// Type - Type of the resource.
2563	Type *string `json:"type,omitempty"`
2564	// ID - Resource ID.
2565	ID *string `json:"id,omitempty"`
2566}
2567
2568// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2569func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2570	objectMap := make(map[string]interface{})
2571	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2572		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2573	}
2574	if agupm.Name != nil {
2575		objectMap["name"] = agupm.Name
2576	}
2577	if agupm.Etag != nil {
2578		objectMap["etag"] = agupm.Etag
2579	}
2580	if agupm.Type != nil {
2581		objectMap["type"] = agupm.Type
2582	}
2583	if agupm.ID != nil {
2584		objectMap["id"] = agupm.ID
2585	}
2586	return json.Marshal(objectMap)
2587}
2588
2589// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2590func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2591	var m map[string]*json.RawMessage
2592	err := json.Unmarshal(body, &m)
2593	if err != nil {
2594		return err
2595	}
2596	for k, v := range m {
2597		switch k {
2598		case "properties":
2599			if v != nil {
2600				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2601				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2602				if err != nil {
2603					return err
2604				}
2605				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2606			}
2607		case "name":
2608			if v != nil {
2609				var name string
2610				err = json.Unmarshal(*v, &name)
2611				if err != nil {
2612					return err
2613				}
2614				agupm.Name = &name
2615			}
2616		case "etag":
2617			if v != nil {
2618				var etag string
2619				err = json.Unmarshal(*v, &etag)
2620				if err != nil {
2621					return err
2622				}
2623				agupm.Etag = &etag
2624			}
2625		case "type":
2626			if v != nil {
2627				var typeVar string
2628				err = json.Unmarshal(*v, &typeVar)
2629				if err != nil {
2630					return err
2631				}
2632				agupm.Type = &typeVar
2633			}
2634		case "id":
2635			if v != nil {
2636				var ID string
2637				err = json.Unmarshal(*v, &ID)
2638				if err != nil {
2639					return err
2640				}
2641				agupm.ID = &ID
2642			}
2643		}
2644	}
2645
2646	return nil
2647}
2648
2649// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2650type ApplicationGatewayURLPathMapPropertiesFormat struct {
2651	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2652	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2653	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2654	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2655	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2656	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2657	// PathRules - Path rule of URL path map resource.
2658	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2659	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2660	ProvisioningState *string `json:"provisioningState,omitempty"`
2661}
2662
2663// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2664// configuration.
2665type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2666	// Enabled - Whether the web application firewall is enabled or not.
2667	Enabled *bool `json:"enabled,omitempty"`
2668	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2669	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2670	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2671	RuleSetType *string `json:"ruleSetType,omitempty"`
2672	// RuleSetVersion - The version of the rule set type.
2673	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2674	// DisabledRuleGroups - The disabled rule groups.
2675	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2676	// RequestBodyCheck - Whether allow WAF to check request Body.
2677	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2678	// MaxRequestBodySize - Maximum request body size for WAF.
2679	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2680}
2681
2682// ApplicationSecurityGroup an application security group in a resource group.
2683type ApplicationSecurityGroup struct {
2684	autorest.Response `json:"-"`
2685	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2686	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2687	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2688	Etag *string `json:"etag,omitempty"`
2689	// ID - Resource ID.
2690	ID *string `json:"id,omitempty"`
2691	// Name - READ-ONLY; Resource name.
2692	Name *string `json:"name,omitempty"`
2693	// Type - READ-ONLY; Resource type.
2694	Type *string `json:"type,omitempty"`
2695	// Location - Resource location.
2696	Location *string `json:"location,omitempty"`
2697	// Tags - Resource tags.
2698	Tags map[string]*string `json:"tags"`
2699}
2700
2701// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2702func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2703	objectMap := make(map[string]interface{})
2704	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2705		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2706	}
2707	if asg.ID != nil {
2708		objectMap["id"] = asg.ID
2709	}
2710	if asg.Location != nil {
2711		objectMap["location"] = asg.Location
2712	}
2713	if asg.Tags != nil {
2714		objectMap["tags"] = asg.Tags
2715	}
2716	return json.Marshal(objectMap)
2717}
2718
2719// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2720func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2721	var m map[string]*json.RawMessage
2722	err := json.Unmarshal(body, &m)
2723	if err != nil {
2724		return err
2725	}
2726	for k, v := range m {
2727		switch k {
2728		case "properties":
2729			if v != nil {
2730				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2731				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2732				if err != nil {
2733					return err
2734				}
2735				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2736			}
2737		case "etag":
2738			if v != nil {
2739				var etag string
2740				err = json.Unmarshal(*v, &etag)
2741				if err != nil {
2742					return err
2743				}
2744				asg.Etag = &etag
2745			}
2746		case "id":
2747			if v != nil {
2748				var ID string
2749				err = json.Unmarshal(*v, &ID)
2750				if err != nil {
2751					return err
2752				}
2753				asg.ID = &ID
2754			}
2755		case "name":
2756			if v != nil {
2757				var name string
2758				err = json.Unmarshal(*v, &name)
2759				if err != nil {
2760					return err
2761				}
2762				asg.Name = &name
2763			}
2764		case "type":
2765			if v != nil {
2766				var typeVar string
2767				err = json.Unmarshal(*v, &typeVar)
2768				if err != nil {
2769					return err
2770				}
2771				asg.Type = &typeVar
2772			}
2773		case "location":
2774			if v != nil {
2775				var location string
2776				err = json.Unmarshal(*v, &location)
2777				if err != nil {
2778					return err
2779				}
2780				asg.Location = &location
2781			}
2782		case "tags":
2783			if v != nil {
2784				var tags map[string]*string
2785				err = json.Unmarshal(*v, &tags)
2786				if err != nil {
2787					return err
2788				}
2789				asg.Tags = tags
2790			}
2791		}
2792	}
2793
2794	return nil
2795}
2796
2797// ApplicationSecurityGroupListResult a list of application security groups.
2798type ApplicationSecurityGroupListResult struct {
2799	autorest.Response `json:"-"`
2800	// Value - A list of application security groups.
2801	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2802	// NextLink - READ-ONLY; The URL to get the next set of results.
2803	NextLink *string `json:"nextLink,omitempty"`
2804}
2805
2806// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2807func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2808	objectMap := make(map[string]interface{})
2809	if asglr.Value != nil {
2810		objectMap["value"] = asglr.Value
2811	}
2812	return json.Marshal(objectMap)
2813}
2814
2815// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2816// ApplicationSecurityGroup values.
2817type ApplicationSecurityGroupListResultIterator struct {
2818	i    int
2819	page ApplicationSecurityGroupListResultPage
2820}
2821
2822// NextWithContext advances to the next value.  If there was an error making
2823// the request the iterator does not advance and the error is returned.
2824func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2825	if tracing.IsEnabled() {
2826		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2827		defer func() {
2828			sc := -1
2829			if iter.Response().Response.Response != nil {
2830				sc = iter.Response().Response.Response.StatusCode
2831			}
2832			tracing.EndSpan(ctx, sc, err)
2833		}()
2834	}
2835	iter.i++
2836	if iter.i < len(iter.page.Values()) {
2837		return nil
2838	}
2839	err = iter.page.NextWithContext(ctx)
2840	if err != nil {
2841		iter.i--
2842		return err
2843	}
2844	iter.i = 0
2845	return nil
2846}
2847
2848// Next advances to the next value.  If there was an error making
2849// the request the iterator does not advance and the error is returned.
2850// Deprecated: Use NextWithContext() instead.
2851func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2852	return iter.NextWithContext(context.Background())
2853}
2854
2855// NotDone returns true if the enumeration should be started or is not yet complete.
2856func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2858}
2859
2860// Response returns the raw server response from the last page request.
2861func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2862	return iter.page.Response()
2863}
2864
2865// Value returns the current value or a zero-initialized value if the
2866// iterator has advanced beyond the end of the collection.
2867func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2868	if !iter.page.NotDone() {
2869		return ApplicationSecurityGroup{}
2870	}
2871	return iter.page.Values()[iter.i]
2872}
2873
2874// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2875func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2876	return ApplicationSecurityGroupListResultIterator{page: page}
2877}
2878
2879// IsEmpty returns true if the ListResult contains no values.
2880func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2881	return asglr.Value == nil || len(*asglr.Value) == 0
2882}
2883
2884// hasNextLink returns true if the NextLink is not empty.
2885func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2886	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2887}
2888
2889// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2890// It returns nil if no more results exist.
2891func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2892	if !asglr.hasNextLink() {
2893		return nil, nil
2894	}
2895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2896		autorest.AsJSON(),
2897		autorest.AsGet(),
2898		autorest.WithBaseURL(to.String(asglr.NextLink)))
2899}
2900
2901// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2902type ApplicationSecurityGroupListResultPage struct {
2903	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2904	asglr ApplicationSecurityGroupListResult
2905}
2906
2907// NextWithContext advances to the next page of values.  If there was an error making
2908// the request the page does not advance and the error is returned.
2909func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2910	if tracing.IsEnabled() {
2911		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2912		defer func() {
2913			sc := -1
2914			if page.Response().Response.Response != nil {
2915				sc = page.Response().Response.Response.StatusCode
2916			}
2917			tracing.EndSpan(ctx, sc, err)
2918		}()
2919	}
2920	for {
2921		next, err := page.fn(ctx, page.asglr)
2922		if err != nil {
2923			return err
2924		}
2925		page.asglr = next
2926		if !next.hasNextLink() || !next.IsEmpty() {
2927			break
2928		}
2929	}
2930	return nil
2931}
2932
2933// Next advances to the next page of values.  If there was an error making
2934// the request the page does not advance and the error is returned.
2935// Deprecated: Use NextWithContext() instead.
2936func (page *ApplicationSecurityGroupListResultPage) Next() error {
2937	return page.NextWithContext(context.Background())
2938}
2939
2940// NotDone returns true if the page enumeration should be started or is not yet complete.
2941func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2942	return !page.asglr.IsEmpty()
2943}
2944
2945// Response returns the raw server response from the last page request.
2946func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2947	return page.asglr
2948}
2949
2950// Values returns the slice of values for the current page or nil if there are no values.
2951func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2952	if page.asglr.IsEmpty() {
2953		return nil
2954	}
2955	return *page.asglr.Value
2956}
2957
2958// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2959func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2960	return ApplicationSecurityGroupListResultPage{
2961		fn:    getNextPage,
2962		asglr: cur,
2963	}
2964}
2965
2966// ApplicationSecurityGroupPropertiesFormat application security group properties.
2967type ApplicationSecurityGroupPropertiesFormat struct {
2968	// 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.
2969	ResourceGUID *string `json:"resourceGuid,omitempty"`
2970	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2971	ProvisioningState *string `json:"provisioningState,omitempty"`
2972}
2973
2974// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
2975func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
2976	objectMap := make(map[string]interface{})
2977	return json.Marshal(objectMap)
2978}
2979
2980// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2981// of a long-running operation.
2982type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2983	azure.FutureAPI
2984	// Result returns the result of the asynchronous operation.
2985	// If the operation has not completed it will return an error.
2986	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2987}
2988
2989// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2990func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2991	var azFuture azure.Future
2992	if err := json.Unmarshal(body, &azFuture); err != nil {
2993		return err
2994	}
2995	future.FutureAPI = &azFuture
2996	future.Result = future.result
2997	return nil
2998}
2999
3000// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3001func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3002	var done bool
3003	done, err = future.DoneWithContext(context.Background(), client)
3004	if err != nil {
3005		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3006		return
3007	}
3008	if !done {
3009		asg.Response.Response = future.Response()
3010		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3011		return
3012	}
3013	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3014	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3015		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3016		if err != nil {
3017			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3018		}
3019	}
3020	return
3021}
3022
3023// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3024// long-running operation.
3025type ApplicationSecurityGroupsDeleteFuture struct {
3026	azure.FutureAPI
3027	// Result returns the result of the asynchronous operation.
3028	// If the operation has not completed it will return an error.
3029	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3030}
3031
3032// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3033func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3034	var azFuture azure.Future
3035	if err := json.Unmarshal(body, &azFuture); err != nil {
3036		return err
3037	}
3038	future.FutureAPI = &azFuture
3039	future.Result = future.result
3040	return nil
3041}
3042
3043// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3044func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3045	var done bool
3046	done, err = future.DoneWithContext(context.Background(), client)
3047	if err != nil {
3048		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3049		return
3050	}
3051	if !done {
3052		ar.Response = future.Response()
3053		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3054		return
3055	}
3056	ar.Response = future.Response()
3057	return
3058}
3059
3060// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3061// that belongs to an ExpressRouteCircuit.
3062type AuthorizationListResult struct {
3063	autorest.Response `json:"-"`
3064	// Value - The authorizations in an ExpressRoute Circuit.
3065	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3066	// NextLink - The URL to get the next set of results.
3067	NextLink *string `json:"nextLink,omitempty"`
3068}
3069
3070// AuthorizationListResultIterator provides access to a complete listing of
3071// ExpressRouteCircuitAuthorization values.
3072type AuthorizationListResultIterator struct {
3073	i    int
3074	page AuthorizationListResultPage
3075}
3076
3077// NextWithContext advances to the next value.  If there was an error making
3078// the request the iterator does not advance and the error is returned.
3079func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3080	if tracing.IsEnabled() {
3081		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3082		defer func() {
3083			sc := -1
3084			if iter.Response().Response.Response != nil {
3085				sc = iter.Response().Response.Response.StatusCode
3086			}
3087			tracing.EndSpan(ctx, sc, err)
3088		}()
3089	}
3090	iter.i++
3091	if iter.i < len(iter.page.Values()) {
3092		return nil
3093	}
3094	err = iter.page.NextWithContext(ctx)
3095	if err != nil {
3096		iter.i--
3097		return err
3098	}
3099	iter.i = 0
3100	return nil
3101}
3102
3103// Next advances to the next value.  If there was an error making
3104// the request the iterator does not advance and the error is returned.
3105// Deprecated: Use NextWithContext() instead.
3106func (iter *AuthorizationListResultIterator) Next() error {
3107	return iter.NextWithContext(context.Background())
3108}
3109
3110// NotDone returns true if the enumeration should be started or is not yet complete.
3111func (iter AuthorizationListResultIterator) NotDone() bool {
3112	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3113}
3114
3115// Response returns the raw server response from the last page request.
3116func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3117	return iter.page.Response()
3118}
3119
3120// Value returns the current value or a zero-initialized value if the
3121// iterator has advanced beyond the end of the collection.
3122func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3123	if !iter.page.NotDone() {
3124		return ExpressRouteCircuitAuthorization{}
3125	}
3126	return iter.page.Values()[iter.i]
3127}
3128
3129// Creates a new instance of the AuthorizationListResultIterator type.
3130func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3131	return AuthorizationListResultIterator{page: page}
3132}
3133
3134// IsEmpty returns true if the ListResult contains no values.
3135func (alr AuthorizationListResult) IsEmpty() bool {
3136	return alr.Value == nil || len(*alr.Value) == 0
3137}
3138
3139// hasNextLink returns true if the NextLink is not empty.
3140func (alr AuthorizationListResult) hasNextLink() bool {
3141	return alr.NextLink != nil && len(*alr.NextLink) != 0
3142}
3143
3144// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3145// It returns nil if no more results exist.
3146func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3147	if !alr.hasNextLink() {
3148		return nil, nil
3149	}
3150	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3151		autorest.AsJSON(),
3152		autorest.AsGet(),
3153		autorest.WithBaseURL(to.String(alr.NextLink)))
3154}
3155
3156// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3157type AuthorizationListResultPage struct {
3158	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3159	alr AuthorizationListResult
3160}
3161
3162// NextWithContext advances to the next page of values.  If there was an error making
3163// the request the page does not advance and the error is returned.
3164func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3165	if tracing.IsEnabled() {
3166		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3167		defer func() {
3168			sc := -1
3169			if page.Response().Response.Response != nil {
3170				sc = page.Response().Response.Response.StatusCode
3171			}
3172			tracing.EndSpan(ctx, sc, err)
3173		}()
3174	}
3175	for {
3176		next, err := page.fn(ctx, page.alr)
3177		if err != nil {
3178			return err
3179		}
3180		page.alr = next
3181		if !next.hasNextLink() || !next.IsEmpty() {
3182			break
3183		}
3184	}
3185	return nil
3186}
3187
3188// Next advances to the next page of values.  If there was an error making
3189// the request the page does not advance and the error is returned.
3190// Deprecated: Use NextWithContext() instead.
3191func (page *AuthorizationListResultPage) Next() error {
3192	return page.NextWithContext(context.Background())
3193}
3194
3195// NotDone returns true if the page enumeration should be started or is not yet complete.
3196func (page AuthorizationListResultPage) NotDone() bool {
3197	return !page.alr.IsEmpty()
3198}
3199
3200// Response returns the raw server response from the last page request.
3201func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3202	return page.alr
3203}
3204
3205// Values returns the slice of values for the current page or nil if there are no values.
3206func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3207	if page.alr.IsEmpty() {
3208		return nil
3209	}
3210	return *page.alr.Value
3211}
3212
3213// Creates a new instance of the AuthorizationListResultPage type.
3214func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3215	return AuthorizationListResultPage{
3216		fn:  getNextPage,
3217		alr: cur,
3218	}
3219}
3220
3221// AuthorizationPropertiesFormat ...
3222type AuthorizationPropertiesFormat struct {
3223	// AuthorizationKey - The authorization key.
3224	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3225	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3226	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3227	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3228	ProvisioningState *string `json:"provisioningState,omitempty"`
3229}
3230
3231// Availability availability of the metric.
3232type Availability struct {
3233	// TimeGrain - The time grain of the availability.
3234	TimeGrain *string `json:"timeGrain,omitempty"`
3235	// Retention - The retention of the availability.
3236	Retention *string `json:"retention,omitempty"`
3237	// BlobDuration - Duration of the availability blob.
3238	BlobDuration *string `json:"blobDuration,omitempty"`
3239}
3240
3241// AvailableProvidersList list of available countries with details.
3242type AvailableProvidersList struct {
3243	autorest.Response `json:"-"`
3244	// Countries - List of available countries.
3245	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3246}
3247
3248// AvailableProvidersListCity city or town details.
3249type AvailableProvidersListCity struct {
3250	// CityName - The city or town name.
3251	CityName *string `json:"cityName,omitempty"`
3252	// Providers - A list of Internet service providers.
3253	Providers *[]string `json:"providers,omitempty"`
3254}
3255
3256// AvailableProvidersListCountry country details.
3257type AvailableProvidersListCountry struct {
3258	// CountryName - The country name.
3259	CountryName *string `json:"countryName,omitempty"`
3260	// Providers - A list of Internet service providers.
3261	Providers *[]string `json:"providers,omitempty"`
3262	// States - List of available states in the country.
3263	States *[]AvailableProvidersListState `json:"states,omitempty"`
3264}
3265
3266// AvailableProvidersListParameters constraints that determine the list of available Internet service
3267// providers.
3268type AvailableProvidersListParameters struct {
3269	// AzureLocations - A list of Azure regions.
3270	AzureLocations *[]string `json:"azureLocations,omitempty"`
3271	// Country - The country for available providers list.
3272	Country *string `json:"country,omitempty"`
3273	// State - The state for available providers list.
3274	State *string `json:"state,omitempty"`
3275	// City - The city or town for available providers list.
3276	City *string `json:"city,omitempty"`
3277}
3278
3279// AvailableProvidersListState state details.
3280type AvailableProvidersListState struct {
3281	// StateName - The state name.
3282	StateName *string `json:"stateName,omitempty"`
3283	// Providers - A list of Internet service providers.
3284	Providers *[]string `json:"providers,omitempty"`
3285	// Cities - List of available cities or towns in the state.
3286	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3287}
3288
3289// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3290// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3291// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3292// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3293// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3294// and error information regarding the failure.
3295type AzureAsyncOperationResult struct {
3296	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3297	Status OperationStatus `json:"status,omitempty"`
3298	Error  *Error          `json:"error,omitempty"`
3299}
3300
3301// AzureReachabilityReport azure reachability report details.
3302type AzureReachabilityReport struct {
3303	autorest.Response `json:"-"`
3304	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3305	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3306	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3307	// ReachabilityReport - List of Azure reachability report items.
3308	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3309}
3310
3311// AzureReachabilityReportItem azure reachability report details for a given provider location.
3312type AzureReachabilityReportItem struct {
3313	// Provider - The Internet service provider.
3314	Provider *string `json:"provider,omitempty"`
3315	// AzureLocation - The Azure region.
3316	AzureLocation *string `json:"azureLocation,omitempty"`
3317	// Latencies - List of latency details for each of the time series.
3318	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3319}
3320
3321// AzureReachabilityReportLatencyInfo details on latency for a time series.
3322type AzureReachabilityReportLatencyInfo struct {
3323	// TimeStamp - The time stamp.
3324	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3325	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3326	Score *int32 `json:"score,omitempty"`
3327}
3328
3329// AzureReachabilityReportLocation parameters that define a geographic location.
3330type AzureReachabilityReportLocation struct {
3331	// Country - The name of the country.
3332	Country *string `json:"country,omitempty"`
3333	// State - The name of the state.
3334	State *string `json:"state,omitempty"`
3335	// City - The name of the city or town.
3336	City *string `json:"city,omitempty"`
3337}
3338
3339// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3340type AzureReachabilityReportParameters struct {
3341	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3342	// Providers - List of Internet service providers.
3343	Providers *[]string `json:"providers,omitempty"`
3344	// AzureLocations - Optional Azure regions to scope the query to.
3345	AzureLocations *[]string `json:"azureLocations,omitempty"`
3346	// StartTime - The start time for the Azure reachability report.
3347	StartTime *date.Time `json:"startTime,omitempty"`
3348	// EndTime - The end time for the Azure reachability report.
3349	EndTime *date.Time `json:"endTime,omitempty"`
3350}
3351
3352// BackendAddressPool pool of backend IP addresses.
3353type BackendAddressPool struct {
3354	autorest.Response `json:"-"`
3355	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3356	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3357	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3358	Name *string `json:"name,omitempty"`
3359	// Etag - A unique read-only string that changes whenever the resource is updated.
3360	Etag *string `json:"etag,omitempty"`
3361	// ID - Resource ID.
3362	ID *string `json:"id,omitempty"`
3363}
3364
3365// MarshalJSON is the custom marshaler for BackendAddressPool.
3366func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3367	objectMap := make(map[string]interface{})
3368	if bap.BackendAddressPoolPropertiesFormat != nil {
3369		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3370	}
3371	if bap.Name != nil {
3372		objectMap["name"] = bap.Name
3373	}
3374	if bap.Etag != nil {
3375		objectMap["etag"] = bap.Etag
3376	}
3377	if bap.ID != nil {
3378		objectMap["id"] = bap.ID
3379	}
3380	return json.Marshal(objectMap)
3381}
3382
3383// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3384func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3385	var m map[string]*json.RawMessage
3386	err := json.Unmarshal(body, &m)
3387	if err != nil {
3388		return err
3389	}
3390	for k, v := range m {
3391		switch k {
3392		case "properties":
3393			if v != nil {
3394				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3395				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3396				if err != nil {
3397					return err
3398				}
3399				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3400			}
3401		case "name":
3402			if v != nil {
3403				var name string
3404				err = json.Unmarshal(*v, &name)
3405				if err != nil {
3406					return err
3407				}
3408				bap.Name = &name
3409			}
3410		case "etag":
3411			if v != nil {
3412				var etag string
3413				err = json.Unmarshal(*v, &etag)
3414				if err != nil {
3415					return err
3416				}
3417				bap.Etag = &etag
3418			}
3419		case "id":
3420			if v != nil {
3421				var ID string
3422				err = json.Unmarshal(*v, &ID)
3423				if err != nil {
3424					return err
3425				}
3426				bap.ID = &ID
3427			}
3428		}
3429	}
3430
3431	return nil
3432}
3433
3434// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3435type BackendAddressPoolPropertiesFormat struct {
3436	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3437	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3438	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3439	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3440	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3441	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3442	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3443	ProvisioningState *string `json:"provisioningState,omitempty"`
3444}
3445
3446// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3447func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3448	objectMap := make(map[string]interface{})
3449	if bappf.ProvisioningState != nil {
3450		objectMap["provisioningState"] = bappf.ProvisioningState
3451	}
3452	return json.Marshal(objectMap)
3453}
3454
3455// BGPCommunity contains bgp community information offered in Service Community resources.
3456type BGPCommunity struct {
3457	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3458	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3459	// CommunityName - The name of the bgp community. e.g. Skype.
3460	CommunityName *string `json:"communityName,omitempty"`
3461	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3462	CommunityValue *string `json:"communityValue,omitempty"`
3463	// CommunityPrefixes - The prefixes that the bgp community contains.
3464	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3465	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3466	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3467	// ServiceGroup - The service group of the bgp community contains.
3468	ServiceGroup *string `json:"serviceGroup,omitempty"`
3469}
3470
3471// BgpPeerStatus BGP peer status details
3472type BgpPeerStatus struct {
3473	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3474	LocalAddress *string `json:"localAddress,omitempty"`
3475	// Neighbor - READ-ONLY; The remote BGP peer
3476	Neighbor *string `json:"neighbor,omitempty"`
3477	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3478	Asn *int32 `json:"asn,omitempty"`
3479	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3480	State BgpPeerState `json:"state,omitempty"`
3481	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3482	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3483	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3484	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3485	// MessagesSent - READ-ONLY; The number of BGP messages sent
3486	MessagesSent *int64 `json:"messagesSent,omitempty"`
3487	// MessagesReceived - READ-ONLY; The number of BGP messages received
3488	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3489}
3490
3491// MarshalJSON is the custom marshaler for BgpPeerStatus.
3492func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
3493	objectMap := make(map[string]interface{})
3494	return json.Marshal(objectMap)
3495}
3496
3497// BgpPeerStatusListResult response for list BGP peer status API service call
3498type BgpPeerStatusListResult struct {
3499	autorest.Response `json:"-"`
3500	// Value - List of BGP peers
3501	Value *[]BgpPeerStatus `json:"value,omitempty"`
3502}
3503
3504// BgpServiceCommunity service Community Properties.
3505type BgpServiceCommunity struct {
3506	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3507	// ID - Resource ID.
3508	ID *string `json:"id,omitempty"`
3509	// Name - READ-ONLY; Resource name.
3510	Name *string `json:"name,omitempty"`
3511	// Type - READ-ONLY; Resource type.
3512	Type *string `json:"type,omitempty"`
3513	// Location - Resource location.
3514	Location *string `json:"location,omitempty"`
3515	// Tags - Resource tags.
3516	Tags map[string]*string `json:"tags"`
3517}
3518
3519// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3520func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3521	objectMap := make(map[string]interface{})
3522	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3523		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3524	}
3525	if bsc.ID != nil {
3526		objectMap["id"] = bsc.ID
3527	}
3528	if bsc.Location != nil {
3529		objectMap["location"] = bsc.Location
3530	}
3531	if bsc.Tags != nil {
3532		objectMap["tags"] = bsc.Tags
3533	}
3534	return json.Marshal(objectMap)
3535}
3536
3537// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3538func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3539	var m map[string]*json.RawMessage
3540	err := json.Unmarshal(body, &m)
3541	if err != nil {
3542		return err
3543	}
3544	for k, v := range m {
3545		switch k {
3546		case "properties":
3547			if v != nil {
3548				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3549				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3550				if err != nil {
3551					return err
3552				}
3553				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3554			}
3555		case "id":
3556			if v != nil {
3557				var ID string
3558				err = json.Unmarshal(*v, &ID)
3559				if err != nil {
3560					return err
3561				}
3562				bsc.ID = &ID
3563			}
3564		case "name":
3565			if v != nil {
3566				var name string
3567				err = json.Unmarshal(*v, &name)
3568				if err != nil {
3569					return err
3570				}
3571				bsc.Name = &name
3572			}
3573		case "type":
3574			if v != nil {
3575				var typeVar string
3576				err = json.Unmarshal(*v, &typeVar)
3577				if err != nil {
3578					return err
3579				}
3580				bsc.Type = &typeVar
3581			}
3582		case "location":
3583			if v != nil {
3584				var location string
3585				err = json.Unmarshal(*v, &location)
3586				if err != nil {
3587					return err
3588				}
3589				bsc.Location = &location
3590			}
3591		case "tags":
3592			if v != nil {
3593				var tags map[string]*string
3594				err = json.Unmarshal(*v, &tags)
3595				if err != nil {
3596					return err
3597				}
3598				bsc.Tags = tags
3599			}
3600		}
3601	}
3602
3603	return nil
3604}
3605
3606// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3607type BgpServiceCommunityListResult struct {
3608	autorest.Response `json:"-"`
3609	// Value - A list of service community resources.
3610	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3611	// NextLink - The URL to get the next set of results.
3612	NextLink *string `json:"nextLink,omitempty"`
3613}
3614
3615// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3616// values.
3617type BgpServiceCommunityListResultIterator struct {
3618	i    int
3619	page BgpServiceCommunityListResultPage
3620}
3621
3622// NextWithContext advances to the next value.  If there was an error making
3623// the request the iterator does not advance and the error is returned.
3624func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3625	if tracing.IsEnabled() {
3626		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3627		defer func() {
3628			sc := -1
3629			if iter.Response().Response.Response != nil {
3630				sc = iter.Response().Response.Response.StatusCode
3631			}
3632			tracing.EndSpan(ctx, sc, err)
3633		}()
3634	}
3635	iter.i++
3636	if iter.i < len(iter.page.Values()) {
3637		return nil
3638	}
3639	err = iter.page.NextWithContext(ctx)
3640	if err != nil {
3641		iter.i--
3642		return err
3643	}
3644	iter.i = 0
3645	return nil
3646}
3647
3648// Next advances to the next value.  If there was an error making
3649// the request the iterator does not advance and the error is returned.
3650// Deprecated: Use NextWithContext() instead.
3651func (iter *BgpServiceCommunityListResultIterator) Next() error {
3652	return iter.NextWithContext(context.Background())
3653}
3654
3655// NotDone returns true if the enumeration should be started or is not yet complete.
3656func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3657	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3658}
3659
3660// Response returns the raw server response from the last page request.
3661func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3662	return iter.page.Response()
3663}
3664
3665// Value returns the current value or a zero-initialized value if the
3666// iterator has advanced beyond the end of the collection.
3667func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3668	if !iter.page.NotDone() {
3669		return BgpServiceCommunity{}
3670	}
3671	return iter.page.Values()[iter.i]
3672}
3673
3674// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3675func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3676	return BgpServiceCommunityListResultIterator{page: page}
3677}
3678
3679// IsEmpty returns true if the ListResult contains no values.
3680func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3681	return bsclr.Value == nil || len(*bsclr.Value) == 0
3682}
3683
3684// hasNextLink returns true if the NextLink is not empty.
3685func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3686	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3687}
3688
3689// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3690// It returns nil if no more results exist.
3691func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3692	if !bsclr.hasNextLink() {
3693		return nil, nil
3694	}
3695	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3696		autorest.AsJSON(),
3697		autorest.AsGet(),
3698		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3699}
3700
3701// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3702type BgpServiceCommunityListResultPage struct {
3703	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3704	bsclr BgpServiceCommunityListResult
3705}
3706
3707// NextWithContext advances to the next page of values.  If there was an error making
3708// the request the page does not advance and the error is returned.
3709func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3710	if tracing.IsEnabled() {
3711		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3712		defer func() {
3713			sc := -1
3714			if page.Response().Response.Response != nil {
3715				sc = page.Response().Response.Response.StatusCode
3716			}
3717			tracing.EndSpan(ctx, sc, err)
3718		}()
3719	}
3720	for {
3721		next, err := page.fn(ctx, page.bsclr)
3722		if err != nil {
3723			return err
3724		}
3725		page.bsclr = next
3726		if !next.hasNextLink() || !next.IsEmpty() {
3727			break
3728		}
3729	}
3730	return nil
3731}
3732
3733// Next advances to the next page of values.  If there was an error making
3734// the request the page does not advance and the error is returned.
3735// Deprecated: Use NextWithContext() instead.
3736func (page *BgpServiceCommunityListResultPage) Next() error {
3737	return page.NextWithContext(context.Background())
3738}
3739
3740// NotDone returns true if the page enumeration should be started or is not yet complete.
3741func (page BgpServiceCommunityListResultPage) NotDone() bool {
3742	return !page.bsclr.IsEmpty()
3743}
3744
3745// Response returns the raw server response from the last page request.
3746func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3747	return page.bsclr
3748}
3749
3750// Values returns the slice of values for the current page or nil if there are no values.
3751func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3752	if page.bsclr.IsEmpty() {
3753		return nil
3754	}
3755	return *page.bsclr.Value
3756}
3757
3758// Creates a new instance of the BgpServiceCommunityListResultPage type.
3759func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3760	return BgpServiceCommunityListResultPage{
3761		fn:    getNextPage,
3762		bsclr: cur,
3763	}
3764}
3765
3766// BgpServiceCommunityPropertiesFormat properties of Service Community.
3767type BgpServiceCommunityPropertiesFormat struct {
3768	// ServiceName - The name of the bgp community. e.g. Skype.
3769	ServiceName *string `json:"serviceName,omitempty"`
3770	// BgpCommunities - Get a list of bgp communities.
3771	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3772}
3773
3774// BgpSettings BGP settings details
3775type BgpSettings struct {
3776	// Asn - The BGP speaker's ASN.
3777	Asn *int64 `json:"asn,omitempty"`
3778	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3779	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3780	// PeerWeight - The weight added to routes learned from this BGP speaker.
3781	PeerWeight *int32 `json:"peerWeight,omitempty"`
3782}
3783
3784// ConnectionMonitor parameters that define the operation to create a connection monitor.
3785type ConnectionMonitor struct {
3786	// Location - Connection monitor location.
3787	Location *string `json:"location,omitempty"`
3788	// Tags - Connection monitor tags.
3789	Tags                         map[string]*string `json:"tags"`
3790	*ConnectionMonitorParameters `json:"properties,omitempty"`
3791}
3792
3793// MarshalJSON is the custom marshaler for ConnectionMonitor.
3794func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
3795	objectMap := make(map[string]interface{})
3796	if cm.Location != nil {
3797		objectMap["location"] = cm.Location
3798	}
3799	if cm.Tags != nil {
3800		objectMap["tags"] = cm.Tags
3801	}
3802	if cm.ConnectionMonitorParameters != nil {
3803		objectMap["properties"] = cm.ConnectionMonitorParameters
3804	}
3805	return json.Marshal(objectMap)
3806}
3807
3808// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
3809func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
3810	var m map[string]*json.RawMessage
3811	err := json.Unmarshal(body, &m)
3812	if err != nil {
3813		return err
3814	}
3815	for k, v := range m {
3816		switch k {
3817		case "location":
3818			if v != nil {
3819				var location string
3820				err = json.Unmarshal(*v, &location)
3821				if err != nil {
3822					return err
3823				}
3824				cm.Location = &location
3825			}
3826		case "tags":
3827			if v != nil {
3828				var tags map[string]*string
3829				err = json.Unmarshal(*v, &tags)
3830				if err != nil {
3831					return err
3832				}
3833				cm.Tags = tags
3834			}
3835		case "properties":
3836			if v != nil {
3837				var connectionMonitorParameters ConnectionMonitorParameters
3838				err = json.Unmarshal(*v, &connectionMonitorParameters)
3839				if err != nil {
3840					return err
3841				}
3842				cm.ConnectionMonitorParameters = &connectionMonitorParameters
3843			}
3844		}
3845	}
3846
3847	return nil
3848}
3849
3850// ConnectionMonitorDestination describes the destination of connection monitor.
3851type ConnectionMonitorDestination struct {
3852	// ResourceID - The ID of the resource used as the destination by connection monitor.
3853	ResourceID *string `json:"resourceId,omitempty"`
3854	// Address - Address of the connection monitor destination (IP or domain name).
3855	Address *string `json:"address,omitempty"`
3856	// Port - The destination port used by connection monitor.
3857	Port *int32 `json:"port,omitempty"`
3858}
3859
3860// ConnectionMonitorListResult list of connection monitors.
3861type ConnectionMonitorListResult struct {
3862	autorest.Response `json:"-"`
3863	// Value - Information about connection monitors.
3864	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
3865}
3866
3867// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
3868type ConnectionMonitorParameters struct {
3869	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
3870	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
3871	// AutoStart - Determines if the connection monitor will start automatically once created.
3872	AutoStart *bool `json:"autoStart,omitempty"`
3873	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3874	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3875}
3876
3877// ConnectionMonitorQueryResult list of connection states snapshots.
3878type ConnectionMonitorQueryResult struct {
3879	autorest.Response `json:"-"`
3880	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
3881	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
3882	// States - Information about connection states.
3883	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
3884}
3885
3886// ConnectionMonitorResult information about the connection monitor.
3887type ConnectionMonitorResult struct {
3888	autorest.Response `json:"-"`
3889	// Name - READ-ONLY; Name of the connection monitor.
3890	Name *string `json:"name,omitempty"`
3891	// ID - READ-ONLY; ID of the connection monitor.
3892	ID   *string `json:"id,omitempty"`
3893	Etag *string `json:"etag,omitempty"`
3894	// Type - READ-ONLY; Connection monitor type.
3895	Type *string `json:"type,omitempty"`
3896	// Location - Connection monitor location.
3897	Location *string `json:"location,omitempty"`
3898	// Tags - Connection monitor tags.
3899	Tags                               map[string]*string `json:"tags"`
3900	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
3901}
3902
3903// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
3904func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
3905	objectMap := make(map[string]interface{})
3906	if cmr.Etag != nil {
3907		objectMap["etag"] = cmr.Etag
3908	}
3909	if cmr.Location != nil {
3910		objectMap["location"] = cmr.Location
3911	}
3912	if cmr.Tags != nil {
3913		objectMap["tags"] = cmr.Tags
3914	}
3915	if cmr.ConnectionMonitorResultProperties != nil {
3916		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
3917	}
3918	return json.Marshal(objectMap)
3919}
3920
3921// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
3922func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
3923	var m map[string]*json.RawMessage
3924	err := json.Unmarshal(body, &m)
3925	if err != nil {
3926		return err
3927	}
3928	for k, v := range m {
3929		switch k {
3930		case "name":
3931			if v != nil {
3932				var name string
3933				err = json.Unmarshal(*v, &name)
3934				if err != nil {
3935					return err
3936				}
3937				cmr.Name = &name
3938			}
3939		case "id":
3940			if v != nil {
3941				var ID string
3942				err = json.Unmarshal(*v, &ID)
3943				if err != nil {
3944					return err
3945				}
3946				cmr.ID = &ID
3947			}
3948		case "etag":
3949			if v != nil {
3950				var etag string
3951				err = json.Unmarshal(*v, &etag)
3952				if err != nil {
3953					return err
3954				}
3955				cmr.Etag = &etag
3956			}
3957		case "type":
3958			if v != nil {
3959				var typeVar string
3960				err = json.Unmarshal(*v, &typeVar)
3961				if err != nil {
3962					return err
3963				}
3964				cmr.Type = &typeVar
3965			}
3966		case "location":
3967			if v != nil {
3968				var location string
3969				err = json.Unmarshal(*v, &location)
3970				if err != nil {
3971					return err
3972				}
3973				cmr.Location = &location
3974			}
3975		case "tags":
3976			if v != nil {
3977				var tags map[string]*string
3978				err = json.Unmarshal(*v, &tags)
3979				if err != nil {
3980					return err
3981				}
3982				cmr.Tags = tags
3983			}
3984		case "properties":
3985			if v != nil {
3986				var connectionMonitorResultProperties ConnectionMonitorResultProperties
3987				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
3988				if err != nil {
3989					return err
3990				}
3991				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
3992			}
3993		}
3994	}
3995
3996	return nil
3997}
3998
3999// ConnectionMonitorResultProperties describes the properties of a connection monitor.
4000type ConnectionMonitorResultProperties struct {
4001	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4002	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4003	// StartTime - The date and time when the connection monitor was started.
4004	StartTime *date.Time `json:"startTime,omitempty"`
4005	// MonitoringStatus - The monitoring status of the connection monitor.
4006	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4007	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4008	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4009	// AutoStart - Determines if the connection monitor will start automatically once created.
4010	AutoStart *bool `json:"autoStart,omitempty"`
4011	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4012	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4013}
4014
4015// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4016// long-running operation.
4017type ConnectionMonitorsCreateOrUpdateFuture struct {
4018	azure.FutureAPI
4019	// Result returns the result of the asynchronous operation.
4020	// If the operation has not completed it will return an error.
4021	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4022}
4023
4024// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4025func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4026	var azFuture azure.Future
4027	if err := json.Unmarshal(body, &azFuture); err != nil {
4028		return err
4029	}
4030	future.FutureAPI = &azFuture
4031	future.Result = future.result
4032	return nil
4033}
4034
4035// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
4036func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
4037	var done bool
4038	done, err = future.DoneWithContext(context.Background(), client)
4039	if err != nil {
4040		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4041		return
4042	}
4043	if !done {
4044		cmr.Response.Response = future.Response()
4045		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
4046		return
4047	}
4048	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4049	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
4050		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
4051		if err != nil {
4052			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
4053		}
4054	}
4055	return
4056}
4057
4058// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4059// long-running operation.
4060type ConnectionMonitorsDeleteFuture struct {
4061	azure.FutureAPI
4062	// Result returns the result of the asynchronous operation.
4063	// If the operation has not completed it will return an error.
4064	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4065}
4066
4067// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4068func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
4069	var azFuture azure.Future
4070	if err := json.Unmarshal(body, &azFuture); err != nil {
4071		return err
4072	}
4073	future.FutureAPI = &azFuture
4074	future.Result = future.result
4075	return nil
4076}
4077
4078// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
4079func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4080	var done bool
4081	done, err = future.DoneWithContext(context.Background(), client)
4082	if err != nil {
4083		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
4084		return
4085	}
4086	if !done {
4087		ar.Response = future.Response()
4088		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
4089		return
4090	}
4091	ar.Response = future.Response()
4092	return
4093}
4094
4095// ConnectionMonitorSource describes the source of connection monitor.
4096type ConnectionMonitorSource struct {
4097	// ResourceID - The ID of the resource used as the source by connection monitor.
4098	ResourceID *string `json:"resourceId,omitempty"`
4099	// Port - The source port used by connection monitor.
4100	Port *int32 `json:"port,omitempty"`
4101}
4102
4103// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4104// operation.
4105type ConnectionMonitorsQueryFuture struct {
4106	azure.FutureAPI
4107	// Result returns the result of the asynchronous operation.
4108	// If the operation has not completed it will return an error.
4109	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4110}
4111
4112// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4113func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
4114	var azFuture azure.Future
4115	if err := json.Unmarshal(body, &azFuture); err != nil {
4116		return err
4117	}
4118	future.FutureAPI = &azFuture
4119	future.Result = future.result
4120	return nil
4121}
4122
4123// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
4124func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
4125	var done bool
4126	done, err = future.DoneWithContext(context.Background(), client)
4127	if err != nil {
4128		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
4129		return
4130	}
4131	if !done {
4132		cmqr.Response.Response = future.Response()
4133		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
4134		return
4135	}
4136	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4137	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
4138		cmqr, err = client.QueryResponder(cmqr.Response.Response)
4139		if err != nil {
4140			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
4141		}
4142	}
4143	return
4144}
4145
4146// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4147// operation.
4148type ConnectionMonitorsStartFuture struct {
4149	azure.FutureAPI
4150	// Result returns the result of the asynchronous operation.
4151	// If the operation has not completed it will return an error.
4152	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4153}
4154
4155// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4156func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
4157	var azFuture azure.Future
4158	if err := json.Unmarshal(body, &azFuture); err != nil {
4159		return err
4160	}
4161	future.FutureAPI = &azFuture
4162	future.Result = future.result
4163	return nil
4164}
4165
4166// result is the default implementation for ConnectionMonitorsStartFuture.Result.
4167func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4168	var done bool
4169	done, err = future.DoneWithContext(context.Background(), client)
4170	if err != nil {
4171		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
4172		return
4173	}
4174	if !done {
4175		ar.Response = future.Response()
4176		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
4177		return
4178	}
4179	ar.Response = future.Response()
4180	return
4181}
4182
4183// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4184// operation.
4185type ConnectionMonitorsStopFuture struct {
4186	azure.FutureAPI
4187	// Result returns the result of the asynchronous operation.
4188	// If the operation has not completed it will return an error.
4189	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4190}
4191
4192// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4193func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
4194	var azFuture azure.Future
4195	if err := json.Unmarshal(body, &azFuture); err != nil {
4196		return err
4197	}
4198	future.FutureAPI = &azFuture
4199	future.Result = future.result
4200	return nil
4201}
4202
4203// result is the default implementation for ConnectionMonitorsStopFuture.Result.
4204func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4205	var done bool
4206	done, err = future.DoneWithContext(context.Background(), client)
4207	if err != nil {
4208		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
4209		return
4210	}
4211	if !done {
4212		ar.Response = future.Response()
4213		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
4214		return
4215	}
4216	ar.Response = future.Response()
4217	return
4218}
4219
4220// ConnectionResetSharedKey the virtual network connection reset shared key
4221type ConnectionResetSharedKey struct {
4222	autorest.Response `json:"-"`
4223	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4224	KeyLength *int32 `json:"keyLength,omitempty"`
4225}
4226
4227// ConnectionSharedKey response for GetConnectionSharedKey API service call
4228type ConnectionSharedKey struct {
4229	autorest.Response `json:"-"`
4230	// Value - The virtual network connection shared key value.
4231	Value *string `json:"value,omitempty"`
4232}
4233
4234// ConnectionStateSnapshot connection state snapshot.
4235type ConnectionStateSnapshot struct {
4236	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4237	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4238	// StartTime - The start time of the connection snapshot.
4239	StartTime *date.Time `json:"startTime,omitempty"`
4240	// EndTime - The end time of the connection snapshot.
4241	EndTime *date.Time `json:"endTime,omitempty"`
4242	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4243	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4244	// Hops - READ-ONLY; List of hops between the source and the destination.
4245	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4246}
4247
4248// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
4249func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
4250	objectMap := make(map[string]interface{})
4251	if CSS.ConnectionState != "" {
4252		objectMap["connectionState"] = CSS.ConnectionState
4253	}
4254	if CSS.StartTime != nil {
4255		objectMap["startTime"] = CSS.StartTime
4256	}
4257	if CSS.EndTime != nil {
4258		objectMap["endTime"] = CSS.EndTime
4259	}
4260	if CSS.EvaluationState != "" {
4261		objectMap["evaluationState"] = CSS.EvaluationState
4262	}
4263	return json.Marshal(objectMap)
4264}
4265
4266// ConnectivityDestination parameters that define destination of connection.
4267type ConnectivityDestination struct {
4268	// ResourceID - The ID of the resource to which a connection attempt will be made.
4269	ResourceID *string `json:"resourceId,omitempty"`
4270	// Address - The IP address or URI the resource to which a connection attempt will be made.
4271	Address *string `json:"address,omitempty"`
4272	// Port - Port on which check connectivity will be performed.
4273	Port *int32 `json:"port,omitempty"`
4274}
4275
4276// ConnectivityHop information about a hop between the source and the destination.
4277type ConnectivityHop struct {
4278	// Type - READ-ONLY; The type of the hop.
4279	Type *string `json:"type,omitempty"`
4280	// ID - READ-ONLY; The ID of the hop.
4281	ID *string `json:"id,omitempty"`
4282	// Address - READ-ONLY; The IP address of the hop.
4283	Address *string `json:"address,omitempty"`
4284	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
4285	ResourceID *string `json:"resourceId,omitempty"`
4286	// NextHopIds - READ-ONLY; List of next hop identifiers.
4287	NextHopIds *[]string `json:"nextHopIds,omitempty"`
4288	// Issues - READ-ONLY; List of issues.
4289	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
4290}
4291
4292// MarshalJSON is the custom marshaler for ConnectivityHop.
4293func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
4294	objectMap := make(map[string]interface{})
4295	return json.Marshal(objectMap)
4296}
4297
4298// ConnectivityInformation information on the connectivity status.
4299type ConnectivityInformation struct {
4300	autorest.Response `json:"-"`
4301	// Hops - READ-ONLY; List of hops between the source and the destination.
4302	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4303	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
4304	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
4305	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
4306	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4307	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
4308	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4309	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
4310	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4311	// ProbesSent - READ-ONLY; Total number of probes sent.
4312	ProbesSent *int32 `json:"probesSent,omitempty"`
4313	// ProbesFailed - READ-ONLY; Number of failed probes.
4314	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4315}
4316
4317// MarshalJSON is the custom marshaler for ConnectivityInformation.
4318func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
4319	objectMap := make(map[string]interface{})
4320	return json.Marshal(objectMap)
4321}
4322
4323// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
4324type ConnectivityIssue struct {
4325	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
4326	Origin Origin `json:"origin,omitempty"`
4327	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
4328	Severity Severity `json:"severity,omitempty"`
4329	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
4330	Type IssueType `json:"type,omitempty"`
4331	// Context - READ-ONLY; Provides additional context on the issue.
4332	Context *[]map[string]*string `json:"context,omitempty"`
4333}
4334
4335// MarshalJSON is the custom marshaler for ConnectivityIssue.
4336func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
4337	objectMap := make(map[string]interface{})
4338	return json.Marshal(objectMap)
4339}
4340
4341// ConnectivityParameters parameters that determine how the connectivity check will be performed.
4342type ConnectivityParameters struct {
4343	Source      *ConnectivitySource      `json:"source,omitempty"`
4344	Destination *ConnectivityDestination `json:"destination,omitempty"`
4345	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
4346	Protocol              Protocol               `json:"protocol,omitempty"`
4347	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
4348}
4349
4350// ConnectivitySource parameters that define the source of the connection.
4351type ConnectivitySource struct {
4352	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
4353	ResourceID *string `json:"resourceId,omitempty"`
4354	// Port - The source port from which a connectivity check will be performed.
4355	Port *int32 `json:"port,omitempty"`
4356}
4357
4358// DdosProtectionPlan a DDoS protection plan in a resource group.
4359type DdosProtectionPlan struct {
4360	autorest.Response `json:"-"`
4361	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
4362	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
4363	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4364	Etag *string `json:"etag,omitempty"`
4365	// ID - Resource ID.
4366	ID *string `json:"id,omitempty"`
4367	// Name - READ-ONLY; Resource name.
4368	Name *string `json:"name,omitempty"`
4369	// Type - READ-ONLY; Resource type.
4370	Type *string `json:"type,omitempty"`
4371	// Location - Resource location.
4372	Location *string `json:"location,omitempty"`
4373	// Tags - Resource tags.
4374	Tags map[string]*string `json:"tags"`
4375}
4376
4377// MarshalJSON is the custom marshaler for DdosProtectionPlan.
4378func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
4379	objectMap := make(map[string]interface{})
4380	if dpp.DdosProtectionPlanPropertiesFormat != nil {
4381		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
4382	}
4383	if dpp.ID != nil {
4384		objectMap["id"] = dpp.ID
4385	}
4386	if dpp.Location != nil {
4387		objectMap["location"] = dpp.Location
4388	}
4389	if dpp.Tags != nil {
4390		objectMap["tags"] = dpp.Tags
4391	}
4392	return json.Marshal(objectMap)
4393}
4394
4395// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
4396func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
4397	var m map[string]*json.RawMessage
4398	err := json.Unmarshal(body, &m)
4399	if err != nil {
4400		return err
4401	}
4402	for k, v := range m {
4403		switch k {
4404		case "properties":
4405			if v != nil {
4406				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
4407				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
4408				if err != nil {
4409					return err
4410				}
4411				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
4412			}
4413		case "etag":
4414			if v != nil {
4415				var etag string
4416				err = json.Unmarshal(*v, &etag)
4417				if err != nil {
4418					return err
4419				}
4420				dpp.Etag = &etag
4421			}
4422		case "id":
4423			if v != nil {
4424				var ID string
4425				err = json.Unmarshal(*v, &ID)
4426				if err != nil {
4427					return err
4428				}
4429				dpp.ID = &ID
4430			}
4431		case "name":
4432			if v != nil {
4433				var name string
4434				err = json.Unmarshal(*v, &name)
4435				if err != nil {
4436					return err
4437				}
4438				dpp.Name = &name
4439			}
4440		case "type":
4441			if v != nil {
4442				var typeVar string
4443				err = json.Unmarshal(*v, &typeVar)
4444				if err != nil {
4445					return err
4446				}
4447				dpp.Type = &typeVar
4448			}
4449		case "location":
4450			if v != nil {
4451				var location string
4452				err = json.Unmarshal(*v, &location)
4453				if err != nil {
4454					return err
4455				}
4456				dpp.Location = &location
4457			}
4458		case "tags":
4459			if v != nil {
4460				var tags map[string]*string
4461				err = json.Unmarshal(*v, &tags)
4462				if err != nil {
4463					return err
4464				}
4465				dpp.Tags = tags
4466			}
4467		}
4468	}
4469
4470	return nil
4471}
4472
4473// DdosProtectionPlanListResult a list of DDoS protection plans.
4474type DdosProtectionPlanListResult struct {
4475	autorest.Response `json:"-"`
4476	// Value - A list of DDoS protection plans.
4477	Value *[]DdosProtectionPlan `json:"value,omitempty"`
4478	// NextLink - READ-ONLY; The URL to get the next set of results.
4479	NextLink *string `json:"nextLink,omitempty"`
4480}
4481
4482// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
4483func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
4484	objectMap := make(map[string]interface{})
4485	if dpplr.Value != nil {
4486		objectMap["value"] = dpplr.Value
4487	}
4488	return json.Marshal(objectMap)
4489}
4490
4491// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
4492type DdosProtectionPlanListResultIterator struct {
4493	i    int
4494	page DdosProtectionPlanListResultPage
4495}
4496
4497// NextWithContext advances to the next value.  If there was an error making
4498// the request the iterator does not advance and the error is returned.
4499func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
4500	if tracing.IsEnabled() {
4501		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
4502		defer func() {
4503			sc := -1
4504			if iter.Response().Response.Response != nil {
4505				sc = iter.Response().Response.Response.StatusCode
4506			}
4507			tracing.EndSpan(ctx, sc, err)
4508		}()
4509	}
4510	iter.i++
4511	if iter.i < len(iter.page.Values()) {
4512		return nil
4513	}
4514	err = iter.page.NextWithContext(ctx)
4515	if err != nil {
4516		iter.i--
4517		return err
4518	}
4519	iter.i = 0
4520	return nil
4521}
4522
4523// Next advances to the next value.  If there was an error making
4524// the request the iterator does not advance and the error is returned.
4525// Deprecated: Use NextWithContext() instead.
4526func (iter *DdosProtectionPlanListResultIterator) Next() error {
4527	return iter.NextWithContext(context.Background())
4528}
4529
4530// NotDone returns true if the enumeration should be started or is not yet complete.
4531func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
4532	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4533}
4534
4535// Response returns the raw server response from the last page request.
4536func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
4537	return iter.page.Response()
4538}
4539
4540// Value returns the current value or a zero-initialized value if the
4541// iterator has advanced beyond the end of the collection.
4542func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
4543	if !iter.page.NotDone() {
4544		return DdosProtectionPlan{}
4545	}
4546	return iter.page.Values()[iter.i]
4547}
4548
4549// Creates a new instance of the DdosProtectionPlanListResultIterator type.
4550func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
4551	return DdosProtectionPlanListResultIterator{page: page}
4552}
4553
4554// IsEmpty returns true if the ListResult contains no values.
4555func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
4556	return dpplr.Value == nil || len(*dpplr.Value) == 0
4557}
4558
4559// hasNextLink returns true if the NextLink is not empty.
4560func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
4561	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
4562}
4563
4564// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
4565// It returns nil if no more results exist.
4566func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
4567	if !dpplr.hasNextLink() {
4568		return nil, nil
4569	}
4570	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4571		autorest.AsJSON(),
4572		autorest.AsGet(),
4573		autorest.WithBaseURL(to.String(dpplr.NextLink)))
4574}
4575
4576// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
4577type DdosProtectionPlanListResultPage struct {
4578	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
4579	dpplr DdosProtectionPlanListResult
4580}
4581
4582// NextWithContext advances to the next page of values.  If there was an error making
4583// the request the page does not advance and the error is returned.
4584func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
4585	if tracing.IsEnabled() {
4586		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
4587		defer func() {
4588			sc := -1
4589			if page.Response().Response.Response != nil {
4590				sc = page.Response().Response.Response.StatusCode
4591			}
4592			tracing.EndSpan(ctx, sc, err)
4593		}()
4594	}
4595	for {
4596		next, err := page.fn(ctx, page.dpplr)
4597		if err != nil {
4598			return err
4599		}
4600		page.dpplr = next
4601		if !next.hasNextLink() || !next.IsEmpty() {
4602			break
4603		}
4604	}
4605	return nil
4606}
4607
4608// Next advances to the next page of values.  If there was an error making
4609// the request the page does not advance and the error is returned.
4610// Deprecated: Use NextWithContext() instead.
4611func (page *DdosProtectionPlanListResultPage) Next() error {
4612	return page.NextWithContext(context.Background())
4613}
4614
4615// NotDone returns true if the page enumeration should be started or is not yet complete.
4616func (page DdosProtectionPlanListResultPage) NotDone() bool {
4617	return !page.dpplr.IsEmpty()
4618}
4619
4620// Response returns the raw server response from the last page request.
4621func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
4622	return page.dpplr
4623}
4624
4625// Values returns the slice of values for the current page or nil if there are no values.
4626func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
4627	if page.dpplr.IsEmpty() {
4628		return nil
4629	}
4630	return *page.dpplr.Value
4631}
4632
4633// Creates a new instance of the DdosProtectionPlanListResultPage type.
4634func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
4635	return DdosProtectionPlanListResultPage{
4636		fn:    getNextPage,
4637		dpplr: cur,
4638	}
4639}
4640
4641// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
4642type DdosProtectionPlanPropertiesFormat struct {
4643	// 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.
4644	ResourceGUID *string `json:"resourceGuid,omitempty"`
4645	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
4646	ProvisioningState *string `json:"provisioningState,omitempty"`
4647	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
4648	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
4649}
4650
4651// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
4652func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
4653	objectMap := make(map[string]interface{})
4654	return json.Marshal(objectMap)
4655}
4656
4657// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4658// long-running operation.
4659type DdosProtectionPlansCreateOrUpdateFuture struct {
4660	azure.FutureAPI
4661	// Result returns the result of the asynchronous operation.
4662	// If the operation has not completed it will return an error.
4663	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
4664}
4665
4666// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4667func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4668	var azFuture azure.Future
4669	if err := json.Unmarshal(body, &azFuture); err != nil {
4670		return err
4671	}
4672	future.FutureAPI = &azFuture
4673	future.Result = future.result
4674	return nil
4675}
4676
4677// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
4678func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
4679	var done bool
4680	done, err = future.DoneWithContext(context.Background(), client)
4681	if err != nil {
4682		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4683		return
4684	}
4685	if !done {
4686		dpp.Response.Response = future.Response()
4687		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
4688		return
4689	}
4690	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4691	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
4692		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
4693		if err != nil {
4694			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
4695		}
4696	}
4697	return
4698}
4699
4700// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
4701// long-running operation.
4702type DdosProtectionPlansDeleteFuture struct {
4703	azure.FutureAPI
4704	// Result returns the result of the asynchronous operation.
4705	// If the operation has not completed it will return an error.
4706	Result func(DdosProtectionPlansClient) (autorest.Response, error)
4707}
4708
4709// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4710func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
4711	var azFuture azure.Future
4712	if err := json.Unmarshal(body, &azFuture); err != nil {
4713		return err
4714	}
4715	future.FutureAPI = &azFuture
4716	future.Result = future.result
4717	return nil
4718}
4719
4720// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
4721func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
4722	var done bool
4723	done, err = future.DoneWithContext(context.Background(), client)
4724	if err != nil {
4725		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
4726		return
4727	}
4728	if !done {
4729		ar.Response = future.Response()
4730		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
4731		return
4732	}
4733	ar.Response = future.Response()
4734	return
4735}
4736
4737// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
4738// network. Standard DHCP option for a subnet overrides VNET DHCP options.
4739type DhcpOptions struct {
4740	// DNSServers - The list of DNS servers IP addresses.
4741	DNSServers *[]string `json:"dnsServers,omitempty"`
4742}
4743
4744// Dimension dimension of the metric.
4745type Dimension struct {
4746	// Name - The name of the dimension.
4747	Name *string `json:"name,omitempty"`
4748	// DisplayName - The display name of the dimension.
4749	DisplayName *string `json:"displayName,omitempty"`
4750	// InternalName - The internal name of the dimension.
4751	InternalName *string `json:"internalName,omitempty"`
4752}
4753
4754// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
4755type DNSNameAvailabilityResult struct {
4756	autorest.Response `json:"-"`
4757	// Available - Domain availability (True/False).
4758	Available *bool `json:"available,omitempty"`
4759}
4760
4761// EffectiveNetworkSecurityGroup effective network security group.
4762type EffectiveNetworkSecurityGroup struct {
4763	// NetworkSecurityGroup - The ID of network security group that is applied.
4764	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
4765	// Association - Associated resources.
4766	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
4767	// EffectiveSecurityRules - A collection of effective security rules.
4768	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
4769	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
4770	TagMap map[string][]string `json:"tagMap"`
4771}
4772
4773// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
4774func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
4775	objectMap := make(map[string]interface{})
4776	if ensg.NetworkSecurityGroup != nil {
4777		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
4778	}
4779	if ensg.Association != nil {
4780		objectMap["association"] = ensg.Association
4781	}
4782	if ensg.EffectiveSecurityRules != nil {
4783		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
4784	}
4785	if ensg.TagMap != nil {
4786		objectMap["tagMap"] = ensg.TagMap
4787	}
4788	return json.Marshal(objectMap)
4789}
4790
4791// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
4792type EffectiveNetworkSecurityGroupAssociation struct {
4793	// Subnet - The ID of the subnet if assigned.
4794	Subnet *SubResource `json:"subnet,omitempty"`
4795	// NetworkInterface - The ID of the network interface if assigned.
4796	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
4797}
4798
4799// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
4800// call.
4801type EffectiveNetworkSecurityGroupListResult struct {
4802	autorest.Response `json:"-"`
4803	// Value - A list of effective network security groups.
4804	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
4805	// NextLink - READ-ONLY; The URL to get the next set of results.
4806	NextLink *string `json:"nextLink,omitempty"`
4807}
4808
4809// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
4810func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4811	objectMap := make(map[string]interface{})
4812	if ensglr.Value != nil {
4813		objectMap["value"] = ensglr.Value
4814	}
4815	return json.Marshal(objectMap)
4816}
4817
4818// EffectiveNetworkSecurityRule effective network security rules.
4819type EffectiveNetworkSecurityRule struct {
4820	// Name - The name of the security rule specified by the user (if created by the user).
4821	Name *string `json:"name,omitempty"`
4822	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
4823	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
4824	// SourcePortRange - The source port or range.
4825	SourcePortRange *string `json:"sourcePortRange,omitempty"`
4826	// DestinationPortRange - The destination port or range.
4827	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
4828	// 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 (*)
4829	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
4830	// 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 (*)
4831	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
4832	// SourceAddressPrefix - The source address prefix.
4833	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
4834	// DestinationAddressPrefix - The destination address prefix.
4835	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
4836	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4837	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
4838	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4839	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
4840	// ExpandedSourceAddressPrefix - The expanded source address prefix.
4841	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
4842	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
4843	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
4844	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
4845	Access SecurityRuleAccess `json:"access,omitempty"`
4846	// Priority - The priority of the rule.
4847	Priority *int32 `json:"priority,omitempty"`
4848	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
4849	Direction SecurityRuleDirection `json:"direction,omitempty"`
4850}
4851
4852// EffectiveRoute effective Route
4853type EffectiveRoute struct {
4854	// Name - The name of the user defined route. This is optional.
4855	Name *string `json:"name,omitempty"`
4856	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
4857	Source EffectiveRouteSource `json:"source,omitempty"`
4858	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
4859	State EffectiveRouteState `json:"state,omitempty"`
4860	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
4861	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
4862	// NextHopIPAddress - The IP address of the next hop of the effective route.
4863	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
4864	// 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'
4865	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
4866}
4867
4868// EffectiveRouteListResult response for list effective route API service call.
4869type EffectiveRouteListResult struct {
4870	autorest.Response `json:"-"`
4871	// Value - A list of effective routes.
4872	Value *[]EffectiveRoute `json:"value,omitempty"`
4873	// NextLink - READ-ONLY; The URL to get the next set of results.
4874	NextLink *string `json:"nextLink,omitempty"`
4875}
4876
4877// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
4878func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
4879	objectMap := make(map[string]interface{})
4880	if erlr.Value != nil {
4881		objectMap["value"] = erlr.Value
4882	}
4883	return json.Marshal(objectMap)
4884}
4885
4886// EndpointServiceResult endpoint service.
4887type EndpointServiceResult struct {
4888	// Name - READ-ONLY; Name of the endpoint service.
4889	Name *string `json:"name,omitempty"`
4890	// Type - READ-ONLY; Type of the endpoint service.
4891	Type *string `json:"type,omitempty"`
4892	// ID - Resource ID.
4893	ID *string `json:"id,omitempty"`
4894}
4895
4896// MarshalJSON is the custom marshaler for EndpointServiceResult.
4897func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
4898	objectMap := make(map[string]interface{})
4899	if esr.ID != nil {
4900		objectMap["id"] = esr.ID
4901	}
4902	return json.Marshal(objectMap)
4903}
4904
4905// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
4906type EndpointServicesListResult struct {
4907	autorest.Response `json:"-"`
4908	// Value - List of available endpoint services in a region.
4909	Value *[]EndpointServiceResult `json:"value,omitempty"`
4910	// NextLink - The URL to get the next set of results.
4911	NextLink *string `json:"nextLink,omitempty"`
4912}
4913
4914// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
4915// values.
4916type EndpointServicesListResultIterator struct {
4917	i    int
4918	page EndpointServicesListResultPage
4919}
4920
4921// NextWithContext advances to the next value.  If there was an error making
4922// the request the iterator does not advance and the error is returned.
4923func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
4924	if tracing.IsEnabled() {
4925		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
4926		defer func() {
4927			sc := -1
4928			if iter.Response().Response.Response != nil {
4929				sc = iter.Response().Response.Response.StatusCode
4930			}
4931			tracing.EndSpan(ctx, sc, err)
4932		}()
4933	}
4934	iter.i++
4935	if iter.i < len(iter.page.Values()) {
4936		return nil
4937	}
4938	err = iter.page.NextWithContext(ctx)
4939	if err != nil {
4940		iter.i--
4941		return err
4942	}
4943	iter.i = 0
4944	return nil
4945}
4946
4947// Next advances to the next value.  If there was an error making
4948// the request the iterator does not advance and the error is returned.
4949// Deprecated: Use NextWithContext() instead.
4950func (iter *EndpointServicesListResultIterator) Next() error {
4951	return iter.NextWithContext(context.Background())
4952}
4953
4954// NotDone returns true if the enumeration should be started or is not yet complete.
4955func (iter EndpointServicesListResultIterator) NotDone() bool {
4956	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4957}
4958
4959// Response returns the raw server response from the last page request.
4960func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
4961	return iter.page.Response()
4962}
4963
4964// Value returns the current value or a zero-initialized value if the
4965// iterator has advanced beyond the end of the collection.
4966func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
4967	if !iter.page.NotDone() {
4968		return EndpointServiceResult{}
4969	}
4970	return iter.page.Values()[iter.i]
4971}
4972
4973// Creates a new instance of the EndpointServicesListResultIterator type.
4974func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
4975	return EndpointServicesListResultIterator{page: page}
4976}
4977
4978// IsEmpty returns true if the ListResult contains no values.
4979func (eslr EndpointServicesListResult) IsEmpty() bool {
4980	return eslr.Value == nil || len(*eslr.Value) == 0
4981}
4982
4983// hasNextLink returns true if the NextLink is not empty.
4984func (eslr EndpointServicesListResult) hasNextLink() bool {
4985	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
4986}
4987
4988// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
4989// It returns nil if no more results exist.
4990func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
4991	if !eslr.hasNextLink() {
4992		return nil, nil
4993	}
4994	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4995		autorest.AsJSON(),
4996		autorest.AsGet(),
4997		autorest.WithBaseURL(to.String(eslr.NextLink)))
4998}
4999
5000// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
5001type EndpointServicesListResultPage struct {
5002	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
5003	eslr EndpointServicesListResult
5004}
5005
5006// NextWithContext advances to the next page of values.  If there was an error making
5007// the request the page does not advance and the error is returned.
5008func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
5009	if tracing.IsEnabled() {
5010		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
5011		defer func() {
5012			sc := -1
5013			if page.Response().Response.Response != nil {
5014				sc = page.Response().Response.Response.StatusCode
5015			}
5016			tracing.EndSpan(ctx, sc, err)
5017		}()
5018	}
5019	for {
5020		next, err := page.fn(ctx, page.eslr)
5021		if err != nil {
5022			return err
5023		}
5024		page.eslr = next
5025		if !next.hasNextLink() || !next.IsEmpty() {
5026			break
5027		}
5028	}
5029	return nil
5030}
5031
5032// Next advances to the next page of values.  If there was an error making
5033// the request the page does not advance and the error is returned.
5034// Deprecated: Use NextWithContext() instead.
5035func (page *EndpointServicesListResultPage) Next() error {
5036	return page.NextWithContext(context.Background())
5037}
5038
5039// NotDone returns true if the page enumeration should be started or is not yet complete.
5040func (page EndpointServicesListResultPage) NotDone() bool {
5041	return !page.eslr.IsEmpty()
5042}
5043
5044// Response returns the raw server response from the last page request.
5045func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
5046	return page.eslr
5047}
5048
5049// Values returns the slice of values for the current page or nil if there are no values.
5050func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
5051	if page.eslr.IsEmpty() {
5052		return nil
5053	}
5054	return *page.eslr.Value
5055}
5056
5057// Creates a new instance of the EndpointServicesListResultPage type.
5058func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
5059	return EndpointServicesListResultPage{
5060		fn:   getNextPage,
5061		eslr: cur,
5062	}
5063}
5064
5065// Error ...
5066type Error struct {
5067	Code       *string         `json:"code,omitempty"`
5068	Message    *string         `json:"message,omitempty"`
5069	Target     *string         `json:"target,omitempty"`
5070	Details    *[]ErrorDetails `json:"details,omitempty"`
5071	InnerError *string         `json:"innerError,omitempty"`
5072}
5073
5074// ErrorDetails ...
5075type ErrorDetails struct {
5076	Code    *string `json:"code,omitempty"`
5077	Target  *string `json:"target,omitempty"`
5078	Message *string `json:"message,omitempty"`
5079}
5080
5081// ExpressRouteCircuit expressRouteCircuit resource
5082type ExpressRouteCircuit struct {
5083	autorest.Response `json:"-"`
5084	// Sku - The SKU.
5085	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
5086	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
5087	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5088	Etag *string `json:"etag,omitempty"`
5089	// ID - Resource ID.
5090	ID *string `json:"id,omitempty"`
5091	// Name - READ-ONLY; Resource name.
5092	Name *string `json:"name,omitempty"`
5093	// Type - READ-ONLY; Resource type.
5094	Type *string `json:"type,omitempty"`
5095	// Location - Resource location.
5096	Location *string `json:"location,omitempty"`
5097	// Tags - Resource tags.
5098	Tags map[string]*string `json:"tags"`
5099}
5100
5101// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
5102func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
5103	objectMap := make(map[string]interface{})
5104	if erc.Sku != nil {
5105		objectMap["sku"] = erc.Sku
5106	}
5107	if erc.ExpressRouteCircuitPropertiesFormat != nil {
5108		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
5109	}
5110	if erc.ID != nil {
5111		objectMap["id"] = erc.ID
5112	}
5113	if erc.Location != nil {
5114		objectMap["location"] = erc.Location
5115	}
5116	if erc.Tags != nil {
5117		objectMap["tags"] = erc.Tags
5118	}
5119	return json.Marshal(objectMap)
5120}
5121
5122// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
5123func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
5124	var m map[string]*json.RawMessage
5125	err := json.Unmarshal(body, &m)
5126	if err != nil {
5127		return err
5128	}
5129	for k, v := range m {
5130		switch k {
5131		case "sku":
5132			if v != nil {
5133				var sku ExpressRouteCircuitSku
5134				err = json.Unmarshal(*v, &sku)
5135				if err != nil {
5136					return err
5137				}
5138				erc.Sku = &sku
5139			}
5140		case "properties":
5141			if v != nil {
5142				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
5143				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
5144				if err != nil {
5145					return err
5146				}
5147				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
5148			}
5149		case "etag":
5150			if v != nil {
5151				var etag string
5152				err = json.Unmarshal(*v, &etag)
5153				if err != nil {
5154					return err
5155				}
5156				erc.Etag = &etag
5157			}
5158		case "id":
5159			if v != nil {
5160				var ID string
5161				err = json.Unmarshal(*v, &ID)
5162				if err != nil {
5163					return err
5164				}
5165				erc.ID = &ID
5166			}
5167		case "name":
5168			if v != nil {
5169				var name string
5170				err = json.Unmarshal(*v, &name)
5171				if err != nil {
5172					return err
5173				}
5174				erc.Name = &name
5175			}
5176		case "type":
5177			if v != nil {
5178				var typeVar string
5179				err = json.Unmarshal(*v, &typeVar)
5180				if err != nil {
5181					return err
5182				}
5183				erc.Type = &typeVar
5184			}
5185		case "location":
5186			if v != nil {
5187				var location string
5188				err = json.Unmarshal(*v, &location)
5189				if err != nil {
5190					return err
5191				}
5192				erc.Location = &location
5193			}
5194		case "tags":
5195			if v != nil {
5196				var tags map[string]*string
5197				err = json.Unmarshal(*v, &tags)
5198				if err != nil {
5199					return err
5200				}
5201				erc.Tags = tags
5202			}
5203		}
5204	}
5205
5206	return nil
5207}
5208
5209// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
5210type ExpressRouteCircuitArpTable struct {
5211	// Age - Age
5212	Age *int32 `json:"age,omitempty"`
5213	// Interface - Interface
5214	Interface *string `json:"interface,omitempty"`
5215	// IPAddress - The IP address.
5216	IPAddress *string `json:"ipAddress,omitempty"`
5217	// MacAddress - The MAC address.
5218	MacAddress *string `json:"macAddress,omitempty"`
5219}
5220
5221// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
5222type ExpressRouteCircuitAuthorization struct {
5223	autorest.Response              `json:"-"`
5224	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
5225	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5226	Name *string `json:"name,omitempty"`
5227	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5228	Etag *string `json:"etag,omitempty"`
5229	// ID - Resource ID.
5230	ID *string `json:"id,omitempty"`
5231}
5232
5233// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
5234func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
5235	objectMap := make(map[string]interface{})
5236	if erca.AuthorizationPropertiesFormat != nil {
5237		objectMap["properties"] = erca.AuthorizationPropertiesFormat
5238	}
5239	if erca.Name != nil {
5240		objectMap["name"] = erca.Name
5241	}
5242	if erca.ID != nil {
5243		objectMap["id"] = erca.ID
5244	}
5245	return json.Marshal(objectMap)
5246}
5247
5248// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
5249func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
5250	var m map[string]*json.RawMessage
5251	err := json.Unmarshal(body, &m)
5252	if err != nil {
5253		return err
5254	}
5255	for k, v := range m {
5256		switch k {
5257		case "properties":
5258			if v != nil {
5259				var authorizationPropertiesFormat AuthorizationPropertiesFormat
5260				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
5261				if err != nil {
5262					return err
5263				}
5264				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
5265			}
5266		case "name":
5267			if v != nil {
5268				var name string
5269				err = json.Unmarshal(*v, &name)
5270				if err != nil {
5271					return err
5272				}
5273				erca.Name = &name
5274			}
5275		case "etag":
5276			if v != nil {
5277				var etag string
5278				err = json.Unmarshal(*v, &etag)
5279				if err != nil {
5280					return err
5281				}
5282				erca.Etag = &etag
5283			}
5284		case "id":
5285			if v != nil {
5286				var ID string
5287				err = json.Unmarshal(*v, &ID)
5288				if err != nil {
5289					return err
5290				}
5291				erca.ID = &ID
5292			}
5293		}
5294	}
5295
5296	return nil
5297}
5298
5299// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
5300// results of a long-running operation.
5301type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
5302	azure.FutureAPI
5303	// Result returns the result of the asynchronous operation.
5304	// If the operation has not completed it will return an error.
5305	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
5306}
5307
5308// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5309func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5310	var azFuture azure.Future
5311	if err := json.Unmarshal(body, &azFuture); err != nil {
5312		return err
5313	}
5314	future.FutureAPI = &azFuture
5315	future.Result = future.result
5316	return nil
5317}
5318
5319// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
5320func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
5321	var done bool
5322	done, err = future.DoneWithContext(context.Background(), client)
5323	if err != nil {
5324		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5325		return
5326	}
5327	if !done {
5328		erca.Response.Response = future.Response()
5329		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
5330		return
5331	}
5332	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5333	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
5334		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
5335		if err != nil {
5336			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
5337		}
5338	}
5339	return
5340}
5341
5342// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
5343// of a long-running operation.
5344type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
5345	azure.FutureAPI
5346	// Result returns the result of the asynchronous operation.
5347	// If the operation has not completed it will return an error.
5348	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
5349}
5350
5351// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5352func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
5353	var azFuture azure.Future
5354	if err := json.Unmarshal(body, &azFuture); err != nil {
5355		return err
5356	}
5357	future.FutureAPI = &azFuture
5358	future.Result = future.result
5359	return nil
5360}
5361
5362// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
5363func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
5364	var done bool
5365	done, err = future.DoneWithContext(context.Background(), client)
5366	if err != nil {
5367		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
5368		return
5369	}
5370	if !done {
5371		ar.Response = future.Response()
5372		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
5373		return
5374	}
5375	ar.Response = future.Response()
5376	return
5377}
5378
5379// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
5380// resource.
5381type ExpressRouteCircuitConnection struct {
5382	autorest.Response                              `json:"-"`
5383	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
5384	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5385	Name *string `json:"name,omitempty"`
5386	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5387	Etag *string `json:"etag,omitempty"`
5388	// ID - Resource ID.
5389	ID *string `json:"id,omitempty"`
5390}
5391
5392// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
5393func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
5394	objectMap := make(map[string]interface{})
5395	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
5396		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
5397	}
5398	if ercc.Name != nil {
5399		objectMap["name"] = ercc.Name
5400	}
5401	if ercc.ID != nil {
5402		objectMap["id"] = ercc.ID
5403	}
5404	return json.Marshal(objectMap)
5405}
5406
5407// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
5408func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
5409	var m map[string]*json.RawMessage
5410	err := json.Unmarshal(body, &m)
5411	if err != nil {
5412		return err
5413	}
5414	for k, v := range m {
5415		switch k {
5416		case "properties":
5417			if v != nil {
5418				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
5419				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
5420				if err != nil {
5421					return err
5422				}
5423				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
5424			}
5425		case "name":
5426			if v != nil {
5427				var name string
5428				err = json.Unmarshal(*v, &name)
5429				if err != nil {
5430					return err
5431				}
5432				ercc.Name = &name
5433			}
5434		case "etag":
5435			if v != nil {
5436				var etag string
5437				err = json.Unmarshal(*v, &etag)
5438				if err != nil {
5439					return err
5440				}
5441				ercc.Etag = &etag
5442			}
5443		case "id":
5444			if v != nil {
5445				var ID string
5446				err = json.Unmarshal(*v, &ID)
5447				if err != nil {
5448					return err
5449				}
5450				ercc.ID = &ID
5451			}
5452		}
5453	}
5454
5455	return nil
5456}
5457
5458// ExpressRouteCircuitConnectionPropertiesFormat ...
5459type ExpressRouteCircuitConnectionPropertiesFormat struct {
5460	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
5461	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
5462	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
5463	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
5464	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
5465	AddressPrefix *string `json:"addressPrefix,omitempty"`
5466	// AuthorizationKey - The authorization key.
5467	AuthorizationKey *string `json:"authorizationKey,omitempty"`
5468	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
5469	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
5470	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
5471	ProvisioningState *string `json:"provisioningState,omitempty"`
5472}
5473
5474// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
5475func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5476	objectMap := make(map[string]interface{})
5477	if erccpf.ExpressRouteCircuitPeering != nil {
5478		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
5479	}
5480	if erccpf.PeerExpressRouteCircuitPeering != nil {
5481		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
5482	}
5483	if erccpf.AddressPrefix != nil {
5484		objectMap["addressPrefix"] = erccpf.AddressPrefix
5485	}
5486	if erccpf.AuthorizationKey != nil {
5487		objectMap["authorizationKey"] = erccpf.AuthorizationKey
5488	}
5489	return json.Marshal(objectMap)
5490}
5491
5492// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
5493// results of a long-running operation.
5494type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
5495	azure.FutureAPI
5496	// Result returns the result of the asynchronous operation.
5497	// If the operation has not completed it will return an error.
5498	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
5499}
5500
5501// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5502func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5503	var azFuture azure.Future
5504	if err := json.Unmarshal(body, &azFuture); err != nil {
5505		return err
5506	}
5507	future.FutureAPI = &azFuture
5508	future.Result = future.result
5509	return nil
5510}
5511
5512// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
5513func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
5514	var done bool
5515	done, err = future.DoneWithContext(context.Background(), client)
5516	if err != nil {
5517		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5518		return
5519	}
5520	if !done {
5521		ercc.Response.Response = future.Response()
5522		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
5523		return
5524	}
5525	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5526	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
5527		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
5528		if err != nil {
5529			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
5530		}
5531	}
5532	return
5533}
5534
5535// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
5536// long-running operation.
5537type ExpressRouteCircuitConnectionsDeleteFuture struct {
5538	azure.FutureAPI
5539	// Result returns the result of the asynchronous operation.
5540	// If the operation has not completed it will return an error.
5541	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
5542}
5543
5544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5545func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
5546	var azFuture azure.Future
5547	if err := json.Unmarshal(body, &azFuture); err != nil {
5548		return err
5549	}
5550	future.FutureAPI = &azFuture
5551	future.Result = future.result
5552	return nil
5553}
5554
5555// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
5556func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
5557	var done bool
5558	done, err = future.DoneWithContext(context.Background(), client)
5559	if err != nil {
5560		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
5561		return
5562	}
5563	if !done {
5564		ar.Response = future.Response()
5565		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
5566		return
5567	}
5568	ar.Response = future.Response()
5569	return
5570}
5571
5572// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
5573type ExpressRouteCircuitListResult struct {
5574	autorest.Response `json:"-"`
5575	// Value - A list of ExpressRouteCircuits in a resource group.
5576	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
5577	// NextLink - The URL to get the next set of results.
5578	NextLink *string `json:"nextLink,omitempty"`
5579}
5580
5581// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
5582// values.
5583type ExpressRouteCircuitListResultIterator struct {
5584	i    int
5585	page ExpressRouteCircuitListResultPage
5586}
5587
5588// NextWithContext advances to the next value.  If there was an error making
5589// the request the iterator does not advance and the error is returned.
5590func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
5591	if tracing.IsEnabled() {
5592		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
5593		defer func() {
5594			sc := -1
5595			if iter.Response().Response.Response != nil {
5596				sc = iter.Response().Response.Response.StatusCode
5597			}
5598			tracing.EndSpan(ctx, sc, err)
5599		}()
5600	}
5601	iter.i++
5602	if iter.i < len(iter.page.Values()) {
5603		return nil
5604	}
5605	err = iter.page.NextWithContext(ctx)
5606	if err != nil {
5607		iter.i--
5608		return err
5609	}
5610	iter.i = 0
5611	return nil
5612}
5613
5614// Next advances to the next value.  If there was an error making
5615// the request the iterator does not advance and the error is returned.
5616// Deprecated: Use NextWithContext() instead.
5617func (iter *ExpressRouteCircuitListResultIterator) Next() error {
5618	return iter.NextWithContext(context.Background())
5619}
5620
5621// NotDone returns true if the enumeration should be started or is not yet complete.
5622func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
5623	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5624}
5625
5626// Response returns the raw server response from the last page request.
5627func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
5628	return iter.page.Response()
5629}
5630
5631// Value returns the current value or a zero-initialized value if the
5632// iterator has advanced beyond the end of the collection.
5633func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
5634	if !iter.page.NotDone() {
5635		return ExpressRouteCircuit{}
5636	}
5637	return iter.page.Values()[iter.i]
5638}
5639
5640// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
5641func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
5642	return ExpressRouteCircuitListResultIterator{page: page}
5643}
5644
5645// IsEmpty returns true if the ListResult contains no values.
5646func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
5647	return erclr.Value == nil || len(*erclr.Value) == 0
5648}
5649
5650// hasNextLink returns true if the NextLink is not empty.
5651func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
5652	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
5653}
5654
5655// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
5656// It returns nil if no more results exist.
5657func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
5658	if !erclr.hasNextLink() {
5659		return nil, nil
5660	}
5661	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5662		autorest.AsJSON(),
5663		autorest.AsGet(),
5664		autorest.WithBaseURL(to.String(erclr.NextLink)))
5665}
5666
5667// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
5668type ExpressRouteCircuitListResultPage struct {
5669	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
5670	erclr ExpressRouteCircuitListResult
5671}
5672
5673// NextWithContext advances to the next page of values.  If there was an error making
5674// the request the page does not advance and the error is returned.
5675func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
5676	if tracing.IsEnabled() {
5677		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
5678		defer func() {
5679			sc := -1
5680			if page.Response().Response.Response != nil {
5681				sc = page.Response().Response.Response.StatusCode
5682			}
5683			tracing.EndSpan(ctx, sc, err)
5684		}()
5685	}
5686	for {
5687		next, err := page.fn(ctx, page.erclr)
5688		if err != nil {
5689			return err
5690		}
5691		page.erclr = next
5692		if !next.hasNextLink() || !next.IsEmpty() {
5693			break
5694		}
5695	}
5696	return nil
5697}
5698
5699// Next advances to the next page of values.  If there was an error making
5700// the request the page does not advance and the error is returned.
5701// Deprecated: Use NextWithContext() instead.
5702func (page *ExpressRouteCircuitListResultPage) Next() error {
5703	return page.NextWithContext(context.Background())
5704}
5705
5706// NotDone returns true if the page enumeration should be started or is not yet complete.
5707func (page ExpressRouteCircuitListResultPage) NotDone() bool {
5708	return !page.erclr.IsEmpty()
5709}
5710
5711// Response returns the raw server response from the last page request.
5712func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
5713	return page.erclr
5714}
5715
5716// Values returns the slice of values for the current page or nil if there are no values.
5717func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
5718	if page.erclr.IsEmpty() {
5719		return nil
5720	}
5721	return *page.erclr.Value
5722}
5723
5724// Creates a new instance of the ExpressRouteCircuitListResultPage type.
5725func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
5726	return ExpressRouteCircuitListResultPage{
5727		fn:    getNextPage,
5728		erclr: cur,
5729	}
5730}
5731
5732// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
5733type ExpressRouteCircuitPeering struct {
5734	autorest.Response                           `json:"-"`
5735	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
5736	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5737	Name *string `json:"name,omitempty"`
5738	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5739	Etag *string `json:"etag,omitempty"`
5740	// ID - Resource ID.
5741	ID *string `json:"id,omitempty"`
5742}
5743
5744// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
5745func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
5746	objectMap := make(map[string]interface{})
5747	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
5748		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
5749	}
5750	if ercp.Name != nil {
5751		objectMap["name"] = ercp.Name
5752	}
5753	if ercp.ID != nil {
5754		objectMap["id"] = ercp.ID
5755	}
5756	return json.Marshal(objectMap)
5757}
5758
5759// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
5760func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
5761	var m map[string]*json.RawMessage
5762	err := json.Unmarshal(body, &m)
5763	if err != nil {
5764		return err
5765	}
5766	for k, v := range m {
5767		switch k {
5768		case "properties":
5769			if v != nil {
5770				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
5771				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
5772				if err != nil {
5773					return err
5774				}
5775				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
5776			}
5777		case "name":
5778			if v != nil {
5779				var name string
5780				err = json.Unmarshal(*v, &name)
5781				if err != nil {
5782					return err
5783				}
5784				ercp.Name = &name
5785			}
5786		case "etag":
5787			if v != nil {
5788				var etag string
5789				err = json.Unmarshal(*v, &etag)
5790				if err != nil {
5791					return err
5792				}
5793				ercp.Etag = &etag
5794			}
5795		case "id":
5796			if v != nil {
5797				var ID string
5798				err = json.Unmarshal(*v, &ID)
5799				if err != nil {
5800					return err
5801				}
5802				ercp.ID = &ID
5803			}
5804		}
5805	}
5806
5807	return nil
5808}
5809
5810// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
5811type ExpressRouteCircuitPeeringConfig struct {
5812	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
5813	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
5814	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
5815	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
5816	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
5817	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
5818	// LegacyMode - The legacy mode of the peering.
5819	LegacyMode *int32 `json:"legacyMode,omitempty"`
5820	// CustomerASN - The CustomerASN of the peering.
5821	CustomerASN *int32 `json:"customerASN,omitempty"`
5822	// RoutingRegistryName - The RoutingRegistryName of the configuration.
5823	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
5824}
5825
5826// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
5827// that belong to an ExpressRouteCircuit.
5828type ExpressRouteCircuitPeeringListResult struct {
5829	autorest.Response `json:"-"`
5830	// Value - The peerings in an express route circuit.
5831	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
5832	// NextLink - The URL to get the next set of results.
5833	NextLink *string `json:"nextLink,omitempty"`
5834}
5835
5836// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
5837// ExpressRouteCircuitPeering values.
5838type ExpressRouteCircuitPeeringListResultIterator struct {
5839	i    int
5840	page ExpressRouteCircuitPeeringListResultPage
5841}
5842
5843// NextWithContext advances to the next value.  If there was an error making
5844// the request the iterator does not advance and the error is returned.
5845func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
5846	if tracing.IsEnabled() {
5847		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
5848		defer func() {
5849			sc := -1
5850			if iter.Response().Response.Response != nil {
5851				sc = iter.Response().Response.Response.StatusCode
5852			}
5853			tracing.EndSpan(ctx, sc, err)
5854		}()
5855	}
5856	iter.i++
5857	if iter.i < len(iter.page.Values()) {
5858		return nil
5859	}
5860	err = iter.page.NextWithContext(ctx)
5861	if err != nil {
5862		iter.i--
5863		return err
5864	}
5865	iter.i = 0
5866	return nil
5867}
5868
5869// Next advances to the next value.  If there was an error making
5870// the request the iterator does not advance and the error is returned.
5871// Deprecated: Use NextWithContext() instead.
5872func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
5873	return iter.NextWithContext(context.Background())
5874}
5875
5876// NotDone returns true if the enumeration should be started or is not yet complete.
5877func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
5878	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5879}
5880
5881// Response returns the raw server response from the last page request.
5882func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
5883	return iter.page.Response()
5884}
5885
5886// Value returns the current value or a zero-initialized value if the
5887// iterator has advanced beyond the end of the collection.
5888func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
5889	if !iter.page.NotDone() {
5890		return ExpressRouteCircuitPeering{}
5891	}
5892	return iter.page.Values()[iter.i]
5893}
5894
5895// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
5896func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
5897	return ExpressRouteCircuitPeeringListResultIterator{page: page}
5898}
5899
5900// IsEmpty returns true if the ListResult contains no values.
5901func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
5902	return ercplr.Value == nil || len(*ercplr.Value) == 0
5903}
5904
5905// hasNextLink returns true if the NextLink is not empty.
5906func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
5907	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
5908}
5909
5910// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
5911// It returns nil if no more results exist.
5912func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
5913	if !ercplr.hasNextLink() {
5914		return nil, nil
5915	}
5916	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5917		autorest.AsJSON(),
5918		autorest.AsGet(),
5919		autorest.WithBaseURL(to.String(ercplr.NextLink)))
5920}
5921
5922// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
5923type ExpressRouteCircuitPeeringListResultPage struct {
5924	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
5925	ercplr ExpressRouteCircuitPeeringListResult
5926}
5927
5928// NextWithContext advances to the next page of values.  If there was an error making
5929// the request the page does not advance and the error is returned.
5930func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
5931	if tracing.IsEnabled() {
5932		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
5933		defer func() {
5934			sc := -1
5935			if page.Response().Response.Response != nil {
5936				sc = page.Response().Response.Response.StatusCode
5937			}
5938			tracing.EndSpan(ctx, sc, err)
5939		}()
5940	}
5941	for {
5942		next, err := page.fn(ctx, page.ercplr)
5943		if err != nil {
5944			return err
5945		}
5946		page.ercplr = next
5947		if !next.hasNextLink() || !next.IsEmpty() {
5948			break
5949		}
5950	}
5951	return nil
5952}
5953
5954// Next advances to the next page of values.  If there was an error making
5955// the request the page does not advance and the error is returned.
5956// Deprecated: Use NextWithContext() instead.
5957func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
5958	return page.NextWithContext(context.Background())
5959}
5960
5961// NotDone returns true if the page enumeration should be started or is not yet complete.
5962func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
5963	return !page.ercplr.IsEmpty()
5964}
5965
5966// Response returns the raw server response from the last page request.
5967func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
5968	return page.ercplr
5969}
5970
5971// Values returns the slice of values for the current page or nil if there are no values.
5972func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
5973	if page.ercplr.IsEmpty() {
5974		return nil
5975	}
5976	return *page.ercplr.Value
5977}
5978
5979// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
5980func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
5981	return ExpressRouteCircuitPeeringListResultPage{
5982		fn:     getNextPage,
5983		ercplr: cur,
5984	}
5985}
5986
5987// ExpressRouteCircuitPeeringPropertiesFormat ...
5988type ExpressRouteCircuitPeeringPropertiesFormat struct {
5989	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
5990	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
5991	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
5992	State ExpressRoutePeeringState `json:"state,omitempty"`
5993	// AzureASN - The Azure ASN.
5994	AzureASN *int32 `json:"azureASN,omitempty"`
5995	// PeerASN - The peer ASN.
5996	PeerASN *int64 `json:"peerASN,omitempty"`
5997	// PrimaryPeerAddressPrefix - The primary address prefix.
5998	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
5999	// SecondaryPeerAddressPrefix - The secondary address prefix.
6000	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6001	// PrimaryAzurePort - The primary port.
6002	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
6003	// SecondaryAzurePort - The secondary port.
6004	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
6005	// SharedKey - The shared key.
6006	SharedKey *string `json:"sharedKey,omitempty"`
6007	// VlanID - The VLAN ID.
6008	VlanID *int32 `json:"vlanId,omitempty"`
6009	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6010	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6011	// Stats - Gets peering stats.
6012	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
6013	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6014	ProvisioningState *string `json:"provisioningState,omitempty"`
6015	// GatewayManagerEtag - The GatewayManager Etag.
6016	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6017	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
6018	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
6019	// RouteFilter - The reference of the RouteFilter resource.
6020	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
6021	// Ipv6PeeringConfig - The IPv6 peering configuration.
6022	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
6023	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
6024	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
6025}
6026
6027// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
6028// of a long-running operation.
6029type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
6030	azure.FutureAPI
6031	// Result returns the result of the asynchronous operation.
6032	// If the operation has not completed it will return an error.
6033	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
6034}
6035
6036// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6037func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6038	var azFuture azure.Future
6039	if err := json.Unmarshal(body, &azFuture); err != nil {
6040		return err
6041	}
6042	future.FutureAPI = &azFuture
6043	future.Result = future.result
6044	return nil
6045}
6046
6047// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
6048func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
6049	var done bool
6050	done, err = future.DoneWithContext(context.Background(), client)
6051	if err != nil {
6052		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6053		return
6054	}
6055	if !done {
6056		ercp.Response.Response = future.Response()
6057		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
6058		return
6059	}
6060	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6061	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
6062		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
6063		if err != nil {
6064			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
6065		}
6066	}
6067	return
6068}
6069
6070// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
6071// long-running operation.
6072type ExpressRouteCircuitPeeringsDeleteFuture struct {
6073	azure.FutureAPI
6074	// Result returns the result of the asynchronous operation.
6075	// If the operation has not completed it will return an error.
6076	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
6077}
6078
6079// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6080func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
6081	var azFuture azure.Future
6082	if err := json.Unmarshal(body, &azFuture); err != nil {
6083		return err
6084	}
6085	future.FutureAPI = &azFuture
6086	future.Result = future.result
6087	return nil
6088}
6089
6090// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
6091func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
6092	var done bool
6093	done, err = future.DoneWithContext(context.Background(), client)
6094	if err != nil {
6095		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
6096		return
6097	}
6098	if !done {
6099		ar.Response = future.Response()
6100		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
6101		return
6102	}
6103	ar.Response = future.Response()
6104	return
6105}
6106
6107// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
6108type ExpressRouteCircuitPropertiesFormat struct {
6109	// AllowClassicOperations - Allow classic operations
6110	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
6111	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
6112	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
6113	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
6114	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
6115	// Authorizations - The list of authorizations.
6116	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
6117	// Peerings - The list of peerings.
6118	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
6119	// ServiceKey - The ServiceKey.
6120	ServiceKey *string `json:"serviceKey,omitempty"`
6121	// ServiceProviderNotes - The ServiceProviderNotes.
6122	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
6123	// ServiceProviderProperties - The ServiceProviderProperties.
6124	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
6125	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6126	ProvisioningState *string `json:"provisioningState,omitempty"`
6127	// GatewayManagerEtag - The GatewayManager Etag.
6128	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6129}
6130
6131// ExpressRouteCircuitReference ...
6132type ExpressRouteCircuitReference struct {
6133	// ID - Corresponding Express Route Circuit Id.
6134	ID *string `json:"id,omitempty"`
6135}
6136
6137// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
6138type ExpressRouteCircuitRoutesTable struct {
6139	// NetworkProperty - network
6140	NetworkProperty *string `json:"network,omitempty"`
6141	// NextHop - nextHop
6142	NextHop *string `json:"nextHop,omitempty"`
6143	// LocPrf - locPrf
6144	LocPrf *string `json:"locPrf,omitempty"`
6145	// Weight - weight.
6146	Weight *int32 `json:"weight,omitempty"`
6147	// Path - path
6148	Path *string `json:"path,omitempty"`
6149}
6150
6151// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
6152type ExpressRouteCircuitRoutesTableSummary struct {
6153	// Neighbor - Neighbor
6154	Neighbor *string `json:"neighbor,omitempty"`
6155	// V - BGP version number spoken to the neighbor.
6156	V *int32 `json:"v,omitempty"`
6157	// As - Autonomous system number.
6158	As *int32 `json:"as,omitempty"`
6159	// 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.
6160	UpDown *string `json:"upDown,omitempty"`
6161	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
6162	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
6163}
6164
6165// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
6166// Circuits API.
6167type ExpressRouteCircuitsArpTableListResult struct {
6168	autorest.Response `json:"-"`
6169	// Value - Gets list of the ARP table.
6170	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
6171	// NextLink - The URL to get the next set of results.
6172	NextLink *string `json:"nextLink,omitempty"`
6173}
6174
6175// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6176// long-running operation.
6177type ExpressRouteCircuitsCreateOrUpdateFuture struct {
6178	azure.FutureAPI
6179	// Result returns the result of the asynchronous operation.
6180	// If the operation has not completed it will return an error.
6181	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
6182}
6183
6184// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6185func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6186	var azFuture azure.Future
6187	if err := json.Unmarshal(body, &azFuture); err != nil {
6188		return err
6189	}
6190	future.FutureAPI = &azFuture
6191	future.Result = future.result
6192	return nil
6193}
6194
6195// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
6196func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
6197	var done bool
6198	done, err = future.DoneWithContext(context.Background(), client)
6199	if err != nil {
6200		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6201		return
6202	}
6203	if !done {
6204		erc.Response.Response = future.Response()
6205		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
6206		return
6207	}
6208	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6209	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
6210		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
6211		if err != nil {
6212			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
6213		}
6214	}
6215	return
6216}
6217
6218// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
6219// long-running operation.
6220type ExpressRouteCircuitsDeleteFuture struct {
6221	azure.FutureAPI
6222	// Result returns the result of the asynchronous operation.
6223	// If the operation has not completed it will return an error.
6224	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
6225}
6226
6227// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6228func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
6229	var azFuture azure.Future
6230	if err := json.Unmarshal(body, &azFuture); err != nil {
6231		return err
6232	}
6233	future.FutureAPI = &azFuture
6234	future.Result = future.result
6235	return nil
6236}
6237
6238// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
6239func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
6240	var done bool
6241	done, err = future.DoneWithContext(context.Background(), client)
6242	if err != nil {
6243		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
6244		return
6245	}
6246	if !done {
6247		ar.Response = future.Response()
6248		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
6249		return
6250	}
6251	ar.Response = future.Response()
6252	return
6253}
6254
6255// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
6256// ExpressRouteCircuit.
6257type ExpressRouteCircuitServiceProviderProperties struct {
6258	// ServiceProviderName - The serviceProviderName.
6259	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
6260	// PeeringLocation - The peering location.
6261	PeeringLocation *string `json:"peeringLocation,omitempty"`
6262	// BandwidthInMbps - The BandwidthInMbps.
6263	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
6264}
6265
6266// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
6267type ExpressRouteCircuitSku struct {
6268	// Name - The name of the SKU.
6269	Name *string `json:"name,omitempty"`
6270	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
6271	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
6272	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
6273	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
6274}
6275
6276// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
6277// long-running operation.
6278type ExpressRouteCircuitsListArpTableFuture struct {
6279	azure.FutureAPI
6280	// Result returns the result of the asynchronous operation.
6281	// If the operation has not completed it will return an error.
6282	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
6283}
6284
6285// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6286func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
6287	var azFuture azure.Future
6288	if err := json.Unmarshal(body, &azFuture); err != nil {
6289		return err
6290	}
6291	future.FutureAPI = &azFuture
6292	future.Result = future.result
6293	return nil
6294}
6295
6296// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
6297func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
6298	var done bool
6299	done, err = future.DoneWithContext(context.Background(), client)
6300	if err != nil {
6301		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
6302		return
6303	}
6304	if !done {
6305		ercatlr.Response.Response = future.Response()
6306		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
6307		return
6308	}
6309	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6310	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
6311		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
6312		if err != nil {
6313			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
6314		}
6315	}
6316	return
6317}
6318
6319// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
6320// long-running operation.
6321type ExpressRouteCircuitsListRoutesTableFuture struct {
6322	azure.FutureAPI
6323	// Result returns the result of the asynchronous operation.
6324	// If the operation has not completed it will return an error.
6325	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
6326}
6327
6328// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6329func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
6330	var azFuture azure.Future
6331	if err := json.Unmarshal(body, &azFuture); err != nil {
6332		return err
6333	}
6334	future.FutureAPI = &azFuture
6335	future.Result = future.result
6336	return nil
6337}
6338
6339// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
6340func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
6341	var done bool
6342	done, err = future.DoneWithContext(context.Background(), client)
6343	if err != nil {
6344		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
6345		return
6346	}
6347	if !done {
6348		ercrtlr.Response.Response = future.Response()
6349		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
6350		return
6351	}
6352	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6353	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
6354		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
6355		if err != nil {
6356			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
6357		}
6358	}
6359	return
6360}
6361
6362// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
6363// results of a long-running operation.
6364type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
6365	azure.FutureAPI
6366	// Result returns the result of the asynchronous operation.
6367	// If the operation has not completed it will return an error.
6368	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
6369}
6370
6371// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6372func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
6373	var azFuture azure.Future
6374	if err := json.Unmarshal(body, &azFuture); err != nil {
6375		return err
6376	}
6377	future.FutureAPI = &azFuture
6378	future.Result = future.result
6379	return nil
6380}
6381
6382// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
6383func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
6384	var done bool
6385	done, err = future.DoneWithContext(context.Background(), client)
6386	if err != nil {
6387		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
6388		return
6389	}
6390	if !done {
6391		ercrtslr.Response.Response = future.Response()
6392		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
6393		return
6394	}
6395	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6396	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
6397		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
6398		if err != nil {
6399			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
6400		}
6401	}
6402	return
6403}
6404
6405// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
6406// Circuits API.
6407type ExpressRouteCircuitsRoutesTableListResult struct {
6408	autorest.Response `json:"-"`
6409	// Value - The list of routes table.
6410	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
6411	// NextLink - The URL to get the next set of results.
6412	NextLink *string `json:"nextLink,omitempty"`
6413}
6414
6415// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
6416// Express Route Circuits API.
6417type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
6418	autorest.Response `json:"-"`
6419	// Value - A list of the routes table.
6420	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
6421	// NextLink - The URL to get the next set of results.
6422	NextLink *string `json:"nextLink,omitempty"`
6423}
6424
6425// ExpressRouteCircuitStats contains stats associated with the peering.
6426type ExpressRouteCircuitStats struct {
6427	autorest.Response `json:"-"`
6428	// PrimarybytesIn - Gets BytesIn of the peering.
6429	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
6430	// PrimarybytesOut - Gets BytesOut of the peering.
6431	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
6432	// SecondarybytesIn - Gets BytesIn of the peering.
6433	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
6434	// SecondarybytesOut - Gets BytesOut of the peering.
6435	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
6436}
6437
6438// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6439// long-running operation.
6440type ExpressRouteCircuitsUpdateTagsFuture struct {
6441	azure.FutureAPI
6442	// Result returns the result of the asynchronous operation.
6443	// If the operation has not completed it will return an error.
6444	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
6445}
6446
6447// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6448func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6449	var azFuture azure.Future
6450	if err := json.Unmarshal(body, &azFuture); err != nil {
6451		return err
6452	}
6453	future.FutureAPI = &azFuture
6454	future.Result = future.result
6455	return nil
6456}
6457
6458// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
6459func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
6460	var done bool
6461	done, err = future.DoneWithContext(context.Background(), client)
6462	if err != nil {
6463		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6464		return
6465	}
6466	if !done {
6467		erc.Response.Response = future.Response()
6468		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
6469		return
6470	}
6471	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6472	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
6473		erc, err = client.UpdateTagsResponder(erc.Response.Response)
6474		if err != nil {
6475			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
6476		}
6477	}
6478	return
6479}
6480
6481// ExpressRouteCrossConnection expressRouteCrossConnection resource
6482type ExpressRouteCrossConnection struct {
6483	autorest.Response                      `json:"-"`
6484	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
6485	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6486	Etag *string `json:"etag,omitempty"`
6487	// ID - Resource ID.
6488	ID *string `json:"id,omitempty"`
6489	// Name - READ-ONLY; Resource name.
6490	Name *string `json:"name,omitempty"`
6491	// Type - READ-ONLY; Resource type.
6492	Type *string `json:"type,omitempty"`
6493	// Location - Resource location.
6494	Location *string `json:"location,omitempty"`
6495	// Tags - Resource tags.
6496	Tags map[string]*string `json:"tags"`
6497}
6498
6499// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
6500func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
6501	objectMap := make(map[string]interface{})
6502	if ercc.ExpressRouteCrossConnectionProperties != nil {
6503		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
6504	}
6505	if ercc.ID != nil {
6506		objectMap["id"] = ercc.ID
6507	}
6508	if ercc.Location != nil {
6509		objectMap["location"] = ercc.Location
6510	}
6511	if ercc.Tags != nil {
6512		objectMap["tags"] = ercc.Tags
6513	}
6514	return json.Marshal(objectMap)
6515}
6516
6517// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
6518func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
6519	var m map[string]*json.RawMessage
6520	err := json.Unmarshal(body, &m)
6521	if err != nil {
6522		return err
6523	}
6524	for k, v := range m {
6525		switch k {
6526		case "properties":
6527			if v != nil {
6528				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
6529				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
6530				if err != nil {
6531					return err
6532				}
6533				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
6534			}
6535		case "etag":
6536			if v != nil {
6537				var etag string
6538				err = json.Unmarshal(*v, &etag)
6539				if err != nil {
6540					return err
6541				}
6542				ercc.Etag = &etag
6543			}
6544		case "id":
6545			if v != nil {
6546				var ID string
6547				err = json.Unmarshal(*v, &ID)
6548				if err != nil {
6549					return err
6550				}
6551				ercc.ID = &ID
6552			}
6553		case "name":
6554			if v != nil {
6555				var name string
6556				err = json.Unmarshal(*v, &name)
6557				if err != nil {
6558					return err
6559				}
6560				ercc.Name = &name
6561			}
6562		case "type":
6563			if v != nil {
6564				var typeVar string
6565				err = json.Unmarshal(*v, &typeVar)
6566				if err != nil {
6567					return err
6568				}
6569				ercc.Type = &typeVar
6570			}
6571		case "location":
6572			if v != nil {
6573				var location string
6574				err = json.Unmarshal(*v, &location)
6575				if err != nil {
6576					return err
6577				}
6578				ercc.Location = &location
6579			}
6580		case "tags":
6581			if v != nil {
6582				var tags map[string]*string
6583				err = json.Unmarshal(*v, &tags)
6584				if err != nil {
6585					return err
6586				}
6587				ercc.Tags = tags
6588			}
6589		}
6590	}
6591
6592	return nil
6593}
6594
6595// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
6596type ExpressRouteCrossConnectionListResult struct {
6597	autorest.Response `json:"-"`
6598	// Value - A list of ExpressRouteCrossConnection resources.
6599	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
6600	// NextLink - READ-ONLY; The URL to get the next set of results.
6601	NextLink *string `json:"nextLink,omitempty"`
6602}
6603
6604// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
6605func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
6606	objectMap := make(map[string]interface{})
6607	if ercclr.Value != nil {
6608		objectMap["value"] = ercclr.Value
6609	}
6610	return json.Marshal(objectMap)
6611}
6612
6613// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
6614// ExpressRouteCrossConnection values.
6615type ExpressRouteCrossConnectionListResultIterator struct {
6616	i    int
6617	page ExpressRouteCrossConnectionListResultPage
6618}
6619
6620// NextWithContext advances to the next value.  If there was an error making
6621// the request the iterator does not advance and the error is returned.
6622func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
6623	if tracing.IsEnabled() {
6624		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
6625		defer func() {
6626			sc := -1
6627			if iter.Response().Response.Response != nil {
6628				sc = iter.Response().Response.Response.StatusCode
6629			}
6630			tracing.EndSpan(ctx, sc, err)
6631		}()
6632	}
6633	iter.i++
6634	if iter.i < len(iter.page.Values()) {
6635		return nil
6636	}
6637	err = iter.page.NextWithContext(ctx)
6638	if err != nil {
6639		iter.i--
6640		return err
6641	}
6642	iter.i = 0
6643	return nil
6644}
6645
6646// Next advances to the next value.  If there was an error making
6647// the request the iterator does not advance and the error is returned.
6648// Deprecated: Use NextWithContext() instead.
6649func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
6650	return iter.NextWithContext(context.Background())
6651}
6652
6653// NotDone returns true if the enumeration should be started or is not yet complete.
6654func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
6655	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6656}
6657
6658// Response returns the raw server response from the last page request.
6659func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
6660	return iter.page.Response()
6661}
6662
6663// Value returns the current value or a zero-initialized value if the
6664// iterator has advanced beyond the end of the collection.
6665func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
6666	if !iter.page.NotDone() {
6667		return ExpressRouteCrossConnection{}
6668	}
6669	return iter.page.Values()[iter.i]
6670}
6671
6672// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
6673func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
6674	return ExpressRouteCrossConnectionListResultIterator{page: page}
6675}
6676
6677// IsEmpty returns true if the ListResult contains no values.
6678func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
6679	return ercclr.Value == nil || len(*ercclr.Value) == 0
6680}
6681
6682// hasNextLink returns true if the NextLink is not empty.
6683func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
6684	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
6685}
6686
6687// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
6688// It returns nil if no more results exist.
6689func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
6690	if !ercclr.hasNextLink() {
6691		return nil, nil
6692	}
6693	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6694		autorest.AsJSON(),
6695		autorest.AsGet(),
6696		autorest.WithBaseURL(to.String(ercclr.NextLink)))
6697}
6698
6699// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
6700type ExpressRouteCrossConnectionListResultPage struct {
6701	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
6702	ercclr ExpressRouteCrossConnectionListResult
6703}
6704
6705// NextWithContext advances to the next page of values.  If there was an error making
6706// the request the page does not advance and the error is returned.
6707func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
6708	if tracing.IsEnabled() {
6709		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
6710		defer func() {
6711			sc := -1
6712			if page.Response().Response.Response != nil {
6713				sc = page.Response().Response.Response.StatusCode
6714			}
6715			tracing.EndSpan(ctx, sc, err)
6716		}()
6717	}
6718	for {
6719		next, err := page.fn(ctx, page.ercclr)
6720		if err != nil {
6721			return err
6722		}
6723		page.ercclr = next
6724		if !next.hasNextLink() || !next.IsEmpty() {
6725			break
6726		}
6727	}
6728	return nil
6729}
6730
6731// Next advances to the next page of values.  If there was an error making
6732// the request the page does not advance and the error is returned.
6733// Deprecated: Use NextWithContext() instead.
6734func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
6735	return page.NextWithContext(context.Background())
6736}
6737
6738// NotDone returns true if the page enumeration should be started or is not yet complete.
6739func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
6740	return !page.ercclr.IsEmpty()
6741}
6742
6743// Response returns the raw server response from the last page request.
6744func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
6745	return page.ercclr
6746}
6747
6748// Values returns the slice of values for the current page or nil if there are no values.
6749func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
6750	if page.ercclr.IsEmpty() {
6751		return nil
6752	}
6753	return *page.ercclr.Value
6754}
6755
6756// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
6757func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
6758	return ExpressRouteCrossConnectionListResultPage{
6759		fn:     getNextPage,
6760		ercclr: cur,
6761	}
6762}
6763
6764// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
6765type ExpressRouteCrossConnectionPeering struct {
6766	autorest.Response                             `json:"-"`
6767	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
6768	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6769	Name *string `json:"name,omitempty"`
6770	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6771	Etag *string `json:"etag,omitempty"`
6772	// ID - Resource ID.
6773	ID *string `json:"id,omitempty"`
6774}
6775
6776// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
6777func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
6778	objectMap := make(map[string]interface{})
6779	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
6780		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
6781	}
6782	if erccp.Name != nil {
6783		objectMap["name"] = erccp.Name
6784	}
6785	if erccp.ID != nil {
6786		objectMap["id"] = erccp.ID
6787	}
6788	return json.Marshal(objectMap)
6789}
6790
6791// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
6792func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
6793	var m map[string]*json.RawMessage
6794	err := json.Unmarshal(body, &m)
6795	if err != nil {
6796		return err
6797	}
6798	for k, v := range m {
6799		switch k {
6800		case "properties":
6801			if v != nil {
6802				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
6803				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
6804				if err != nil {
6805					return err
6806				}
6807				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
6808			}
6809		case "name":
6810			if v != nil {
6811				var name string
6812				err = json.Unmarshal(*v, &name)
6813				if err != nil {
6814					return err
6815				}
6816				erccp.Name = &name
6817			}
6818		case "etag":
6819			if v != nil {
6820				var etag string
6821				err = json.Unmarshal(*v, &etag)
6822				if err != nil {
6823					return err
6824				}
6825				erccp.Etag = &etag
6826			}
6827		case "id":
6828			if v != nil {
6829				var ID string
6830				err = json.Unmarshal(*v, &ID)
6831				if err != nil {
6832					return err
6833				}
6834				erccp.ID = &ID
6835			}
6836		}
6837	}
6838
6839	return nil
6840}
6841
6842// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
6843// that belong to an ExpressRouteCrossConnection.
6844type ExpressRouteCrossConnectionPeeringList struct {
6845	autorest.Response `json:"-"`
6846	// Value - The peerings in an express route cross connection.
6847	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
6848	// NextLink - READ-ONLY; The URL to get the next set of results.
6849	NextLink *string `json:"nextLink,omitempty"`
6850}
6851
6852// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
6853func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
6854	objectMap := make(map[string]interface{})
6855	if erccpl.Value != nil {
6856		objectMap["value"] = erccpl.Value
6857	}
6858	return json.Marshal(objectMap)
6859}
6860
6861// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
6862// ExpressRouteCrossConnectionPeering values.
6863type ExpressRouteCrossConnectionPeeringListIterator struct {
6864	i    int
6865	page ExpressRouteCrossConnectionPeeringListPage
6866}
6867
6868// NextWithContext advances to the next value.  If there was an error making
6869// the request the iterator does not advance and the error is returned.
6870func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
6871	if tracing.IsEnabled() {
6872		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
6873		defer func() {
6874			sc := -1
6875			if iter.Response().Response.Response != nil {
6876				sc = iter.Response().Response.Response.StatusCode
6877			}
6878			tracing.EndSpan(ctx, sc, err)
6879		}()
6880	}
6881	iter.i++
6882	if iter.i < len(iter.page.Values()) {
6883		return nil
6884	}
6885	err = iter.page.NextWithContext(ctx)
6886	if err != nil {
6887		iter.i--
6888		return err
6889	}
6890	iter.i = 0
6891	return nil
6892}
6893
6894// Next advances to the next value.  If there was an error making
6895// the request the iterator does not advance and the error is returned.
6896// Deprecated: Use NextWithContext() instead.
6897func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
6898	return iter.NextWithContext(context.Background())
6899}
6900
6901// NotDone returns true if the enumeration should be started or is not yet complete.
6902func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
6903	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6904}
6905
6906// Response returns the raw server response from the last page request.
6907func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
6908	return iter.page.Response()
6909}
6910
6911// Value returns the current value or a zero-initialized value if the
6912// iterator has advanced beyond the end of the collection.
6913func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
6914	if !iter.page.NotDone() {
6915		return ExpressRouteCrossConnectionPeering{}
6916	}
6917	return iter.page.Values()[iter.i]
6918}
6919
6920// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
6921func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
6922	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
6923}
6924
6925// IsEmpty returns true if the ListResult contains no values.
6926func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
6927	return erccpl.Value == nil || len(*erccpl.Value) == 0
6928}
6929
6930// hasNextLink returns true if the NextLink is not empty.
6931func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
6932	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
6933}
6934
6935// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
6936// It returns nil if no more results exist.
6937func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
6938	if !erccpl.hasNextLink() {
6939		return nil, nil
6940	}
6941	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6942		autorest.AsJSON(),
6943		autorest.AsGet(),
6944		autorest.WithBaseURL(to.String(erccpl.NextLink)))
6945}
6946
6947// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
6948type ExpressRouteCrossConnectionPeeringListPage struct {
6949	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
6950	erccpl ExpressRouteCrossConnectionPeeringList
6951}
6952
6953// NextWithContext advances to the next page of values.  If there was an error making
6954// the request the page does not advance and the error is returned.
6955func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
6956	if tracing.IsEnabled() {
6957		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
6958		defer func() {
6959			sc := -1
6960			if page.Response().Response.Response != nil {
6961				sc = page.Response().Response.Response.StatusCode
6962			}
6963			tracing.EndSpan(ctx, sc, err)
6964		}()
6965	}
6966	for {
6967		next, err := page.fn(ctx, page.erccpl)
6968		if err != nil {
6969			return err
6970		}
6971		page.erccpl = next
6972		if !next.hasNextLink() || !next.IsEmpty() {
6973			break
6974		}
6975	}
6976	return nil
6977}
6978
6979// Next advances to the next page of values.  If there was an error making
6980// the request the page does not advance and the error is returned.
6981// Deprecated: Use NextWithContext() instead.
6982func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
6983	return page.NextWithContext(context.Background())
6984}
6985
6986// NotDone returns true if the page enumeration should be started or is not yet complete.
6987func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
6988	return !page.erccpl.IsEmpty()
6989}
6990
6991// Response returns the raw server response from the last page request.
6992func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
6993	return page.erccpl
6994}
6995
6996// Values returns the slice of values for the current page or nil if there are no values.
6997func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
6998	if page.erccpl.IsEmpty() {
6999		return nil
7000	}
7001	return *page.erccpl.Value
7002}
7003
7004// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
7005func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
7006	return ExpressRouteCrossConnectionPeeringListPage{
7007		fn:     getNextPage,
7008		erccpl: cur,
7009	}
7010}
7011
7012// ExpressRouteCrossConnectionPeeringProperties ...
7013type ExpressRouteCrossConnectionPeeringProperties struct {
7014	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7015	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7016	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7017	State ExpressRoutePeeringState `json:"state,omitempty"`
7018	// AzureASN - READ-ONLY; The Azure ASN.
7019	AzureASN *int32 `json:"azureASN,omitempty"`
7020	// PeerASN - The peer ASN.
7021	PeerASN *int64 `json:"peerASN,omitempty"`
7022	// PrimaryPeerAddressPrefix - The primary address prefix.
7023	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7024	// SecondaryPeerAddressPrefix - The secondary address prefix.
7025	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7026	// PrimaryAzurePort - READ-ONLY; The primary port.
7027	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7028	// SecondaryAzurePort - READ-ONLY; The secondary port.
7029	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7030	// SharedKey - The shared key.
7031	SharedKey *string `json:"sharedKey,omitempty"`
7032	// VlanID - The VLAN ID.
7033	VlanID *int32 `json:"vlanId,omitempty"`
7034	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7035	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7036	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7037	ProvisioningState *string `json:"provisioningState,omitempty"`
7038	// GatewayManagerEtag - The GatewayManager Etag.
7039	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7040	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7041	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7042	// Ipv6PeeringConfig - The IPv6 peering configuration.
7043	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7044}
7045
7046// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
7047func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
7048	objectMap := make(map[string]interface{})
7049	if erccpp.PeeringType != "" {
7050		objectMap["peeringType"] = erccpp.PeeringType
7051	}
7052	if erccpp.State != "" {
7053		objectMap["state"] = erccpp.State
7054	}
7055	if erccpp.PeerASN != nil {
7056		objectMap["peerASN"] = erccpp.PeerASN
7057	}
7058	if erccpp.PrimaryPeerAddressPrefix != nil {
7059		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
7060	}
7061	if erccpp.SecondaryPeerAddressPrefix != nil {
7062		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
7063	}
7064	if erccpp.SharedKey != nil {
7065		objectMap["sharedKey"] = erccpp.SharedKey
7066	}
7067	if erccpp.VlanID != nil {
7068		objectMap["vlanId"] = erccpp.VlanID
7069	}
7070	if erccpp.MicrosoftPeeringConfig != nil {
7071		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
7072	}
7073	if erccpp.GatewayManagerEtag != nil {
7074		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
7075	}
7076	if erccpp.LastModifiedBy != nil {
7077		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
7078	}
7079	if erccpp.Ipv6PeeringConfig != nil {
7080		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
7081	}
7082	return json.Marshal(objectMap)
7083}
7084
7085// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7086// results of a long-running operation.
7087type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
7088	azure.FutureAPI
7089	// Result returns the result of the asynchronous operation.
7090	// If the operation has not completed it will return an error.
7091	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
7092}
7093
7094// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7095func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7096	var azFuture azure.Future
7097	if err := json.Unmarshal(body, &azFuture); err != nil {
7098		return err
7099	}
7100	future.FutureAPI = &azFuture
7101	future.Result = future.result
7102	return nil
7103}
7104
7105// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
7106func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
7107	var done bool
7108	done, err = future.DoneWithContext(context.Background(), client)
7109	if err != nil {
7110		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7111		return
7112	}
7113	if !done {
7114		erccp.Response.Response = future.Response()
7115		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
7116		return
7117	}
7118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7119	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
7120		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
7121		if err != nil {
7122			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
7123		}
7124	}
7125	return
7126}
7127
7128// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
7129// of a long-running operation.
7130type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
7131	azure.FutureAPI
7132	// Result returns the result of the asynchronous operation.
7133	// If the operation has not completed it will return an error.
7134	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
7135}
7136
7137// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7138func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
7139	var azFuture azure.Future
7140	if err := json.Unmarshal(body, &azFuture); err != nil {
7141		return err
7142	}
7143	future.FutureAPI = &azFuture
7144	future.Result = future.result
7145	return nil
7146}
7147
7148// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
7149func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
7150	var done bool
7151	done, err = future.DoneWithContext(context.Background(), client)
7152	if err != nil {
7153		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
7154		return
7155	}
7156	if !done {
7157		ar.Response = future.Response()
7158		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
7159		return
7160	}
7161	ar.Response = future.Response()
7162	return
7163}
7164
7165// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
7166type ExpressRouteCrossConnectionProperties struct {
7167	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
7168	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7169	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
7170	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7171	// STag - READ-ONLY; The identifier of the circuit traffic.
7172	STag *int32 `json:"sTag,omitempty"`
7173	// PeeringLocation - The peering location of the ExpressRoute circuit.
7174	PeeringLocation *string `json:"peeringLocation,omitempty"`
7175	// BandwidthInMbps - The circuit bandwidth In Mbps.
7176	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
7177	// ExpressRouteCircuit - The ExpressRouteCircuit
7178	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
7179	// 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'
7180	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
7181	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
7182	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
7183	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7184	ProvisioningState *string `json:"provisioningState,omitempty"`
7185	// Peerings - The list of peerings.
7186	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
7187}
7188
7189// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
7190func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
7191	objectMap := make(map[string]interface{})
7192	if erccp.PeeringLocation != nil {
7193		objectMap["peeringLocation"] = erccp.PeeringLocation
7194	}
7195	if erccp.BandwidthInMbps != nil {
7196		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
7197	}
7198	if erccp.ExpressRouteCircuit != nil {
7199		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
7200	}
7201	if erccp.ServiceProviderProvisioningState != "" {
7202		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
7203	}
7204	if erccp.ServiceProviderNotes != nil {
7205		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
7206	}
7207	if erccp.Peerings != nil {
7208		objectMap["peerings"] = erccp.Peerings
7209	}
7210	return json.Marshal(objectMap)
7211}
7212
7213// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
7214type ExpressRouteCrossConnectionRoutesTableSummary struct {
7215	// Neighbor - IP address of Neighbor router
7216	Neighbor *string `json:"neighbor,omitempty"`
7217	// Asn - Autonomous system number.
7218	Asn *int32 `json:"asn,omitempty"`
7219	// 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.
7220	UpDown *string `json:"upDown,omitempty"`
7221	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
7222	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
7223}
7224
7225// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7226// results of a long-running operation.
7227type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
7228	azure.FutureAPI
7229	// Result returns the result of the asynchronous operation.
7230	// If the operation has not completed it will return an error.
7231	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
7232}
7233
7234// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7235func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7236	var azFuture azure.Future
7237	if err := json.Unmarshal(body, &azFuture); err != nil {
7238		return err
7239	}
7240	future.FutureAPI = &azFuture
7241	future.Result = future.result
7242	return nil
7243}
7244
7245// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
7246func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
7247	var done bool
7248	done, err = future.DoneWithContext(context.Background(), client)
7249	if err != nil {
7250		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7251		return
7252	}
7253	if !done {
7254		ercc.Response.Response = future.Response()
7255		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
7256		return
7257	}
7258	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7259	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7260		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
7261		if err != nil {
7262			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
7263		}
7264	}
7265	return
7266}
7267
7268// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
7269// of a long-running operation.
7270type ExpressRouteCrossConnectionsListArpTableFuture struct {
7271	azure.FutureAPI
7272	// Result returns the result of the asynchronous operation.
7273	// If the operation has not completed it will return an error.
7274	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
7275}
7276
7277// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7278func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
7279	var azFuture azure.Future
7280	if err := json.Unmarshal(body, &azFuture); err != nil {
7281		return err
7282	}
7283	future.FutureAPI = &azFuture
7284	future.Result = future.result
7285	return nil
7286}
7287
7288// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
7289func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
7290	var done bool
7291	done, err = future.DoneWithContext(context.Background(), client)
7292	if err != nil {
7293		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
7294		return
7295	}
7296	if !done {
7297		ercatlr.Response.Response = future.Response()
7298		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
7299		return
7300	}
7301	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7302	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
7303		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
7304		if err != nil {
7305			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
7306		}
7307	}
7308	return
7309}
7310
7311// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
7312// results of a long-running operation.
7313type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
7314	azure.FutureAPI
7315	// Result returns the result of the asynchronous operation.
7316	// If the operation has not completed it will return an error.
7317	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
7318}
7319
7320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7321func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
7322	var azFuture azure.Future
7323	if err := json.Unmarshal(body, &azFuture); err != nil {
7324		return err
7325	}
7326	future.FutureAPI = &azFuture
7327	future.Result = future.result
7328	return nil
7329}
7330
7331// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
7332func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
7333	var done bool
7334	done, err = future.DoneWithContext(context.Background(), client)
7335	if err != nil {
7336		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
7337		return
7338	}
7339	if !done {
7340		ercrtlr.Response.Response = future.Response()
7341		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
7342		return
7343	}
7344	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7345	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
7346		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
7347		if err != nil {
7348			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
7349		}
7350	}
7351	return
7352}
7353
7354// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
7355// the results of a long-running operation.
7356type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
7357	azure.FutureAPI
7358	// Result returns the result of the asynchronous operation.
7359	// If the operation has not completed it will return an error.
7360	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
7361}
7362
7363// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7364func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
7365	var azFuture azure.Future
7366	if err := json.Unmarshal(body, &azFuture); err != nil {
7367		return err
7368	}
7369	future.FutureAPI = &azFuture
7370	future.Result = future.result
7371	return nil
7372}
7373
7374// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
7375func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
7376	var done bool
7377	done, err = future.DoneWithContext(context.Background(), client)
7378	if err != nil {
7379		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
7380		return
7381	}
7382	if !done {
7383		erccrtslr.Response.Response = future.Response()
7384		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
7385		return
7386	}
7387	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7388	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
7389		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
7390		if err != nil {
7391			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
7392		}
7393	}
7394	return
7395}
7396
7397// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
7398// the Express Route Cross Connections.
7399type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
7400	autorest.Response `json:"-"`
7401	// Value - A list of the routes table.
7402	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
7403	// NextLink - READ-ONLY; The URL to get the next set of results.
7404	NextLink *string `json:"nextLink,omitempty"`
7405}
7406
7407// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
7408func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
7409	objectMap := make(map[string]interface{})
7410	if erccrtslr.Value != nil {
7411		objectMap["value"] = erccrtslr.Value
7412	}
7413	return json.Marshal(objectMap)
7414}
7415
7416// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
7417// a long-running operation.
7418type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
7419	azure.FutureAPI
7420	// Result returns the result of the asynchronous operation.
7421	// If the operation has not completed it will return an error.
7422	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
7423}
7424
7425// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7426func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7427	var azFuture azure.Future
7428	if err := json.Unmarshal(body, &azFuture); err != nil {
7429		return err
7430	}
7431	future.FutureAPI = &azFuture
7432	future.Result = future.result
7433	return nil
7434}
7435
7436// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
7437func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
7438	var done bool
7439	done, err = future.DoneWithContext(context.Background(), client)
7440	if err != nil {
7441		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7442		return
7443	}
7444	if !done {
7445		ercc.Response.Response = future.Response()
7446		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
7447		return
7448	}
7449	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7450	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7451		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
7452		if err != nil {
7453			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
7454		}
7455	}
7456	return
7457}
7458
7459// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
7460type ExpressRouteServiceProvider struct {
7461	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
7462	// ID - Resource ID.
7463	ID *string `json:"id,omitempty"`
7464	// Name - READ-ONLY; Resource name.
7465	Name *string `json:"name,omitempty"`
7466	// Type - READ-ONLY; Resource type.
7467	Type *string `json:"type,omitempty"`
7468	// Location - Resource location.
7469	Location *string `json:"location,omitempty"`
7470	// Tags - Resource tags.
7471	Tags map[string]*string `json:"tags"`
7472}
7473
7474// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
7475func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
7476	objectMap := make(map[string]interface{})
7477	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
7478		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
7479	}
7480	if ersp.ID != nil {
7481		objectMap["id"] = ersp.ID
7482	}
7483	if ersp.Location != nil {
7484		objectMap["location"] = ersp.Location
7485	}
7486	if ersp.Tags != nil {
7487		objectMap["tags"] = ersp.Tags
7488	}
7489	return json.Marshal(objectMap)
7490}
7491
7492// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
7493func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
7494	var m map[string]*json.RawMessage
7495	err := json.Unmarshal(body, &m)
7496	if err != nil {
7497		return err
7498	}
7499	for k, v := range m {
7500		switch k {
7501		case "properties":
7502			if v != nil {
7503				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
7504				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
7505				if err != nil {
7506					return err
7507				}
7508				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
7509			}
7510		case "id":
7511			if v != nil {
7512				var ID string
7513				err = json.Unmarshal(*v, &ID)
7514				if err != nil {
7515					return err
7516				}
7517				ersp.ID = &ID
7518			}
7519		case "name":
7520			if v != nil {
7521				var name string
7522				err = json.Unmarshal(*v, &name)
7523				if err != nil {
7524					return err
7525				}
7526				ersp.Name = &name
7527			}
7528		case "type":
7529			if v != nil {
7530				var typeVar string
7531				err = json.Unmarshal(*v, &typeVar)
7532				if err != nil {
7533					return err
7534				}
7535				ersp.Type = &typeVar
7536			}
7537		case "location":
7538			if v != nil {
7539				var location string
7540				err = json.Unmarshal(*v, &location)
7541				if err != nil {
7542					return err
7543				}
7544				ersp.Location = &location
7545			}
7546		case "tags":
7547			if v != nil {
7548				var tags map[string]*string
7549				err = json.Unmarshal(*v, &tags)
7550				if err != nil {
7551					return err
7552				}
7553				ersp.Tags = tags
7554			}
7555		}
7556	}
7557
7558	return nil
7559}
7560
7561// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
7562// resources.
7563type ExpressRouteServiceProviderBandwidthsOffered struct {
7564	// OfferName - The OfferName.
7565	OfferName *string `json:"offerName,omitempty"`
7566	// ValueInMbps - The ValueInMbps.
7567	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
7568}
7569
7570// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
7571type ExpressRouteServiceProviderListResult struct {
7572	autorest.Response `json:"-"`
7573	// Value - A list of ExpressRouteResourceProvider resources.
7574	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
7575	// NextLink - The URL to get the next set of results.
7576	NextLink *string `json:"nextLink,omitempty"`
7577}
7578
7579// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
7580// ExpressRouteServiceProvider values.
7581type ExpressRouteServiceProviderListResultIterator struct {
7582	i    int
7583	page ExpressRouteServiceProviderListResultPage
7584}
7585
7586// NextWithContext advances to the next value.  If there was an error making
7587// the request the iterator does not advance and the error is returned.
7588func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
7589	if tracing.IsEnabled() {
7590		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
7591		defer func() {
7592			sc := -1
7593			if iter.Response().Response.Response != nil {
7594				sc = iter.Response().Response.Response.StatusCode
7595			}
7596			tracing.EndSpan(ctx, sc, err)
7597		}()
7598	}
7599	iter.i++
7600	if iter.i < len(iter.page.Values()) {
7601		return nil
7602	}
7603	err = iter.page.NextWithContext(ctx)
7604	if err != nil {
7605		iter.i--
7606		return err
7607	}
7608	iter.i = 0
7609	return nil
7610}
7611
7612// Next advances to the next value.  If there was an error making
7613// the request the iterator does not advance and the error is returned.
7614// Deprecated: Use NextWithContext() instead.
7615func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
7616	return iter.NextWithContext(context.Background())
7617}
7618
7619// NotDone returns true if the enumeration should be started or is not yet complete.
7620func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
7621	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7622}
7623
7624// Response returns the raw server response from the last page request.
7625func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
7626	return iter.page.Response()
7627}
7628
7629// Value returns the current value or a zero-initialized value if the
7630// iterator has advanced beyond the end of the collection.
7631func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
7632	if !iter.page.NotDone() {
7633		return ExpressRouteServiceProvider{}
7634	}
7635	return iter.page.Values()[iter.i]
7636}
7637
7638// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
7639func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
7640	return ExpressRouteServiceProviderListResultIterator{page: page}
7641}
7642
7643// IsEmpty returns true if the ListResult contains no values.
7644func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
7645	return ersplr.Value == nil || len(*ersplr.Value) == 0
7646}
7647
7648// hasNextLink returns true if the NextLink is not empty.
7649func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
7650	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
7651}
7652
7653// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
7654// It returns nil if no more results exist.
7655func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
7656	if !ersplr.hasNextLink() {
7657		return nil, nil
7658	}
7659	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7660		autorest.AsJSON(),
7661		autorest.AsGet(),
7662		autorest.WithBaseURL(to.String(ersplr.NextLink)))
7663}
7664
7665// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
7666type ExpressRouteServiceProviderListResultPage struct {
7667	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
7668	ersplr ExpressRouteServiceProviderListResult
7669}
7670
7671// NextWithContext advances to the next page of values.  If there was an error making
7672// the request the page does not advance and the error is returned.
7673func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
7674	if tracing.IsEnabled() {
7675		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
7676		defer func() {
7677			sc := -1
7678			if page.Response().Response.Response != nil {
7679				sc = page.Response().Response.Response.StatusCode
7680			}
7681			tracing.EndSpan(ctx, sc, err)
7682		}()
7683	}
7684	for {
7685		next, err := page.fn(ctx, page.ersplr)
7686		if err != nil {
7687			return err
7688		}
7689		page.ersplr = next
7690		if !next.hasNextLink() || !next.IsEmpty() {
7691			break
7692		}
7693	}
7694	return nil
7695}
7696
7697// Next advances to the next page of values.  If there was an error making
7698// the request the page does not advance and the error is returned.
7699// Deprecated: Use NextWithContext() instead.
7700func (page *ExpressRouteServiceProviderListResultPage) Next() error {
7701	return page.NextWithContext(context.Background())
7702}
7703
7704// NotDone returns true if the page enumeration should be started or is not yet complete.
7705func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
7706	return !page.ersplr.IsEmpty()
7707}
7708
7709// Response returns the raw server response from the last page request.
7710func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
7711	return page.ersplr
7712}
7713
7714// Values returns the slice of values for the current page or nil if there are no values.
7715func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
7716	if page.ersplr.IsEmpty() {
7717		return nil
7718	}
7719	return *page.ersplr.Value
7720}
7721
7722// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
7723func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
7724	return ExpressRouteServiceProviderListResultPage{
7725		fn:     getNextPage,
7726		ersplr: cur,
7727	}
7728}
7729
7730// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
7731type ExpressRouteServiceProviderPropertiesFormat struct {
7732	// PeeringLocations - Get a list of peering locations.
7733	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
7734	// BandwidthsOffered - Gets bandwidths offered.
7735	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
7736	// ProvisioningState - Gets the provisioning state of the resource.
7737	ProvisioningState *string `json:"provisioningState,omitempty"`
7738}
7739
7740// FlowLogInformation information on the configuration of flow log.
7741type FlowLogInformation struct {
7742	autorest.Response `json:"-"`
7743	// TargetResourceID - The ID of the resource to configure for flow logging.
7744	TargetResourceID   *string `json:"targetResourceId,omitempty"`
7745	*FlowLogProperties `json:"properties,omitempty"`
7746}
7747
7748// MarshalJSON is the custom marshaler for FlowLogInformation.
7749func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
7750	objectMap := make(map[string]interface{})
7751	if fli.TargetResourceID != nil {
7752		objectMap["targetResourceId"] = fli.TargetResourceID
7753	}
7754	if fli.FlowLogProperties != nil {
7755		objectMap["properties"] = fli.FlowLogProperties
7756	}
7757	return json.Marshal(objectMap)
7758}
7759
7760// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
7761func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
7762	var m map[string]*json.RawMessage
7763	err := json.Unmarshal(body, &m)
7764	if err != nil {
7765		return err
7766	}
7767	for k, v := range m {
7768		switch k {
7769		case "targetResourceId":
7770			if v != nil {
7771				var targetResourceID string
7772				err = json.Unmarshal(*v, &targetResourceID)
7773				if err != nil {
7774					return err
7775				}
7776				fli.TargetResourceID = &targetResourceID
7777			}
7778		case "properties":
7779			if v != nil {
7780				var flowLogProperties FlowLogProperties
7781				err = json.Unmarshal(*v, &flowLogProperties)
7782				if err != nil {
7783					return err
7784				}
7785				fli.FlowLogProperties = &flowLogProperties
7786			}
7787		}
7788	}
7789
7790	return nil
7791}
7792
7793// FlowLogProperties parameters that define the configuration of flow log.
7794type FlowLogProperties struct {
7795	// StorageID - ID of the storage account which is used to store the flow log.
7796	StorageID *string `json:"storageId,omitempty"`
7797	// Enabled - Flag to enable/disable flow logging.
7798	Enabled         *bool                      `json:"enabled,omitempty"`
7799	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
7800}
7801
7802// FlowLogStatusParameters parameters that define a resource to query flow log status.
7803type FlowLogStatusParameters struct {
7804	// TargetResourceID - The target resource where getting the flow logging status.
7805	TargetResourceID *string `json:"targetResourceId,omitempty"`
7806}
7807
7808// FrontendIPConfiguration frontend IP address of the load balancer.
7809type FrontendIPConfiguration struct {
7810	autorest.Response `json:"-"`
7811	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
7812	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7813	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7814	Name *string `json:"name,omitempty"`
7815	// Etag - A unique read-only string that changes whenever the resource is updated.
7816	Etag *string `json:"etag,omitempty"`
7817	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
7818	Zones *[]string `json:"zones,omitempty"`
7819	// ID - Resource ID.
7820	ID *string `json:"id,omitempty"`
7821}
7822
7823// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
7824func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
7825	objectMap := make(map[string]interface{})
7826	if fic.FrontendIPConfigurationPropertiesFormat != nil {
7827		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
7828	}
7829	if fic.Name != nil {
7830		objectMap["name"] = fic.Name
7831	}
7832	if fic.Etag != nil {
7833		objectMap["etag"] = fic.Etag
7834	}
7835	if fic.Zones != nil {
7836		objectMap["zones"] = fic.Zones
7837	}
7838	if fic.ID != nil {
7839		objectMap["id"] = fic.ID
7840	}
7841	return json.Marshal(objectMap)
7842}
7843
7844// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
7845func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
7846	var m map[string]*json.RawMessage
7847	err := json.Unmarshal(body, &m)
7848	if err != nil {
7849		return err
7850	}
7851	for k, v := range m {
7852		switch k {
7853		case "properties":
7854			if v != nil {
7855				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
7856				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
7857				if err != nil {
7858					return err
7859				}
7860				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
7861			}
7862		case "name":
7863			if v != nil {
7864				var name string
7865				err = json.Unmarshal(*v, &name)
7866				if err != nil {
7867					return err
7868				}
7869				fic.Name = &name
7870			}
7871		case "etag":
7872			if v != nil {
7873				var etag string
7874				err = json.Unmarshal(*v, &etag)
7875				if err != nil {
7876					return err
7877				}
7878				fic.Etag = &etag
7879			}
7880		case "zones":
7881			if v != nil {
7882				var zones []string
7883				err = json.Unmarshal(*v, &zones)
7884				if err != nil {
7885					return err
7886				}
7887				fic.Zones = &zones
7888			}
7889		case "id":
7890			if v != nil {
7891				var ID string
7892				err = json.Unmarshal(*v, &ID)
7893				if err != nil {
7894					return err
7895				}
7896				fic.ID = &ID
7897			}
7898		}
7899	}
7900
7901	return nil
7902}
7903
7904// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
7905type FrontendIPConfigurationPropertiesFormat struct {
7906	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
7907	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
7908	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
7909	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
7910	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
7911	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
7912	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
7913	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
7914	// PrivateIPAddress - The private IP address of the IP configuration.
7915	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7916	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7917	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7918	// Subnet - The reference of the subnet resource.
7919	Subnet *Subnet `json:"subnet,omitempty"`
7920	// PublicIPAddress - The reference of the Public IP resource.
7921	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7922	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7923	ProvisioningState *string `json:"provisioningState,omitempty"`
7924}
7925
7926// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
7927func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7928	objectMap := make(map[string]interface{})
7929	if ficpf.PrivateIPAddress != nil {
7930		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
7931	}
7932	if ficpf.PrivateIPAllocationMethod != "" {
7933		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
7934	}
7935	if ficpf.Subnet != nil {
7936		objectMap["subnet"] = ficpf.Subnet
7937	}
7938	if ficpf.PublicIPAddress != nil {
7939		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
7940	}
7941	if ficpf.ProvisioningState != nil {
7942		objectMap["provisioningState"] = ficpf.ProvisioningState
7943	}
7944	return json.Marshal(objectMap)
7945}
7946
7947// GatewayRoute gateway routing details
7948type GatewayRoute struct {
7949	// LocalAddress - READ-ONLY; The gateway's local address
7950	LocalAddress *string `json:"localAddress,omitempty"`
7951	// NetworkProperty - READ-ONLY; The route's network prefix
7952	NetworkProperty *string `json:"network,omitempty"`
7953	// NextHop - READ-ONLY; The route's next hop
7954	NextHop *string `json:"nextHop,omitempty"`
7955	// SourcePeer - READ-ONLY; The peer this route was learned from
7956	SourcePeer *string `json:"sourcePeer,omitempty"`
7957	// Origin - READ-ONLY; The source this route was learned from
7958	Origin *string `json:"origin,omitempty"`
7959	// AsPath - READ-ONLY; The route's AS path sequence
7960	AsPath *string `json:"asPath,omitempty"`
7961	// Weight - READ-ONLY; The route's weight
7962	Weight *int32 `json:"weight,omitempty"`
7963}
7964
7965// MarshalJSON is the custom marshaler for GatewayRoute.
7966func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
7967	objectMap := make(map[string]interface{})
7968	return json.Marshal(objectMap)
7969}
7970
7971// GatewayRouteListResult list of virtual network gateway routes
7972type GatewayRouteListResult struct {
7973	autorest.Response `json:"-"`
7974	// Value - List of gateway routes
7975	Value *[]GatewayRoute `json:"value,omitempty"`
7976}
7977
7978// HTTPConfiguration HTTP configuration of the connectivity check.
7979type HTTPConfiguration struct {
7980	// Method - HTTP method. Possible values include: 'Get'
7981	Method HTTPMethod `json:"method,omitempty"`
7982	// Headers - List of HTTP headers.
7983	Headers *[]HTTPHeader `json:"headers,omitempty"`
7984	// ValidStatusCodes - Valid status codes.
7985	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
7986}
7987
7988// HTTPHeader describes the HTTP header.
7989type HTTPHeader struct {
7990	// Name - The name in HTTP header.
7991	Name *string `json:"name,omitempty"`
7992	// Value - The value in HTTP header.
7993	Value *string `json:"value,omitempty"`
7994}
7995
7996// InboundNatPool inbound NAT pool of the load balancer.
7997type InboundNatPool struct {
7998	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
7999	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
8000	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8001	Name *string `json:"name,omitempty"`
8002	// Etag - A unique read-only string that changes whenever the resource is updated.
8003	Etag *string `json:"etag,omitempty"`
8004	// ID - Resource ID.
8005	ID *string `json:"id,omitempty"`
8006}
8007
8008// MarshalJSON is the custom marshaler for InboundNatPool.
8009func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
8010	objectMap := make(map[string]interface{})
8011	if inp.InboundNatPoolPropertiesFormat != nil {
8012		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
8013	}
8014	if inp.Name != nil {
8015		objectMap["name"] = inp.Name
8016	}
8017	if inp.Etag != nil {
8018		objectMap["etag"] = inp.Etag
8019	}
8020	if inp.ID != nil {
8021		objectMap["id"] = inp.ID
8022	}
8023	return json.Marshal(objectMap)
8024}
8025
8026// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
8027func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
8028	var m map[string]*json.RawMessage
8029	err := json.Unmarshal(body, &m)
8030	if err != nil {
8031		return err
8032	}
8033	for k, v := range m {
8034		switch k {
8035		case "properties":
8036			if v != nil {
8037				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
8038				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
8039				if err != nil {
8040					return err
8041				}
8042				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
8043			}
8044		case "name":
8045			if v != nil {
8046				var name string
8047				err = json.Unmarshal(*v, &name)
8048				if err != nil {
8049					return err
8050				}
8051				inp.Name = &name
8052			}
8053		case "etag":
8054			if v != nil {
8055				var etag string
8056				err = json.Unmarshal(*v, &etag)
8057				if err != nil {
8058					return err
8059				}
8060				inp.Etag = &etag
8061			}
8062		case "id":
8063			if v != nil {
8064				var ID string
8065				err = json.Unmarshal(*v, &ID)
8066				if err != nil {
8067					return err
8068				}
8069				inp.ID = &ID
8070			}
8071		}
8072	}
8073
8074	return nil
8075}
8076
8077// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
8078type InboundNatPoolPropertiesFormat struct {
8079	// FrontendIPConfiguration - A reference to frontend IP addresses.
8080	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
8081	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
8082	Protocol TransportProtocol `json:"protocol,omitempty"`
8083	// 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.
8084	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
8085	// 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.
8086	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
8087	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
8088	BackendPort *int32 `json:"backendPort,omitempty"`
8089	// 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.
8090	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8091	// 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.
8092	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
8093	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8094	ProvisioningState *string `json:"provisioningState,omitempty"`
8095}
8096
8097// InboundNatRule inbound NAT rule of the load balancer.
8098type InboundNatRule struct {
8099	autorest.Response `json:"-"`
8100	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
8101	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
8102	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8103	Name *string `json:"name,omitempty"`
8104	// Etag - A unique read-only string that changes whenever the resource is updated.
8105	Etag *string `json:"etag,omitempty"`
8106	// ID - Resource ID.
8107	ID *string `json:"id,omitempty"`
8108}
8109
8110// MarshalJSON is the custom marshaler for InboundNatRule.
8111func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
8112	objectMap := make(map[string]interface{})
8113	if inr.InboundNatRulePropertiesFormat != nil {
8114		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
8115	}
8116	if inr.Name != nil {
8117		objectMap["name"] = inr.Name
8118	}
8119	if inr.Etag != nil {
8120		objectMap["etag"] = inr.Etag
8121	}
8122	if inr.ID != nil {
8123		objectMap["id"] = inr.ID
8124	}
8125	return json.Marshal(objectMap)
8126}
8127
8128// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
8129func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
8130	var m map[string]*json.RawMessage
8131	err := json.Unmarshal(body, &m)
8132	if err != nil {
8133		return err
8134	}
8135	for k, v := range m {
8136		switch k {
8137		case "properties":
8138			if v != nil {
8139				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
8140				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
8141				if err != nil {
8142					return err
8143				}
8144				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
8145			}
8146		case "name":
8147			if v != nil {
8148				var name string
8149				err = json.Unmarshal(*v, &name)
8150				if err != nil {
8151					return err
8152				}
8153				inr.Name = &name
8154			}
8155		case "etag":
8156			if v != nil {
8157				var etag string
8158				err = json.Unmarshal(*v, &etag)
8159				if err != nil {
8160					return err
8161				}
8162				inr.Etag = &etag
8163			}
8164		case "id":
8165			if v != nil {
8166				var ID string
8167				err = json.Unmarshal(*v, &ID)
8168				if err != nil {
8169					return err
8170				}
8171				inr.ID = &ID
8172			}
8173		}
8174	}
8175
8176	return nil
8177}
8178
8179// InboundNatRuleListResult response for ListInboundNatRule API service call.
8180type InboundNatRuleListResult struct {
8181	autorest.Response `json:"-"`
8182	// Value - A list of inbound nat rules in a load balancer.
8183	Value *[]InboundNatRule `json:"value,omitempty"`
8184	// NextLink - READ-ONLY; The URL to get the next set of results.
8185	NextLink *string `json:"nextLink,omitempty"`
8186}
8187
8188// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
8189func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
8190	objectMap := make(map[string]interface{})
8191	if inrlr.Value != nil {
8192		objectMap["value"] = inrlr.Value
8193	}
8194	return json.Marshal(objectMap)
8195}
8196
8197// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
8198type InboundNatRuleListResultIterator struct {
8199	i    int
8200	page InboundNatRuleListResultPage
8201}
8202
8203// NextWithContext advances to the next value.  If there was an error making
8204// the request the iterator does not advance and the error is returned.
8205func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
8206	if tracing.IsEnabled() {
8207		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
8208		defer func() {
8209			sc := -1
8210			if iter.Response().Response.Response != nil {
8211				sc = iter.Response().Response.Response.StatusCode
8212			}
8213			tracing.EndSpan(ctx, sc, err)
8214		}()
8215	}
8216	iter.i++
8217	if iter.i < len(iter.page.Values()) {
8218		return nil
8219	}
8220	err = iter.page.NextWithContext(ctx)
8221	if err != nil {
8222		iter.i--
8223		return err
8224	}
8225	iter.i = 0
8226	return nil
8227}
8228
8229// Next advances to the next value.  If there was an error making
8230// the request the iterator does not advance and the error is returned.
8231// Deprecated: Use NextWithContext() instead.
8232func (iter *InboundNatRuleListResultIterator) Next() error {
8233	return iter.NextWithContext(context.Background())
8234}
8235
8236// NotDone returns true if the enumeration should be started or is not yet complete.
8237func (iter InboundNatRuleListResultIterator) NotDone() bool {
8238	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8239}
8240
8241// Response returns the raw server response from the last page request.
8242func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
8243	return iter.page.Response()
8244}
8245
8246// Value returns the current value or a zero-initialized value if the
8247// iterator has advanced beyond the end of the collection.
8248func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
8249	if !iter.page.NotDone() {
8250		return InboundNatRule{}
8251	}
8252	return iter.page.Values()[iter.i]
8253}
8254
8255// Creates a new instance of the InboundNatRuleListResultIterator type.
8256func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
8257	return InboundNatRuleListResultIterator{page: page}
8258}
8259
8260// IsEmpty returns true if the ListResult contains no values.
8261func (inrlr InboundNatRuleListResult) IsEmpty() bool {
8262	return inrlr.Value == nil || len(*inrlr.Value) == 0
8263}
8264
8265// hasNextLink returns true if the NextLink is not empty.
8266func (inrlr InboundNatRuleListResult) hasNextLink() bool {
8267	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
8268}
8269
8270// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
8271// It returns nil if no more results exist.
8272func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
8273	if !inrlr.hasNextLink() {
8274		return nil, nil
8275	}
8276	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8277		autorest.AsJSON(),
8278		autorest.AsGet(),
8279		autorest.WithBaseURL(to.String(inrlr.NextLink)))
8280}
8281
8282// InboundNatRuleListResultPage contains a page of InboundNatRule values.
8283type InboundNatRuleListResultPage struct {
8284	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
8285	inrlr InboundNatRuleListResult
8286}
8287
8288// NextWithContext advances to the next page of values.  If there was an error making
8289// the request the page does not advance and the error is returned.
8290func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
8291	if tracing.IsEnabled() {
8292		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
8293		defer func() {
8294			sc := -1
8295			if page.Response().Response.Response != nil {
8296				sc = page.Response().Response.Response.StatusCode
8297			}
8298			tracing.EndSpan(ctx, sc, err)
8299		}()
8300	}
8301	for {
8302		next, err := page.fn(ctx, page.inrlr)
8303		if err != nil {
8304			return err
8305		}
8306		page.inrlr = next
8307		if !next.hasNextLink() || !next.IsEmpty() {
8308			break
8309		}
8310	}
8311	return nil
8312}
8313
8314// Next advances to the next page of values.  If there was an error making
8315// the request the page does not advance and the error is returned.
8316// Deprecated: Use NextWithContext() instead.
8317func (page *InboundNatRuleListResultPage) Next() error {
8318	return page.NextWithContext(context.Background())
8319}
8320
8321// NotDone returns true if the page enumeration should be started or is not yet complete.
8322func (page InboundNatRuleListResultPage) NotDone() bool {
8323	return !page.inrlr.IsEmpty()
8324}
8325
8326// Response returns the raw server response from the last page request.
8327func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
8328	return page.inrlr
8329}
8330
8331// Values returns the slice of values for the current page or nil if there are no values.
8332func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
8333	if page.inrlr.IsEmpty() {
8334		return nil
8335	}
8336	return *page.inrlr.Value
8337}
8338
8339// Creates a new instance of the InboundNatRuleListResultPage type.
8340func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
8341	return InboundNatRuleListResultPage{
8342		fn:    getNextPage,
8343		inrlr: cur,
8344	}
8345}
8346
8347// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
8348type InboundNatRulePropertiesFormat struct {
8349	// FrontendIPConfiguration - A reference to frontend IP addresses.
8350	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
8351	// 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.
8352	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
8353	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
8354	Protocol TransportProtocol `json:"protocol,omitempty"`
8355	// 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.
8356	FrontendPort *int32 `json:"frontendPort,omitempty"`
8357	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
8358	BackendPort *int32 `json:"backendPort,omitempty"`
8359	// 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.
8360	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8361	// 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.
8362	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
8363	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8364	ProvisioningState *string `json:"provisioningState,omitempty"`
8365}
8366
8367// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
8368func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
8369	objectMap := make(map[string]interface{})
8370	if inrpf.FrontendIPConfiguration != nil {
8371		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
8372	}
8373	if inrpf.Protocol != "" {
8374		objectMap["protocol"] = inrpf.Protocol
8375	}
8376	if inrpf.FrontendPort != nil {
8377		objectMap["frontendPort"] = inrpf.FrontendPort
8378	}
8379	if inrpf.BackendPort != nil {
8380		objectMap["backendPort"] = inrpf.BackendPort
8381	}
8382	if inrpf.IdleTimeoutInMinutes != nil {
8383		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
8384	}
8385	if inrpf.EnableFloatingIP != nil {
8386		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
8387	}
8388	if inrpf.ProvisioningState != nil {
8389		objectMap["provisioningState"] = inrpf.ProvisioningState
8390	}
8391	return json.Marshal(objectMap)
8392}
8393
8394// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8395// long-running operation.
8396type InboundNatRulesCreateOrUpdateFuture struct {
8397	azure.FutureAPI
8398	// Result returns the result of the asynchronous operation.
8399	// If the operation has not completed it will return an error.
8400	Result func(InboundNatRulesClient) (InboundNatRule, error)
8401}
8402
8403// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8404func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8405	var azFuture azure.Future
8406	if err := json.Unmarshal(body, &azFuture); err != nil {
8407		return err
8408	}
8409	future.FutureAPI = &azFuture
8410	future.Result = future.result
8411	return nil
8412}
8413
8414// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
8415func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
8416	var done bool
8417	done, err = future.DoneWithContext(context.Background(), client)
8418	if err != nil {
8419		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8420		return
8421	}
8422	if !done {
8423		inr.Response.Response = future.Response()
8424		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
8425		return
8426	}
8427	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8428	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
8429		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
8430		if err != nil {
8431			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
8432		}
8433	}
8434	return
8435}
8436
8437// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8438// operation.
8439type InboundNatRulesDeleteFuture struct {
8440	azure.FutureAPI
8441	// Result returns the result of the asynchronous operation.
8442	// If the operation has not completed it will return an error.
8443	Result func(InboundNatRulesClient) (autorest.Response, error)
8444}
8445
8446// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8447func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
8448	var azFuture azure.Future
8449	if err := json.Unmarshal(body, &azFuture); err != nil {
8450		return err
8451	}
8452	future.FutureAPI = &azFuture
8453	future.Result = future.result
8454	return nil
8455}
8456
8457// result is the default implementation for InboundNatRulesDeleteFuture.Result.
8458func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
8459	var done bool
8460	done, err = future.DoneWithContext(context.Background(), client)
8461	if err != nil {
8462		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
8463		return
8464	}
8465	if !done {
8466		ar.Response = future.Response()
8467		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
8468		return
8469	}
8470	ar.Response = future.Response()
8471	return
8472}
8473
8474// Interface a network interface in a resource group.
8475type Interface struct {
8476	autorest.Response `json:"-"`
8477	// InterfacePropertiesFormat - Properties of the network interface.
8478	*InterfacePropertiesFormat `json:"properties,omitempty"`
8479	// Etag - A unique read-only string that changes whenever the resource is updated.
8480	Etag *string `json:"etag,omitempty"`
8481	// ID - Resource ID.
8482	ID *string `json:"id,omitempty"`
8483	// Name - READ-ONLY; Resource name.
8484	Name *string `json:"name,omitempty"`
8485	// Type - READ-ONLY; Resource type.
8486	Type *string `json:"type,omitempty"`
8487	// Location - Resource location.
8488	Location *string `json:"location,omitempty"`
8489	// Tags - Resource tags.
8490	Tags map[string]*string `json:"tags"`
8491}
8492
8493// MarshalJSON is the custom marshaler for Interface.
8494func (i Interface) MarshalJSON() ([]byte, error) {
8495	objectMap := make(map[string]interface{})
8496	if i.InterfacePropertiesFormat != nil {
8497		objectMap["properties"] = i.InterfacePropertiesFormat
8498	}
8499	if i.Etag != nil {
8500		objectMap["etag"] = i.Etag
8501	}
8502	if i.ID != nil {
8503		objectMap["id"] = i.ID
8504	}
8505	if i.Location != nil {
8506		objectMap["location"] = i.Location
8507	}
8508	if i.Tags != nil {
8509		objectMap["tags"] = i.Tags
8510	}
8511	return json.Marshal(objectMap)
8512}
8513
8514// UnmarshalJSON is the custom unmarshaler for Interface struct.
8515func (i *Interface) UnmarshalJSON(body []byte) error {
8516	var m map[string]*json.RawMessage
8517	err := json.Unmarshal(body, &m)
8518	if err != nil {
8519		return err
8520	}
8521	for k, v := range m {
8522		switch k {
8523		case "properties":
8524			if v != nil {
8525				var interfacePropertiesFormat InterfacePropertiesFormat
8526				err = json.Unmarshal(*v, &interfacePropertiesFormat)
8527				if err != nil {
8528					return err
8529				}
8530				i.InterfacePropertiesFormat = &interfacePropertiesFormat
8531			}
8532		case "etag":
8533			if v != nil {
8534				var etag string
8535				err = json.Unmarshal(*v, &etag)
8536				if err != nil {
8537					return err
8538				}
8539				i.Etag = &etag
8540			}
8541		case "id":
8542			if v != nil {
8543				var ID string
8544				err = json.Unmarshal(*v, &ID)
8545				if err != nil {
8546					return err
8547				}
8548				i.ID = &ID
8549			}
8550		case "name":
8551			if v != nil {
8552				var name string
8553				err = json.Unmarshal(*v, &name)
8554				if err != nil {
8555					return err
8556				}
8557				i.Name = &name
8558			}
8559		case "type":
8560			if v != nil {
8561				var typeVar string
8562				err = json.Unmarshal(*v, &typeVar)
8563				if err != nil {
8564					return err
8565				}
8566				i.Type = &typeVar
8567			}
8568		case "location":
8569			if v != nil {
8570				var location string
8571				err = json.Unmarshal(*v, &location)
8572				if err != nil {
8573					return err
8574				}
8575				i.Location = &location
8576			}
8577		case "tags":
8578			if v != nil {
8579				var tags map[string]*string
8580				err = json.Unmarshal(*v, &tags)
8581				if err != nil {
8582					return err
8583				}
8584				i.Tags = tags
8585			}
8586		}
8587	}
8588
8589	return nil
8590}
8591
8592// InterfaceAssociation network interface and its custom security rules.
8593type InterfaceAssociation struct {
8594	// ID - READ-ONLY; Network interface ID.
8595	ID *string `json:"id,omitempty"`
8596	// SecurityRules - Collection of custom security rules.
8597	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
8598}
8599
8600// MarshalJSON is the custom marshaler for InterfaceAssociation.
8601func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
8602	objectMap := make(map[string]interface{})
8603	if ia.SecurityRules != nil {
8604		objectMap["securityRules"] = ia.SecurityRules
8605	}
8606	return json.Marshal(objectMap)
8607}
8608
8609// InterfaceDNSSettings DNS settings of a network interface.
8610type InterfaceDNSSettings struct {
8611	// 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.
8612	DNSServers *[]string `json:"dnsServers,omitempty"`
8613	// 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.
8614	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
8615	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
8616	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
8617	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
8618	InternalFqdn *string `json:"internalFqdn,omitempty"`
8619	// 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.
8620	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
8621}
8622
8623// InterfaceIPConfiguration iPConfiguration in a network interface.
8624type InterfaceIPConfiguration struct {
8625	autorest.Response `json:"-"`
8626	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
8627	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8628	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8629	Name *string `json:"name,omitempty"`
8630	// Etag - A unique read-only string that changes whenever the resource is updated.
8631	Etag *string `json:"etag,omitempty"`
8632	// ID - Resource ID.
8633	ID *string `json:"id,omitempty"`
8634}
8635
8636// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
8637func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
8638	objectMap := make(map[string]interface{})
8639	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
8640		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
8641	}
8642	if iic.Name != nil {
8643		objectMap["name"] = iic.Name
8644	}
8645	if iic.Etag != nil {
8646		objectMap["etag"] = iic.Etag
8647	}
8648	if iic.ID != nil {
8649		objectMap["id"] = iic.ID
8650	}
8651	return json.Marshal(objectMap)
8652}
8653
8654// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
8655func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
8656	var m map[string]*json.RawMessage
8657	err := json.Unmarshal(body, &m)
8658	if err != nil {
8659		return err
8660	}
8661	for k, v := range m {
8662		switch k {
8663		case "properties":
8664			if v != nil {
8665				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
8666				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
8667				if err != nil {
8668					return err
8669				}
8670				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
8671			}
8672		case "name":
8673			if v != nil {
8674				var name string
8675				err = json.Unmarshal(*v, &name)
8676				if err != nil {
8677					return err
8678				}
8679				iic.Name = &name
8680			}
8681		case "etag":
8682			if v != nil {
8683				var etag string
8684				err = json.Unmarshal(*v, &etag)
8685				if err != nil {
8686					return err
8687				}
8688				iic.Etag = &etag
8689			}
8690		case "id":
8691			if v != nil {
8692				var ID string
8693				err = json.Unmarshal(*v, &ID)
8694				if err != nil {
8695					return err
8696				}
8697				iic.ID = &ID
8698			}
8699		}
8700	}
8701
8702	return nil
8703}
8704
8705// InterfaceIPConfigurationListResult response for list ip configurations API service call.
8706type InterfaceIPConfigurationListResult struct {
8707	autorest.Response `json:"-"`
8708	// Value - A list of ip configurations.
8709	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
8710	// NextLink - READ-ONLY; The URL to get the next set of results.
8711	NextLink *string `json:"nextLink,omitempty"`
8712}
8713
8714// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
8715func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
8716	objectMap := make(map[string]interface{})
8717	if iiclr.Value != nil {
8718		objectMap["value"] = iiclr.Value
8719	}
8720	return json.Marshal(objectMap)
8721}
8722
8723// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
8724// InterfaceIPConfiguration values.
8725type InterfaceIPConfigurationListResultIterator struct {
8726	i    int
8727	page InterfaceIPConfigurationListResultPage
8728}
8729
8730// NextWithContext advances to the next value.  If there was an error making
8731// the request the iterator does not advance and the error is returned.
8732func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8733	if tracing.IsEnabled() {
8734		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
8735		defer func() {
8736			sc := -1
8737			if iter.Response().Response.Response != nil {
8738				sc = iter.Response().Response.Response.StatusCode
8739			}
8740			tracing.EndSpan(ctx, sc, err)
8741		}()
8742	}
8743	iter.i++
8744	if iter.i < len(iter.page.Values()) {
8745		return nil
8746	}
8747	err = iter.page.NextWithContext(ctx)
8748	if err != nil {
8749		iter.i--
8750		return err
8751	}
8752	iter.i = 0
8753	return nil
8754}
8755
8756// Next advances to the next value.  If there was an error making
8757// the request the iterator does not advance and the error is returned.
8758// Deprecated: Use NextWithContext() instead.
8759func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
8760	return iter.NextWithContext(context.Background())
8761}
8762
8763// NotDone returns true if the enumeration should be started or is not yet complete.
8764func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
8765	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8766}
8767
8768// Response returns the raw server response from the last page request.
8769func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
8770	return iter.page.Response()
8771}
8772
8773// Value returns the current value or a zero-initialized value if the
8774// iterator has advanced beyond the end of the collection.
8775func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
8776	if !iter.page.NotDone() {
8777		return InterfaceIPConfiguration{}
8778	}
8779	return iter.page.Values()[iter.i]
8780}
8781
8782// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
8783func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
8784	return InterfaceIPConfigurationListResultIterator{page: page}
8785}
8786
8787// IsEmpty returns true if the ListResult contains no values.
8788func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
8789	return iiclr.Value == nil || len(*iiclr.Value) == 0
8790}
8791
8792// hasNextLink returns true if the NextLink is not empty.
8793func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
8794	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
8795}
8796
8797// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
8798// It returns nil if no more results exist.
8799func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
8800	if !iiclr.hasNextLink() {
8801		return nil, nil
8802	}
8803	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8804		autorest.AsJSON(),
8805		autorest.AsGet(),
8806		autorest.WithBaseURL(to.String(iiclr.NextLink)))
8807}
8808
8809// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
8810type InterfaceIPConfigurationListResultPage struct {
8811	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
8812	iiclr InterfaceIPConfigurationListResult
8813}
8814
8815// NextWithContext advances to the next page of values.  If there was an error making
8816// the request the page does not advance and the error is returned.
8817func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
8818	if tracing.IsEnabled() {
8819		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
8820		defer func() {
8821			sc := -1
8822			if page.Response().Response.Response != nil {
8823				sc = page.Response().Response.Response.StatusCode
8824			}
8825			tracing.EndSpan(ctx, sc, err)
8826		}()
8827	}
8828	for {
8829		next, err := page.fn(ctx, page.iiclr)
8830		if err != nil {
8831			return err
8832		}
8833		page.iiclr = next
8834		if !next.hasNextLink() || !next.IsEmpty() {
8835			break
8836		}
8837	}
8838	return nil
8839}
8840
8841// Next advances to the next page of values.  If there was an error making
8842// the request the page does not advance and the error is returned.
8843// Deprecated: Use NextWithContext() instead.
8844func (page *InterfaceIPConfigurationListResultPage) Next() error {
8845	return page.NextWithContext(context.Background())
8846}
8847
8848// NotDone returns true if the page enumeration should be started or is not yet complete.
8849func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
8850	return !page.iiclr.IsEmpty()
8851}
8852
8853// Response returns the raw server response from the last page request.
8854func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
8855	return page.iiclr
8856}
8857
8858// Values returns the slice of values for the current page or nil if there are no values.
8859func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
8860	if page.iiclr.IsEmpty() {
8861		return nil
8862	}
8863	return *page.iiclr.Value
8864}
8865
8866// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
8867func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
8868	return InterfaceIPConfigurationListResultPage{
8869		fn:    getNextPage,
8870		iiclr: cur,
8871	}
8872}
8873
8874// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
8875type InterfaceIPConfigurationPropertiesFormat struct {
8876	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
8877	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
8878	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
8879	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
8880	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
8881	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
8882	// PrivateIPAddress - Private IP address of the IP configuration.
8883	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
8884	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
8885	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8886	// 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'
8887	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
8888	// Subnet - Subnet bound to the IP configuration.
8889	Subnet *Subnet `json:"subnet,omitempty"`
8890	// Primary - Gets whether this is a primary customer address on the network interface.
8891	Primary *bool `json:"primary,omitempty"`
8892	// PublicIPAddress - Public IP address bound to the IP configuration.
8893	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
8894	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
8895	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
8896	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8897	ProvisioningState *string `json:"provisioningState,omitempty"`
8898}
8899
8900// InterfaceListResult response for the ListNetworkInterface API service call.
8901type InterfaceListResult struct {
8902	autorest.Response `json:"-"`
8903	// Value - A list of network interfaces in a resource group.
8904	Value *[]Interface `json:"value,omitempty"`
8905	// NextLink - READ-ONLY; The URL to get the next set of results.
8906	NextLink *string `json:"nextLink,omitempty"`
8907}
8908
8909// MarshalJSON is the custom marshaler for InterfaceListResult.
8910func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
8911	objectMap := make(map[string]interface{})
8912	if ilr.Value != nil {
8913		objectMap["value"] = ilr.Value
8914	}
8915	return json.Marshal(objectMap)
8916}
8917
8918// InterfaceListResultIterator provides access to a complete listing of Interface values.
8919type InterfaceListResultIterator struct {
8920	i    int
8921	page InterfaceListResultPage
8922}
8923
8924// NextWithContext advances to the next value.  If there was an error making
8925// the request the iterator does not advance and the error is returned.
8926func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
8927	if tracing.IsEnabled() {
8928		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
8929		defer func() {
8930			sc := -1
8931			if iter.Response().Response.Response != nil {
8932				sc = iter.Response().Response.Response.StatusCode
8933			}
8934			tracing.EndSpan(ctx, sc, err)
8935		}()
8936	}
8937	iter.i++
8938	if iter.i < len(iter.page.Values()) {
8939		return nil
8940	}
8941	err = iter.page.NextWithContext(ctx)
8942	if err != nil {
8943		iter.i--
8944		return err
8945	}
8946	iter.i = 0
8947	return nil
8948}
8949
8950// Next advances to the next value.  If there was an error making
8951// the request the iterator does not advance and the error is returned.
8952// Deprecated: Use NextWithContext() instead.
8953func (iter *InterfaceListResultIterator) Next() error {
8954	return iter.NextWithContext(context.Background())
8955}
8956
8957// NotDone returns true if the enumeration should be started or is not yet complete.
8958func (iter InterfaceListResultIterator) NotDone() bool {
8959	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8960}
8961
8962// Response returns the raw server response from the last page request.
8963func (iter InterfaceListResultIterator) Response() InterfaceListResult {
8964	return iter.page.Response()
8965}
8966
8967// Value returns the current value or a zero-initialized value if the
8968// iterator has advanced beyond the end of the collection.
8969func (iter InterfaceListResultIterator) Value() Interface {
8970	if !iter.page.NotDone() {
8971		return Interface{}
8972	}
8973	return iter.page.Values()[iter.i]
8974}
8975
8976// Creates a new instance of the InterfaceListResultIterator type.
8977func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
8978	return InterfaceListResultIterator{page: page}
8979}
8980
8981// IsEmpty returns true if the ListResult contains no values.
8982func (ilr InterfaceListResult) IsEmpty() bool {
8983	return ilr.Value == nil || len(*ilr.Value) == 0
8984}
8985
8986// hasNextLink returns true if the NextLink is not empty.
8987func (ilr InterfaceListResult) hasNextLink() bool {
8988	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
8989}
8990
8991// interfaceListResultPreparer prepares a request to retrieve the next set of results.
8992// It returns nil if no more results exist.
8993func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
8994	if !ilr.hasNextLink() {
8995		return nil, nil
8996	}
8997	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8998		autorest.AsJSON(),
8999		autorest.AsGet(),
9000		autorest.WithBaseURL(to.String(ilr.NextLink)))
9001}
9002
9003// InterfaceListResultPage contains a page of Interface values.
9004type InterfaceListResultPage struct {
9005	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
9006	ilr InterfaceListResult
9007}
9008
9009// NextWithContext advances to the next page of values.  If there was an error making
9010// the request the page does not advance and the error is returned.
9011func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
9012	if tracing.IsEnabled() {
9013		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
9014		defer func() {
9015			sc := -1
9016			if page.Response().Response.Response != nil {
9017				sc = page.Response().Response.Response.StatusCode
9018			}
9019			tracing.EndSpan(ctx, sc, err)
9020		}()
9021	}
9022	for {
9023		next, err := page.fn(ctx, page.ilr)
9024		if err != nil {
9025			return err
9026		}
9027		page.ilr = next
9028		if !next.hasNextLink() || !next.IsEmpty() {
9029			break
9030		}
9031	}
9032	return nil
9033}
9034
9035// Next advances to the next page of values.  If there was an error making
9036// the request the page does not advance and the error is returned.
9037// Deprecated: Use NextWithContext() instead.
9038func (page *InterfaceListResultPage) Next() error {
9039	return page.NextWithContext(context.Background())
9040}
9041
9042// NotDone returns true if the page enumeration should be started or is not yet complete.
9043func (page InterfaceListResultPage) NotDone() bool {
9044	return !page.ilr.IsEmpty()
9045}
9046
9047// Response returns the raw server response from the last page request.
9048func (page InterfaceListResultPage) Response() InterfaceListResult {
9049	return page.ilr
9050}
9051
9052// Values returns the slice of values for the current page or nil if there are no values.
9053func (page InterfaceListResultPage) Values() []Interface {
9054	if page.ilr.IsEmpty() {
9055		return nil
9056	}
9057	return *page.ilr.Value
9058}
9059
9060// Creates a new instance of the InterfaceListResultPage type.
9061func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
9062	return InterfaceListResultPage{
9063		fn:  getNextPage,
9064		ilr: cur,
9065	}
9066}
9067
9068// InterfaceLoadBalancerListResult response for list ip configurations API service call.
9069type InterfaceLoadBalancerListResult struct {
9070	autorest.Response `json:"-"`
9071	// Value - A list of load balancers.
9072	Value *[]LoadBalancer `json:"value,omitempty"`
9073	// NextLink - READ-ONLY; The URL to get the next set of results.
9074	NextLink *string `json:"nextLink,omitempty"`
9075}
9076
9077// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
9078func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
9079	objectMap := make(map[string]interface{})
9080	if ilblr.Value != nil {
9081		objectMap["value"] = ilblr.Value
9082	}
9083	return json.Marshal(objectMap)
9084}
9085
9086// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
9087type InterfaceLoadBalancerListResultIterator struct {
9088	i    int
9089	page InterfaceLoadBalancerListResultPage
9090}
9091
9092// NextWithContext advances to the next value.  If there was an error making
9093// the request the iterator does not advance and the error is returned.
9094func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
9095	if tracing.IsEnabled() {
9096		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
9097		defer func() {
9098			sc := -1
9099			if iter.Response().Response.Response != nil {
9100				sc = iter.Response().Response.Response.StatusCode
9101			}
9102			tracing.EndSpan(ctx, sc, err)
9103		}()
9104	}
9105	iter.i++
9106	if iter.i < len(iter.page.Values()) {
9107		return nil
9108	}
9109	err = iter.page.NextWithContext(ctx)
9110	if err != nil {
9111		iter.i--
9112		return err
9113	}
9114	iter.i = 0
9115	return nil
9116}
9117
9118// Next advances to the next value.  If there was an error making
9119// the request the iterator does not advance and the error is returned.
9120// Deprecated: Use NextWithContext() instead.
9121func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
9122	return iter.NextWithContext(context.Background())
9123}
9124
9125// NotDone returns true if the enumeration should be started or is not yet complete.
9126func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
9127	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9128}
9129
9130// Response returns the raw server response from the last page request.
9131func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
9132	return iter.page.Response()
9133}
9134
9135// Value returns the current value or a zero-initialized value if the
9136// iterator has advanced beyond the end of the collection.
9137func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
9138	if !iter.page.NotDone() {
9139		return LoadBalancer{}
9140	}
9141	return iter.page.Values()[iter.i]
9142}
9143
9144// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
9145func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
9146	return InterfaceLoadBalancerListResultIterator{page: page}
9147}
9148
9149// IsEmpty returns true if the ListResult contains no values.
9150func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
9151	return ilblr.Value == nil || len(*ilblr.Value) == 0
9152}
9153
9154// hasNextLink returns true if the NextLink is not empty.
9155func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
9156	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
9157}
9158
9159// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
9160// It returns nil if no more results exist.
9161func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
9162	if !ilblr.hasNextLink() {
9163		return nil, nil
9164	}
9165	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9166		autorest.AsJSON(),
9167		autorest.AsGet(),
9168		autorest.WithBaseURL(to.String(ilblr.NextLink)))
9169}
9170
9171// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
9172type InterfaceLoadBalancerListResultPage struct {
9173	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
9174	ilblr InterfaceLoadBalancerListResult
9175}
9176
9177// NextWithContext advances to the next page of values.  If there was an error making
9178// the request the page does not advance and the error is returned.
9179func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
9180	if tracing.IsEnabled() {
9181		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
9182		defer func() {
9183			sc := -1
9184			if page.Response().Response.Response != nil {
9185				sc = page.Response().Response.Response.StatusCode
9186			}
9187			tracing.EndSpan(ctx, sc, err)
9188		}()
9189	}
9190	for {
9191		next, err := page.fn(ctx, page.ilblr)
9192		if err != nil {
9193			return err
9194		}
9195		page.ilblr = next
9196		if !next.hasNextLink() || !next.IsEmpty() {
9197			break
9198		}
9199	}
9200	return nil
9201}
9202
9203// Next advances to the next page of values.  If there was an error making
9204// the request the page does not advance and the error is returned.
9205// Deprecated: Use NextWithContext() instead.
9206func (page *InterfaceLoadBalancerListResultPage) Next() error {
9207	return page.NextWithContext(context.Background())
9208}
9209
9210// NotDone returns true if the page enumeration should be started or is not yet complete.
9211func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
9212	return !page.ilblr.IsEmpty()
9213}
9214
9215// Response returns the raw server response from the last page request.
9216func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
9217	return page.ilblr
9218}
9219
9220// Values returns the slice of values for the current page or nil if there are no values.
9221func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
9222	if page.ilblr.IsEmpty() {
9223		return nil
9224	}
9225	return *page.ilblr.Value
9226}
9227
9228// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
9229func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
9230	return InterfaceLoadBalancerListResultPage{
9231		fn:    getNextPage,
9232		ilblr: cur,
9233	}
9234}
9235
9236// InterfacePropertiesFormat networkInterface properties.
9237type InterfacePropertiesFormat struct {
9238	// VirtualMachine - The reference of a virtual machine.
9239	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
9240	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
9241	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
9242	// IPConfigurations - A list of IPConfigurations of the network interface.
9243	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
9244	// DNSSettings - The DNS settings in network interface.
9245	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
9246	// MacAddress - The MAC address of the network interface.
9247	MacAddress *string `json:"macAddress,omitempty"`
9248	// Primary - Gets whether this is a primary network interface on a virtual machine.
9249	Primary *bool `json:"primary,omitempty"`
9250	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
9251	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
9252	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
9253	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
9254	// ResourceGUID - The resource GUID property of the network interface resource.
9255	ResourceGUID *string `json:"resourceGuid,omitempty"`
9256	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9257	ProvisioningState *string `json:"provisioningState,omitempty"`
9258}
9259
9260// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9261// long-running operation.
9262type InterfacesCreateOrUpdateFuture struct {
9263	azure.FutureAPI
9264	// Result returns the result of the asynchronous operation.
9265	// If the operation has not completed it will return an error.
9266	Result func(InterfacesClient) (Interface, error)
9267}
9268
9269// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9270func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9271	var azFuture azure.Future
9272	if err := json.Unmarshal(body, &azFuture); err != nil {
9273		return err
9274	}
9275	future.FutureAPI = &azFuture
9276	future.Result = future.result
9277	return nil
9278}
9279
9280// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
9281func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
9282	var done bool
9283	done, err = future.DoneWithContext(context.Background(), client)
9284	if err != nil {
9285		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9286		return
9287	}
9288	if !done {
9289		i.Response.Response = future.Response()
9290		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
9291		return
9292	}
9293	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9294	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
9295		i, err = client.CreateOrUpdateResponder(i.Response.Response)
9296		if err != nil {
9297			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
9298		}
9299	}
9300	return
9301}
9302
9303// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9304// operation.
9305type InterfacesDeleteFuture struct {
9306	azure.FutureAPI
9307	// Result returns the result of the asynchronous operation.
9308	// If the operation has not completed it will return an error.
9309	Result func(InterfacesClient) (autorest.Response, error)
9310}
9311
9312// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9313func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
9314	var azFuture azure.Future
9315	if err := json.Unmarshal(body, &azFuture); err != nil {
9316		return err
9317	}
9318	future.FutureAPI = &azFuture
9319	future.Result = future.result
9320	return nil
9321}
9322
9323// result is the default implementation for InterfacesDeleteFuture.Result.
9324func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
9325	var done bool
9326	done, err = future.DoneWithContext(context.Background(), client)
9327	if err != nil {
9328		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
9329		return
9330	}
9331	if !done {
9332		ar.Response = future.Response()
9333		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
9334		return
9335	}
9336	ar.Response = future.Response()
9337	return
9338}
9339
9340// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
9341// long-running operation.
9342type InterfacesGetEffectiveRouteTableFuture struct {
9343	azure.FutureAPI
9344	// Result returns the result of the asynchronous operation.
9345	// If the operation has not completed it will return an error.
9346	Result func(InterfacesClient) (EffectiveRouteListResult, error)
9347}
9348
9349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9350func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
9351	var azFuture azure.Future
9352	if err := json.Unmarshal(body, &azFuture); err != nil {
9353		return err
9354	}
9355	future.FutureAPI = &azFuture
9356	future.Result = future.result
9357	return nil
9358}
9359
9360// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
9361func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
9362	var done bool
9363	done, err = future.DoneWithContext(context.Background(), client)
9364	if err != nil {
9365		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
9366		return
9367	}
9368	if !done {
9369		erlr.Response.Response = future.Response()
9370		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
9371		return
9372	}
9373	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9374	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
9375		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
9376		if err != nil {
9377			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
9378		}
9379	}
9380	return
9381}
9382
9383// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
9384// results of a long-running operation.
9385type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
9386	azure.FutureAPI
9387	// Result returns the result of the asynchronous operation.
9388	// If the operation has not completed it will return an error.
9389	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
9390}
9391
9392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9393func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
9394	var azFuture azure.Future
9395	if err := json.Unmarshal(body, &azFuture); err != nil {
9396		return err
9397	}
9398	future.FutureAPI = &azFuture
9399	future.Result = future.result
9400	return nil
9401}
9402
9403// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
9404func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
9405	var done bool
9406	done, err = future.DoneWithContext(context.Background(), client)
9407	if err != nil {
9408		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
9409		return
9410	}
9411	if !done {
9412		ensglr.Response.Response = future.Response()
9413		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
9414		return
9415	}
9416	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9417	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
9418		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
9419		if err != nil {
9420			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
9421		}
9422	}
9423	return
9424}
9425
9426// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
9427// operation.
9428type InterfacesUpdateTagsFuture struct {
9429	azure.FutureAPI
9430	// Result returns the result of the asynchronous operation.
9431	// If the operation has not completed it will return an error.
9432	Result func(InterfacesClient) (Interface, error)
9433}
9434
9435// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9436func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9437	var azFuture azure.Future
9438	if err := json.Unmarshal(body, &azFuture); err != nil {
9439		return err
9440	}
9441	future.FutureAPI = &azFuture
9442	future.Result = future.result
9443	return nil
9444}
9445
9446// result is the default implementation for InterfacesUpdateTagsFuture.Result.
9447func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
9448	var done bool
9449	done, err = future.DoneWithContext(context.Background(), client)
9450	if err != nil {
9451		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9452		return
9453	}
9454	if !done {
9455		i.Response.Response = future.Response()
9456		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
9457		return
9458	}
9459	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9460	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
9461		i, err = client.UpdateTagsResponder(i.Response.Response)
9462		if err != nil {
9463			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
9464		}
9465	}
9466	return
9467}
9468
9469// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
9470type IPAddressAvailabilityResult struct {
9471	autorest.Response `json:"-"`
9472	// Available - Private IP address availability.
9473	Available *bool `json:"available,omitempty"`
9474	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
9475	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
9476}
9477
9478// IPConfiguration IP configuration
9479type IPConfiguration struct {
9480	// IPConfigurationPropertiesFormat - Properties of the IP configuration
9481	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
9482	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9483	Name *string `json:"name,omitempty"`
9484	// Etag - A unique read-only string that changes whenever the resource is updated.
9485	Etag *string `json:"etag,omitempty"`
9486	// ID - Resource ID.
9487	ID *string `json:"id,omitempty"`
9488}
9489
9490// MarshalJSON is the custom marshaler for IPConfiguration.
9491func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
9492	objectMap := make(map[string]interface{})
9493	if ic.IPConfigurationPropertiesFormat != nil {
9494		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
9495	}
9496	if ic.Name != nil {
9497		objectMap["name"] = ic.Name
9498	}
9499	if ic.Etag != nil {
9500		objectMap["etag"] = ic.Etag
9501	}
9502	if ic.ID != nil {
9503		objectMap["id"] = ic.ID
9504	}
9505	return json.Marshal(objectMap)
9506}
9507
9508// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
9509func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
9510	var m map[string]*json.RawMessage
9511	err := json.Unmarshal(body, &m)
9512	if err != nil {
9513		return err
9514	}
9515	for k, v := range m {
9516		switch k {
9517		case "properties":
9518			if v != nil {
9519				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
9520				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
9521				if err != nil {
9522					return err
9523				}
9524				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
9525			}
9526		case "name":
9527			if v != nil {
9528				var name string
9529				err = json.Unmarshal(*v, &name)
9530				if err != nil {
9531					return err
9532				}
9533				ic.Name = &name
9534			}
9535		case "etag":
9536			if v != nil {
9537				var etag string
9538				err = json.Unmarshal(*v, &etag)
9539				if err != nil {
9540					return err
9541				}
9542				ic.Etag = &etag
9543			}
9544		case "id":
9545			if v != nil {
9546				var ID string
9547				err = json.Unmarshal(*v, &ID)
9548				if err != nil {
9549					return err
9550				}
9551				ic.ID = &ID
9552			}
9553		}
9554	}
9555
9556	return nil
9557}
9558
9559// IPConfigurationPropertiesFormat properties of IP configuration.
9560type IPConfigurationPropertiesFormat struct {
9561	// PrivateIPAddress - The private IP address of the IP configuration.
9562	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9563	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9564	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
9565	// Subnet - The reference of the subnet resource.
9566	Subnet *Subnet `json:"subnet,omitempty"`
9567	// PublicIPAddress - The reference of the public IP resource.
9568	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
9569	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9570	ProvisioningState *string `json:"provisioningState,omitempty"`
9571}
9572
9573// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
9574type IpsecPolicy struct {
9575	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
9576	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
9577	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
9578	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
9579	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
9580	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
9581	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
9582	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
9583	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
9584	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
9585	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
9586	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
9587	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
9588	DhGroup DhGroup `json:"dhGroup,omitempty"`
9589	// 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'
9590	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
9591}
9592
9593// IPTag contains the IpTag associated with the public IP address
9594type IPTag struct {
9595	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
9596	IPTagType *string `json:"ipTagType,omitempty"`
9597	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
9598	Tag *string `json:"tag,omitempty"`
9599}
9600
9601// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
9602type Ipv6ExpressRouteCircuitPeeringConfig struct {
9603	// PrimaryPeerAddressPrefix - The primary address prefix.
9604	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9605	// SecondaryPeerAddressPrefix - The secondary address prefix.
9606	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9607	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9608	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9609	// RouteFilter - The reference of the RouteFilter resource.
9610	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
9611	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
9612	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
9613}
9614
9615// LoadBalancer loadBalancer resource
9616type LoadBalancer struct {
9617	autorest.Response `json:"-"`
9618	// Sku - The load balancer SKU.
9619	Sku *LoadBalancerSku `json:"sku,omitempty"`
9620	// LoadBalancerPropertiesFormat - Properties of load balancer.
9621	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
9622	// Etag - A unique read-only string that changes whenever the resource is updated.
9623	Etag *string `json:"etag,omitempty"`
9624	// ID - Resource ID.
9625	ID *string `json:"id,omitempty"`
9626	// Name - READ-ONLY; Resource name.
9627	Name *string `json:"name,omitempty"`
9628	// Type - READ-ONLY; Resource type.
9629	Type *string `json:"type,omitempty"`
9630	// Location - Resource location.
9631	Location *string `json:"location,omitempty"`
9632	// Tags - Resource tags.
9633	Tags map[string]*string `json:"tags"`
9634}
9635
9636// MarshalJSON is the custom marshaler for LoadBalancer.
9637func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
9638	objectMap := make(map[string]interface{})
9639	if lb.Sku != nil {
9640		objectMap["sku"] = lb.Sku
9641	}
9642	if lb.LoadBalancerPropertiesFormat != nil {
9643		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
9644	}
9645	if lb.Etag != nil {
9646		objectMap["etag"] = lb.Etag
9647	}
9648	if lb.ID != nil {
9649		objectMap["id"] = lb.ID
9650	}
9651	if lb.Location != nil {
9652		objectMap["location"] = lb.Location
9653	}
9654	if lb.Tags != nil {
9655		objectMap["tags"] = lb.Tags
9656	}
9657	return json.Marshal(objectMap)
9658}
9659
9660// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
9661func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
9662	var m map[string]*json.RawMessage
9663	err := json.Unmarshal(body, &m)
9664	if err != nil {
9665		return err
9666	}
9667	for k, v := range m {
9668		switch k {
9669		case "sku":
9670			if v != nil {
9671				var sku LoadBalancerSku
9672				err = json.Unmarshal(*v, &sku)
9673				if err != nil {
9674					return err
9675				}
9676				lb.Sku = &sku
9677			}
9678		case "properties":
9679			if v != nil {
9680				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
9681				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
9682				if err != nil {
9683					return err
9684				}
9685				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
9686			}
9687		case "etag":
9688			if v != nil {
9689				var etag string
9690				err = json.Unmarshal(*v, &etag)
9691				if err != nil {
9692					return err
9693				}
9694				lb.Etag = &etag
9695			}
9696		case "id":
9697			if v != nil {
9698				var ID string
9699				err = json.Unmarshal(*v, &ID)
9700				if err != nil {
9701					return err
9702				}
9703				lb.ID = &ID
9704			}
9705		case "name":
9706			if v != nil {
9707				var name string
9708				err = json.Unmarshal(*v, &name)
9709				if err != nil {
9710					return err
9711				}
9712				lb.Name = &name
9713			}
9714		case "type":
9715			if v != nil {
9716				var typeVar string
9717				err = json.Unmarshal(*v, &typeVar)
9718				if err != nil {
9719					return err
9720				}
9721				lb.Type = &typeVar
9722			}
9723		case "location":
9724			if v != nil {
9725				var location string
9726				err = json.Unmarshal(*v, &location)
9727				if err != nil {
9728					return err
9729				}
9730				lb.Location = &location
9731			}
9732		case "tags":
9733			if v != nil {
9734				var tags map[string]*string
9735				err = json.Unmarshal(*v, &tags)
9736				if err != nil {
9737					return err
9738				}
9739				lb.Tags = tags
9740			}
9741		}
9742	}
9743
9744	return nil
9745}
9746
9747// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
9748type LoadBalancerBackendAddressPoolListResult struct {
9749	autorest.Response `json:"-"`
9750	// Value - A list of backend address pools in a load balancer.
9751	Value *[]BackendAddressPool `json:"value,omitempty"`
9752	// NextLink - READ-ONLY; The URL to get the next set of results.
9753	NextLink *string `json:"nextLink,omitempty"`
9754}
9755
9756// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
9757func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
9758	objectMap := make(map[string]interface{})
9759	if lbbaplr.Value != nil {
9760		objectMap["value"] = lbbaplr.Value
9761	}
9762	return json.Marshal(objectMap)
9763}
9764
9765// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
9766// BackendAddressPool values.
9767type LoadBalancerBackendAddressPoolListResultIterator struct {
9768	i    int
9769	page LoadBalancerBackendAddressPoolListResultPage
9770}
9771
9772// NextWithContext advances to the next value.  If there was an error making
9773// the request the iterator does not advance and the error is returned.
9774func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
9775	if tracing.IsEnabled() {
9776		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
9777		defer func() {
9778			sc := -1
9779			if iter.Response().Response.Response != nil {
9780				sc = iter.Response().Response.Response.StatusCode
9781			}
9782			tracing.EndSpan(ctx, sc, err)
9783		}()
9784	}
9785	iter.i++
9786	if iter.i < len(iter.page.Values()) {
9787		return nil
9788	}
9789	err = iter.page.NextWithContext(ctx)
9790	if err != nil {
9791		iter.i--
9792		return err
9793	}
9794	iter.i = 0
9795	return nil
9796}
9797
9798// Next advances to the next value.  If there was an error making
9799// the request the iterator does not advance and the error is returned.
9800// Deprecated: Use NextWithContext() instead.
9801func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
9802	return iter.NextWithContext(context.Background())
9803}
9804
9805// NotDone returns true if the enumeration should be started or is not yet complete.
9806func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
9807	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9808}
9809
9810// Response returns the raw server response from the last page request.
9811func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
9812	return iter.page.Response()
9813}
9814
9815// Value returns the current value or a zero-initialized value if the
9816// iterator has advanced beyond the end of the collection.
9817func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
9818	if !iter.page.NotDone() {
9819		return BackendAddressPool{}
9820	}
9821	return iter.page.Values()[iter.i]
9822}
9823
9824// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
9825func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
9826	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
9827}
9828
9829// IsEmpty returns true if the ListResult contains no values.
9830func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
9831	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
9832}
9833
9834// hasNextLink returns true if the NextLink is not empty.
9835func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
9836	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
9837}
9838
9839// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
9840// It returns nil if no more results exist.
9841func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
9842	if !lbbaplr.hasNextLink() {
9843		return nil, nil
9844	}
9845	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9846		autorest.AsJSON(),
9847		autorest.AsGet(),
9848		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
9849}
9850
9851// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
9852type LoadBalancerBackendAddressPoolListResultPage struct {
9853	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
9854	lbbaplr LoadBalancerBackendAddressPoolListResult
9855}
9856
9857// NextWithContext advances to the next page of values.  If there was an error making
9858// the request the page does not advance and the error is returned.
9859func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
9860	if tracing.IsEnabled() {
9861		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
9862		defer func() {
9863			sc := -1
9864			if page.Response().Response.Response != nil {
9865				sc = page.Response().Response.Response.StatusCode
9866			}
9867			tracing.EndSpan(ctx, sc, err)
9868		}()
9869	}
9870	for {
9871		next, err := page.fn(ctx, page.lbbaplr)
9872		if err != nil {
9873			return err
9874		}
9875		page.lbbaplr = next
9876		if !next.hasNextLink() || !next.IsEmpty() {
9877			break
9878		}
9879	}
9880	return nil
9881}
9882
9883// Next advances to the next page of values.  If there was an error making
9884// the request the page does not advance and the error is returned.
9885// Deprecated: Use NextWithContext() instead.
9886func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
9887	return page.NextWithContext(context.Background())
9888}
9889
9890// NotDone returns true if the page enumeration should be started or is not yet complete.
9891func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
9892	return !page.lbbaplr.IsEmpty()
9893}
9894
9895// Response returns the raw server response from the last page request.
9896func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
9897	return page.lbbaplr
9898}
9899
9900// Values returns the slice of values for the current page or nil if there are no values.
9901func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
9902	if page.lbbaplr.IsEmpty() {
9903		return nil
9904	}
9905	return *page.lbbaplr.Value
9906}
9907
9908// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
9909func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
9910	return LoadBalancerBackendAddressPoolListResultPage{
9911		fn:      getNextPage,
9912		lbbaplr: cur,
9913	}
9914}
9915
9916// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
9917type LoadBalancerFrontendIPConfigurationListResult struct {
9918	autorest.Response `json:"-"`
9919	// Value - A list of frontend IP configurations in a load balancer.
9920	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
9921	// NextLink - READ-ONLY; The URL to get the next set of results.
9922	NextLink *string `json:"nextLink,omitempty"`
9923}
9924
9925// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
9926func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
9927	objectMap := make(map[string]interface{})
9928	if lbficlr.Value != nil {
9929		objectMap["value"] = lbficlr.Value
9930	}
9931	return json.Marshal(objectMap)
9932}
9933
9934// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
9935// FrontendIPConfiguration values.
9936type LoadBalancerFrontendIPConfigurationListResultIterator struct {
9937	i    int
9938	page LoadBalancerFrontendIPConfigurationListResultPage
9939}
9940
9941// NextWithContext advances to the next value.  If there was an error making
9942// the request the iterator does not advance and the error is returned.
9943func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9944	if tracing.IsEnabled() {
9945		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
9946		defer func() {
9947			sc := -1
9948			if iter.Response().Response.Response != nil {
9949				sc = iter.Response().Response.Response.StatusCode
9950			}
9951			tracing.EndSpan(ctx, sc, err)
9952		}()
9953	}
9954	iter.i++
9955	if iter.i < len(iter.page.Values()) {
9956		return nil
9957	}
9958	err = iter.page.NextWithContext(ctx)
9959	if err != nil {
9960		iter.i--
9961		return err
9962	}
9963	iter.i = 0
9964	return nil
9965}
9966
9967// Next advances to the next value.  If there was an error making
9968// the request the iterator does not advance and the error is returned.
9969// Deprecated: Use NextWithContext() instead.
9970func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
9971	return iter.NextWithContext(context.Background())
9972}
9973
9974// NotDone returns true if the enumeration should be started or is not yet complete.
9975func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
9976	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9977}
9978
9979// Response returns the raw server response from the last page request.
9980func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
9981	return iter.page.Response()
9982}
9983
9984// Value returns the current value or a zero-initialized value if the
9985// iterator has advanced beyond the end of the collection.
9986func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
9987	if !iter.page.NotDone() {
9988		return FrontendIPConfiguration{}
9989	}
9990	return iter.page.Values()[iter.i]
9991}
9992
9993// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
9994func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
9995	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
9996}
9997
9998// IsEmpty returns true if the ListResult contains no values.
9999func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
10000	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
10001}
10002
10003// hasNextLink returns true if the NextLink is not empty.
10004func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
10005	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
10006}
10007
10008// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
10009// It returns nil if no more results exist.
10010func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
10011	if !lbficlr.hasNextLink() {
10012		return nil, nil
10013	}
10014	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10015		autorest.AsJSON(),
10016		autorest.AsGet(),
10017		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
10018}
10019
10020// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
10021type LoadBalancerFrontendIPConfigurationListResultPage struct {
10022	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
10023	lbficlr LoadBalancerFrontendIPConfigurationListResult
10024}
10025
10026// NextWithContext advances to the next page of values.  If there was an error making
10027// the request the page does not advance and the error is returned.
10028func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
10029	if tracing.IsEnabled() {
10030		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
10031		defer func() {
10032			sc := -1
10033			if page.Response().Response.Response != nil {
10034				sc = page.Response().Response.Response.StatusCode
10035			}
10036			tracing.EndSpan(ctx, sc, err)
10037		}()
10038	}
10039	for {
10040		next, err := page.fn(ctx, page.lbficlr)
10041		if err != nil {
10042			return err
10043		}
10044		page.lbficlr = next
10045		if !next.hasNextLink() || !next.IsEmpty() {
10046			break
10047		}
10048	}
10049	return nil
10050}
10051
10052// Next advances to the next page of values.  If there was an error making
10053// the request the page does not advance and the error is returned.
10054// Deprecated: Use NextWithContext() instead.
10055func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
10056	return page.NextWithContext(context.Background())
10057}
10058
10059// NotDone returns true if the page enumeration should be started or is not yet complete.
10060func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
10061	return !page.lbficlr.IsEmpty()
10062}
10063
10064// Response returns the raw server response from the last page request.
10065func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
10066	return page.lbficlr
10067}
10068
10069// Values returns the slice of values for the current page or nil if there are no values.
10070func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
10071	if page.lbficlr.IsEmpty() {
10072		return nil
10073	}
10074	return *page.lbficlr.Value
10075}
10076
10077// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
10078func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
10079	return LoadBalancerFrontendIPConfigurationListResultPage{
10080		fn:      getNextPage,
10081		lbficlr: cur,
10082	}
10083}
10084
10085// LoadBalancerListResult response for ListLoadBalancers API service call.
10086type LoadBalancerListResult struct {
10087	autorest.Response `json:"-"`
10088	// Value - A list of load balancers in a resource group.
10089	Value *[]LoadBalancer `json:"value,omitempty"`
10090	// NextLink - READ-ONLY; The URL to get the next set of results.
10091	NextLink *string `json:"nextLink,omitempty"`
10092}
10093
10094// MarshalJSON is the custom marshaler for LoadBalancerListResult.
10095func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
10096	objectMap := make(map[string]interface{})
10097	if lblr.Value != nil {
10098		objectMap["value"] = lblr.Value
10099	}
10100	return json.Marshal(objectMap)
10101}
10102
10103// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
10104type LoadBalancerListResultIterator struct {
10105	i    int
10106	page LoadBalancerListResultPage
10107}
10108
10109// NextWithContext advances to the next value.  If there was an error making
10110// the request the iterator does not advance and the error is returned.
10111func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
10112	if tracing.IsEnabled() {
10113		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
10114		defer func() {
10115			sc := -1
10116			if iter.Response().Response.Response != nil {
10117				sc = iter.Response().Response.Response.StatusCode
10118			}
10119			tracing.EndSpan(ctx, sc, err)
10120		}()
10121	}
10122	iter.i++
10123	if iter.i < len(iter.page.Values()) {
10124		return nil
10125	}
10126	err = iter.page.NextWithContext(ctx)
10127	if err != nil {
10128		iter.i--
10129		return err
10130	}
10131	iter.i = 0
10132	return nil
10133}
10134
10135// Next advances to the next value.  If there was an error making
10136// the request the iterator does not advance and the error is returned.
10137// Deprecated: Use NextWithContext() instead.
10138func (iter *LoadBalancerListResultIterator) Next() error {
10139	return iter.NextWithContext(context.Background())
10140}
10141
10142// NotDone returns true if the enumeration should be started or is not yet complete.
10143func (iter LoadBalancerListResultIterator) NotDone() bool {
10144	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10145}
10146
10147// Response returns the raw server response from the last page request.
10148func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
10149	return iter.page.Response()
10150}
10151
10152// Value returns the current value or a zero-initialized value if the
10153// iterator has advanced beyond the end of the collection.
10154func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
10155	if !iter.page.NotDone() {
10156		return LoadBalancer{}
10157	}
10158	return iter.page.Values()[iter.i]
10159}
10160
10161// Creates a new instance of the LoadBalancerListResultIterator type.
10162func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
10163	return LoadBalancerListResultIterator{page: page}
10164}
10165
10166// IsEmpty returns true if the ListResult contains no values.
10167func (lblr LoadBalancerListResult) IsEmpty() bool {
10168	return lblr.Value == nil || len(*lblr.Value) == 0
10169}
10170
10171// hasNextLink returns true if the NextLink is not empty.
10172func (lblr LoadBalancerListResult) hasNextLink() bool {
10173	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
10174}
10175
10176// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
10177// It returns nil if no more results exist.
10178func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
10179	if !lblr.hasNextLink() {
10180		return nil, nil
10181	}
10182	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10183		autorest.AsJSON(),
10184		autorest.AsGet(),
10185		autorest.WithBaseURL(to.String(lblr.NextLink)))
10186}
10187
10188// LoadBalancerListResultPage contains a page of LoadBalancer values.
10189type LoadBalancerListResultPage struct {
10190	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
10191	lblr LoadBalancerListResult
10192}
10193
10194// NextWithContext advances to the next page of values.  If there was an error making
10195// the request the page does not advance and the error is returned.
10196func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
10197	if tracing.IsEnabled() {
10198		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
10199		defer func() {
10200			sc := -1
10201			if page.Response().Response.Response != nil {
10202				sc = page.Response().Response.Response.StatusCode
10203			}
10204			tracing.EndSpan(ctx, sc, err)
10205		}()
10206	}
10207	for {
10208		next, err := page.fn(ctx, page.lblr)
10209		if err != nil {
10210			return err
10211		}
10212		page.lblr = next
10213		if !next.hasNextLink() || !next.IsEmpty() {
10214			break
10215		}
10216	}
10217	return nil
10218}
10219
10220// Next advances to the next page of values.  If there was an error making
10221// the request the page does not advance and the error is returned.
10222// Deprecated: Use NextWithContext() instead.
10223func (page *LoadBalancerListResultPage) Next() error {
10224	return page.NextWithContext(context.Background())
10225}
10226
10227// NotDone returns true if the page enumeration should be started or is not yet complete.
10228func (page LoadBalancerListResultPage) NotDone() bool {
10229	return !page.lblr.IsEmpty()
10230}
10231
10232// Response returns the raw server response from the last page request.
10233func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
10234	return page.lblr
10235}
10236
10237// Values returns the slice of values for the current page or nil if there are no values.
10238func (page LoadBalancerListResultPage) Values() []LoadBalancer {
10239	if page.lblr.IsEmpty() {
10240		return nil
10241	}
10242	return *page.lblr.Value
10243}
10244
10245// Creates a new instance of the LoadBalancerListResultPage type.
10246func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
10247	return LoadBalancerListResultPage{
10248		fn:   getNextPage,
10249		lblr: cur,
10250	}
10251}
10252
10253// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
10254type LoadBalancerLoadBalancingRuleListResult struct {
10255	autorest.Response `json:"-"`
10256	// Value - A list of load balancing rules in a load balancer.
10257	Value *[]LoadBalancingRule `json:"value,omitempty"`
10258	// NextLink - READ-ONLY; The URL to get the next set of results.
10259	NextLink *string `json:"nextLink,omitempty"`
10260}
10261
10262// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
10263func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
10264	objectMap := make(map[string]interface{})
10265	if lblbrlr.Value != nil {
10266		objectMap["value"] = lblbrlr.Value
10267	}
10268	return json.Marshal(objectMap)
10269}
10270
10271// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
10272// LoadBalancingRule values.
10273type LoadBalancerLoadBalancingRuleListResultIterator struct {
10274	i    int
10275	page LoadBalancerLoadBalancingRuleListResultPage
10276}
10277
10278// NextWithContext advances to the next value.  If there was an error making
10279// the request the iterator does not advance and the error is returned.
10280func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10281	if tracing.IsEnabled() {
10282		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
10283		defer func() {
10284			sc := -1
10285			if iter.Response().Response.Response != nil {
10286				sc = iter.Response().Response.Response.StatusCode
10287			}
10288			tracing.EndSpan(ctx, sc, err)
10289		}()
10290	}
10291	iter.i++
10292	if iter.i < len(iter.page.Values()) {
10293		return nil
10294	}
10295	err = iter.page.NextWithContext(ctx)
10296	if err != nil {
10297		iter.i--
10298		return err
10299	}
10300	iter.i = 0
10301	return nil
10302}
10303
10304// Next advances to the next value.  If there was an error making
10305// the request the iterator does not advance and the error is returned.
10306// Deprecated: Use NextWithContext() instead.
10307func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
10308	return iter.NextWithContext(context.Background())
10309}
10310
10311// NotDone returns true if the enumeration should be started or is not yet complete.
10312func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
10313	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10314}
10315
10316// Response returns the raw server response from the last page request.
10317func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
10318	return iter.page.Response()
10319}
10320
10321// Value returns the current value or a zero-initialized value if the
10322// iterator has advanced beyond the end of the collection.
10323func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
10324	if !iter.page.NotDone() {
10325		return LoadBalancingRule{}
10326	}
10327	return iter.page.Values()[iter.i]
10328}
10329
10330// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
10331func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
10332	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
10333}
10334
10335// IsEmpty returns true if the ListResult contains no values.
10336func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
10337	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
10338}
10339
10340// hasNextLink returns true if the NextLink is not empty.
10341func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
10342	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
10343}
10344
10345// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
10346// It returns nil if no more results exist.
10347func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10348	if !lblbrlr.hasNextLink() {
10349		return nil, nil
10350	}
10351	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10352		autorest.AsJSON(),
10353		autorest.AsGet(),
10354		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
10355}
10356
10357// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
10358type LoadBalancerLoadBalancingRuleListResultPage struct {
10359	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
10360	lblbrlr LoadBalancerLoadBalancingRuleListResult
10361}
10362
10363// NextWithContext advances to the next page of values.  If there was an error making
10364// the request the page does not advance and the error is returned.
10365func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
10366	if tracing.IsEnabled() {
10367		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
10368		defer func() {
10369			sc := -1
10370			if page.Response().Response.Response != nil {
10371				sc = page.Response().Response.Response.StatusCode
10372			}
10373			tracing.EndSpan(ctx, sc, err)
10374		}()
10375	}
10376	for {
10377		next, err := page.fn(ctx, page.lblbrlr)
10378		if err != nil {
10379			return err
10380		}
10381		page.lblbrlr = next
10382		if !next.hasNextLink() || !next.IsEmpty() {
10383			break
10384		}
10385	}
10386	return nil
10387}
10388
10389// Next advances to the next page of values.  If there was an error making
10390// the request the page does not advance and the error is returned.
10391// Deprecated: Use NextWithContext() instead.
10392func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
10393	return page.NextWithContext(context.Background())
10394}
10395
10396// NotDone returns true if the page enumeration should be started or is not yet complete.
10397func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
10398	return !page.lblbrlr.IsEmpty()
10399}
10400
10401// Response returns the raw server response from the last page request.
10402func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
10403	return page.lblbrlr
10404}
10405
10406// Values returns the slice of values for the current page or nil if there are no values.
10407func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
10408	if page.lblbrlr.IsEmpty() {
10409		return nil
10410	}
10411	return *page.lblbrlr.Value
10412}
10413
10414// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
10415func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
10416	return LoadBalancerLoadBalancingRuleListResultPage{
10417		fn:      getNextPage,
10418		lblbrlr: cur,
10419	}
10420}
10421
10422// LoadBalancerProbeListResult response for ListProbe API service call.
10423type LoadBalancerProbeListResult struct {
10424	autorest.Response `json:"-"`
10425	// Value - A list of probes in a load balancer.
10426	Value *[]Probe `json:"value,omitempty"`
10427	// NextLink - READ-ONLY; The URL to get the next set of results.
10428	NextLink *string `json:"nextLink,omitempty"`
10429}
10430
10431// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
10432func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
10433	objectMap := make(map[string]interface{})
10434	if lbplr.Value != nil {
10435		objectMap["value"] = lbplr.Value
10436	}
10437	return json.Marshal(objectMap)
10438}
10439
10440// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
10441type LoadBalancerProbeListResultIterator struct {
10442	i    int
10443	page LoadBalancerProbeListResultPage
10444}
10445
10446// NextWithContext advances to the next value.  If there was an error making
10447// the request the iterator does not advance and the error is returned.
10448func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
10449	if tracing.IsEnabled() {
10450		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
10451		defer func() {
10452			sc := -1
10453			if iter.Response().Response.Response != nil {
10454				sc = iter.Response().Response.Response.StatusCode
10455			}
10456			tracing.EndSpan(ctx, sc, err)
10457		}()
10458	}
10459	iter.i++
10460	if iter.i < len(iter.page.Values()) {
10461		return nil
10462	}
10463	err = iter.page.NextWithContext(ctx)
10464	if err != nil {
10465		iter.i--
10466		return err
10467	}
10468	iter.i = 0
10469	return nil
10470}
10471
10472// Next advances to the next value.  If there was an error making
10473// the request the iterator does not advance and the error is returned.
10474// Deprecated: Use NextWithContext() instead.
10475func (iter *LoadBalancerProbeListResultIterator) Next() error {
10476	return iter.NextWithContext(context.Background())
10477}
10478
10479// NotDone returns true if the enumeration should be started or is not yet complete.
10480func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
10481	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10482}
10483
10484// Response returns the raw server response from the last page request.
10485func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
10486	return iter.page.Response()
10487}
10488
10489// Value returns the current value or a zero-initialized value if the
10490// iterator has advanced beyond the end of the collection.
10491func (iter LoadBalancerProbeListResultIterator) Value() Probe {
10492	if !iter.page.NotDone() {
10493		return Probe{}
10494	}
10495	return iter.page.Values()[iter.i]
10496}
10497
10498// Creates a new instance of the LoadBalancerProbeListResultIterator type.
10499func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
10500	return LoadBalancerProbeListResultIterator{page: page}
10501}
10502
10503// IsEmpty returns true if the ListResult contains no values.
10504func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
10505	return lbplr.Value == nil || len(*lbplr.Value) == 0
10506}
10507
10508// hasNextLink returns true if the NextLink is not empty.
10509func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
10510	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
10511}
10512
10513// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
10514// It returns nil if no more results exist.
10515func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
10516	if !lbplr.hasNextLink() {
10517		return nil, nil
10518	}
10519	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10520		autorest.AsJSON(),
10521		autorest.AsGet(),
10522		autorest.WithBaseURL(to.String(lbplr.NextLink)))
10523}
10524
10525// LoadBalancerProbeListResultPage contains a page of Probe values.
10526type LoadBalancerProbeListResultPage struct {
10527	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
10528	lbplr LoadBalancerProbeListResult
10529}
10530
10531// NextWithContext advances to the next page of values.  If there was an error making
10532// the request the page does not advance and the error is returned.
10533func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
10534	if tracing.IsEnabled() {
10535		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
10536		defer func() {
10537			sc := -1
10538			if page.Response().Response.Response != nil {
10539				sc = page.Response().Response.Response.StatusCode
10540			}
10541			tracing.EndSpan(ctx, sc, err)
10542		}()
10543	}
10544	for {
10545		next, err := page.fn(ctx, page.lbplr)
10546		if err != nil {
10547			return err
10548		}
10549		page.lbplr = next
10550		if !next.hasNextLink() || !next.IsEmpty() {
10551			break
10552		}
10553	}
10554	return nil
10555}
10556
10557// Next advances to the next page of values.  If there was an error making
10558// the request the page does not advance and the error is returned.
10559// Deprecated: Use NextWithContext() instead.
10560func (page *LoadBalancerProbeListResultPage) Next() error {
10561	return page.NextWithContext(context.Background())
10562}
10563
10564// NotDone returns true if the page enumeration should be started or is not yet complete.
10565func (page LoadBalancerProbeListResultPage) NotDone() bool {
10566	return !page.lbplr.IsEmpty()
10567}
10568
10569// Response returns the raw server response from the last page request.
10570func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
10571	return page.lbplr
10572}
10573
10574// Values returns the slice of values for the current page or nil if there are no values.
10575func (page LoadBalancerProbeListResultPage) Values() []Probe {
10576	if page.lbplr.IsEmpty() {
10577		return nil
10578	}
10579	return *page.lbplr.Value
10580}
10581
10582// Creates a new instance of the LoadBalancerProbeListResultPage type.
10583func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
10584	return LoadBalancerProbeListResultPage{
10585		fn:    getNextPage,
10586		lbplr: cur,
10587	}
10588}
10589
10590// LoadBalancerPropertiesFormat properties of the load balancer.
10591type LoadBalancerPropertiesFormat struct {
10592	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
10593	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
10594	// BackendAddressPools - Collection of backend address pools used by a load balancer
10595	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
10596	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
10597	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
10598	// Probes - Collection of probe objects used in the load balancer
10599	Probes *[]Probe `json:"probes,omitempty"`
10600	// 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.
10601	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
10602	// 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.
10603	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
10604	// OutboundNatRules - The outbound NAT rules.
10605	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
10606	// ResourceGUID - The resource GUID property of the load balancer resource.
10607	ResourceGUID *string `json:"resourceGuid,omitempty"`
10608	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10609	ProvisioningState *string `json:"provisioningState,omitempty"`
10610}
10611
10612// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10613// long-running operation.
10614type LoadBalancersCreateOrUpdateFuture struct {
10615	azure.FutureAPI
10616	// Result returns the result of the asynchronous operation.
10617	// If the operation has not completed it will return an error.
10618	Result func(LoadBalancersClient) (LoadBalancer, error)
10619}
10620
10621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10622func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10623	var azFuture azure.Future
10624	if err := json.Unmarshal(body, &azFuture); err != nil {
10625		return err
10626	}
10627	future.FutureAPI = &azFuture
10628	future.Result = future.result
10629	return nil
10630}
10631
10632// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
10633func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
10634	var done bool
10635	done, err = future.DoneWithContext(context.Background(), client)
10636	if err != nil {
10637		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10638		return
10639	}
10640	if !done {
10641		lb.Response.Response = future.Response()
10642		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
10643		return
10644	}
10645	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10646	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
10647		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
10648		if err != nil {
10649			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
10650		}
10651	}
10652	return
10653}
10654
10655// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10656// operation.
10657type LoadBalancersDeleteFuture struct {
10658	azure.FutureAPI
10659	// Result returns the result of the asynchronous operation.
10660	// If the operation has not completed it will return an error.
10661	Result func(LoadBalancersClient) (autorest.Response, error)
10662}
10663
10664// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10665func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
10666	var azFuture azure.Future
10667	if err := json.Unmarshal(body, &azFuture); err != nil {
10668		return err
10669	}
10670	future.FutureAPI = &azFuture
10671	future.Result = future.result
10672	return nil
10673}
10674
10675// result is the default implementation for LoadBalancersDeleteFuture.Result.
10676func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
10677	var done bool
10678	done, err = future.DoneWithContext(context.Background(), client)
10679	if err != nil {
10680		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
10681		return
10682	}
10683	if !done {
10684		ar.Response = future.Response()
10685		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
10686		return
10687	}
10688	ar.Response = future.Response()
10689	return
10690}
10691
10692// LoadBalancerSku SKU of a load balancer
10693type LoadBalancerSku struct {
10694	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
10695	Name LoadBalancerSkuName `json:"name,omitempty"`
10696}
10697
10698// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
10699// operation.
10700type LoadBalancersUpdateTagsFuture struct {
10701	azure.FutureAPI
10702	// Result returns the result of the asynchronous operation.
10703	// If the operation has not completed it will return an error.
10704	Result func(LoadBalancersClient) (LoadBalancer, error)
10705}
10706
10707// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10708func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10709	var azFuture azure.Future
10710	if err := json.Unmarshal(body, &azFuture); err != nil {
10711		return err
10712	}
10713	future.FutureAPI = &azFuture
10714	future.Result = future.result
10715	return nil
10716}
10717
10718// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
10719func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
10720	var done bool
10721	done, err = future.DoneWithContext(context.Background(), client)
10722	if err != nil {
10723		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10724		return
10725	}
10726	if !done {
10727		lb.Response.Response = future.Response()
10728		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
10729		return
10730	}
10731	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10732	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
10733		lb, err = client.UpdateTagsResponder(lb.Response.Response)
10734		if err != nil {
10735			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
10736		}
10737	}
10738	return
10739}
10740
10741// LoadBalancingRule a load balancing rule for a load balancer.
10742type LoadBalancingRule struct {
10743	autorest.Response `json:"-"`
10744	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
10745	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
10746	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10747	Name *string `json:"name,omitempty"`
10748	// Etag - A unique read-only string that changes whenever the resource is updated.
10749	Etag *string `json:"etag,omitempty"`
10750	// ID - Resource ID.
10751	ID *string `json:"id,omitempty"`
10752}
10753
10754// MarshalJSON is the custom marshaler for LoadBalancingRule.
10755func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
10756	objectMap := make(map[string]interface{})
10757	if lbr.LoadBalancingRulePropertiesFormat != nil {
10758		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
10759	}
10760	if lbr.Name != nil {
10761		objectMap["name"] = lbr.Name
10762	}
10763	if lbr.Etag != nil {
10764		objectMap["etag"] = lbr.Etag
10765	}
10766	if lbr.ID != nil {
10767		objectMap["id"] = lbr.ID
10768	}
10769	return json.Marshal(objectMap)
10770}
10771
10772// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
10773func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
10774	var m map[string]*json.RawMessage
10775	err := json.Unmarshal(body, &m)
10776	if err != nil {
10777		return err
10778	}
10779	for k, v := range m {
10780		switch k {
10781		case "properties":
10782			if v != nil {
10783				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
10784				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
10785				if err != nil {
10786					return err
10787				}
10788				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
10789			}
10790		case "name":
10791			if v != nil {
10792				var name string
10793				err = json.Unmarshal(*v, &name)
10794				if err != nil {
10795					return err
10796				}
10797				lbr.Name = &name
10798			}
10799		case "etag":
10800			if v != nil {
10801				var etag string
10802				err = json.Unmarshal(*v, &etag)
10803				if err != nil {
10804					return err
10805				}
10806				lbr.Etag = &etag
10807			}
10808		case "id":
10809			if v != nil {
10810				var ID string
10811				err = json.Unmarshal(*v, &ID)
10812				if err != nil {
10813					return err
10814				}
10815				lbr.ID = &ID
10816			}
10817		}
10818	}
10819
10820	return nil
10821}
10822
10823// LoadBalancingRulePropertiesFormat properties of the load balancer.
10824type LoadBalancingRulePropertiesFormat struct {
10825	// FrontendIPConfiguration - A reference to frontend IP addresses.
10826	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
10827	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
10828	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
10829	// Probe - The reference of the load balancer probe used by the load balancing rule.
10830	Probe *SubResource `json:"probe,omitempty"`
10831	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
10832	Protocol TransportProtocol `json:"protocol,omitempty"`
10833	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
10834	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
10835	// 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"
10836	FrontendPort *int32 `json:"frontendPort,omitempty"`
10837	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
10838	BackendPort *int32 `json:"backendPort,omitempty"`
10839	// 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.
10840	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
10841	// 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.
10842	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
10843	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
10844	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
10845	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10846	ProvisioningState *string `json:"provisioningState,omitempty"`
10847}
10848
10849// LocalNetworkGateway a common class for general resource information
10850type LocalNetworkGateway struct {
10851	autorest.Response `json:"-"`
10852	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
10853	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
10854	// Etag - A unique read-only string that changes whenever the resource is updated.
10855	Etag *string `json:"etag,omitempty"`
10856	// ID - Resource ID.
10857	ID *string `json:"id,omitempty"`
10858	// Name - READ-ONLY; Resource name.
10859	Name *string `json:"name,omitempty"`
10860	// Type - READ-ONLY; Resource type.
10861	Type *string `json:"type,omitempty"`
10862	// Location - Resource location.
10863	Location *string `json:"location,omitempty"`
10864	// Tags - Resource tags.
10865	Tags map[string]*string `json:"tags"`
10866}
10867
10868// MarshalJSON is the custom marshaler for LocalNetworkGateway.
10869func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
10870	objectMap := make(map[string]interface{})
10871	if lng.LocalNetworkGatewayPropertiesFormat != nil {
10872		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
10873	}
10874	if lng.Etag != nil {
10875		objectMap["etag"] = lng.Etag
10876	}
10877	if lng.ID != nil {
10878		objectMap["id"] = lng.ID
10879	}
10880	if lng.Location != nil {
10881		objectMap["location"] = lng.Location
10882	}
10883	if lng.Tags != nil {
10884		objectMap["tags"] = lng.Tags
10885	}
10886	return json.Marshal(objectMap)
10887}
10888
10889// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
10890func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
10891	var m map[string]*json.RawMessage
10892	err := json.Unmarshal(body, &m)
10893	if err != nil {
10894		return err
10895	}
10896	for k, v := range m {
10897		switch k {
10898		case "properties":
10899			if v != nil {
10900				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
10901				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
10902				if err != nil {
10903					return err
10904				}
10905				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
10906			}
10907		case "etag":
10908			if v != nil {
10909				var etag string
10910				err = json.Unmarshal(*v, &etag)
10911				if err != nil {
10912					return err
10913				}
10914				lng.Etag = &etag
10915			}
10916		case "id":
10917			if v != nil {
10918				var ID string
10919				err = json.Unmarshal(*v, &ID)
10920				if err != nil {
10921					return err
10922				}
10923				lng.ID = &ID
10924			}
10925		case "name":
10926			if v != nil {
10927				var name string
10928				err = json.Unmarshal(*v, &name)
10929				if err != nil {
10930					return err
10931				}
10932				lng.Name = &name
10933			}
10934		case "type":
10935			if v != nil {
10936				var typeVar string
10937				err = json.Unmarshal(*v, &typeVar)
10938				if err != nil {
10939					return err
10940				}
10941				lng.Type = &typeVar
10942			}
10943		case "location":
10944			if v != nil {
10945				var location string
10946				err = json.Unmarshal(*v, &location)
10947				if err != nil {
10948					return err
10949				}
10950				lng.Location = &location
10951			}
10952		case "tags":
10953			if v != nil {
10954				var tags map[string]*string
10955				err = json.Unmarshal(*v, &tags)
10956				if err != nil {
10957					return err
10958				}
10959				lng.Tags = tags
10960			}
10961		}
10962	}
10963
10964	return nil
10965}
10966
10967// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
10968type LocalNetworkGatewayListResult struct {
10969	autorest.Response `json:"-"`
10970	// Value - A list of local network gateways that exists in a resource group.
10971	Value *[]LocalNetworkGateway `json:"value,omitempty"`
10972	// NextLink - READ-ONLY; The URL to get the next set of results.
10973	NextLink *string `json:"nextLink,omitempty"`
10974}
10975
10976// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
10977func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
10978	objectMap := make(map[string]interface{})
10979	if lnglr.Value != nil {
10980		objectMap["value"] = lnglr.Value
10981	}
10982	return json.Marshal(objectMap)
10983}
10984
10985// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
10986// values.
10987type LocalNetworkGatewayListResultIterator struct {
10988	i    int
10989	page LocalNetworkGatewayListResultPage
10990}
10991
10992// NextWithContext advances to the next value.  If there was an error making
10993// the request the iterator does not advance and the error is returned.
10994func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
10995	if tracing.IsEnabled() {
10996		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
10997		defer func() {
10998			sc := -1
10999			if iter.Response().Response.Response != nil {
11000				sc = iter.Response().Response.Response.StatusCode
11001			}
11002			tracing.EndSpan(ctx, sc, err)
11003		}()
11004	}
11005	iter.i++
11006	if iter.i < len(iter.page.Values()) {
11007		return nil
11008	}
11009	err = iter.page.NextWithContext(ctx)
11010	if err != nil {
11011		iter.i--
11012		return err
11013	}
11014	iter.i = 0
11015	return nil
11016}
11017
11018// Next advances to the next value.  If there was an error making
11019// the request the iterator does not advance and the error is returned.
11020// Deprecated: Use NextWithContext() instead.
11021func (iter *LocalNetworkGatewayListResultIterator) Next() error {
11022	return iter.NextWithContext(context.Background())
11023}
11024
11025// NotDone returns true if the enumeration should be started or is not yet complete.
11026func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
11027	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11028}
11029
11030// Response returns the raw server response from the last page request.
11031func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
11032	return iter.page.Response()
11033}
11034
11035// Value returns the current value or a zero-initialized value if the
11036// iterator has advanced beyond the end of the collection.
11037func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
11038	if !iter.page.NotDone() {
11039		return LocalNetworkGateway{}
11040	}
11041	return iter.page.Values()[iter.i]
11042}
11043
11044// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
11045func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
11046	return LocalNetworkGatewayListResultIterator{page: page}
11047}
11048
11049// IsEmpty returns true if the ListResult contains no values.
11050func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
11051	return lnglr.Value == nil || len(*lnglr.Value) == 0
11052}
11053
11054// hasNextLink returns true if the NextLink is not empty.
11055func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
11056	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
11057}
11058
11059// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
11060// It returns nil if no more results exist.
11061func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
11062	if !lnglr.hasNextLink() {
11063		return nil, nil
11064	}
11065	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11066		autorest.AsJSON(),
11067		autorest.AsGet(),
11068		autorest.WithBaseURL(to.String(lnglr.NextLink)))
11069}
11070
11071// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
11072type LocalNetworkGatewayListResultPage struct {
11073	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
11074	lnglr LocalNetworkGatewayListResult
11075}
11076
11077// NextWithContext advances to the next page of values.  If there was an error making
11078// the request the page does not advance and the error is returned.
11079func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
11080	if tracing.IsEnabled() {
11081		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
11082		defer func() {
11083			sc := -1
11084			if page.Response().Response.Response != nil {
11085				sc = page.Response().Response.Response.StatusCode
11086			}
11087			tracing.EndSpan(ctx, sc, err)
11088		}()
11089	}
11090	for {
11091		next, err := page.fn(ctx, page.lnglr)
11092		if err != nil {
11093			return err
11094		}
11095		page.lnglr = next
11096		if !next.hasNextLink() || !next.IsEmpty() {
11097			break
11098		}
11099	}
11100	return nil
11101}
11102
11103// Next advances to the next page of values.  If there was an error making
11104// the request the page does not advance and the error is returned.
11105// Deprecated: Use NextWithContext() instead.
11106func (page *LocalNetworkGatewayListResultPage) Next() error {
11107	return page.NextWithContext(context.Background())
11108}
11109
11110// NotDone returns true if the page enumeration should be started or is not yet complete.
11111func (page LocalNetworkGatewayListResultPage) NotDone() bool {
11112	return !page.lnglr.IsEmpty()
11113}
11114
11115// Response returns the raw server response from the last page request.
11116func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
11117	return page.lnglr
11118}
11119
11120// Values returns the slice of values for the current page or nil if there are no values.
11121func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
11122	if page.lnglr.IsEmpty() {
11123		return nil
11124	}
11125	return *page.lnglr.Value
11126}
11127
11128// Creates a new instance of the LocalNetworkGatewayListResultPage type.
11129func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
11130	return LocalNetworkGatewayListResultPage{
11131		fn:    getNextPage,
11132		lnglr: cur,
11133	}
11134}
11135
11136// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
11137type LocalNetworkGatewayPropertiesFormat struct {
11138	// LocalNetworkAddressSpace - Local network site address space.
11139	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
11140	// GatewayIPAddress - IP address of local network gateway.
11141	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
11142	// BgpSettings - Local network gateway's BGP speaker settings.
11143	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
11144	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
11145	ResourceGUID *string `json:"resourceGuid,omitempty"`
11146	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11147	ProvisioningState *string `json:"provisioningState,omitempty"`
11148}
11149
11150// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
11151func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
11152	objectMap := make(map[string]interface{})
11153	if lngpf.LocalNetworkAddressSpace != nil {
11154		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
11155	}
11156	if lngpf.GatewayIPAddress != nil {
11157		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
11158	}
11159	if lngpf.BgpSettings != nil {
11160		objectMap["bgpSettings"] = lngpf.BgpSettings
11161	}
11162	if lngpf.ResourceGUID != nil {
11163		objectMap["resourceGuid"] = lngpf.ResourceGUID
11164	}
11165	return json.Marshal(objectMap)
11166}
11167
11168// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11169// long-running operation.
11170type LocalNetworkGatewaysCreateOrUpdateFuture struct {
11171	azure.FutureAPI
11172	// Result returns the result of the asynchronous operation.
11173	// If the operation has not completed it will return an error.
11174	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
11175}
11176
11177// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11178func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11179	var azFuture azure.Future
11180	if err := json.Unmarshal(body, &azFuture); err != nil {
11181		return err
11182	}
11183	future.FutureAPI = &azFuture
11184	future.Result = future.result
11185	return nil
11186}
11187
11188// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
11189func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
11190	var done bool
11191	done, err = future.DoneWithContext(context.Background(), client)
11192	if err != nil {
11193		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11194		return
11195	}
11196	if !done {
11197		lng.Response.Response = future.Response()
11198		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
11199		return
11200	}
11201	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11202	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
11203		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
11204		if err != nil {
11205			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
11206		}
11207	}
11208	return
11209}
11210
11211// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11212// long-running operation.
11213type LocalNetworkGatewaysDeleteFuture struct {
11214	azure.FutureAPI
11215	// Result returns the result of the asynchronous operation.
11216	// If the operation has not completed it will return an error.
11217	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
11218}
11219
11220// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11221func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
11222	var azFuture azure.Future
11223	if err := json.Unmarshal(body, &azFuture); err != nil {
11224		return err
11225	}
11226	future.FutureAPI = &azFuture
11227	future.Result = future.result
11228	return nil
11229}
11230
11231// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
11232func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
11233	var done bool
11234	done, err = future.DoneWithContext(context.Background(), client)
11235	if err != nil {
11236		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
11237		return
11238	}
11239	if !done {
11240		ar.Response = future.Response()
11241		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
11242		return
11243	}
11244	ar.Response = future.Response()
11245	return
11246}
11247
11248// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11249// long-running operation.
11250type LocalNetworkGatewaysUpdateTagsFuture struct {
11251	azure.FutureAPI
11252	// Result returns the result of the asynchronous operation.
11253	// If the operation has not completed it will return an error.
11254	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
11255}
11256
11257// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11258func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11259	var azFuture azure.Future
11260	if err := json.Unmarshal(body, &azFuture); err != nil {
11261		return err
11262	}
11263	future.FutureAPI = &azFuture
11264	future.Result = future.result
11265	return nil
11266}
11267
11268// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
11269func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
11270	var done bool
11271	done, err = future.DoneWithContext(context.Background(), client)
11272	if err != nil {
11273		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11274		return
11275	}
11276	if !done {
11277		lng.Response.Response = future.Response()
11278		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
11279		return
11280	}
11281	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11282	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
11283		lng, err = client.UpdateTagsResponder(lng.Response.Response)
11284		if err != nil {
11285			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
11286		}
11287	}
11288	return
11289}
11290
11291// LogSpecification description of logging specification.
11292type LogSpecification struct {
11293	// Name - The name of the specification.
11294	Name *string `json:"name,omitempty"`
11295	// DisplayName - The display name of the specification.
11296	DisplayName *string `json:"displayName,omitempty"`
11297	// BlobDuration - Duration of the blob.
11298	BlobDuration *string `json:"blobDuration,omitempty"`
11299}
11300
11301// MetricSpecification description of metrics specification.
11302type MetricSpecification struct {
11303	// Name - The name of the metric.
11304	Name *string `json:"name,omitempty"`
11305	// DisplayName - The display name of the metric.
11306	DisplayName *string `json:"displayName,omitempty"`
11307	// DisplayDescription - The description of the metric.
11308	DisplayDescription *string `json:"displayDescription,omitempty"`
11309	// Unit - Units the metric to be displayed in.
11310	Unit *string `json:"unit,omitempty"`
11311	// AggregationType - The aggregation type.
11312	AggregationType *string `json:"aggregationType,omitempty"`
11313	// Availabilities - List of availability.
11314	Availabilities *[]Availability `json:"availabilities,omitempty"`
11315	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
11316	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
11317	// FillGapWithZero - Whether gaps would be filled with zeros.
11318	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
11319	// MetricFilterPattern - Pattern for the filter of the metric.
11320	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
11321	// Dimensions - List of dimensions.
11322	Dimensions *[]Dimension `json:"dimensions,omitempty"`
11323	// IsInternal - Whether the metric is internal.
11324	IsInternal *bool `json:"isInternal,omitempty"`
11325	// SourceMdmAccount - The source MDM account.
11326	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
11327	// SourceMdmNamespace - The source MDM namespace.
11328	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
11329	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
11330	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
11331}
11332
11333// NextHopParameters parameters that define the source and destination endpoint.
11334type NextHopParameters struct {
11335	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
11336	TargetResourceID *string `json:"targetResourceId,omitempty"`
11337	// SourceIPAddress - The source IP address.
11338	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
11339	// DestinationIPAddress - The destination IP address.
11340	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
11341	// 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).
11342	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
11343}
11344
11345// NextHopResult the information about next hop from the specified VM.
11346type NextHopResult struct {
11347	autorest.Response `json:"-"`
11348	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
11349	NextHopType NextHopType `json:"nextHopType,omitempty"`
11350	// NextHopIPAddress - Next hop IP Address
11351	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
11352	// 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'.
11353	RouteTableID *string `json:"routeTableId,omitempty"`
11354}
11355
11356// Operation network REST API operation definition.
11357type Operation struct {
11358	// Name - Operation name: {provider}/{resource}/{operation}
11359	Name *string `json:"name,omitempty"`
11360	// Display - Display metadata associated with the operation.
11361	Display *OperationDisplay `json:"display,omitempty"`
11362	// Origin - Origin of the operation.
11363	Origin *string `json:"origin,omitempty"`
11364	// OperationPropertiesFormat - Operation properties format.
11365	*OperationPropertiesFormat `json:"properties,omitempty"`
11366}
11367
11368// MarshalJSON is the custom marshaler for Operation.
11369func (o Operation) MarshalJSON() ([]byte, error) {
11370	objectMap := make(map[string]interface{})
11371	if o.Name != nil {
11372		objectMap["name"] = o.Name
11373	}
11374	if o.Display != nil {
11375		objectMap["display"] = o.Display
11376	}
11377	if o.Origin != nil {
11378		objectMap["origin"] = o.Origin
11379	}
11380	if o.OperationPropertiesFormat != nil {
11381		objectMap["properties"] = o.OperationPropertiesFormat
11382	}
11383	return json.Marshal(objectMap)
11384}
11385
11386// UnmarshalJSON is the custom unmarshaler for Operation struct.
11387func (o *Operation) UnmarshalJSON(body []byte) error {
11388	var m map[string]*json.RawMessage
11389	err := json.Unmarshal(body, &m)
11390	if err != nil {
11391		return err
11392	}
11393	for k, v := range m {
11394		switch k {
11395		case "name":
11396			if v != nil {
11397				var name string
11398				err = json.Unmarshal(*v, &name)
11399				if err != nil {
11400					return err
11401				}
11402				o.Name = &name
11403			}
11404		case "display":
11405			if v != nil {
11406				var display OperationDisplay
11407				err = json.Unmarshal(*v, &display)
11408				if err != nil {
11409					return err
11410				}
11411				o.Display = &display
11412			}
11413		case "origin":
11414			if v != nil {
11415				var origin string
11416				err = json.Unmarshal(*v, &origin)
11417				if err != nil {
11418					return err
11419				}
11420				o.Origin = &origin
11421			}
11422		case "properties":
11423			if v != nil {
11424				var operationPropertiesFormat OperationPropertiesFormat
11425				err = json.Unmarshal(*v, &operationPropertiesFormat)
11426				if err != nil {
11427					return err
11428				}
11429				o.OperationPropertiesFormat = &operationPropertiesFormat
11430			}
11431		}
11432	}
11433
11434	return nil
11435}
11436
11437// OperationDisplay display metadata associated with the operation.
11438type OperationDisplay struct {
11439	// Provider - Service provider: Microsoft Network.
11440	Provider *string `json:"provider,omitempty"`
11441	// Resource - Resource on which the operation is performed.
11442	Resource *string `json:"resource,omitempty"`
11443	// Operation - Type of the operation: get, read, delete, etc.
11444	Operation *string `json:"operation,omitempty"`
11445	// Description - Description of the operation.
11446	Description *string `json:"description,omitempty"`
11447}
11448
11449// OperationListResult result of the request to list Network operations. It contains a list of operations
11450// and a URL link to get the next set of results.
11451type OperationListResult struct {
11452	autorest.Response `json:"-"`
11453	// Value - List of Network operations supported by the Network resource provider.
11454	Value *[]Operation `json:"value,omitempty"`
11455	// NextLink - URL to get the next set of operation list results if there are any.
11456	NextLink *string `json:"nextLink,omitempty"`
11457}
11458
11459// OperationListResultIterator provides access to a complete listing of Operation values.
11460type OperationListResultIterator struct {
11461	i    int
11462	page OperationListResultPage
11463}
11464
11465// NextWithContext advances to the next value.  If there was an error making
11466// the request the iterator does not advance and the error is returned.
11467func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11468	if tracing.IsEnabled() {
11469		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
11470		defer func() {
11471			sc := -1
11472			if iter.Response().Response.Response != nil {
11473				sc = iter.Response().Response.Response.StatusCode
11474			}
11475			tracing.EndSpan(ctx, sc, err)
11476		}()
11477	}
11478	iter.i++
11479	if iter.i < len(iter.page.Values()) {
11480		return nil
11481	}
11482	err = iter.page.NextWithContext(ctx)
11483	if err != nil {
11484		iter.i--
11485		return err
11486	}
11487	iter.i = 0
11488	return nil
11489}
11490
11491// Next advances to the next value.  If there was an error making
11492// the request the iterator does not advance and the error is returned.
11493// Deprecated: Use NextWithContext() instead.
11494func (iter *OperationListResultIterator) Next() error {
11495	return iter.NextWithContext(context.Background())
11496}
11497
11498// NotDone returns true if the enumeration should be started or is not yet complete.
11499func (iter OperationListResultIterator) NotDone() bool {
11500	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11501}
11502
11503// Response returns the raw server response from the last page request.
11504func (iter OperationListResultIterator) Response() OperationListResult {
11505	return iter.page.Response()
11506}
11507
11508// Value returns the current value or a zero-initialized value if the
11509// iterator has advanced beyond the end of the collection.
11510func (iter OperationListResultIterator) Value() Operation {
11511	if !iter.page.NotDone() {
11512		return Operation{}
11513	}
11514	return iter.page.Values()[iter.i]
11515}
11516
11517// Creates a new instance of the OperationListResultIterator type.
11518func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
11519	return OperationListResultIterator{page: page}
11520}
11521
11522// IsEmpty returns true if the ListResult contains no values.
11523func (olr OperationListResult) IsEmpty() bool {
11524	return olr.Value == nil || len(*olr.Value) == 0
11525}
11526
11527// hasNextLink returns true if the NextLink is not empty.
11528func (olr OperationListResult) hasNextLink() bool {
11529	return olr.NextLink != nil && len(*olr.NextLink) != 0
11530}
11531
11532// operationListResultPreparer prepares a request to retrieve the next set of results.
11533// It returns nil if no more results exist.
11534func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
11535	if !olr.hasNextLink() {
11536		return nil, nil
11537	}
11538	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11539		autorest.AsJSON(),
11540		autorest.AsGet(),
11541		autorest.WithBaseURL(to.String(olr.NextLink)))
11542}
11543
11544// OperationListResultPage contains a page of Operation values.
11545type OperationListResultPage struct {
11546	fn  func(context.Context, OperationListResult) (OperationListResult, error)
11547	olr OperationListResult
11548}
11549
11550// NextWithContext advances to the next page of values.  If there was an error making
11551// the request the page does not advance and the error is returned.
11552func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
11553	if tracing.IsEnabled() {
11554		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
11555		defer func() {
11556			sc := -1
11557			if page.Response().Response.Response != nil {
11558				sc = page.Response().Response.Response.StatusCode
11559			}
11560			tracing.EndSpan(ctx, sc, err)
11561		}()
11562	}
11563	for {
11564		next, err := page.fn(ctx, page.olr)
11565		if err != nil {
11566			return err
11567		}
11568		page.olr = next
11569		if !next.hasNextLink() || !next.IsEmpty() {
11570			break
11571		}
11572	}
11573	return nil
11574}
11575
11576// Next advances to the next page of values.  If there was an error making
11577// the request the page does not advance and the error is returned.
11578// Deprecated: Use NextWithContext() instead.
11579func (page *OperationListResultPage) Next() error {
11580	return page.NextWithContext(context.Background())
11581}
11582
11583// NotDone returns true if the page enumeration should be started or is not yet complete.
11584func (page OperationListResultPage) NotDone() bool {
11585	return !page.olr.IsEmpty()
11586}
11587
11588// Response returns the raw server response from the last page request.
11589func (page OperationListResultPage) Response() OperationListResult {
11590	return page.olr
11591}
11592
11593// Values returns the slice of values for the current page or nil if there are no values.
11594func (page OperationListResultPage) Values() []Operation {
11595	if page.olr.IsEmpty() {
11596		return nil
11597	}
11598	return *page.olr.Value
11599}
11600
11601// Creates a new instance of the OperationListResultPage type.
11602func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
11603	return OperationListResultPage{
11604		fn:  getNextPage,
11605		olr: cur,
11606	}
11607}
11608
11609// OperationPropertiesFormat description of operation properties format.
11610type OperationPropertiesFormat struct {
11611	// ServiceSpecification - Specification of the service.
11612	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
11613}
11614
11615// OperationPropertiesFormatServiceSpecification specification of the service.
11616type OperationPropertiesFormatServiceSpecification struct {
11617	// MetricSpecifications - Operation service specification.
11618	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
11619	// LogSpecifications - Operation log specification.
11620	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
11621}
11622
11623// OutboundNatRule outbound NAT pool of the load balancer.
11624type OutboundNatRule struct {
11625	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
11626	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
11627	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11628	Name *string `json:"name,omitempty"`
11629	// Etag - A unique read-only string that changes whenever the resource is updated.
11630	Etag *string `json:"etag,omitempty"`
11631	// ID - Resource ID.
11632	ID *string `json:"id,omitempty"`
11633}
11634
11635// MarshalJSON is the custom marshaler for OutboundNatRule.
11636func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
11637	objectMap := make(map[string]interface{})
11638	if onr.OutboundNatRulePropertiesFormat != nil {
11639		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
11640	}
11641	if onr.Name != nil {
11642		objectMap["name"] = onr.Name
11643	}
11644	if onr.Etag != nil {
11645		objectMap["etag"] = onr.Etag
11646	}
11647	if onr.ID != nil {
11648		objectMap["id"] = onr.ID
11649	}
11650	return json.Marshal(objectMap)
11651}
11652
11653// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
11654func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
11655	var m map[string]*json.RawMessage
11656	err := json.Unmarshal(body, &m)
11657	if err != nil {
11658		return err
11659	}
11660	for k, v := range m {
11661		switch k {
11662		case "properties":
11663			if v != nil {
11664				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
11665				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
11666				if err != nil {
11667					return err
11668				}
11669				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
11670			}
11671		case "name":
11672			if v != nil {
11673				var name string
11674				err = json.Unmarshal(*v, &name)
11675				if err != nil {
11676					return err
11677				}
11678				onr.Name = &name
11679			}
11680		case "etag":
11681			if v != nil {
11682				var etag string
11683				err = json.Unmarshal(*v, &etag)
11684				if err != nil {
11685					return err
11686				}
11687				onr.Etag = &etag
11688			}
11689		case "id":
11690			if v != nil {
11691				var ID string
11692				err = json.Unmarshal(*v, &ID)
11693				if err != nil {
11694					return err
11695				}
11696				onr.ID = &ID
11697			}
11698		}
11699	}
11700
11701	return nil
11702}
11703
11704// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
11705type OutboundNatRulePropertiesFormat struct {
11706	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
11707	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
11708	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
11709	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
11710	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
11711	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
11712	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11713	ProvisioningState *string `json:"provisioningState,omitempty"`
11714}
11715
11716// PacketCapture parameters that define the create packet capture operation.
11717type PacketCapture struct {
11718	*PacketCaptureParameters `json:"properties,omitempty"`
11719}
11720
11721// MarshalJSON is the custom marshaler for PacketCapture.
11722func (pc PacketCapture) MarshalJSON() ([]byte, error) {
11723	objectMap := make(map[string]interface{})
11724	if pc.PacketCaptureParameters != nil {
11725		objectMap["properties"] = pc.PacketCaptureParameters
11726	}
11727	return json.Marshal(objectMap)
11728}
11729
11730// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
11731func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
11732	var m map[string]*json.RawMessage
11733	err := json.Unmarshal(body, &m)
11734	if err != nil {
11735		return err
11736	}
11737	for k, v := range m {
11738		switch k {
11739		case "properties":
11740			if v != nil {
11741				var packetCaptureParameters PacketCaptureParameters
11742				err = json.Unmarshal(*v, &packetCaptureParameters)
11743				if err != nil {
11744					return err
11745				}
11746				pc.PacketCaptureParameters = &packetCaptureParameters
11747			}
11748		}
11749	}
11750
11751	return nil
11752}
11753
11754// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
11755type PacketCaptureFilter struct {
11756	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
11757	Protocol PcProtocol `json:"protocol,omitempty"`
11758	// 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.
11759	LocalIPAddress *string `json:"localIPAddress,omitempty"`
11760	// 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.
11761	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
11762	// 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.
11763	LocalPort *string `json:"localPort,omitempty"`
11764	// 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.
11765	RemotePort *string `json:"remotePort,omitempty"`
11766}
11767
11768// PacketCaptureListResult list of packet capture sessions.
11769type PacketCaptureListResult struct {
11770	autorest.Response `json:"-"`
11771	// Value - Information about packet capture sessions.
11772	Value *[]PacketCaptureResult `json:"value,omitempty"`
11773}
11774
11775// PacketCaptureParameters parameters that define the create packet capture operation.
11776type PacketCaptureParameters struct {
11777	// Target - The ID of the targeted resource, only VM is currently supported.
11778	Target *string `json:"target,omitempty"`
11779	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
11780	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
11781	// TotalBytesPerSession - Maximum size of the capture output.
11782	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
11783	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
11784	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
11785	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
11786	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
11787}
11788
11789// PacketCaptureQueryStatusResult status of packet capture session.
11790type PacketCaptureQueryStatusResult struct {
11791	autorest.Response `json:"-"`
11792	// Name - The name of the packet capture resource.
11793	Name *string `json:"name,omitempty"`
11794	// ID - The ID of the packet capture resource.
11795	ID *string `json:"id,omitempty"`
11796	// CaptureStartTime - The start time of the packet capture session.
11797	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
11798	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
11799	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
11800	// StopReason - The reason the current packet capture session was stopped.
11801	StopReason *string `json:"stopReason,omitempty"`
11802	// PacketCaptureError - List of errors of packet capture session.
11803	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
11804}
11805
11806// PacketCaptureResult information about packet capture session.
11807type PacketCaptureResult struct {
11808	autorest.Response `json:"-"`
11809	// Name - READ-ONLY; Name of the packet capture session.
11810	Name *string `json:"name,omitempty"`
11811	// ID - READ-ONLY; ID of the packet capture operation.
11812	ID                             *string `json:"id,omitempty"`
11813	Etag                           *string `json:"etag,omitempty"`
11814	*PacketCaptureResultProperties `json:"properties,omitempty"`
11815}
11816
11817// MarshalJSON is the custom marshaler for PacketCaptureResult.
11818func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
11819	objectMap := make(map[string]interface{})
11820	if pcr.Etag != nil {
11821		objectMap["etag"] = pcr.Etag
11822	}
11823	if pcr.PacketCaptureResultProperties != nil {
11824		objectMap["properties"] = pcr.PacketCaptureResultProperties
11825	}
11826	return json.Marshal(objectMap)
11827}
11828
11829// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
11830func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
11831	var m map[string]*json.RawMessage
11832	err := json.Unmarshal(body, &m)
11833	if err != nil {
11834		return err
11835	}
11836	for k, v := range m {
11837		switch k {
11838		case "name":
11839			if v != nil {
11840				var name string
11841				err = json.Unmarshal(*v, &name)
11842				if err != nil {
11843					return err
11844				}
11845				pcr.Name = &name
11846			}
11847		case "id":
11848			if v != nil {
11849				var ID string
11850				err = json.Unmarshal(*v, &ID)
11851				if err != nil {
11852					return err
11853				}
11854				pcr.ID = &ID
11855			}
11856		case "etag":
11857			if v != nil {
11858				var etag string
11859				err = json.Unmarshal(*v, &etag)
11860				if err != nil {
11861					return err
11862				}
11863				pcr.Etag = &etag
11864			}
11865		case "properties":
11866			if v != nil {
11867				var packetCaptureResultProperties PacketCaptureResultProperties
11868				err = json.Unmarshal(*v, &packetCaptureResultProperties)
11869				if err != nil {
11870					return err
11871				}
11872				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
11873			}
11874		}
11875	}
11876
11877	return nil
11878}
11879
11880// PacketCaptureResultProperties describes the properties of a packet capture session.
11881type PacketCaptureResultProperties struct {
11882	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11883	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11884	// Target - The ID of the targeted resource, only VM is currently supported.
11885	Target *string `json:"target,omitempty"`
11886	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
11887	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
11888	// TotalBytesPerSession - Maximum size of the capture output.
11889	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
11890	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
11891	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
11892	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
11893	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
11894}
11895
11896// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
11897// operation.
11898type PacketCapturesCreateFuture struct {
11899	azure.FutureAPI
11900	// Result returns the result of the asynchronous operation.
11901	// If the operation has not completed it will return an error.
11902	Result func(PacketCapturesClient) (PacketCaptureResult, error)
11903}
11904
11905// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11906func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
11907	var azFuture azure.Future
11908	if err := json.Unmarshal(body, &azFuture); err != nil {
11909		return err
11910	}
11911	future.FutureAPI = &azFuture
11912	future.Result = future.result
11913	return nil
11914}
11915
11916// result is the default implementation for PacketCapturesCreateFuture.Result.
11917func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
11918	var done bool
11919	done, err = future.DoneWithContext(context.Background(), client)
11920	if err != nil {
11921		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
11922		return
11923	}
11924	if !done {
11925		pcr.Response.Response = future.Response()
11926		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
11927		return
11928	}
11929	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11930	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
11931		pcr, err = client.CreateResponder(pcr.Response.Response)
11932		if err != nil {
11933			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
11934		}
11935	}
11936	return
11937}
11938
11939// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11940// operation.
11941type PacketCapturesDeleteFuture struct {
11942	azure.FutureAPI
11943	// Result returns the result of the asynchronous operation.
11944	// If the operation has not completed it will return an error.
11945	Result func(PacketCapturesClient) (autorest.Response, error)
11946}
11947
11948// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11949func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
11950	var azFuture azure.Future
11951	if err := json.Unmarshal(body, &azFuture); err != nil {
11952		return err
11953	}
11954	future.FutureAPI = &azFuture
11955	future.Result = future.result
11956	return nil
11957}
11958
11959// result is the default implementation for PacketCapturesDeleteFuture.Result.
11960func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
11961	var done bool
11962	done, err = future.DoneWithContext(context.Background(), client)
11963	if err != nil {
11964		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
11965		return
11966	}
11967	if !done {
11968		ar.Response = future.Response()
11969		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
11970		return
11971	}
11972	ar.Response = future.Response()
11973	return
11974}
11975
11976// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
11977// operation.
11978type PacketCapturesGetStatusFuture struct {
11979	azure.FutureAPI
11980	// Result returns the result of the asynchronous operation.
11981	// If the operation has not completed it will return an error.
11982	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
11983}
11984
11985// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11986func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
11987	var azFuture azure.Future
11988	if err := json.Unmarshal(body, &azFuture); err != nil {
11989		return err
11990	}
11991	future.FutureAPI = &azFuture
11992	future.Result = future.result
11993	return nil
11994}
11995
11996// result is the default implementation for PacketCapturesGetStatusFuture.Result.
11997func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
11998	var done bool
11999	done, err = future.DoneWithContext(context.Background(), client)
12000	if err != nil {
12001		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
12002		return
12003	}
12004	if !done {
12005		pcqsr.Response.Response = future.Response()
12006		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
12007		return
12008	}
12009	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12010	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
12011		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
12012		if err != nil {
12013			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
12014		}
12015	}
12016	return
12017}
12018
12019// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
12020// operation.
12021type PacketCapturesStopFuture struct {
12022	azure.FutureAPI
12023	// Result returns the result of the asynchronous operation.
12024	// If the operation has not completed it will return an error.
12025	Result func(PacketCapturesClient) (autorest.Response, error)
12026}
12027
12028// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12029func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
12030	var azFuture azure.Future
12031	if err := json.Unmarshal(body, &azFuture); err != nil {
12032		return err
12033	}
12034	future.FutureAPI = &azFuture
12035	future.Result = future.result
12036	return nil
12037}
12038
12039// result is the default implementation for PacketCapturesStopFuture.Result.
12040func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
12041	var done bool
12042	done, err = future.DoneWithContext(context.Background(), client)
12043	if err != nil {
12044		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
12045		return
12046	}
12047	if !done {
12048		ar.Response = future.Response()
12049		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
12050		return
12051	}
12052	ar.Response = future.Response()
12053	return
12054}
12055
12056// PacketCaptureStorageLocation describes the storage location for a packet capture session.
12057type PacketCaptureStorageLocation struct {
12058	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
12059	StorageID *string `json:"storageId,omitempty"`
12060	// 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.
12061	StoragePath *string `json:"storagePath,omitempty"`
12062	// 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.
12063	FilePath *string `json:"filePath,omitempty"`
12064}
12065
12066// PatchRouteFilter route Filter Resource.
12067type PatchRouteFilter struct {
12068	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
12069	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
12070	Name *string `json:"name,omitempty"`
12071	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12072	Etag *string `json:"etag,omitempty"`
12073	// Type - READ-ONLY; Resource type.
12074	Type *string `json:"type,omitempty"`
12075	// Tags - Resource tags.
12076	Tags map[string]*string `json:"tags"`
12077	// ID - Resource ID.
12078	ID *string `json:"id,omitempty"`
12079}
12080
12081// MarshalJSON is the custom marshaler for PatchRouteFilter.
12082func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
12083	objectMap := make(map[string]interface{})
12084	if prf.RouteFilterPropertiesFormat != nil {
12085		objectMap["properties"] = prf.RouteFilterPropertiesFormat
12086	}
12087	if prf.Tags != nil {
12088		objectMap["tags"] = prf.Tags
12089	}
12090	if prf.ID != nil {
12091		objectMap["id"] = prf.ID
12092	}
12093	return json.Marshal(objectMap)
12094}
12095
12096// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
12097func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
12098	var m map[string]*json.RawMessage
12099	err := json.Unmarshal(body, &m)
12100	if err != nil {
12101		return err
12102	}
12103	for k, v := range m {
12104		switch k {
12105		case "properties":
12106			if v != nil {
12107				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
12108				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
12109				if err != nil {
12110					return err
12111				}
12112				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
12113			}
12114		case "name":
12115			if v != nil {
12116				var name string
12117				err = json.Unmarshal(*v, &name)
12118				if err != nil {
12119					return err
12120				}
12121				prf.Name = &name
12122			}
12123		case "etag":
12124			if v != nil {
12125				var etag string
12126				err = json.Unmarshal(*v, &etag)
12127				if err != nil {
12128					return err
12129				}
12130				prf.Etag = &etag
12131			}
12132		case "type":
12133			if v != nil {
12134				var typeVar string
12135				err = json.Unmarshal(*v, &typeVar)
12136				if err != nil {
12137					return err
12138				}
12139				prf.Type = &typeVar
12140			}
12141		case "tags":
12142			if v != nil {
12143				var tags map[string]*string
12144				err = json.Unmarshal(*v, &tags)
12145				if err != nil {
12146					return err
12147				}
12148				prf.Tags = tags
12149			}
12150		case "id":
12151			if v != nil {
12152				var ID string
12153				err = json.Unmarshal(*v, &ID)
12154				if err != nil {
12155					return err
12156				}
12157				prf.ID = &ID
12158			}
12159		}
12160	}
12161
12162	return nil
12163}
12164
12165// PatchRouteFilterRule route Filter Rule Resource
12166type PatchRouteFilterRule struct {
12167	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
12168	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
12169	Name *string `json:"name,omitempty"`
12170	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12171	Etag *string `json:"etag,omitempty"`
12172	// ID - Resource ID.
12173	ID *string `json:"id,omitempty"`
12174}
12175
12176// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
12177func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
12178	objectMap := make(map[string]interface{})
12179	if prfr.RouteFilterRulePropertiesFormat != nil {
12180		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
12181	}
12182	if prfr.ID != nil {
12183		objectMap["id"] = prfr.ID
12184	}
12185	return json.Marshal(objectMap)
12186}
12187
12188// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
12189func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
12190	var m map[string]*json.RawMessage
12191	err := json.Unmarshal(body, &m)
12192	if err != nil {
12193		return err
12194	}
12195	for k, v := range m {
12196		switch k {
12197		case "properties":
12198			if v != nil {
12199				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
12200				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
12201				if err != nil {
12202					return err
12203				}
12204				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
12205			}
12206		case "name":
12207			if v != nil {
12208				var name string
12209				err = json.Unmarshal(*v, &name)
12210				if err != nil {
12211					return err
12212				}
12213				prfr.Name = &name
12214			}
12215		case "etag":
12216			if v != nil {
12217				var etag string
12218				err = json.Unmarshal(*v, &etag)
12219				if err != nil {
12220					return err
12221				}
12222				prfr.Etag = &etag
12223			}
12224		case "id":
12225			if v != nil {
12226				var ID string
12227				err = json.Unmarshal(*v, &ID)
12228				if err != nil {
12229					return err
12230				}
12231				prfr.ID = &ID
12232			}
12233		}
12234	}
12235
12236	return nil
12237}
12238
12239// Probe a load balancer probe.
12240type Probe struct {
12241	autorest.Response `json:"-"`
12242	// ProbePropertiesFormat - Properties of load balancer probe.
12243	*ProbePropertiesFormat `json:"properties,omitempty"`
12244	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12245	Name *string `json:"name,omitempty"`
12246	// Etag - A unique read-only string that changes whenever the resource is updated.
12247	Etag *string `json:"etag,omitempty"`
12248	// ID - Resource ID.
12249	ID *string `json:"id,omitempty"`
12250}
12251
12252// MarshalJSON is the custom marshaler for Probe.
12253func (p Probe) MarshalJSON() ([]byte, error) {
12254	objectMap := make(map[string]interface{})
12255	if p.ProbePropertiesFormat != nil {
12256		objectMap["properties"] = p.ProbePropertiesFormat
12257	}
12258	if p.Name != nil {
12259		objectMap["name"] = p.Name
12260	}
12261	if p.Etag != nil {
12262		objectMap["etag"] = p.Etag
12263	}
12264	if p.ID != nil {
12265		objectMap["id"] = p.ID
12266	}
12267	return json.Marshal(objectMap)
12268}
12269
12270// UnmarshalJSON is the custom unmarshaler for Probe struct.
12271func (p *Probe) UnmarshalJSON(body []byte) error {
12272	var m map[string]*json.RawMessage
12273	err := json.Unmarshal(body, &m)
12274	if err != nil {
12275		return err
12276	}
12277	for k, v := range m {
12278		switch k {
12279		case "properties":
12280			if v != nil {
12281				var probePropertiesFormat ProbePropertiesFormat
12282				err = json.Unmarshal(*v, &probePropertiesFormat)
12283				if err != nil {
12284					return err
12285				}
12286				p.ProbePropertiesFormat = &probePropertiesFormat
12287			}
12288		case "name":
12289			if v != nil {
12290				var name string
12291				err = json.Unmarshal(*v, &name)
12292				if err != nil {
12293					return err
12294				}
12295				p.Name = &name
12296			}
12297		case "etag":
12298			if v != nil {
12299				var etag string
12300				err = json.Unmarshal(*v, &etag)
12301				if err != nil {
12302					return err
12303				}
12304				p.Etag = &etag
12305			}
12306		case "id":
12307			if v != nil {
12308				var ID string
12309				err = json.Unmarshal(*v, &ID)
12310				if err != nil {
12311					return err
12312				}
12313				p.ID = &ID
12314			}
12315		}
12316	}
12317
12318	return nil
12319}
12320
12321// ProbePropertiesFormat load balancer probe resource.
12322type ProbePropertiesFormat struct {
12323	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
12324	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12325	// 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'
12326	Protocol ProbeProtocol `json:"protocol,omitempty"`
12327	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
12328	Port *int32 `json:"port,omitempty"`
12329	// 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.
12330	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
12331	// 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.
12332	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
12333	// 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.
12334	RequestPath *string `json:"requestPath,omitempty"`
12335	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12336	ProvisioningState *string `json:"provisioningState,omitempty"`
12337}
12338
12339// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
12340func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
12341	objectMap := make(map[string]interface{})
12342	if ppf.Protocol != "" {
12343		objectMap["protocol"] = ppf.Protocol
12344	}
12345	if ppf.Port != nil {
12346		objectMap["port"] = ppf.Port
12347	}
12348	if ppf.IntervalInSeconds != nil {
12349		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
12350	}
12351	if ppf.NumberOfProbes != nil {
12352		objectMap["numberOfProbes"] = ppf.NumberOfProbes
12353	}
12354	if ppf.RequestPath != nil {
12355		objectMap["requestPath"] = ppf.RequestPath
12356	}
12357	if ppf.ProvisioningState != nil {
12358		objectMap["provisioningState"] = ppf.ProvisioningState
12359	}
12360	return json.Marshal(objectMap)
12361}
12362
12363// ProtocolConfiguration configuration of the protocol.
12364type ProtocolConfiguration struct {
12365	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
12366}
12367
12368// PublicIPAddress public IP address resource.
12369type PublicIPAddress struct {
12370	autorest.Response `json:"-"`
12371	// Sku - The public IP address SKU.
12372	Sku *PublicIPAddressSku `json:"sku,omitempty"`
12373	// PublicIPAddressPropertiesFormat - Public IP address properties.
12374	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
12375	// Etag - A unique read-only string that changes whenever the resource is updated.
12376	Etag *string `json:"etag,omitempty"`
12377	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12378	Zones *[]string `json:"zones,omitempty"`
12379	// ID - Resource ID.
12380	ID *string `json:"id,omitempty"`
12381	// Name - READ-ONLY; Resource name.
12382	Name *string `json:"name,omitempty"`
12383	// Type - READ-ONLY; Resource type.
12384	Type *string `json:"type,omitempty"`
12385	// Location - Resource location.
12386	Location *string `json:"location,omitempty"`
12387	// Tags - Resource tags.
12388	Tags map[string]*string `json:"tags"`
12389}
12390
12391// MarshalJSON is the custom marshaler for PublicIPAddress.
12392func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
12393	objectMap := make(map[string]interface{})
12394	if pia.Sku != nil {
12395		objectMap["sku"] = pia.Sku
12396	}
12397	if pia.PublicIPAddressPropertiesFormat != nil {
12398		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
12399	}
12400	if pia.Etag != nil {
12401		objectMap["etag"] = pia.Etag
12402	}
12403	if pia.Zones != nil {
12404		objectMap["zones"] = pia.Zones
12405	}
12406	if pia.ID != nil {
12407		objectMap["id"] = pia.ID
12408	}
12409	if pia.Location != nil {
12410		objectMap["location"] = pia.Location
12411	}
12412	if pia.Tags != nil {
12413		objectMap["tags"] = pia.Tags
12414	}
12415	return json.Marshal(objectMap)
12416}
12417
12418// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
12419func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
12420	var m map[string]*json.RawMessage
12421	err := json.Unmarshal(body, &m)
12422	if err != nil {
12423		return err
12424	}
12425	for k, v := range m {
12426		switch k {
12427		case "sku":
12428			if v != nil {
12429				var sku PublicIPAddressSku
12430				err = json.Unmarshal(*v, &sku)
12431				if err != nil {
12432					return err
12433				}
12434				pia.Sku = &sku
12435			}
12436		case "properties":
12437			if v != nil {
12438				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
12439				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
12440				if err != nil {
12441					return err
12442				}
12443				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
12444			}
12445		case "etag":
12446			if v != nil {
12447				var etag string
12448				err = json.Unmarshal(*v, &etag)
12449				if err != nil {
12450					return err
12451				}
12452				pia.Etag = &etag
12453			}
12454		case "zones":
12455			if v != nil {
12456				var zones []string
12457				err = json.Unmarshal(*v, &zones)
12458				if err != nil {
12459					return err
12460				}
12461				pia.Zones = &zones
12462			}
12463		case "id":
12464			if v != nil {
12465				var ID string
12466				err = json.Unmarshal(*v, &ID)
12467				if err != nil {
12468					return err
12469				}
12470				pia.ID = &ID
12471			}
12472		case "name":
12473			if v != nil {
12474				var name string
12475				err = json.Unmarshal(*v, &name)
12476				if err != nil {
12477					return err
12478				}
12479				pia.Name = &name
12480			}
12481		case "type":
12482			if v != nil {
12483				var typeVar string
12484				err = json.Unmarshal(*v, &typeVar)
12485				if err != nil {
12486					return err
12487				}
12488				pia.Type = &typeVar
12489			}
12490		case "location":
12491			if v != nil {
12492				var location string
12493				err = json.Unmarshal(*v, &location)
12494				if err != nil {
12495					return err
12496				}
12497				pia.Location = &location
12498			}
12499		case "tags":
12500			if v != nil {
12501				var tags map[string]*string
12502				err = json.Unmarshal(*v, &tags)
12503				if err != nil {
12504					return err
12505				}
12506				pia.Tags = tags
12507			}
12508		}
12509	}
12510
12511	return nil
12512}
12513
12514// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
12515type PublicIPAddressDNSSettings struct {
12516	// 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.
12517	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
12518	// 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.
12519	Fqdn *string `json:"fqdn,omitempty"`
12520	// 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.
12521	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
12522}
12523
12524// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12525// long-running operation.
12526type PublicIPAddressesCreateOrUpdateFuture struct {
12527	azure.FutureAPI
12528	// Result returns the result of the asynchronous operation.
12529	// If the operation has not completed it will return an error.
12530	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
12531}
12532
12533// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12534func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12535	var azFuture azure.Future
12536	if err := json.Unmarshal(body, &azFuture); err != nil {
12537		return err
12538	}
12539	future.FutureAPI = &azFuture
12540	future.Result = future.result
12541	return nil
12542}
12543
12544// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
12545func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
12546	var done bool
12547	done, err = future.DoneWithContext(context.Background(), client)
12548	if err != nil {
12549		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12550		return
12551	}
12552	if !done {
12553		pia.Response.Response = future.Response()
12554		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
12555		return
12556	}
12557	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12558	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
12559		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
12560		if err != nil {
12561			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
12562		}
12563	}
12564	return
12565}
12566
12567// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12568// operation.
12569type PublicIPAddressesDeleteFuture struct {
12570	azure.FutureAPI
12571	// Result returns the result of the asynchronous operation.
12572	// If the operation has not completed it will return an error.
12573	Result func(PublicIPAddressesClient) (autorest.Response, error)
12574}
12575
12576// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12577func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
12578	var azFuture azure.Future
12579	if err := json.Unmarshal(body, &azFuture); err != nil {
12580		return err
12581	}
12582	future.FutureAPI = &azFuture
12583	future.Result = future.result
12584	return nil
12585}
12586
12587// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
12588func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
12589	var done bool
12590	done, err = future.DoneWithContext(context.Background(), client)
12591	if err != nil {
12592		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
12593		return
12594	}
12595	if !done {
12596		ar.Response = future.Response()
12597		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
12598		return
12599	}
12600	ar.Response = future.Response()
12601	return
12602}
12603
12604// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
12605// long-running operation.
12606type PublicIPAddressesUpdateTagsFuture struct {
12607	azure.FutureAPI
12608	// Result returns the result of the asynchronous operation.
12609	// If the operation has not completed it will return an error.
12610	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
12611}
12612
12613// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12614func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12615	var azFuture azure.Future
12616	if err := json.Unmarshal(body, &azFuture); err != nil {
12617		return err
12618	}
12619	future.FutureAPI = &azFuture
12620	future.Result = future.result
12621	return nil
12622}
12623
12624// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
12625func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
12626	var done bool
12627	done, err = future.DoneWithContext(context.Background(), client)
12628	if err != nil {
12629		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12630		return
12631	}
12632	if !done {
12633		pia.Response.Response = future.Response()
12634		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
12635		return
12636	}
12637	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12638	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
12639		pia, err = client.UpdateTagsResponder(pia.Response.Response)
12640		if err != nil {
12641			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
12642		}
12643	}
12644	return
12645}
12646
12647// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
12648type PublicIPAddressListResult struct {
12649	autorest.Response `json:"-"`
12650	// Value - A list of public IP addresses that exists in a resource group.
12651	Value *[]PublicIPAddress `json:"value,omitempty"`
12652	// NextLink - The URL to get the next set of results.
12653	NextLink *string `json:"nextLink,omitempty"`
12654}
12655
12656// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
12657type PublicIPAddressListResultIterator struct {
12658	i    int
12659	page PublicIPAddressListResultPage
12660}
12661
12662// NextWithContext advances to the next value.  If there was an error making
12663// the request the iterator does not advance and the error is returned.
12664func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
12665	if tracing.IsEnabled() {
12666		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
12667		defer func() {
12668			sc := -1
12669			if iter.Response().Response.Response != nil {
12670				sc = iter.Response().Response.Response.StatusCode
12671			}
12672			tracing.EndSpan(ctx, sc, err)
12673		}()
12674	}
12675	iter.i++
12676	if iter.i < len(iter.page.Values()) {
12677		return nil
12678	}
12679	err = iter.page.NextWithContext(ctx)
12680	if err != nil {
12681		iter.i--
12682		return err
12683	}
12684	iter.i = 0
12685	return nil
12686}
12687
12688// Next advances to the next value.  If there was an error making
12689// the request the iterator does not advance and the error is returned.
12690// Deprecated: Use NextWithContext() instead.
12691func (iter *PublicIPAddressListResultIterator) Next() error {
12692	return iter.NextWithContext(context.Background())
12693}
12694
12695// NotDone returns true if the enumeration should be started or is not yet complete.
12696func (iter PublicIPAddressListResultIterator) NotDone() bool {
12697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12698}
12699
12700// Response returns the raw server response from the last page request.
12701func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
12702	return iter.page.Response()
12703}
12704
12705// Value returns the current value or a zero-initialized value if the
12706// iterator has advanced beyond the end of the collection.
12707func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
12708	if !iter.page.NotDone() {
12709		return PublicIPAddress{}
12710	}
12711	return iter.page.Values()[iter.i]
12712}
12713
12714// Creates a new instance of the PublicIPAddressListResultIterator type.
12715func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
12716	return PublicIPAddressListResultIterator{page: page}
12717}
12718
12719// IsEmpty returns true if the ListResult contains no values.
12720func (pialr PublicIPAddressListResult) IsEmpty() bool {
12721	return pialr.Value == nil || len(*pialr.Value) == 0
12722}
12723
12724// hasNextLink returns true if the NextLink is not empty.
12725func (pialr PublicIPAddressListResult) hasNextLink() bool {
12726	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
12727}
12728
12729// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
12730// It returns nil if no more results exist.
12731func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
12732	if !pialr.hasNextLink() {
12733		return nil, nil
12734	}
12735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12736		autorest.AsJSON(),
12737		autorest.AsGet(),
12738		autorest.WithBaseURL(to.String(pialr.NextLink)))
12739}
12740
12741// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
12742type PublicIPAddressListResultPage struct {
12743	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
12744	pialr PublicIPAddressListResult
12745}
12746
12747// NextWithContext advances to the next page of values.  If there was an error making
12748// the request the page does not advance and the error is returned.
12749func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
12750	if tracing.IsEnabled() {
12751		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
12752		defer func() {
12753			sc := -1
12754			if page.Response().Response.Response != nil {
12755				sc = page.Response().Response.Response.StatusCode
12756			}
12757			tracing.EndSpan(ctx, sc, err)
12758		}()
12759	}
12760	for {
12761		next, err := page.fn(ctx, page.pialr)
12762		if err != nil {
12763			return err
12764		}
12765		page.pialr = next
12766		if !next.hasNextLink() || !next.IsEmpty() {
12767			break
12768		}
12769	}
12770	return nil
12771}
12772
12773// Next advances to the next page of values.  If there was an error making
12774// the request the page does not advance and the error is returned.
12775// Deprecated: Use NextWithContext() instead.
12776func (page *PublicIPAddressListResultPage) Next() error {
12777	return page.NextWithContext(context.Background())
12778}
12779
12780// NotDone returns true if the page enumeration should be started or is not yet complete.
12781func (page PublicIPAddressListResultPage) NotDone() bool {
12782	return !page.pialr.IsEmpty()
12783}
12784
12785// Response returns the raw server response from the last page request.
12786func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
12787	return page.pialr
12788}
12789
12790// Values returns the slice of values for the current page or nil if there are no values.
12791func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
12792	if page.pialr.IsEmpty() {
12793		return nil
12794	}
12795	return *page.pialr.Value
12796}
12797
12798// Creates a new instance of the PublicIPAddressListResultPage type.
12799func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
12800	return PublicIPAddressListResultPage{
12801		fn:    getNextPage,
12802		pialr: cur,
12803	}
12804}
12805
12806// PublicIPAddressPropertiesFormat public IP address properties.
12807type PublicIPAddressPropertiesFormat struct {
12808	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12809	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
12810	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
12811	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
12812	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
12813	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
12814	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
12815	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
12816	// IPTags - The list of tags associated with the public IP address.
12817	IPTags *[]IPTag `json:"ipTags,omitempty"`
12818	// IPAddress - The IP address associated with the public IP address resource.
12819	IPAddress *string `json:"ipAddress,omitempty"`
12820	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
12821	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12822	// ResourceGUID - The resource GUID property of the public IP resource.
12823	ResourceGUID *string `json:"resourceGuid,omitempty"`
12824	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12825	ProvisioningState *string `json:"provisioningState,omitempty"`
12826}
12827
12828// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
12829func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
12830	objectMap := make(map[string]interface{})
12831	if piapf.PublicIPAllocationMethod != "" {
12832		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
12833	}
12834	if piapf.PublicIPAddressVersion != "" {
12835		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
12836	}
12837	if piapf.DNSSettings != nil {
12838		objectMap["dnsSettings"] = piapf.DNSSettings
12839	}
12840	if piapf.IPTags != nil {
12841		objectMap["ipTags"] = piapf.IPTags
12842	}
12843	if piapf.IPAddress != nil {
12844		objectMap["ipAddress"] = piapf.IPAddress
12845	}
12846	if piapf.IdleTimeoutInMinutes != nil {
12847		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
12848	}
12849	if piapf.ResourceGUID != nil {
12850		objectMap["resourceGuid"] = piapf.ResourceGUID
12851	}
12852	if piapf.ProvisioningState != nil {
12853		objectMap["provisioningState"] = piapf.ProvisioningState
12854	}
12855	return json.Marshal(objectMap)
12856}
12857
12858// PublicIPAddressSku SKU of a public IP address
12859type PublicIPAddressSku struct {
12860	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
12861	Name PublicIPAddressSkuName `json:"name,omitempty"`
12862}
12863
12864// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
12865type QueryTroubleshootingParameters struct {
12866	// TargetResourceID - The target resource ID to query the troubleshooting result.
12867	TargetResourceID *string `json:"targetResourceId,omitempty"`
12868}
12869
12870// Resource common resource representation.
12871type Resource struct {
12872	// ID - Resource ID.
12873	ID *string `json:"id,omitempty"`
12874	// Name - READ-ONLY; Resource name.
12875	Name *string `json:"name,omitempty"`
12876	// Type - READ-ONLY; Resource type.
12877	Type *string `json:"type,omitempty"`
12878	// Location - Resource location.
12879	Location *string `json:"location,omitempty"`
12880	// Tags - Resource tags.
12881	Tags map[string]*string `json:"tags"`
12882}
12883
12884// MarshalJSON is the custom marshaler for Resource.
12885func (r Resource) MarshalJSON() ([]byte, error) {
12886	objectMap := make(map[string]interface{})
12887	if r.ID != nil {
12888		objectMap["id"] = r.ID
12889	}
12890	if r.Location != nil {
12891		objectMap["location"] = r.Location
12892	}
12893	if r.Tags != nil {
12894		objectMap["tags"] = r.Tags
12895	}
12896	return json.Marshal(objectMap)
12897}
12898
12899// ResourceNavigationLink resourceNavigationLink resource.
12900type ResourceNavigationLink struct {
12901	// ResourceNavigationLinkFormat - Resource navigation link properties format.
12902	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
12903	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
12904	Name *string `json:"name,omitempty"`
12905	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12906	Etag *string `json:"etag,omitempty"`
12907	// ID - Resource ID.
12908	ID *string `json:"id,omitempty"`
12909}
12910
12911// MarshalJSON is the custom marshaler for ResourceNavigationLink.
12912func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
12913	objectMap := make(map[string]interface{})
12914	if rnl.ResourceNavigationLinkFormat != nil {
12915		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
12916	}
12917	if rnl.Name != nil {
12918		objectMap["name"] = rnl.Name
12919	}
12920	if rnl.ID != nil {
12921		objectMap["id"] = rnl.ID
12922	}
12923	return json.Marshal(objectMap)
12924}
12925
12926// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
12927func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
12928	var m map[string]*json.RawMessage
12929	err := json.Unmarshal(body, &m)
12930	if err != nil {
12931		return err
12932	}
12933	for k, v := range m {
12934		switch k {
12935		case "properties":
12936			if v != nil {
12937				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
12938				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
12939				if err != nil {
12940					return err
12941				}
12942				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
12943			}
12944		case "name":
12945			if v != nil {
12946				var name string
12947				err = json.Unmarshal(*v, &name)
12948				if err != nil {
12949					return err
12950				}
12951				rnl.Name = &name
12952			}
12953		case "etag":
12954			if v != nil {
12955				var etag string
12956				err = json.Unmarshal(*v, &etag)
12957				if err != nil {
12958					return err
12959				}
12960				rnl.Etag = &etag
12961			}
12962		case "id":
12963			if v != nil {
12964				var ID string
12965				err = json.Unmarshal(*v, &ID)
12966				if err != nil {
12967					return err
12968				}
12969				rnl.ID = &ID
12970			}
12971		}
12972	}
12973
12974	return nil
12975}
12976
12977// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
12978type ResourceNavigationLinkFormat struct {
12979	// LinkedResourceType - Resource type of the linked resource.
12980	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
12981	// Link - Link to the external resource
12982	Link *string `json:"link,omitempty"`
12983	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
12984	ProvisioningState *string `json:"provisioningState,omitempty"`
12985}
12986
12987// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
12988func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
12989	objectMap := make(map[string]interface{})
12990	if rnlf.LinkedResourceType != nil {
12991		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
12992	}
12993	if rnlf.Link != nil {
12994		objectMap["link"] = rnlf.Link
12995	}
12996	return json.Marshal(objectMap)
12997}
12998
12999// RetentionPolicyParameters parameters that define the retention policy for flow log.
13000type RetentionPolicyParameters struct {
13001	// Days - Number of days to retain flow log records.
13002	Days *int32 `json:"days,omitempty"`
13003	// Enabled - Flag to enable/disable retention.
13004	Enabled *bool `json:"enabled,omitempty"`
13005}
13006
13007// Route route resource
13008type Route struct {
13009	autorest.Response `json:"-"`
13010	// RoutePropertiesFormat - Properties of the route.
13011	*RoutePropertiesFormat `json:"properties,omitempty"`
13012	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13013	Name *string `json:"name,omitempty"`
13014	// Etag - A unique read-only string that changes whenever the resource is updated.
13015	Etag *string `json:"etag,omitempty"`
13016	// ID - Resource ID.
13017	ID *string `json:"id,omitempty"`
13018}
13019
13020// MarshalJSON is the custom marshaler for Route.
13021func (r Route) MarshalJSON() ([]byte, error) {
13022	objectMap := make(map[string]interface{})
13023	if r.RoutePropertiesFormat != nil {
13024		objectMap["properties"] = r.RoutePropertiesFormat
13025	}
13026	if r.Name != nil {
13027		objectMap["name"] = r.Name
13028	}
13029	if r.Etag != nil {
13030		objectMap["etag"] = r.Etag
13031	}
13032	if r.ID != nil {
13033		objectMap["id"] = r.ID
13034	}
13035	return json.Marshal(objectMap)
13036}
13037
13038// UnmarshalJSON is the custom unmarshaler for Route struct.
13039func (r *Route) UnmarshalJSON(body []byte) error {
13040	var m map[string]*json.RawMessage
13041	err := json.Unmarshal(body, &m)
13042	if err != nil {
13043		return err
13044	}
13045	for k, v := range m {
13046		switch k {
13047		case "properties":
13048			if v != nil {
13049				var routePropertiesFormat RoutePropertiesFormat
13050				err = json.Unmarshal(*v, &routePropertiesFormat)
13051				if err != nil {
13052					return err
13053				}
13054				r.RoutePropertiesFormat = &routePropertiesFormat
13055			}
13056		case "name":
13057			if v != nil {
13058				var name string
13059				err = json.Unmarshal(*v, &name)
13060				if err != nil {
13061					return err
13062				}
13063				r.Name = &name
13064			}
13065		case "etag":
13066			if v != nil {
13067				var etag string
13068				err = json.Unmarshal(*v, &etag)
13069				if err != nil {
13070					return err
13071				}
13072				r.Etag = &etag
13073			}
13074		case "id":
13075			if v != nil {
13076				var ID string
13077				err = json.Unmarshal(*v, &ID)
13078				if err != nil {
13079					return err
13080				}
13081				r.ID = &ID
13082			}
13083		}
13084	}
13085
13086	return nil
13087}
13088
13089// RouteFilter route Filter Resource.
13090type RouteFilter struct {
13091	autorest.Response            `json:"-"`
13092	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
13093	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
13094	Etag *string `json:"etag,omitempty"`
13095	// ID - Resource ID.
13096	ID *string `json:"id,omitempty"`
13097	// Name - READ-ONLY; Resource name.
13098	Name *string `json:"name,omitempty"`
13099	// Type - READ-ONLY; Resource type.
13100	Type *string `json:"type,omitempty"`
13101	// Location - Resource location.
13102	Location *string `json:"location,omitempty"`
13103	// Tags - Resource tags.
13104	Tags map[string]*string `json:"tags"`
13105}
13106
13107// MarshalJSON is the custom marshaler for RouteFilter.
13108func (rf RouteFilter) MarshalJSON() ([]byte, error) {
13109	objectMap := make(map[string]interface{})
13110	if rf.RouteFilterPropertiesFormat != nil {
13111		objectMap["properties"] = rf.RouteFilterPropertiesFormat
13112	}
13113	if rf.ID != nil {
13114		objectMap["id"] = rf.ID
13115	}
13116	if rf.Location != nil {
13117		objectMap["location"] = rf.Location
13118	}
13119	if rf.Tags != nil {
13120		objectMap["tags"] = rf.Tags
13121	}
13122	return json.Marshal(objectMap)
13123}
13124
13125// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
13126func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
13127	var m map[string]*json.RawMessage
13128	err := json.Unmarshal(body, &m)
13129	if err != nil {
13130		return err
13131	}
13132	for k, v := range m {
13133		switch k {
13134		case "properties":
13135			if v != nil {
13136				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
13137				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
13138				if err != nil {
13139					return err
13140				}
13141				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
13142			}
13143		case "etag":
13144			if v != nil {
13145				var etag string
13146				err = json.Unmarshal(*v, &etag)
13147				if err != nil {
13148					return err
13149				}
13150				rf.Etag = &etag
13151			}
13152		case "id":
13153			if v != nil {
13154				var ID string
13155				err = json.Unmarshal(*v, &ID)
13156				if err != nil {
13157					return err
13158				}
13159				rf.ID = &ID
13160			}
13161		case "name":
13162			if v != nil {
13163				var name string
13164				err = json.Unmarshal(*v, &name)
13165				if err != nil {
13166					return err
13167				}
13168				rf.Name = &name
13169			}
13170		case "type":
13171			if v != nil {
13172				var typeVar string
13173				err = json.Unmarshal(*v, &typeVar)
13174				if err != nil {
13175					return err
13176				}
13177				rf.Type = &typeVar
13178			}
13179		case "location":
13180			if v != nil {
13181				var location string
13182				err = json.Unmarshal(*v, &location)
13183				if err != nil {
13184					return err
13185				}
13186				rf.Location = &location
13187			}
13188		case "tags":
13189			if v != nil {
13190				var tags map[string]*string
13191				err = json.Unmarshal(*v, &tags)
13192				if err != nil {
13193					return err
13194				}
13195				rf.Tags = tags
13196			}
13197		}
13198	}
13199
13200	return nil
13201}
13202
13203// RouteFilterListResult response for the ListRouteFilters API service call.
13204type RouteFilterListResult struct {
13205	autorest.Response `json:"-"`
13206	// Value - Gets a list of route filters in a resource group.
13207	Value *[]RouteFilter `json:"value,omitempty"`
13208	// NextLink - The URL to get the next set of results.
13209	NextLink *string `json:"nextLink,omitempty"`
13210}
13211
13212// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
13213type RouteFilterListResultIterator struct {
13214	i    int
13215	page RouteFilterListResultPage
13216}
13217
13218// NextWithContext advances to the next value.  If there was an error making
13219// the request the iterator does not advance and the error is returned.
13220func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
13221	if tracing.IsEnabled() {
13222		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
13223		defer func() {
13224			sc := -1
13225			if iter.Response().Response.Response != nil {
13226				sc = iter.Response().Response.Response.StatusCode
13227			}
13228			tracing.EndSpan(ctx, sc, err)
13229		}()
13230	}
13231	iter.i++
13232	if iter.i < len(iter.page.Values()) {
13233		return nil
13234	}
13235	err = iter.page.NextWithContext(ctx)
13236	if err != nil {
13237		iter.i--
13238		return err
13239	}
13240	iter.i = 0
13241	return nil
13242}
13243
13244// Next advances to the next value.  If there was an error making
13245// the request the iterator does not advance and the error is returned.
13246// Deprecated: Use NextWithContext() instead.
13247func (iter *RouteFilterListResultIterator) Next() error {
13248	return iter.NextWithContext(context.Background())
13249}
13250
13251// NotDone returns true if the enumeration should be started or is not yet complete.
13252func (iter RouteFilterListResultIterator) NotDone() bool {
13253	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13254}
13255
13256// Response returns the raw server response from the last page request.
13257func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
13258	return iter.page.Response()
13259}
13260
13261// Value returns the current value or a zero-initialized value if the
13262// iterator has advanced beyond the end of the collection.
13263func (iter RouteFilterListResultIterator) Value() RouteFilter {
13264	if !iter.page.NotDone() {
13265		return RouteFilter{}
13266	}
13267	return iter.page.Values()[iter.i]
13268}
13269
13270// Creates a new instance of the RouteFilterListResultIterator type.
13271func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
13272	return RouteFilterListResultIterator{page: page}
13273}
13274
13275// IsEmpty returns true if the ListResult contains no values.
13276func (rflr RouteFilterListResult) IsEmpty() bool {
13277	return rflr.Value == nil || len(*rflr.Value) == 0
13278}
13279
13280// hasNextLink returns true if the NextLink is not empty.
13281func (rflr RouteFilterListResult) hasNextLink() bool {
13282	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
13283}
13284
13285// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
13286// It returns nil if no more results exist.
13287func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
13288	if !rflr.hasNextLink() {
13289		return nil, nil
13290	}
13291	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13292		autorest.AsJSON(),
13293		autorest.AsGet(),
13294		autorest.WithBaseURL(to.String(rflr.NextLink)))
13295}
13296
13297// RouteFilterListResultPage contains a page of RouteFilter values.
13298type RouteFilterListResultPage struct {
13299	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
13300	rflr RouteFilterListResult
13301}
13302
13303// NextWithContext advances to the next page of values.  If there was an error making
13304// the request the page does not advance and the error is returned.
13305func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
13306	if tracing.IsEnabled() {
13307		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
13308		defer func() {
13309			sc := -1
13310			if page.Response().Response.Response != nil {
13311				sc = page.Response().Response.Response.StatusCode
13312			}
13313			tracing.EndSpan(ctx, sc, err)
13314		}()
13315	}
13316	for {
13317		next, err := page.fn(ctx, page.rflr)
13318		if err != nil {
13319			return err
13320		}
13321		page.rflr = next
13322		if !next.hasNextLink() || !next.IsEmpty() {
13323			break
13324		}
13325	}
13326	return nil
13327}
13328
13329// Next advances to the next page of values.  If there was an error making
13330// the request the page does not advance and the error is returned.
13331// Deprecated: Use NextWithContext() instead.
13332func (page *RouteFilterListResultPage) Next() error {
13333	return page.NextWithContext(context.Background())
13334}
13335
13336// NotDone returns true if the page enumeration should be started or is not yet complete.
13337func (page RouteFilterListResultPage) NotDone() bool {
13338	return !page.rflr.IsEmpty()
13339}
13340
13341// Response returns the raw server response from the last page request.
13342func (page RouteFilterListResultPage) Response() RouteFilterListResult {
13343	return page.rflr
13344}
13345
13346// Values returns the slice of values for the current page or nil if there are no values.
13347func (page RouteFilterListResultPage) Values() []RouteFilter {
13348	if page.rflr.IsEmpty() {
13349		return nil
13350	}
13351	return *page.rflr.Value
13352}
13353
13354// Creates a new instance of the RouteFilterListResultPage type.
13355func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
13356	return RouteFilterListResultPage{
13357		fn:   getNextPage,
13358		rflr: cur,
13359	}
13360}
13361
13362// RouteFilterPropertiesFormat route Filter Resource
13363type RouteFilterPropertiesFormat struct {
13364	// Rules - Collection of RouteFilterRules contained within a route filter.
13365	Rules *[]RouteFilterRule `json:"rules,omitempty"`
13366	// Peerings - A collection of references to express route circuit peerings.
13367	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
13368	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
13369	ProvisioningState *string `json:"provisioningState,omitempty"`
13370}
13371
13372// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
13373func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
13374	objectMap := make(map[string]interface{})
13375	if rfpf.Rules != nil {
13376		objectMap["rules"] = rfpf.Rules
13377	}
13378	if rfpf.Peerings != nil {
13379		objectMap["peerings"] = rfpf.Peerings
13380	}
13381	return json.Marshal(objectMap)
13382}
13383
13384// RouteFilterRule route Filter Rule Resource
13385type RouteFilterRule struct {
13386	autorest.Response                `json:"-"`
13387	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
13388	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13389	Name *string `json:"name,omitempty"`
13390	// Location - Resource location.
13391	Location *string `json:"location,omitempty"`
13392	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13393	Etag *string `json:"etag,omitempty"`
13394	// ID - Resource ID.
13395	ID *string `json:"id,omitempty"`
13396}
13397
13398// MarshalJSON is the custom marshaler for RouteFilterRule.
13399func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
13400	objectMap := make(map[string]interface{})
13401	if rfr.RouteFilterRulePropertiesFormat != nil {
13402		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
13403	}
13404	if rfr.Name != nil {
13405		objectMap["name"] = rfr.Name
13406	}
13407	if rfr.Location != nil {
13408		objectMap["location"] = rfr.Location
13409	}
13410	if rfr.ID != nil {
13411		objectMap["id"] = rfr.ID
13412	}
13413	return json.Marshal(objectMap)
13414}
13415
13416// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
13417func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
13418	var m map[string]*json.RawMessage
13419	err := json.Unmarshal(body, &m)
13420	if err != nil {
13421		return err
13422	}
13423	for k, v := range m {
13424		switch k {
13425		case "properties":
13426			if v != nil {
13427				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
13428				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
13429				if err != nil {
13430					return err
13431				}
13432				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
13433			}
13434		case "name":
13435			if v != nil {
13436				var name string
13437				err = json.Unmarshal(*v, &name)
13438				if err != nil {
13439					return err
13440				}
13441				rfr.Name = &name
13442			}
13443		case "location":
13444			if v != nil {
13445				var location string
13446				err = json.Unmarshal(*v, &location)
13447				if err != nil {
13448					return err
13449				}
13450				rfr.Location = &location
13451			}
13452		case "etag":
13453			if v != nil {
13454				var etag string
13455				err = json.Unmarshal(*v, &etag)
13456				if err != nil {
13457					return err
13458				}
13459				rfr.Etag = &etag
13460			}
13461		case "id":
13462			if v != nil {
13463				var ID string
13464				err = json.Unmarshal(*v, &ID)
13465				if err != nil {
13466					return err
13467				}
13468				rfr.ID = &ID
13469			}
13470		}
13471	}
13472
13473	return nil
13474}
13475
13476// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
13477type RouteFilterRuleListResult struct {
13478	autorest.Response `json:"-"`
13479	// Value - Gets a list of RouteFilterRules in a resource group.
13480	Value *[]RouteFilterRule `json:"value,omitempty"`
13481	// NextLink - The URL to get the next set of results.
13482	NextLink *string `json:"nextLink,omitempty"`
13483}
13484
13485// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
13486type RouteFilterRuleListResultIterator struct {
13487	i    int
13488	page RouteFilterRuleListResultPage
13489}
13490
13491// NextWithContext advances to the next value.  If there was an error making
13492// the request the iterator does not advance and the error is returned.
13493func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13494	if tracing.IsEnabled() {
13495		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
13496		defer func() {
13497			sc := -1
13498			if iter.Response().Response.Response != nil {
13499				sc = iter.Response().Response.Response.StatusCode
13500			}
13501			tracing.EndSpan(ctx, sc, err)
13502		}()
13503	}
13504	iter.i++
13505	if iter.i < len(iter.page.Values()) {
13506		return nil
13507	}
13508	err = iter.page.NextWithContext(ctx)
13509	if err != nil {
13510		iter.i--
13511		return err
13512	}
13513	iter.i = 0
13514	return nil
13515}
13516
13517// Next advances to the next value.  If there was an error making
13518// the request the iterator does not advance and the error is returned.
13519// Deprecated: Use NextWithContext() instead.
13520func (iter *RouteFilterRuleListResultIterator) Next() error {
13521	return iter.NextWithContext(context.Background())
13522}
13523
13524// NotDone returns true if the enumeration should be started or is not yet complete.
13525func (iter RouteFilterRuleListResultIterator) NotDone() bool {
13526	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13527}
13528
13529// Response returns the raw server response from the last page request.
13530func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
13531	return iter.page.Response()
13532}
13533
13534// Value returns the current value or a zero-initialized value if the
13535// iterator has advanced beyond the end of the collection.
13536func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
13537	if !iter.page.NotDone() {
13538		return RouteFilterRule{}
13539	}
13540	return iter.page.Values()[iter.i]
13541}
13542
13543// Creates a new instance of the RouteFilterRuleListResultIterator type.
13544func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
13545	return RouteFilterRuleListResultIterator{page: page}
13546}
13547
13548// IsEmpty returns true if the ListResult contains no values.
13549func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
13550	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
13551}
13552
13553// hasNextLink returns true if the NextLink is not empty.
13554func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
13555	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
13556}
13557
13558// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
13559// It returns nil if no more results exist.
13560func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13561	if !rfrlr.hasNextLink() {
13562		return nil, nil
13563	}
13564	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13565		autorest.AsJSON(),
13566		autorest.AsGet(),
13567		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
13568}
13569
13570// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
13571type RouteFilterRuleListResultPage struct {
13572	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
13573	rfrlr RouteFilterRuleListResult
13574}
13575
13576// NextWithContext advances to the next page of values.  If there was an error making
13577// the request the page does not advance and the error is returned.
13578func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13579	if tracing.IsEnabled() {
13580		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
13581		defer func() {
13582			sc := -1
13583			if page.Response().Response.Response != nil {
13584				sc = page.Response().Response.Response.StatusCode
13585			}
13586			tracing.EndSpan(ctx, sc, err)
13587		}()
13588	}
13589	for {
13590		next, err := page.fn(ctx, page.rfrlr)
13591		if err != nil {
13592			return err
13593		}
13594		page.rfrlr = next
13595		if !next.hasNextLink() || !next.IsEmpty() {
13596			break
13597		}
13598	}
13599	return nil
13600}
13601
13602// Next advances to the next page of values.  If there was an error making
13603// the request the page does not advance and the error is returned.
13604// Deprecated: Use NextWithContext() instead.
13605func (page *RouteFilterRuleListResultPage) Next() error {
13606	return page.NextWithContext(context.Background())
13607}
13608
13609// NotDone returns true if the page enumeration should be started or is not yet complete.
13610func (page RouteFilterRuleListResultPage) NotDone() bool {
13611	return !page.rfrlr.IsEmpty()
13612}
13613
13614// Response returns the raw server response from the last page request.
13615func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
13616	return page.rfrlr
13617}
13618
13619// Values returns the slice of values for the current page or nil if there are no values.
13620func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
13621	if page.rfrlr.IsEmpty() {
13622		return nil
13623	}
13624	return *page.rfrlr.Value
13625}
13626
13627// Creates a new instance of the RouteFilterRuleListResultPage type.
13628func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
13629	return RouteFilterRuleListResultPage{
13630		fn:    getNextPage,
13631		rfrlr: cur,
13632	}
13633}
13634
13635// RouteFilterRulePropertiesFormat route Filter Rule Resource
13636type RouteFilterRulePropertiesFormat struct {
13637	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
13638	Access Access `json:"access,omitempty"`
13639	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
13640	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
13641	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
13642	Communities *[]string `json:"communities,omitempty"`
13643	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
13644	ProvisioningState *string `json:"provisioningState,omitempty"`
13645}
13646
13647// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
13648func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
13649	objectMap := make(map[string]interface{})
13650	if rfrpf.Access != "" {
13651		objectMap["access"] = rfrpf.Access
13652	}
13653	if rfrpf.RouteFilterRuleType != nil {
13654		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
13655	}
13656	if rfrpf.Communities != nil {
13657		objectMap["communities"] = rfrpf.Communities
13658	}
13659	return json.Marshal(objectMap)
13660}
13661
13662// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13663// long-running operation.
13664type RouteFilterRulesCreateOrUpdateFuture struct {
13665	azure.FutureAPI
13666	// Result returns the result of the asynchronous operation.
13667	// If the operation has not completed it will return an error.
13668	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
13669}
13670
13671// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13672func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13673	var azFuture azure.Future
13674	if err := json.Unmarshal(body, &azFuture); err != nil {
13675		return err
13676	}
13677	future.FutureAPI = &azFuture
13678	future.Result = future.result
13679	return nil
13680}
13681
13682// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
13683func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
13684	var done bool
13685	done, err = future.DoneWithContext(context.Background(), client)
13686	if err != nil {
13687		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13688		return
13689	}
13690	if !done {
13691		rfr.Response.Response = future.Response()
13692		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
13693		return
13694	}
13695	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13696	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
13697		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
13698		if err != nil {
13699			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
13700		}
13701	}
13702	return
13703}
13704
13705// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13706// operation.
13707type RouteFilterRulesDeleteFuture struct {
13708	azure.FutureAPI
13709	// Result returns the result of the asynchronous operation.
13710	// If the operation has not completed it will return an error.
13711	Result func(RouteFilterRulesClient) (autorest.Response, error)
13712}
13713
13714// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13715func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
13716	var azFuture azure.Future
13717	if err := json.Unmarshal(body, &azFuture); err != nil {
13718		return err
13719	}
13720	future.FutureAPI = &azFuture
13721	future.Result = future.result
13722	return nil
13723}
13724
13725// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
13726func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
13727	var done bool
13728	done, err = future.DoneWithContext(context.Background(), client)
13729	if err != nil {
13730		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
13731		return
13732	}
13733	if !done {
13734		ar.Response = future.Response()
13735		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
13736		return
13737	}
13738	ar.Response = future.Response()
13739	return
13740}
13741
13742// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
13743// operation.
13744type RouteFilterRulesUpdateFuture struct {
13745	azure.FutureAPI
13746	// Result returns the result of the asynchronous operation.
13747	// If the operation has not completed it will return an error.
13748	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
13749}
13750
13751// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13752func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
13753	var azFuture azure.Future
13754	if err := json.Unmarshal(body, &azFuture); err != nil {
13755		return err
13756	}
13757	future.FutureAPI = &azFuture
13758	future.Result = future.result
13759	return nil
13760}
13761
13762// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
13763func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
13764	var done bool
13765	done, err = future.DoneWithContext(context.Background(), client)
13766	if err != nil {
13767		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
13768		return
13769	}
13770	if !done {
13771		rfr.Response.Response = future.Response()
13772		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
13773		return
13774	}
13775	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13776	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
13777		rfr, err = client.UpdateResponder(rfr.Response.Response)
13778		if err != nil {
13779			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
13780		}
13781	}
13782	return
13783}
13784
13785// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13786// long-running operation.
13787type RouteFiltersCreateOrUpdateFuture struct {
13788	azure.FutureAPI
13789	// Result returns the result of the asynchronous operation.
13790	// If the operation has not completed it will return an error.
13791	Result func(RouteFiltersClient) (RouteFilter, error)
13792}
13793
13794// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13795func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13796	var azFuture azure.Future
13797	if err := json.Unmarshal(body, &azFuture); err != nil {
13798		return err
13799	}
13800	future.FutureAPI = &azFuture
13801	future.Result = future.result
13802	return nil
13803}
13804
13805// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
13806func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
13807	var done bool
13808	done, err = future.DoneWithContext(context.Background(), client)
13809	if err != nil {
13810		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13811		return
13812	}
13813	if !done {
13814		rf.Response.Response = future.Response()
13815		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
13816		return
13817	}
13818	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13819	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
13820		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
13821		if err != nil {
13822			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
13823		}
13824	}
13825	return
13826}
13827
13828// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13829// operation.
13830type RouteFiltersDeleteFuture struct {
13831	azure.FutureAPI
13832	// Result returns the result of the asynchronous operation.
13833	// If the operation has not completed it will return an error.
13834	Result func(RouteFiltersClient) (autorest.Response, error)
13835}
13836
13837// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13838func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
13839	var azFuture azure.Future
13840	if err := json.Unmarshal(body, &azFuture); err != nil {
13841		return err
13842	}
13843	future.FutureAPI = &azFuture
13844	future.Result = future.result
13845	return nil
13846}
13847
13848// result is the default implementation for RouteFiltersDeleteFuture.Result.
13849func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
13850	var done bool
13851	done, err = future.DoneWithContext(context.Background(), client)
13852	if err != nil {
13853		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
13854		return
13855	}
13856	if !done {
13857		ar.Response = future.Response()
13858		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
13859		return
13860	}
13861	ar.Response = future.Response()
13862	return
13863}
13864
13865// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
13866// operation.
13867type RouteFiltersUpdateFuture struct {
13868	azure.FutureAPI
13869	// Result returns the result of the asynchronous operation.
13870	// If the operation has not completed it will return an error.
13871	Result func(RouteFiltersClient) (RouteFilter, error)
13872}
13873
13874// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13875func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
13876	var azFuture azure.Future
13877	if err := json.Unmarshal(body, &azFuture); err != nil {
13878		return err
13879	}
13880	future.FutureAPI = &azFuture
13881	future.Result = future.result
13882	return nil
13883}
13884
13885// result is the default implementation for RouteFiltersUpdateFuture.Result.
13886func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
13887	var done bool
13888	done, err = future.DoneWithContext(context.Background(), client)
13889	if err != nil {
13890		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
13891		return
13892	}
13893	if !done {
13894		rf.Response.Response = future.Response()
13895		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
13896		return
13897	}
13898	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13899	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
13900		rf, err = client.UpdateResponder(rf.Response.Response)
13901		if err != nil {
13902			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
13903		}
13904	}
13905	return
13906}
13907
13908// RouteListResult response for the ListRoute API service call
13909type RouteListResult struct {
13910	autorest.Response `json:"-"`
13911	// Value - Gets a list of routes in a resource group.
13912	Value *[]Route `json:"value,omitempty"`
13913	// NextLink - The URL to get the next set of results.
13914	NextLink *string `json:"nextLink,omitempty"`
13915}
13916
13917// RouteListResultIterator provides access to a complete listing of Route values.
13918type RouteListResultIterator struct {
13919	i    int
13920	page RouteListResultPage
13921}
13922
13923// NextWithContext advances to the next value.  If there was an error making
13924// the request the iterator does not advance and the error is returned.
13925func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
13926	if tracing.IsEnabled() {
13927		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
13928		defer func() {
13929			sc := -1
13930			if iter.Response().Response.Response != nil {
13931				sc = iter.Response().Response.Response.StatusCode
13932			}
13933			tracing.EndSpan(ctx, sc, err)
13934		}()
13935	}
13936	iter.i++
13937	if iter.i < len(iter.page.Values()) {
13938		return nil
13939	}
13940	err = iter.page.NextWithContext(ctx)
13941	if err != nil {
13942		iter.i--
13943		return err
13944	}
13945	iter.i = 0
13946	return nil
13947}
13948
13949// Next advances to the next value.  If there was an error making
13950// the request the iterator does not advance and the error is returned.
13951// Deprecated: Use NextWithContext() instead.
13952func (iter *RouteListResultIterator) Next() error {
13953	return iter.NextWithContext(context.Background())
13954}
13955
13956// NotDone returns true if the enumeration should be started or is not yet complete.
13957func (iter RouteListResultIterator) NotDone() bool {
13958	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13959}
13960
13961// Response returns the raw server response from the last page request.
13962func (iter RouteListResultIterator) Response() RouteListResult {
13963	return iter.page.Response()
13964}
13965
13966// Value returns the current value or a zero-initialized value if the
13967// iterator has advanced beyond the end of the collection.
13968func (iter RouteListResultIterator) Value() Route {
13969	if !iter.page.NotDone() {
13970		return Route{}
13971	}
13972	return iter.page.Values()[iter.i]
13973}
13974
13975// Creates a new instance of the RouteListResultIterator type.
13976func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
13977	return RouteListResultIterator{page: page}
13978}
13979
13980// IsEmpty returns true if the ListResult contains no values.
13981func (rlr RouteListResult) IsEmpty() bool {
13982	return rlr.Value == nil || len(*rlr.Value) == 0
13983}
13984
13985// hasNextLink returns true if the NextLink is not empty.
13986func (rlr RouteListResult) hasNextLink() bool {
13987	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
13988}
13989
13990// routeListResultPreparer prepares a request to retrieve the next set of results.
13991// It returns nil if no more results exist.
13992func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
13993	if !rlr.hasNextLink() {
13994		return nil, nil
13995	}
13996	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13997		autorest.AsJSON(),
13998		autorest.AsGet(),
13999		autorest.WithBaseURL(to.String(rlr.NextLink)))
14000}
14001
14002// RouteListResultPage contains a page of Route values.
14003type RouteListResultPage struct {
14004	fn  func(context.Context, RouteListResult) (RouteListResult, error)
14005	rlr RouteListResult
14006}
14007
14008// NextWithContext advances to the next page of values.  If there was an error making
14009// the request the page does not advance and the error is returned.
14010func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
14011	if tracing.IsEnabled() {
14012		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
14013		defer func() {
14014			sc := -1
14015			if page.Response().Response.Response != nil {
14016				sc = page.Response().Response.Response.StatusCode
14017			}
14018			tracing.EndSpan(ctx, sc, err)
14019		}()
14020	}
14021	for {
14022		next, err := page.fn(ctx, page.rlr)
14023		if err != nil {
14024			return err
14025		}
14026		page.rlr = next
14027		if !next.hasNextLink() || !next.IsEmpty() {
14028			break
14029		}
14030	}
14031	return nil
14032}
14033
14034// Next advances to the next page of values.  If there was an error making
14035// the request the page does not advance and the error is returned.
14036// Deprecated: Use NextWithContext() instead.
14037func (page *RouteListResultPage) Next() error {
14038	return page.NextWithContext(context.Background())
14039}
14040
14041// NotDone returns true if the page enumeration should be started or is not yet complete.
14042func (page RouteListResultPage) NotDone() bool {
14043	return !page.rlr.IsEmpty()
14044}
14045
14046// Response returns the raw server response from the last page request.
14047func (page RouteListResultPage) Response() RouteListResult {
14048	return page.rlr
14049}
14050
14051// Values returns the slice of values for the current page or nil if there are no values.
14052func (page RouteListResultPage) Values() []Route {
14053	if page.rlr.IsEmpty() {
14054		return nil
14055	}
14056	return *page.rlr.Value
14057}
14058
14059// Creates a new instance of the RouteListResultPage type.
14060func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
14061	return RouteListResultPage{
14062		fn:  getNextPage,
14063		rlr: cur,
14064	}
14065}
14066
14067// RoutePropertiesFormat route resource
14068type RoutePropertiesFormat struct {
14069	// AddressPrefix - The destination CIDR to which the route applies.
14070	AddressPrefix *string `json:"addressPrefix,omitempty"`
14071	// 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'
14072	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
14073	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
14074	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
14075	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14076	ProvisioningState *string `json:"provisioningState,omitempty"`
14077}
14078
14079// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14080// operation.
14081type RoutesCreateOrUpdateFuture struct {
14082	azure.FutureAPI
14083	// Result returns the result of the asynchronous operation.
14084	// If the operation has not completed it will return an error.
14085	Result func(RoutesClient) (Route, error)
14086}
14087
14088// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14089func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14090	var azFuture azure.Future
14091	if err := json.Unmarshal(body, &azFuture); err != nil {
14092		return err
14093	}
14094	future.FutureAPI = &azFuture
14095	future.Result = future.result
14096	return nil
14097}
14098
14099// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
14100func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
14101	var done bool
14102	done, err = future.DoneWithContext(context.Background(), client)
14103	if err != nil {
14104		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14105		return
14106	}
14107	if !done {
14108		r.Response.Response = future.Response()
14109		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
14110		return
14111	}
14112	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14113	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
14114		r, err = client.CreateOrUpdateResponder(r.Response.Response)
14115		if err != nil {
14116			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
14117		}
14118	}
14119	return
14120}
14121
14122// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
14123type RoutesDeleteFuture struct {
14124	azure.FutureAPI
14125	// Result returns the result of the asynchronous operation.
14126	// If the operation has not completed it will return an error.
14127	Result func(RoutesClient) (autorest.Response, error)
14128}
14129
14130// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14131func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
14132	var azFuture azure.Future
14133	if err := json.Unmarshal(body, &azFuture); err != nil {
14134		return err
14135	}
14136	future.FutureAPI = &azFuture
14137	future.Result = future.result
14138	return nil
14139}
14140
14141// result is the default implementation for RoutesDeleteFuture.Result.
14142func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
14143	var done bool
14144	done, err = future.DoneWithContext(context.Background(), client)
14145	if err != nil {
14146		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
14147		return
14148	}
14149	if !done {
14150		ar.Response = future.Response()
14151		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
14152		return
14153	}
14154	ar.Response = future.Response()
14155	return
14156}
14157
14158// RouteTable route table resource.
14159type RouteTable struct {
14160	autorest.Response `json:"-"`
14161	// RouteTablePropertiesFormat - Properties of the route table.
14162	*RouteTablePropertiesFormat `json:"properties,omitempty"`
14163	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14164	Etag *string `json:"etag,omitempty"`
14165	// ID - Resource ID.
14166	ID *string `json:"id,omitempty"`
14167	// Name - READ-ONLY; Resource name.
14168	Name *string `json:"name,omitempty"`
14169	// Type - READ-ONLY; Resource type.
14170	Type *string `json:"type,omitempty"`
14171	// Location - Resource location.
14172	Location *string `json:"location,omitempty"`
14173	// Tags - Resource tags.
14174	Tags map[string]*string `json:"tags"`
14175}
14176
14177// MarshalJSON is the custom marshaler for RouteTable.
14178func (rt RouteTable) MarshalJSON() ([]byte, error) {
14179	objectMap := make(map[string]interface{})
14180	if rt.RouteTablePropertiesFormat != nil {
14181		objectMap["properties"] = rt.RouteTablePropertiesFormat
14182	}
14183	if rt.Etag != nil {
14184		objectMap["etag"] = rt.Etag
14185	}
14186	if rt.ID != nil {
14187		objectMap["id"] = rt.ID
14188	}
14189	if rt.Location != nil {
14190		objectMap["location"] = rt.Location
14191	}
14192	if rt.Tags != nil {
14193		objectMap["tags"] = rt.Tags
14194	}
14195	return json.Marshal(objectMap)
14196}
14197
14198// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
14199func (rt *RouteTable) UnmarshalJSON(body []byte) error {
14200	var m map[string]*json.RawMessage
14201	err := json.Unmarshal(body, &m)
14202	if err != nil {
14203		return err
14204	}
14205	for k, v := range m {
14206		switch k {
14207		case "properties":
14208			if v != nil {
14209				var routeTablePropertiesFormat RouteTablePropertiesFormat
14210				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
14211				if err != nil {
14212					return err
14213				}
14214				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
14215			}
14216		case "etag":
14217			if v != nil {
14218				var etag string
14219				err = json.Unmarshal(*v, &etag)
14220				if err != nil {
14221					return err
14222				}
14223				rt.Etag = &etag
14224			}
14225		case "id":
14226			if v != nil {
14227				var ID string
14228				err = json.Unmarshal(*v, &ID)
14229				if err != nil {
14230					return err
14231				}
14232				rt.ID = &ID
14233			}
14234		case "name":
14235			if v != nil {
14236				var name string
14237				err = json.Unmarshal(*v, &name)
14238				if err != nil {
14239					return err
14240				}
14241				rt.Name = &name
14242			}
14243		case "type":
14244			if v != nil {
14245				var typeVar string
14246				err = json.Unmarshal(*v, &typeVar)
14247				if err != nil {
14248					return err
14249				}
14250				rt.Type = &typeVar
14251			}
14252		case "location":
14253			if v != nil {
14254				var location string
14255				err = json.Unmarshal(*v, &location)
14256				if err != nil {
14257					return err
14258				}
14259				rt.Location = &location
14260			}
14261		case "tags":
14262			if v != nil {
14263				var tags map[string]*string
14264				err = json.Unmarshal(*v, &tags)
14265				if err != nil {
14266					return err
14267				}
14268				rt.Tags = tags
14269			}
14270		}
14271	}
14272
14273	return nil
14274}
14275
14276// RouteTableListResult response for the ListRouteTable API service call.
14277type RouteTableListResult struct {
14278	autorest.Response `json:"-"`
14279	// Value - Gets a list of route tables in a resource group.
14280	Value *[]RouteTable `json:"value,omitempty"`
14281	// NextLink - The URL to get the next set of results.
14282	NextLink *string `json:"nextLink,omitempty"`
14283}
14284
14285// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
14286type RouteTableListResultIterator struct {
14287	i    int
14288	page RouteTableListResultPage
14289}
14290
14291// NextWithContext advances to the next value.  If there was an error making
14292// the request the iterator does not advance and the error is returned.
14293func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
14294	if tracing.IsEnabled() {
14295		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
14296		defer func() {
14297			sc := -1
14298			if iter.Response().Response.Response != nil {
14299				sc = iter.Response().Response.Response.StatusCode
14300			}
14301			tracing.EndSpan(ctx, sc, err)
14302		}()
14303	}
14304	iter.i++
14305	if iter.i < len(iter.page.Values()) {
14306		return nil
14307	}
14308	err = iter.page.NextWithContext(ctx)
14309	if err != nil {
14310		iter.i--
14311		return err
14312	}
14313	iter.i = 0
14314	return nil
14315}
14316
14317// Next advances to the next value.  If there was an error making
14318// the request the iterator does not advance and the error is returned.
14319// Deprecated: Use NextWithContext() instead.
14320func (iter *RouteTableListResultIterator) Next() error {
14321	return iter.NextWithContext(context.Background())
14322}
14323
14324// NotDone returns true if the enumeration should be started or is not yet complete.
14325func (iter RouteTableListResultIterator) NotDone() bool {
14326	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14327}
14328
14329// Response returns the raw server response from the last page request.
14330func (iter RouteTableListResultIterator) Response() RouteTableListResult {
14331	return iter.page.Response()
14332}
14333
14334// Value returns the current value or a zero-initialized value if the
14335// iterator has advanced beyond the end of the collection.
14336func (iter RouteTableListResultIterator) Value() RouteTable {
14337	if !iter.page.NotDone() {
14338		return RouteTable{}
14339	}
14340	return iter.page.Values()[iter.i]
14341}
14342
14343// Creates a new instance of the RouteTableListResultIterator type.
14344func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
14345	return RouteTableListResultIterator{page: page}
14346}
14347
14348// IsEmpty returns true if the ListResult contains no values.
14349func (rtlr RouteTableListResult) IsEmpty() bool {
14350	return rtlr.Value == nil || len(*rtlr.Value) == 0
14351}
14352
14353// hasNextLink returns true if the NextLink is not empty.
14354func (rtlr RouteTableListResult) hasNextLink() bool {
14355	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
14356}
14357
14358// routeTableListResultPreparer prepares a request to retrieve the next set of results.
14359// It returns nil if no more results exist.
14360func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
14361	if !rtlr.hasNextLink() {
14362		return nil, nil
14363	}
14364	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14365		autorest.AsJSON(),
14366		autorest.AsGet(),
14367		autorest.WithBaseURL(to.String(rtlr.NextLink)))
14368}
14369
14370// RouteTableListResultPage contains a page of RouteTable values.
14371type RouteTableListResultPage struct {
14372	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
14373	rtlr RouteTableListResult
14374}
14375
14376// NextWithContext advances to the next page of values.  If there was an error making
14377// the request the page does not advance and the error is returned.
14378func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
14379	if tracing.IsEnabled() {
14380		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
14381		defer func() {
14382			sc := -1
14383			if page.Response().Response.Response != nil {
14384				sc = page.Response().Response.Response.StatusCode
14385			}
14386			tracing.EndSpan(ctx, sc, err)
14387		}()
14388	}
14389	for {
14390		next, err := page.fn(ctx, page.rtlr)
14391		if err != nil {
14392			return err
14393		}
14394		page.rtlr = next
14395		if !next.hasNextLink() || !next.IsEmpty() {
14396			break
14397		}
14398	}
14399	return nil
14400}
14401
14402// Next advances to the next page of values.  If there was an error making
14403// the request the page does not advance and the error is returned.
14404// Deprecated: Use NextWithContext() instead.
14405func (page *RouteTableListResultPage) Next() error {
14406	return page.NextWithContext(context.Background())
14407}
14408
14409// NotDone returns true if the page enumeration should be started or is not yet complete.
14410func (page RouteTableListResultPage) NotDone() bool {
14411	return !page.rtlr.IsEmpty()
14412}
14413
14414// Response returns the raw server response from the last page request.
14415func (page RouteTableListResultPage) Response() RouteTableListResult {
14416	return page.rtlr
14417}
14418
14419// Values returns the slice of values for the current page or nil if there are no values.
14420func (page RouteTableListResultPage) Values() []RouteTable {
14421	if page.rtlr.IsEmpty() {
14422		return nil
14423	}
14424	return *page.rtlr.Value
14425}
14426
14427// Creates a new instance of the RouteTableListResultPage type.
14428func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
14429	return RouteTableListResultPage{
14430		fn:   getNextPage,
14431		rtlr: cur,
14432	}
14433}
14434
14435// RouteTablePropertiesFormat route Table resource
14436type RouteTablePropertiesFormat struct {
14437	// Routes - Collection of routes contained within a route table.
14438	Routes *[]Route `json:"routes,omitempty"`
14439	// Subnets - READ-ONLY; A collection of references to subnets.
14440	Subnets *[]Subnet `json:"subnets,omitempty"`
14441	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
14442	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
14443	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14444	ProvisioningState *string `json:"provisioningState,omitempty"`
14445}
14446
14447// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
14448func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
14449	objectMap := make(map[string]interface{})
14450	if rtpf.Routes != nil {
14451		objectMap["routes"] = rtpf.Routes
14452	}
14453	if rtpf.DisableBgpRoutePropagation != nil {
14454		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
14455	}
14456	if rtpf.ProvisioningState != nil {
14457		objectMap["provisioningState"] = rtpf.ProvisioningState
14458	}
14459	return json.Marshal(objectMap)
14460}
14461
14462// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14463// long-running operation.
14464type RouteTablesCreateOrUpdateFuture struct {
14465	azure.FutureAPI
14466	// Result returns the result of the asynchronous operation.
14467	// If the operation has not completed it will return an error.
14468	Result func(RouteTablesClient) (RouteTable, error)
14469}
14470
14471// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14472func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14473	var azFuture azure.Future
14474	if err := json.Unmarshal(body, &azFuture); err != nil {
14475		return err
14476	}
14477	future.FutureAPI = &azFuture
14478	future.Result = future.result
14479	return nil
14480}
14481
14482// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
14483func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
14484	var done bool
14485	done, err = future.DoneWithContext(context.Background(), client)
14486	if err != nil {
14487		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14488		return
14489	}
14490	if !done {
14491		rt.Response.Response = future.Response()
14492		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
14493		return
14494	}
14495	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14496	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
14497		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
14498		if err != nil {
14499			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
14500		}
14501	}
14502	return
14503}
14504
14505// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14506// operation.
14507type RouteTablesDeleteFuture struct {
14508	azure.FutureAPI
14509	// Result returns the result of the asynchronous operation.
14510	// If the operation has not completed it will return an error.
14511	Result func(RouteTablesClient) (autorest.Response, error)
14512}
14513
14514// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14515func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
14516	var azFuture azure.Future
14517	if err := json.Unmarshal(body, &azFuture); err != nil {
14518		return err
14519	}
14520	future.FutureAPI = &azFuture
14521	future.Result = future.result
14522	return nil
14523}
14524
14525// result is the default implementation for RouteTablesDeleteFuture.Result.
14526func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
14527	var done bool
14528	done, err = future.DoneWithContext(context.Background(), client)
14529	if err != nil {
14530		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
14531		return
14532	}
14533	if !done {
14534		ar.Response = future.Response()
14535		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
14536		return
14537	}
14538	ar.Response = future.Response()
14539	return
14540}
14541
14542// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14543// operation.
14544type RouteTablesUpdateTagsFuture struct {
14545	azure.FutureAPI
14546	// Result returns the result of the asynchronous operation.
14547	// If the operation has not completed it will return an error.
14548	Result func(RouteTablesClient) (RouteTable, error)
14549}
14550
14551// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14552func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14553	var azFuture azure.Future
14554	if err := json.Unmarshal(body, &azFuture); err != nil {
14555		return err
14556	}
14557	future.FutureAPI = &azFuture
14558	future.Result = future.result
14559	return nil
14560}
14561
14562// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
14563func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
14564	var done bool
14565	done, err = future.DoneWithContext(context.Background(), client)
14566	if err != nil {
14567		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14568		return
14569	}
14570	if !done {
14571		rt.Response.Response = future.Response()
14572		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
14573		return
14574	}
14575	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14576	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
14577		rt, err = client.UpdateTagsResponder(rt.Response.Response)
14578		if err != nil {
14579			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
14580		}
14581	}
14582	return
14583}
14584
14585// SecurityGroup networkSecurityGroup resource.
14586type SecurityGroup struct {
14587	autorest.Response `json:"-"`
14588	// SecurityGroupPropertiesFormat - Properties of the network security group
14589	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
14590	// Etag - A unique read-only string that changes whenever the resource is updated.
14591	Etag *string `json:"etag,omitempty"`
14592	// ID - Resource ID.
14593	ID *string `json:"id,omitempty"`
14594	// Name - READ-ONLY; Resource name.
14595	Name *string `json:"name,omitempty"`
14596	// Type - READ-ONLY; Resource type.
14597	Type *string `json:"type,omitempty"`
14598	// Location - Resource location.
14599	Location *string `json:"location,omitempty"`
14600	// Tags - Resource tags.
14601	Tags map[string]*string `json:"tags"`
14602}
14603
14604// MarshalJSON is the custom marshaler for SecurityGroup.
14605func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
14606	objectMap := make(map[string]interface{})
14607	if sg.SecurityGroupPropertiesFormat != nil {
14608		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
14609	}
14610	if sg.Etag != nil {
14611		objectMap["etag"] = sg.Etag
14612	}
14613	if sg.ID != nil {
14614		objectMap["id"] = sg.ID
14615	}
14616	if sg.Location != nil {
14617		objectMap["location"] = sg.Location
14618	}
14619	if sg.Tags != nil {
14620		objectMap["tags"] = sg.Tags
14621	}
14622	return json.Marshal(objectMap)
14623}
14624
14625// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
14626func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
14627	var m map[string]*json.RawMessage
14628	err := json.Unmarshal(body, &m)
14629	if err != nil {
14630		return err
14631	}
14632	for k, v := range m {
14633		switch k {
14634		case "properties":
14635			if v != nil {
14636				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
14637				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
14638				if err != nil {
14639					return err
14640				}
14641				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
14642			}
14643		case "etag":
14644			if v != nil {
14645				var etag string
14646				err = json.Unmarshal(*v, &etag)
14647				if err != nil {
14648					return err
14649				}
14650				sg.Etag = &etag
14651			}
14652		case "id":
14653			if v != nil {
14654				var ID string
14655				err = json.Unmarshal(*v, &ID)
14656				if err != nil {
14657					return err
14658				}
14659				sg.ID = &ID
14660			}
14661		case "name":
14662			if v != nil {
14663				var name string
14664				err = json.Unmarshal(*v, &name)
14665				if err != nil {
14666					return err
14667				}
14668				sg.Name = &name
14669			}
14670		case "type":
14671			if v != nil {
14672				var typeVar string
14673				err = json.Unmarshal(*v, &typeVar)
14674				if err != nil {
14675					return err
14676				}
14677				sg.Type = &typeVar
14678			}
14679		case "location":
14680			if v != nil {
14681				var location string
14682				err = json.Unmarshal(*v, &location)
14683				if err != nil {
14684					return err
14685				}
14686				sg.Location = &location
14687			}
14688		case "tags":
14689			if v != nil {
14690				var tags map[string]*string
14691				err = json.Unmarshal(*v, &tags)
14692				if err != nil {
14693					return err
14694				}
14695				sg.Tags = tags
14696			}
14697		}
14698	}
14699
14700	return nil
14701}
14702
14703// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
14704type SecurityGroupListResult struct {
14705	autorest.Response `json:"-"`
14706	// Value - A list of NetworkSecurityGroup resources.
14707	Value *[]SecurityGroup `json:"value,omitempty"`
14708	// NextLink - The URL to get the next set of results.
14709	NextLink *string `json:"nextLink,omitempty"`
14710}
14711
14712// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
14713type SecurityGroupListResultIterator struct {
14714	i    int
14715	page SecurityGroupListResultPage
14716}
14717
14718// NextWithContext advances to the next value.  If there was an error making
14719// the request the iterator does not advance and the error is returned.
14720func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
14721	if tracing.IsEnabled() {
14722		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
14723		defer func() {
14724			sc := -1
14725			if iter.Response().Response.Response != nil {
14726				sc = iter.Response().Response.Response.StatusCode
14727			}
14728			tracing.EndSpan(ctx, sc, err)
14729		}()
14730	}
14731	iter.i++
14732	if iter.i < len(iter.page.Values()) {
14733		return nil
14734	}
14735	err = iter.page.NextWithContext(ctx)
14736	if err != nil {
14737		iter.i--
14738		return err
14739	}
14740	iter.i = 0
14741	return nil
14742}
14743
14744// Next advances to the next value.  If there was an error making
14745// the request the iterator does not advance and the error is returned.
14746// Deprecated: Use NextWithContext() instead.
14747func (iter *SecurityGroupListResultIterator) Next() error {
14748	return iter.NextWithContext(context.Background())
14749}
14750
14751// NotDone returns true if the enumeration should be started or is not yet complete.
14752func (iter SecurityGroupListResultIterator) NotDone() bool {
14753	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14754}
14755
14756// Response returns the raw server response from the last page request.
14757func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
14758	return iter.page.Response()
14759}
14760
14761// Value returns the current value or a zero-initialized value if the
14762// iterator has advanced beyond the end of the collection.
14763func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
14764	if !iter.page.NotDone() {
14765		return SecurityGroup{}
14766	}
14767	return iter.page.Values()[iter.i]
14768}
14769
14770// Creates a new instance of the SecurityGroupListResultIterator type.
14771func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
14772	return SecurityGroupListResultIterator{page: page}
14773}
14774
14775// IsEmpty returns true if the ListResult contains no values.
14776func (sglr SecurityGroupListResult) IsEmpty() bool {
14777	return sglr.Value == nil || len(*sglr.Value) == 0
14778}
14779
14780// hasNextLink returns true if the NextLink is not empty.
14781func (sglr SecurityGroupListResult) hasNextLink() bool {
14782	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
14783}
14784
14785// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
14786// It returns nil if no more results exist.
14787func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
14788	if !sglr.hasNextLink() {
14789		return nil, nil
14790	}
14791	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14792		autorest.AsJSON(),
14793		autorest.AsGet(),
14794		autorest.WithBaseURL(to.String(sglr.NextLink)))
14795}
14796
14797// SecurityGroupListResultPage contains a page of SecurityGroup values.
14798type SecurityGroupListResultPage struct {
14799	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
14800	sglr SecurityGroupListResult
14801}
14802
14803// NextWithContext advances to the next page of values.  If there was an error making
14804// the request the page does not advance and the error is returned.
14805func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
14806	if tracing.IsEnabled() {
14807		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
14808		defer func() {
14809			sc := -1
14810			if page.Response().Response.Response != nil {
14811				sc = page.Response().Response.Response.StatusCode
14812			}
14813			tracing.EndSpan(ctx, sc, err)
14814		}()
14815	}
14816	for {
14817		next, err := page.fn(ctx, page.sglr)
14818		if err != nil {
14819			return err
14820		}
14821		page.sglr = next
14822		if !next.hasNextLink() || !next.IsEmpty() {
14823			break
14824		}
14825	}
14826	return nil
14827}
14828
14829// Next advances to the next page of values.  If there was an error making
14830// the request the page does not advance and the error is returned.
14831// Deprecated: Use NextWithContext() instead.
14832func (page *SecurityGroupListResultPage) Next() error {
14833	return page.NextWithContext(context.Background())
14834}
14835
14836// NotDone returns true if the page enumeration should be started or is not yet complete.
14837func (page SecurityGroupListResultPage) NotDone() bool {
14838	return !page.sglr.IsEmpty()
14839}
14840
14841// Response returns the raw server response from the last page request.
14842func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
14843	return page.sglr
14844}
14845
14846// Values returns the slice of values for the current page or nil if there are no values.
14847func (page SecurityGroupListResultPage) Values() []SecurityGroup {
14848	if page.sglr.IsEmpty() {
14849		return nil
14850	}
14851	return *page.sglr.Value
14852}
14853
14854// Creates a new instance of the SecurityGroupListResultPage type.
14855func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
14856	return SecurityGroupListResultPage{
14857		fn:   getNextPage,
14858		sglr: cur,
14859	}
14860}
14861
14862// SecurityGroupNetworkInterface network interface and all its associated security rules.
14863type SecurityGroupNetworkInterface struct {
14864	// ID - ID of the network interface.
14865	ID                       *string                   `json:"id,omitempty"`
14866	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
14867}
14868
14869// SecurityGroupPropertiesFormat network Security Group resource.
14870type SecurityGroupPropertiesFormat struct {
14871	// SecurityRules - A collection of security rules of the network security group.
14872	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
14873	// DefaultSecurityRules - The default security rules of network security group.
14874	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
14875	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
14876	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
14877	// Subnets - READ-ONLY; A collection of references to subnets.
14878	Subnets *[]Subnet `json:"subnets,omitempty"`
14879	// ResourceGUID - The resource GUID property of the network security group resource.
14880	ResourceGUID *string `json:"resourceGuid,omitempty"`
14881	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14882	ProvisioningState *string `json:"provisioningState,omitempty"`
14883}
14884
14885// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
14886func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
14887	objectMap := make(map[string]interface{})
14888	if sgpf.SecurityRules != nil {
14889		objectMap["securityRules"] = sgpf.SecurityRules
14890	}
14891	if sgpf.DefaultSecurityRules != nil {
14892		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
14893	}
14894	if sgpf.ResourceGUID != nil {
14895		objectMap["resourceGuid"] = sgpf.ResourceGUID
14896	}
14897	if sgpf.ProvisioningState != nil {
14898		objectMap["provisioningState"] = sgpf.ProvisioningState
14899	}
14900	return json.Marshal(objectMap)
14901}
14902
14903// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14904// long-running operation.
14905type SecurityGroupsCreateOrUpdateFuture struct {
14906	azure.FutureAPI
14907	// Result returns the result of the asynchronous operation.
14908	// If the operation has not completed it will return an error.
14909	Result func(SecurityGroupsClient) (SecurityGroup, error)
14910}
14911
14912// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14913func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14914	var azFuture azure.Future
14915	if err := json.Unmarshal(body, &azFuture); err != nil {
14916		return err
14917	}
14918	future.FutureAPI = &azFuture
14919	future.Result = future.result
14920	return nil
14921}
14922
14923// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
14924func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
14925	var done bool
14926	done, err = future.DoneWithContext(context.Background(), client)
14927	if err != nil {
14928		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14929		return
14930	}
14931	if !done {
14932		sg.Response.Response = future.Response()
14933		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
14934		return
14935	}
14936	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14937	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
14938		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
14939		if err != nil {
14940			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
14941		}
14942	}
14943	return
14944}
14945
14946// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14947// operation.
14948type SecurityGroupsDeleteFuture struct {
14949	azure.FutureAPI
14950	// Result returns the result of the asynchronous operation.
14951	// If the operation has not completed it will return an error.
14952	Result func(SecurityGroupsClient) (autorest.Response, error)
14953}
14954
14955// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14956func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
14957	var azFuture azure.Future
14958	if err := json.Unmarshal(body, &azFuture); err != nil {
14959		return err
14960	}
14961	future.FutureAPI = &azFuture
14962	future.Result = future.result
14963	return nil
14964}
14965
14966// result is the default implementation for SecurityGroupsDeleteFuture.Result.
14967func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
14968	var done bool
14969	done, err = future.DoneWithContext(context.Background(), client)
14970	if err != nil {
14971		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
14972		return
14973	}
14974	if !done {
14975		ar.Response = future.Response()
14976		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
14977		return
14978	}
14979	ar.Response = future.Response()
14980	return
14981}
14982
14983// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14984// long-running operation.
14985type SecurityGroupsUpdateTagsFuture struct {
14986	azure.FutureAPI
14987	// Result returns the result of the asynchronous operation.
14988	// If the operation has not completed it will return an error.
14989	Result func(SecurityGroupsClient) (SecurityGroup, error)
14990}
14991
14992// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14993func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14994	var azFuture azure.Future
14995	if err := json.Unmarshal(body, &azFuture); err != nil {
14996		return err
14997	}
14998	future.FutureAPI = &azFuture
14999	future.Result = future.result
15000	return nil
15001}
15002
15003// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
15004func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
15005	var done bool
15006	done, err = future.DoneWithContext(context.Background(), client)
15007	if err != nil {
15008		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15009		return
15010	}
15011	if !done {
15012		sg.Response.Response = future.Response()
15013		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
15014		return
15015	}
15016	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15017	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
15018		sg, err = client.UpdateTagsResponder(sg.Response.Response)
15019		if err != nil {
15020			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
15021		}
15022	}
15023	return
15024}
15025
15026// SecurityGroupViewParameters parameters that define the VM to check security groups for.
15027type SecurityGroupViewParameters struct {
15028	// TargetResourceID - ID of the target VM.
15029	TargetResourceID *string `json:"targetResourceId,omitempty"`
15030}
15031
15032// SecurityGroupViewResult the information about security rules applied to the specified VM.
15033type SecurityGroupViewResult struct {
15034	autorest.Response `json:"-"`
15035	// NetworkInterfaces - List of network interfaces on the specified VM.
15036	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
15037}
15038
15039// SecurityRule network security rule.
15040type SecurityRule struct {
15041	autorest.Response `json:"-"`
15042	// SecurityRulePropertiesFormat - Properties of the security rule
15043	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
15044	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15045	Name *string `json:"name,omitempty"`
15046	// Etag - A unique read-only string that changes whenever the resource is updated.
15047	Etag *string `json:"etag,omitempty"`
15048	// ID - Resource ID.
15049	ID *string `json:"id,omitempty"`
15050}
15051
15052// MarshalJSON is the custom marshaler for SecurityRule.
15053func (sr SecurityRule) MarshalJSON() ([]byte, error) {
15054	objectMap := make(map[string]interface{})
15055	if sr.SecurityRulePropertiesFormat != nil {
15056		objectMap["properties"] = sr.SecurityRulePropertiesFormat
15057	}
15058	if sr.Name != nil {
15059		objectMap["name"] = sr.Name
15060	}
15061	if sr.Etag != nil {
15062		objectMap["etag"] = sr.Etag
15063	}
15064	if sr.ID != nil {
15065		objectMap["id"] = sr.ID
15066	}
15067	return json.Marshal(objectMap)
15068}
15069
15070// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
15071func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
15072	var m map[string]*json.RawMessage
15073	err := json.Unmarshal(body, &m)
15074	if err != nil {
15075		return err
15076	}
15077	for k, v := range m {
15078		switch k {
15079		case "properties":
15080			if v != nil {
15081				var securityRulePropertiesFormat SecurityRulePropertiesFormat
15082				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
15083				if err != nil {
15084					return err
15085				}
15086				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
15087			}
15088		case "name":
15089			if v != nil {
15090				var name string
15091				err = json.Unmarshal(*v, &name)
15092				if err != nil {
15093					return err
15094				}
15095				sr.Name = &name
15096			}
15097		case "etag":
15098			if v != nil {
15099				var etag string
15100				err = json.Unmarshal(*v, &etag)
15101				if err != nil {
15102					return err
15103				}
15104				sr.Etag = &etag
15105			}
15106		case "id":
15107			if v != nil {
15108				var ID string
15109				err = json.Unmarshal(*v, &ID)
15110				if err != nil {
15111					return err
15112				}
15113				sr.ID = &ID
15114			}
15115		}
15116	}
15117
15118	return nil
15119}
15120
15121// SecurityRuleAssociations all security rules associated with the network interface.
15122type SecurityRuleAssociations struct {
15123	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
15124	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
15125	// DefaultSecurityRules - Collection of default security rules of the network security group.
15126	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
15127	// EffectiveSecurityRules - Collection of effective security rules.
15128	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
15129}
15130
15131// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
15132// belongs to a network security group.
15133type SecurityRuleListResult struct {
15134	autorest.Response `json:"-"`
15135	// Value - The security rules in a network security group.
15136	Value *[]SecurityRule `json:"value,omitempty"`
15137	// NextLink - The URL to get the next set of results.
15138	NextLink *string `json:"nextLink,omitempty"`
15139}
15140
15141// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
15142type SecurityRuleListResultIterator struct {
15143	i    int
15144	page SecurityRuleListResultPage
15145}
15146
15147// NextWithContext advances to the next value.  If there was an error making
15148// the request the iterator does not advance and the error is returned.
15149func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15150	if tracing.IsEnabled() {
15151		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
15152		defer func() {
15153			sc := -1
15154			if iter.Response().Response.Response != nil {
15155				sc = iter.Response().Response.Response.StatusCode
15156			}
15157			tracing.EndSpan(ctx, sc, err)
15158		}()
15159	}
15160	iter.i++
15161	if iter.i < len(iter.page.Values()) {
15162		return nil
15163	}
15164	err = iter.page.NextWithContext(ctx)
15165	if err != nil {
15166		iter.i--
15167		return err
15168	}
15169	iter.i = 0
15170	return nil
15171}
15172
15173// Next advances to the next value.  If there was an error making
15174// the request the iterator does not advance and the error is returned.
15175// Deprecated: Use NextWithContext() instead.
15176func (iter *SecurityRuleListResultIterator) Next() error {
15177	return iter.NextWithContext(context.Background())
15178}
15179
15180// NotDone returns true if the enumeration should be started or is not yet complete.
15181func (iter SecurityRuleListResultIterator) NotDone() bool {
15182	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15183}
15184
15185// Response returns the raw server response from the last page request.
15186func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
15187	return iter.page.Response()
15188}
15189
15190// Value returns the current value or a zero-initialized value if the
15191// iterator has advanced beyond the end of the collection.
15192func (iter SecurityRuleListResultIterator) Value() SecurityRule {
15193	if !iter.page.NotDone() {
15194		return SecurityRule{}
15195	}
15196	return iter.page.Values()[iter.i]
15197}
15198
15199// Creates a new instance of the SecurityRuleListResultIterator type.
15200func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
15201	return SecurityRuleListResultIterator{page: page}
15202}
15203
15204// IsEmpty returns true if the ListResult contains no values.
15205func (srlr SecurityRuleListResult) IsEmpty() bool {
15206	return srlr.Value == nil || len(*srlr.Value) == 0
15207}
15208
15209// hasNextLink returns true if the NextLink is not empty.
15210func (srlr SecurityRuleListResult) hasNextLink() bool {
15211	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
15212}
15213
15214// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
15215// It returns nil if no more results exist.
15216func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15217	if !srlr.hasNextLink() {
15218		return nil, nil
15219	}
15220	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15221		autorest.AsJSON(),
15222		autorest.AsGet(),
15223		autorest.WithBaseURL(to.String(srlr.NextLink)))
15224}
15225
15226// SecurityRuleListResultPage contains a page of SecurityRule values.
15227type SecurityRuleListResultPage struct {
15228	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
15229	srlr SecurityRuleListResult
15230}
15231
15232// NextWithContext advances to the next page of values.  If there was an error making
15233// the request the page does not advance and the error is returned.
15234func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15235	if tracing.IsEnabled() {
15236		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
15237		defer func() {
15238			sc := -1
15239			if page.Response().Response.Response != nil {
15240				sc = page.Response().Response.Response.StatusCode
15241			}
15242			tracing.EndSpan(ctx, sc, err)
15243		}()
15244	}
15245	for {
15246		next, err := page.fn(ctx, page.srlr)
15247		if err != nil {
15248			return err
15249		}
15250		page.srlr = next
15251		if !next.hasNextLink() || !next.IsEmpty() {
15252			break
15253		}
15254	}
15255	return nil
15256}
15257
15258// Next advances to the next page of values.  If there was an error making
15259// the request the page does not advance and the error is returned.
15260// Deprecated: Use NextWithContext() instead.
15261func (page *SecurityRuleListResultPage) Next() error {
15262	return page.NextWithContext(context.Background())
15263}
15264
15265// NotDone returns true if the page enumeration should be started or is not yet complete.
15266func (page SecurityRuleListResultPage) NotDone() bool {
15267	return !page.srlr.IsEmpty()
15268}
15269
15270// Response returns the raw server response from the last page request.
15271func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
15272	return page.srlr
15273}
15274
15275// Values returns the slice of values for the current page or nil if there are no values.
15276func (page SecurityRuleListResultPage) Values() []SecurityRule {
15277	if page.srlr.IsEmpty() {
15278		return nil
15279	}
15280	return *page.srlr.Value
15281}
15282
15283// Creates a new instance of the SecurityRuleListResultPage type.
15284func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
15285	return SecurityRuleListResultPage{
15286		fn:   getNextPage,
15287		srlr: cur,
15288	}
15289}
15290
15291// SecurityRulePropertiesFormat security rule resource.
15292type SecurityRulePropertiesFormat struct {
15293	// Description - A description for this rule. Restricted to 140 chars.
15294	Description *string `json:"description,omitempty"`
15295	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
15296	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
15297	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
15298	SourcePortRange *string `json:"sourcePortRange,omitempty"`
15299	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
15300	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
15301	// 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.
15302	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
15303	// SourceAddressPrefixes - The CIDR or source IP ranges.
15304	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
15305	// SourceApplicationSecurityGroups - The application security group specified as source.
15306	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
15307	// 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.
15308	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
15309	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
15310	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
15311	// DestinationApplicationSecurityGroups - The application security group specified as destination.
15312	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
15313	// SourcePortRanges - The source port ranges.
15314	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
15315	// DestinationPortRanges - The destination port ranges.
15316	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
15317	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
15318	Access SecurityRuleAccess `json:"access,omitempty"`
15319	// 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.
15320	Priority *int32 `json:"priority,omitempty"`
15321	// 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'
15322	Direction SecurityRuleDirection `json:"direction,omitempty"`
15323	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15324	ProvisioningState *string `json:"provisioningState,omitempty"`
15325}
15326
15327// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15328// long-running operation.
15329type SecurityRulesCreateOrUpdateFuture struct {
15330	azure.FutureAPI
15331	// Result returns the result of the asynchronous operation.
15332	// If the operation has not completed it will return an error.
15333	Result func(SecurityRulesClient) (SecurityRule, error)
15334}
15335
15336// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15337func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15338	var azFuture azure.Future
15339	if err := json.Unmarshal(body, &azFuture); err != nil {
15340		return err
15341	}
15342	future.FutureAPI = &azFuture
15343	future.Result = future.result
15344	return nil
15345}
15346
15347// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
15348func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
15349	var done bool
15350	done, err = future.DoneWithContext(context.Background(), client)
15351	if err != nil {
15352		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15353		return
15354	}
15355	if !done {
15356		sr.Response.Response = future.Response()
15357		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
15358		return
15359	}
15360	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15361	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
15362		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
15363		if err != nil {
15364			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
15365		}
15366	}
15367	return
15368}
15369
15370// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15371// operation.
15372type SecurityRulesDeleteFuture struct {
15373	azure.FutureAPI
15374	// Result returns the result of the asynchronous operation.
15375	// If the operation has not completed it will return an error.
15376	Result func(SecurityRulesClient) (autorest.Response, error)
15377}
15378
15379// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15380func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
15381	var azFuture azure.Future
15382	if err := json.Unmarshal(body, &azFuture); err != nil {
15383		return err
15384	}
15385	future.FutureAPI = &azFuture
15386	future.Result = future.result
15387	return nil
15388}
15389
15390// result is the default implementation for SecurityRulesDeleteFuture.Result.
15391func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
15392	var done bool
15393	done, err = future.DoneWithContext(context.Background(), client)
15394	if err != nil {
15395		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15396		return
15397	}
15398	if !done {
15399		ar.Response = future.Response()
15400		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
15401		return
15402	}
15403	ar.Response = future.Response()
15404	return
15405}
15406
15407// ServiceEndpointPropertiesFormat the service endpoint properties.
15408type ServiceEndpointPropertiesFormat struct {
15409	// Service - The type of the endpoint service.
15410	Service *string `json:"service,omitempty"`
15411	// Locations - A list of locations.
15412	Locations *[]string `json:"locations,omitempty"`
15413	// ProvisioningState - The provisioning state of the resource.
15414	ProvisioningState *string `json:"provisioningState,omitempty"`
15415}
15416
15417// String ...
15418type String struct {
15419	autorest.Response `json:"-"`
15420	Value             *string `json:"value,omitempty"`
15421}
15422
15423// Subnet subnet in a virtual network resource.
15424type Subnet struct {
15425	autorest.Response `json:"-"`
15426	// SubnetPropertiesFormat - Properties of the subnet.
15427	*SubnetPropertiesFormat `json:"properties,omitempty"`
15428	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15429	Name *string `json:"name,omitempty"`
15430	// Etag - A unique read-only string that changes whenever the resource is updated.
15431	Etag *string `json:"etag,omitempty"`
15432	// ID - Resource ID.
15433	ID *string `json:"id,omitempty"`
15434}
15435
15436// MarshalJSON is the custom marshaler for Subnet.
15437func (s Subnet) MarshalJSON() ([]byte, error) {
15438	objectMap := make(map[string]interface{})
15439	if s.SubnetPropertiesFormat != nil {
15440		objectMap["properties"] = s.SubnetPropertiesFormat
15441	}
15442	if s.Name != nil {
15443		objectMap["name"] = s.Name
15444	}
15445	if s.Etag != nil {
15446		objectMap["etag"] = s.Etag
15447	}
15448	if s.ID != nil {
15449		objectMap["id"] = s.ID
15450	}
15451	return json.Marshal(objectMap)
15452}
15453
15454// UnmarshalJSON is the custom unmarshaler for Subnet struct.
15455func (s *Subnet) UnmarshalJSON(body []byte) error {
15456	var m map[string]*json.RawMessage
15457	err := json.Unmarshal(body, &m)
15458	if err != nil {
15459		return err
15460	}
15461	for k, v := range m {
15462		switch k {
15463		case "properties":
15464			if v != nil {
15465				var subnetPropertiesFormat SubnetPropertiesFormat
15466				err = json.Unmarshal(*v, &subnetPropertiesFormat)
15467				if err != nil {
15468					return err
15469				}
15470				s.SubnetPropertiesFormat = &subnetPropertiesFormat
15471			}
15472		case "name":
15473			if v != nil {
15474				var name string
15475				err = json.Unmarshal(*v, &name)
15476				if err != nil {
15477					return err
15478				}
15479				s.Name = &name
15480			}
15481		case "etag":
15482			if v != nil {
15483				var etag string
15484				err = json.Unmarshal(*v, &etag)
15485				if err != nil {
15486					return err
15487				}
15488				s.Etag = &etag
15489			}
15490		case "id":
15491			if v != nil {
15492				var ID string
15493				err = json.Unmarshal(*v, &ID)
15494				if err != nil {
15495					return err
15496				}
15497				s.ID = &ID
15498			}
15499		}
15500	}
15501
15502	return nil
15503}
15504
15505// SubnetAssociation network interface and its custom security rules.
15506type SubnetAssociation struct {
15507	// ID - READ-ONLY; Subnet ID.
15508	ID *string `json:"id,omitempty"`
15509	// SecurityRules - Collection of custom security rules.
15510	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
15511}
15512
15513// MarshalJSON is the custom marshaler for SubnetAssociation.
15514func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
15515	objectMap := make(map[string]interface{})
15516	if sa.SecurityRules != nil {
15517		objectMap["securityRules"] = sa.SecurityRules
15518	}
15519	return json.Marshal(objectMap)
15520}
15521
15522// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
15523// network
15524type SubnetListResult struct {
15525	autorest.Response `json:"-"`
15526	// Value - The subnets in a virtual network.
15527	Value *[]Subnet `json:"value,omitempty"`
15528	// NextLink - The URL to get the next set of results.
15529	NextLink *string `json:"nextLink,omitempty"`
15530}
15531
15532// SubnetListResultIterator provides access to a complete listing of Subnet values.
15533type SubnetListResultIterator struct {
15534	i    int
15535	page SubnetListResultPage
15536}
15537
15538// NextWithContext advances to the next value.  If there was an error making
15539// the request the iterator does not advance and the error is returned.
15540func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
15541	if tracing.IsEnabled() {
15542		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
15543		defer func() {
15544			sc := -1
15545			if iter.Response().Response.Response != nil {
15546				sc = iter.Response().Response.Response.StatusCode
15547			}
15548			tracing.EndSpan(ctx, sc, err)
15549		}()
15550	}
15551	iter.i++
15552	if iter.i < len(iter.page.Values()) {
15553		return nil
15554	}
15555	err = iter.page.NextWithContext(ctx)
15556	if err != nil {
15557		iter.i--
15558		return err
15559	}
15560	iter.i = 0
15561	return nil
15562}
15563
15564// Next advances to the next value.  If there was an error making
15565// the request the iterator does not advance and the error is returned.
15566// Deprecated: Use NextWithContext() instead.
15567func (iter *SubnetListResultIterator) Next() error {
15568	return iter.NextWithContext(context.Background())
15569}
15570
15571// NotDone returns true if the enumeration should be started or is not yet complete.
15572func (iter SubnetListResultIterator) NotDone() bool {
15573	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15574}
15575
15576// Response returns the raw server response from the last page request.
15577func (iter SubnetListResultIterator) Response() SubnetListResult {
15578	return iter.page.Response()
15579}
15580
15581// Value returns the current value or a zero-initialized value if the
15582// iterator has advanced beyond the end of the collection.
15583func (iter SubnetListResultIterator) Value() Subnet {
15584	if !iter.page.NotDone() {
15585		return Subnet{}
15586	}
15587	return iter.page.Values()[iter.i]
15588}
15589
15590// Creates a new instance of the SubnetListResultIterator type.
15591func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
15592	return SubnetListResultIterator{page: page}
15593}
15594
15595// IsEmpty returns true if the ListResult contains no values.
15596func (slr SubnetListResult) IsEmpty() bool {
15597	return slr.Value == nil || len(*slr.Value) == 0
15598}
15599
15600// hasNextLink returns true if the NextLink is not empty.
15601func (slr SubnetListResult) hasNextLink() bool {
15602	return slr.NextLink != nil && len(*slr.NextLink) != 0
15603}
15604
15605// subnetListResultPreparer prepares a request to retrieve the next set of results.
15606// It returns nil if no more results exist.
15607func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
15608	if !slr.hasNextLink() {
15609		return nil, nil
15610	}
15611	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15612		autorest.AsJSON(),
15613		autorest.AsGet(),
15614		autorest.WithBaseURL(to.String(slr.NextLink)))
15615}
15616
15617// SubnetListResultPage contains a page of Subnet values.
15618type SubnetListResultPage struct {
15619	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
15620	slr SubnetListResult
15621}
15622
15623// NextWithContext advances to the next page of values.  If there was an error making
15624// the request the page does not advance and the error is returned.
15625func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
15626	if tracing.IsEnabled() {
15627		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
15628		defer func() {
15629			sc := -1
15630			if page.Response().Response.Response != nil {
15631				sc = page.Response().Response.Response.StatusCode
15632			}
15633			tracing.EndSpan(ctx, sc, err)
15634		}()
15635	}
15636	for {
15637		next, err := page.fn(ctx, page.slr)
15638		if err != nil {
15639			return err
15640		}
15641		page.slr = next
15642		if !next.hasNextLink() || !next.IsEmpty() {
15643			break
15644		}
15645	}
15646	return nil
15647}
15648
15649// Next advances to the next page of values.  If there was an error making
15650// the request the page does not advance and the error is returned.
15651// Deprecated: Use NextWithContext() instead.
15652func (page *SubnetListResultPage) Next() error {
15653	return page.NextWithContext(context.Background())
15654}
15655
15656// NotDone returns true if the page enumeration should be started or is not yet complete.
15657func (page SubnetListResultPage) NotDone() bool {
15658	return !page.slr.IsEmpty()
15659}
15660
15661// Response returns the raw server response from the last page request.
15662func (page SubnetListResultPage) Response() SubnetListResult {
15663	return page.slr
15664}
15665
15666// Values returns the slice of values for the current page or nil if there are no values.
15667func (page SubnetListResultPage) Values() []Subnet {
15668	if page.slr.IsEmpty() {
15669		return nil
15670	}
15671	return *page.slr.Value
15672}
15673
15674// Creates a new instance of the SubnetListResultPage type.
15675func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
15676	return SubnetListResultPage{
15677		fn:  getNextPage,
15678		slr: cur,
15679	}
15680}
15681
15682// SubnetPropertiesFormat properties of the subnet.
15683type SubnetPropertiesFormat struct {
15684	// AddressPrefix - The address prefix for the subnet.
15685	AddressPrefix *string `json:"addressPrefix,omitempty"`
15686	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
15687	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
15688	// RouteTable - The reference of the RouteTable resource.
15689	RouteTable *RouteTable `json:"routeTable,omitempty"`
15690	// ServiceEndpoints - An array of service endpoints.
15691	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
15692	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
15693	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
15694	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
15695	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
15696	// ProvisioningState - The provisioning state of the resource.
15697	ProvisioningState *string `json:"provisioningState,omitempty"`
15698}
15699
15700// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
15701func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
15702	objectMap := make(map[string]interface{})
15703	if spf.AddressPrefix != nil {
15704		objectMap["addressPrefix"] = spf.AddressPrefix
15705	}
15706	if spf.NetworkSecurityGroup != nil {
15707		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
15708	}
15709	if spf.RouteTable != nil {
15710		objectMap["routeTable"] = spf.RouteTable
15711	}
15712	if spf.ServiceEndpoints != nil {
15713		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
15714	}
15715	if spf.ResourceNavigationLinks != nil {
15716		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
15717	}
15718	if spf.ProvisioningState != nil {
15719		objectMap["provisioningState"] = spf.ProvisioningState
15720	}
15721	return json.Marshal(objectMap)
15722}
15723
15724// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15725// operation.
15726type SubnetsCreateOrUpdateFuture struct {
15727	azure.FutureAPI
15728	// Result returns the result of the asynchronous operation.
15729	// If the operation has not completed it will return an error.
15730	Result func(SubnetsClient) (Subnet, error)
15731}
15732
15733// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15734func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15735	var azFuture azure.Future
15736	if err := json.Unmarshal(body, &azFuture); err != nil {
15737		return err
15738	}
15739	future.FutureAPI = &azFuture
15740	future.Result = future.result
15741	return nil
15742}
15743
15744// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
15745func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
15746	var done bool
15747	done, err = future.DoneWithContext(context.Background(), client)
15748	if err != nil {
15749		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15750		return
15751	}
15752	if !done {
15753		s.Response.Response = future.Response()
15754		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
15755		return
15756	}
15757	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15758	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
15759		s, err = client.CreateOrUpdateResponder(s.Response.Response)
15760		if err != nil {
15761			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
15762		}
15763	}
15764	return
15765}
15766
15767// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15768// operation.
15769type SubnetsDeleteFuture struct {
15770	azure.FutureAPI
15771	// Result returns the result of the asynchronous operation.
15772	// If the operation has not completed it will return an error.
15773	Result func(SubnetsClient) (autorest.Response, error)
15774}
15775
15776// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15777func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
15778	var azFuture azure.Future
15779	if err := json.Unmarshal(body, &azFuture); err != nil {
15780		return err
15781	}
15782	future.FutureAPI = &azFuture
15783	future.Result = future.result
15784	return nil
15785}
15786
15787// result is the default implementation for SubnetsDeleteFuture.Result.
15788func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
15789	var done bool
15790	done, err = future.DoneWithContext(context.Background(), client)
15791	if err != nil {
15792		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
15793		return
15794	}
15795	if !done {
15796		ar.Response = future.Response()
15797		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
15798		return
15799	}
15800	ar.Response = future.Response()
15801	return
15802}
15803
15804// SubResource reference to another subresource.
15805type SubResource struct {
15806	// ID - Resource ID.
15807	ID *string `json:"id,omitempty"`
15808}
15809
15810// TagsObject tags object for patch operations.
15811type TagsObject struct {
15812	// Tags - Resource tags.
15813	Tags map[string]*string `json:"tags"`
15814}
15815
15816// MarshalJSON is the custom marshaler for TagsObject.
15817func (toVar TagsObject) MarshalJSON() ([]byte, error) {
15818	objectMap := make(map[string]interface{})
15819	if toVar.Tags != nil {
15820		objectMap["tags"] = toVar.Tags
15821	}
15822	return json.Marshal(objectMap)
15823}
15824
15825// Topology topology of the specified resource group.
15826type Topology struct {
15827	autorest.Response `json:"-"`
15828	// ID - READ-ONLY; GUID representing the operation id.
15829	ID *string `json:"id,omitempty"`
15830	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
15831	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
15832	// LastModified - READ-ONLY; The datetime when the topology was last modified.
15833	LastModified *date.Time          `json:"lastModified,omitempty"`
15834	Resources    *[]TopologyResource `json:"resources,omitempty"`
15835}
15836
15837// MarshalJSON is the custom marshaler for Topology.
15838func (t Topology) MarshalJSON() ([]byte, error) {
15839	objectMap := make(map[string]interface{})
15840	if t.Resources != nil {
15841		objectMap["resources"] = t.Resources
15842	}
15843	return json.Marshal(objectMap)
15844}
15845
15846// TopologyAssociation resources that have an association with the parent resource.
15847type TopologyAssociation struct {
15848	// Name - The name of the resource that is associated with the parent resource.
15849	Name *string `json:"name,omitempty"`
15850	// ResourceID - The ID of the resource that is associated with the parent resource.
15851	ResourceID *string `json:"resourceId,omitempty"`
15852	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
15853	AssociationType AssociationType `json:"associationType,omitempty"`
15854}
15855
15856// TopologyParameters parameters that define the representation of topology.
15857type TopologyParameters struct {
15858	// TargetResourceGroupName - The name of the target resource group to perform topology on.
15859	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
15860	// TargetVirtualNetwork - The reference of the Virtual Network resource.
15861	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
15862	// TargetSubnet - The reference of the Subnet resource.
15863	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
15864}
15865
15866// TopologyResource the network resource topology information for the given resource group.
15867type TopologyResource struct {
15868	// Name - Name of the resource.
15869	Name *string `json:"name,omitempty"`
15870	// ID - ID of the resource.
15871	ID *string `json:"id,omitempty"`
15872	// Location - Resource location.
15873	Location *string `json:"location,omitempty"`
15874	// Associations - Holds the associations the resource has with other resources in the resource group.
15875	Associations *[]TopologyAssociation `json:"associations,omitempty"`
15876}
15877
15878// TroubleshootingDetails information gained from troubleshooting of specified resource.
15879type TroubleshootingDetails struct {
15880	// ID - The id of the get troubleshoot operation.
15881	ID *string `json:"id,omitempty"`
15882	// ReasonType - Reason type of failure.
15883	ReasonType *string `json:"reasonType,omitempty"`
15884	// Summary - A summary of troubleshooting.
15885	Summary *string `json:"summary,omitempty"`
15886	// Detail - Details on troubleshooting results.
15887	Detail *string `json:"detail,omitempty"`
15888	// RecommendedActions - List of recommended actions.
15889	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
15890}
15891
15892// TroubleshootingParameters parameters that define the resource to troubleshoot.
15893type TroubleshootingParameters struct {
15894	// TargetResourceID - The target resource to troubleshoot.
15895	TargetResourceID           *string `json:"targetResourceId,omitempty"`
15896	*TroubleshootingProperties `json:"properties,omitempty"`
15897}
15898
15899// MarshalJSON is the custom marshaler for TroubleshootingParameters.
15900func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
15901	objectMap := make(map[string]interface{})
15902	if tp.TargetResourceID != nil {
15903		objectMap["targetResourceId"] = tp.TargetResourceID
15904	}
15905	if tp.TroubleshootingProperties != nil {
15906		objectMap["properties"] = tp.TroubleshootingProperties
15907	}
15908	return json.Marshal(objectMap)
15909}
15910
15911// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
15912func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
15913	var m map[string]*json.RawMessage
15914	err := json.Unmarshal(body, &m)
15915	if err != nil {
15916		return err
15917	}
15918	for k, v := range m {
15919		switch k {
15920		case "targetResourceId":
15921			if v != nil {
15922				var targetResourceID string
15923				err = json.Unmarshal(*v, &targetResourceID)
15924				if err != nil {
15925					return err
15926				}
15927				tp.TargetResourceID = &targetResourceID
15928			}
15929		case "properties":
15930			if v != nil {
15931				var troubleshootingProperties TroubleshootingProperties
15932				err = json.Unmarshal(*v, &troubleshootingProperties)
15933				if err != nil {
15934					return err
15935				}
15936				tp.TroubleshootingProperties = &troubleshootingProperties
15937			}
15938		}
15939	}
15940
15941	return nil
15942}
15943
15944// TroubleshootingProperties storage location provided for troubleshoot.
15945type TroubleshootingProperties struct {
15946	// StorageID - The ID for the storage account to save the troubleshoot result.
15947	StorageID *string `json:"storageId,omitempty"`
15948	// StoragePath - The path to the blob to save the troubleshoot result in.
15949	StoragePath *string `json:"storagePath,omitempty"`
15950}
15951
15952// TroubleshootingRecommendedActions recommended actions based on discovered issues.
15953type TroubleshootingRecommendedActions struct {
15954	// ActionID - ID of the recommended action.
15955	ActionID *string `json:"actionId,omitempty"`
15956	// ActionText - Description of recommended actions.
15957	ActionText *string `json:"actionText,omitempty"`
15958	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
15959	ActionURI *string `json:"actionUri,omitempty"`
15960	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
15961	ActionURIText *string `json:"actionUriText,omitempty"`
15962}
15963
15964// TroubleshootingResult troubleshooting information gained from specified resource.
15965type TroubleshootingResult struct {
15966	autorest.Response `json:"-"`
15967	// StartTime - The start time of the troubleshooting.
15968	StartTime *date.Time `json:"startTime,omitempty"`
15969	// EndTime - The end time of the troubleshooting.
15970	EndTime *date.Time `json:"endTime,omitempty"`
15971	// Code - The result code of the troubleshooting.
15972	Code *string `json:"code,omitempty"`
15973	// Results - Information from troubleshooting.
15974	Results *[]TroubleshootingDetails `json:"results,omitempty"`
15975}
15976
15977// TunnelConnectionHealth virtualNetworkGatewayConnection properties
15978type TunnelConnectionHealth struct {
15979	// Tunnel - READ-ONLY; Tunnel name.
15980	Tunnel *string `json:"tunnel,omitempty"`
15981	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15982	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15983	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
15984	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15985	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
15986	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15987	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
15988	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
15989}
15990
15991// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
15992func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
15993	objectMap := make(map[string]interface{})
15994	return json.Marshal(objectMap)
15995}
15996
15997// Usage describes network resource usage.
15998type Usage struct {
15999	// ID - READ-ONLY; Resource identifier.
16000	ID *string `json:"id,omitempty"`
16001	// Unit - An enum describing the unit of measurement.
16002	Unit *string `json:"unit,omitempty"`
16003	// CurrentValue - The current value of the usage.
16004	CurrentValue *int64 `json:"currentValue,omitempty"`
16005	// Limit - The limit of usage.
16006	Limit *int64 `json:"limit,omitempty"`
16007	// Name - The name of the type of usage.
16008	Name *UsageName `json:"name,omitempty"`
16009}
16010
16011// MarshalJSON is the custom marshaler for Usage.
16012func (u Usage) MarshalJSON() ([]byte, error) {
16013	objectMap := make(map[string]interface{})
16014	if u.Unit != nil {
16015		objectMap["unit"] = u.Unit
16016	}
16017	if u.CurrentValue != nil {
16018		objectMap["currentValue"] = u.CurrentValue
16019	}
16020	if u.Limit != nil {
16021		objectMap["limit"] = u.Limit
16022	}
16023	if u.Name != nil {
16024		objectMap["name"] = u.Name
16025	}
16026	return json.Marshal(objectMap)
16027}
16028
16029// UsageName the usage names.
16030type UsageName struct {
16031	// Value - A string describing the resource name.
16032	Value *string `json:"value,omitempty"`
16033	// LocalizedValue - A localized string describing the resource name.
16034	LocalizedValue *string `json:"localizedValue,omitempty"`
16035}
16036
16037// UsagesListResult the list usages operation response.
16038type UsagesListResult struct {
16039	autorest.Response `json:"-"`
16040	// Value - The list network resource usages.
16041	Value *[]Usage `json:"value,omitempty"`
16042	// NextLink - URL to get the next set of results.
16043	NextLink *string `json:"nextLink,omitempty"`
16044}
16045
16046// UsagesListResultIterator provides access to a complete listing of Usage values.
16047type UsagesListResultIterator struct {
16048	i    int
16049	page UsagesListResultPage
16050}
16051
16052// NextWithContext advances to the next value.  If there was an error making
16053// the request the iterator does not advance and the error is returned.
16054func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
16055	if tracing.IsEnabled() {
16056		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
16057		defer func() {
16058			sc := -1
16059			if iter.Response().Response.Response != nil {
16060				sc = iter.Response().Response.Response.StatusCode
16061			}
16062			tracing.EndSpan(ctx, sc, err)
16063		}()
16064	}
16065	iter.i++
16066	if iter.i < len(iter.page.Values()) {
16067		return nil
16068	}
16069	err = iter.page.NextWithContext(ctx)
16070	if err != nil {
16071		iter.i--
16072		return err
16073	}
16074	iter.i = 0
16075	return nil
16076}
16077
16078// Next advances to the next value.  If there was an error making
16079// the request the iterator does not advance and the error is returned.
16080// Deprecated: Use NextWithContext() instead.
16081func (iter *UsagesListResultIterator) Next() error {
16082	return iter.NextWithContext(context.Background())
16083}
16084
16085// NotDone returns true if the enumeration should be started or is not yet complete.
16086func (iter UsagesListResultIterator) NotDone() bool {
16087	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16088}
16089
16090// Response returns the raw server response from the last page request.
16091func (iter UsagesListResultIterator) Response() UsagesListResult {
16092	return iter.page.Response()
16093}
16094
16095// Value returns the current value or a zero-initialized value if the
16096// iterator has advanced beyond the end of the collection.
16097func (iter UsagesListResultIterator) Value() Usage {
16098	if !iter.page.NotDone() {
16099		return Usage{}
16100	}
16101	return iter.page.Values()[iter.i]
16102}
16103
16104// Creates a new instance of the UsagesListResultIterator type.
16105func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
16106	return UsagesListResultIterator{page: page}
16107}
16108
16109// IsEmpty returns true if the ListResult contains no values.
16110func (ulr UsagesListResult) IsEmpty() bool {
16111	return ulr.Value == nil || len(*ulr.Value) == 0
16112}
16113
16114// hasNextLink returns true if the NextLink is not empty.
16115func (ulr UsagesListResult) hasNextLink() bool {
16116	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
16117}
16118
16119// usagesListResultPreparer prepares a request to retrieve the next set of results.
16120// It returns nil if no more results exist.
16121func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
16122	if !ulr.hasNextLink() {
16123		return nil, nil
16124	}
16125	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16126		autorest.AsJSON(),
16127		autorest.AsGet(),
16128		autorest.WithBaseURL(to.String(ulr.NextLink)))
16129}
16130
16131// UsagesListResultPage contains a page of Usage values.
16132type UsagesListResultPage struct {
16133	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
16134	ulr UsagesListResult
16135}
16136
16137// NextWithContext advances to the next page of values.  If there was an error making
16138// the request the page does not advance and the error is returned.
16139func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
16140	if tracing.IsEnabled() {
16141		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
16142		defer func() {
16143			sc := -1
16144			if page.Response().Response.Response != nil {
16145				sc = page.Response().Response.Response.StatusCode
16146			}
16147			tracing.EndSpan(ctx, sc, err)
16148		}()
16149	}
16150	for {
16151		next, err := page.fn(ctx, page.ulr)
16152		if err != nil {
16153			return err
16154		}
16155		page.ulr = next
16156		if !next.hasNextLink() || !next.IsEmpty() {
16157			break
16158		}
16159	}
16160	return nil
16161}
16162
16163// Next advances to the next page of values.  If there was an error making
16164// the request the page does not advance and the error is returned.
16165// Deprecated: Use NextWithContext() instead.
16166func (page *UsagesListResultPage) Next() error {
16167	return page.NextWithContext(context.Background())
16168}
16169
16170// NotDone returns true if the page enumeration should be started or is not yet complete.
16171func (page UsagesListResultPage) NotDone() bool {
16172	return !page.ulr.IsEmpty()
16173}
16174
16175// Response returns the raw server response from the last page request.
16176func (page UsagesListResultPage) Response() UsagesListResult {
16177	return page.ulr
16178}
16179
16180// Values returns the slice of values for the current page or nil if there are no values.
16181func (page UsagesListResultPage) Values() []Usage {
16182	if page.ulr.IsEmpty() {
16183		return nil
16184	}
16185	return *page.ulr.Value
16186}
16187
16188// Creates a new instance of the UsagesListResultPage type.
16189func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
16190	return UsagesListResultPage{
16191		fn:  getNextPage,
16192		ulr: cur,
16193	}
16194}
16195
16196// VerificationIPFlowParameters parameters that define the IP flow to be verified.
16197type VerificationIPFlowParameters struct {
16198	// TargetResourceID - The ID of the target resource to perform next-hop on.
16199	TargetResourceID *string `json:"targetResourceId,omitempty"`
16200	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
16201	Direction Direction `json:"direction,omitempty"`
16202	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
16203	Protocol IPFlowProtocol `json:"protocol,omitempty"`
16204	// 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.
16205	LocalPort *string `json:"localPort,omitempty"`
16206	// 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.
16207	RemotePort *string `json:"remotePort,omitempty"`
16208	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
16209	LocalIPAddress *string `json:"localIPAddress,omitempty"`
16210	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
16211	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
16212	// 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).
16213	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
16214}
16215
16216// VerificationIPFlowResult results of IP flow verification on the target resource.
16217type VerificationIPFlowResult struct {
16218	autorest.Response `json:"-"`
16219	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
16220	Access Access `json:"access,omitempty"`
16221	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
16222	RuleName *string `json:"ruleName,omitempty"`
16223}
16224
16225// VirtualNetwork virtual Network resource.
16226type VirtualNetwork struct {
16227	autorest.Response `json:"-"`
16228	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
16229	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
16230	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16231	Etag *string `json:"etag,omitempty"`
16232	// ID - Resource ID.
16233	ID *string `json:"id,omitempty"`
16234	// Name - READ-ONLY; Resource name.
16235	Name *string `json:"name,omitempty"`
16236	// Type - READ-ONLY; Resource type.
16237	Type *string `json:"type,omitempty"`
16238	// Location - Resource location.
16239	Location *string `json:"location,omitempty"`
16240	// Tags - Resource tags.
16241	Tags map[string]*string `json:"tags"`
16242}
16243
16244// MarshalJSON is the custom marshaler for VirtualNetwork.
16245func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
16246	objectMap := make(map[string]interface{})
16247	if vn.VirtualNetworkPropertiesFormat != nil {
16248		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
16249	}
16250	if vn.Etag != nil {
16251		objectMap["etag"] = vn.Etag
16252	}
16253	if vn.ID != nil {
16254		objectMap["id"] = vn.ID
16255	}
16256	if vn.Location != nil {
16257		objectMap["location"] = vn.Location
16258	}
16259	if vn.Tags != nil {
16260		objectMap["tags"] = vn.Tags
16261	}
16262	return json.Marshal(objectMap)
16263}
16264
16265// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
16266func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
16267	var m map[string]*json.RawMessage
16268	err := json.Unmarshal(body, &m)
16269	if err != nil {
16270		return err
16271	}
16272	for k, v := range m {
16273		switch k {
16274		case "properties":
16275			if v != nil {
16276				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
16277				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
16278				if err != nil {
16279					return err
16280				}
16281				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
16282			}
16283		case "etag":
16284			if v != nil {
16285				var etag string
16286				err = json.Unmarshal(*v, &etag)
16287				if err != nil {
16288					return err
16289				}
16290				vn.Etag = &etag
16291			}
16292		case "id":
16293			if v != nil {
16294				var ID string
16295				err = json.Unmarshal(*v, &ID)
16296				if err != nil {
16297					return err
16298				}
16299				vn.ID = &ID
16300			}
16301		case "name":
16302			if v != nil {
16303				var name string
16304				err = json.Unmarshal(*v, &name)
16305				if err != nil {
16306					return err
16307				}
16308				vn.Name = &name
16309			}
16310		case "type":
16311			if v != nil {
16312				var typeVar string
16313				err = json.Unmarshal(*v, &typeVar)
16314				if err != nil {
16315					return err
16316				}
16317				vn.Type = &typeVar
16318			}
16319		case "location":
16320			if v != nil {
16321				var location string
16322				err = json.Unmarshal(*v, &location)
16323				if err != nil {
16324					return err
16325				}
16326				vn.Location = &location
16327			}
16328		case "tags":
16329			if v != nil {
16330				var tags map[string]*string
16331				err = json.Unmarshal(*v, &tags)
16332				if err != nil {
16333					return err
16334				}
16335				vn.Tags = tags
16336			}
16337		}
16338	}
16339
16340	return nil
16341}
16342
16343// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
16344// resource.
16345type VirtualNetworkConnectionGatewayReference struct {
16346	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
16347	ID *string `json:"id,omitempty"`
16348}
16349
16350// VirtualNetworkGateway a common class for general resource information
16351type VirtualNetworkGateway struct {
16352	autorest.Response `json:"-"`
16353	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
16354	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
16355	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16356	Etag *string `json:"etag,omitempty"`
16357	// ID - Resource ID.
16358	ID *string `json:"id,omitempty"`
16359	// Name - READ-ONLY; Resource name.
16360	Name *string `json:"name,omitempty"`
16361	// Type - READ-ONLY; Resource type.
16362	Type *string `json:"type,omitempty"`
16363	// Location - Resource location.
16364	Location *string `json:"location,omitempty"`
16365	// Tags - Resource tags.
16366	Tags map[string]*string `json:"tags"`
16367}
16368
16369// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
16370func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
16371	objectMap := make(map[string]interface{})
16372	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
16373		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
16374	}
16375	if vng.Etag != nil {
16376		objectMap["etag"] = vng.Etag
16377	}
16378	if vng.ID != nil {
16379		objectMap["id"] = vng.ID
16380	}
16381	if vng.Location != nil {
16382		objectMap["location"] = vng.Location
16383	}
16384	if vng.Tags != nil {
16385		objectMap["tags"] = vng.Tags
16386	}
16387	return json.Marshal(objectMap)
16388}
16389
16390// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
16391func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
16392	var m map[string]*json.RawMessage
16393	err := json.Unmarshal(body, &m)
16394	if err != nil {
16395		return err
16396	}
16397	for k, v := range m {
16398		switch k {
16399		case "properties":
16400			if v != nil {
16401				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
16402				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
16403				if err != nil {
16404					return err
16405				}
16406				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
16407			}
16408		case "etag":
16409			if v != nil {
16410				var etag string
16411				err = json.Unmarshal(*v, &etag)
16412				if err != nil {
16413					return err
16414				}
16415				vng.Etag = &etag
16416			}
16417		case "id":
16418			if v != nil {
16419				var ID string
16420				err = json.Unmarshal(*v, &ID)
16421				if err != nil {
16422					return err
16423				}
16424				vng.ID = &ID
16425			}
16426		case "name":
16427			if v != nil {
16428				var name string
16429				err = json.Unmarshal(*v, &name)
16430				if err != nil {
16431					return err
16432				}
16433				vng.Name = &name
16434			}
16435		case "type":
16436			if v != nil {
16437				var typeVar string
16438				err = json.Unmarshal(*v, &typeVar)
16439				if err != nil {
16440					return err
16441				}
16442				vng.Type = &typeVar
16443			}
16444		case "location":
16445			if v != nil {
16446				var location string
16447				err = json.Unmarshal(*v, &location)
16448				if err != nil {
16449					return err
16450				}
16451				vng.Location = &location
16452			}
16453		case "tags":
16454			if v != nil {
16455				var tags map[string]*string
16456				err = json.Unmarshal(*v, &tags)
16457				if err != nil {
16458					return err
16459				}
16460				vng.Tags = tags
16461			}
16462		}
16463	}
16464
16465	return nil
16466}
16467
16468// VirtualNetworkGatewayConnection a common class for general resource information
16469type VirtualNetworkGatewayConnection struct {
16470	autorest.Response `json:"-"`
16471	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
16472	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
16473	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16474	Etag *string `json:"etag,omitempty"`
16475	// ID - Resource ID.
16476	ID *string `json:"id,omitempty"`
16477	// Name - READ-ONLY; Resource name.
16478	Name *string `json:"name,omitempty"`
16479	// Type - READ-ONLY; Resource type.
16480	Type *string `json:"type,omitempty"`
16481	// Location - Resource location.
16482	Location *string `json:"location,omitempty"`
16483	// Tags - Resource tags.
16484	Tags map[string]*string `json:"tags"`
16485}
16486
16487// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
16488func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
16489	objectMap := make(map[string]interface{})
16490	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
16491		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
16492	}
16493	if vngc.Etag != nil {
16494		objectMap["etag"] = vngc.Etag
16495	}
16496	if vngc.ID != nil {
16497		objectMap["id"] = vngc.ID
16498	}
16499	if vngc.Location != nil {
16500		objectMap["location"] = vngc.Location
16501	}
16502	if vngc.Tags != nil {
16503		objectMap["tags"] = vngc.Tags
16504	}
16505	return json.Marshal(objectMap)
16506}
16507
16508// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
16509func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
16510	var m map[string]*json.RawMessage
16511	err := json.Unmarshal(body, &m)
16512	if err != nil {
16513		return err
16514	}
16515	for k, v := range m {
16516		switch k {
16517		case "properties":
16518			if v != nil {
16519				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
16520				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
16521				if err != nil {
16522					return err
16523				}
16524				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
16525			}
16526		case "etag":
16527			if v != nil {
16528				var etag string
16529				err = json.Unmarshal(*v, &etag)
16530				if err != nil {
16531					return err
16532				}
16533				vngc.Etag = &etag
16534			}
16535		case "id":
16536			if v != nil {
16537				var ID string
16538				err = json.Unmarshal(*v, &ID)
16539				if err != nil {
16540					return err
16541				}
16542				vngc.ID = &ID
16543			}
16544		case "name":
16545			if v != nil {
16546				var name string
16547				err = json.Unmarshal(*v, &name)
16548				if err != nil {
16549					return err
16550				}
16551				vngc.Name = &name
16552			}
16553		case "type":
16554			if v != nil {
16555				var typeVar string
16556				err = json.Unmarshal(*v, &typeVar)
16557				if err != nil {
16558					return err
16559				}
16560				vngc.Type = &typeVar
16561			}
16562		case "location":
16563			if v != nil {
16564				var location string
16565				err = json.Unmarshal(*v, &location)
16566				if err != nil {
16567					return err
16568				}
16569				vngc.Location = &location
16570			}
16571		case "tags":
16572			if v != nil {
16573				var tags map[string]*string
16574				err = json.Unmarshal(*v, &tags)
16575				if err != nil {
16576					return err
16577				}
16578				vngc.Tags = tags
16579			}
16580		}
16581	}
16582
16583	return nil
16584}
16585
16586// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
16587type VirtualNetworkGatewayConnectionListEntity struct {
16588	autorest.Response `json:"-"`
16589	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
16590	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
16591	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16592	Etag *string `json:"etag,omitempty"`
16593	// ID - Resource ID.
16594	ID *string `json:"id,omitempty"`
16595	// Name - READ-ONLY; Resource name.
16596	Name *string `json:"name,omitempty"`
16597	// Type - READ-ONLY; Resource type.
16598	Type *string `json:"type,omitempty"`
16599	// Location - Resource location.
16600	Location *string `json:"location,omitempty"`
16601	// Tags - Resource tags.
16602	Tags map[string]*string `json:"tags"`
16603}
16604
16605// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
16606func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
16607	objectMap := make(map[string]interface{})
16608	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
16609		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
16610	}
16611	if vngcle.Etag != nil {
16612		objectMap["etag"] = vngcle.Etag
16613	}
16614	if vngcle.ID != nil {
16615		objectMap["id"] = vngcle.ID
16616	}
16617	if vngcle.Location != nil {
16618		objectMap["location"] = vngcle.Location
16619	}
16620	if vngcle.Tags != nil {
16621		objectMap["tags"] = vngcle.Tags
16622	}
16623	return json.Marshal(objectMap)
16624}
16625
16626// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
16627func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
16628	var m map[string]*json.RawMessage
16629	err := json.Unmarshal(body, &m)
16630	if err != nil {
16631		return err
16632	}
16633	for k, v := range m {
16634		switch k {
16635		case "properties":
16636			if v != nil {
16637				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
16638				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
16639				if err != nil {
16640					return err
16641				}
16642				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
16643			}
16644		case "etag":
16645			if v != nil {
16646				var etag string
16647				err = json.Unmarshal(*v, &etag)
16648				if err != nil {
16649					return err
16650				}
16651				vngcle.Etag = &etag
16652			}
16653		case "id":
16654			if v != nil {
16655				var ID string
16656				err = json.Unmarshal(*v, &ID)
16657				if err != nil {
16658					return err
16659				}
16660				vngcle.ID = &ID
16661			}
16662		case "name":
16663			if v != nil {
16664				var name string
16665				err = json.Unmarshal(*v, &name)
16666				if err != nil {
16667					return err
16668				}
16669				vngcle.Name = &name
16670			}
16671		case "type":
16672			if v != nil {
16673				var typeVar string
16674				err = json.Unmarshal(*v, &typeVar)
16675				if err != nil {
16676					return err
16677				}
16678				vngcle.Type = &typeVar
16679			}
16680		case "location":
16681			if v != nil {
16682				var location string
16683				err = json.Unmarshal(*v, &location)
16684				if err != nil {
16685					return err
16686				}
16687				vngcle.Location = &location
16688			}
16689		case "tags":
16690			if v != nil {
16691				var tags map[string]*string
16692				err = json.Unmarshal(*v, &tags)
16693				if err != nil {
16694					return err
16695				}
16696				vngcle.Tags = tags
16697			}
16698		}
16699	}
16700
16701	return nil
16702}
16703
16704// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
16705type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
16706	// AuthorizationKey - The authorizationKey.
16707	AuthorizationKey *string `json:"authorizationKey,omitempty"`
16708	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
16709	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
16710	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
16711	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
16712	// LocalNetworkGateway2 - The reference to local network gateway resource.
16713	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
16714	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
16715	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
16716	// RoutingWeight - The routing weight.
16717	RoutingWeight *int32 `json:"routingWeight,omitempty"`
16718	// SharedKey - The IPSec shared key.
16719	SharedKey *string `json:"sharedKey,omitempty"`
16720	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
16721	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
16722	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
16723	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
16724	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
16725	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
16726	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
16727	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
16728	// Peer - The reference to peerings resource.
16729	Peer *SubResource `json:"peer,omitempty"`
16730	// EnableBgp - EnableBgp flag
16731	EnableBgp *bool `json:"enableBgp,omitempty"`
16732	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
16733	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
16734	// IpsecPolicies - The IPSec Policies to be considered by this connection.
16735	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
16736	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
16737	ResourceGUID *string `json:"resourceGuid,omitempty"`
16738	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16739	ProvisioningState *string `json:"provisioningState,omitempty"`
16740}
16741
16742// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
16743func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
16744	objectMap := make(map[string]interface{})
16745	if vngclepf.AuthorizationKey != nil {
16746		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
16747	}
16748	if vngclepf.VirtualNetworkGateway1 != nil {
16749		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
16750	}
16751	if vngclepf.VirtualNetworkGateway2 != nil {
16752		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
16753	}
16754	if vngclepf.LocalNetworkGateway2 != nil {
16755		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
16756	}
16757	if vngclepf.ConnectionType != "" {
16758		objectMap["connectionType"] = vngclepf.ConnectionType
16759	}
16760	if vngclepf.RoutingWeight != nil {
16761		objectMap["routingWeight"] = vngclepf.RoutingWeight
16762	}
16763	if vngclepf.SharedKey != nil {
16764		objectMap["sharedKey"] = vngclepf.SharedKey
16765	}
16766	if vngclepf.Peer != nil {
16767		objectMap["peer"] = vngclepf.Peer
16768	}
16769	if vngclepf.EnableBgp != nil {
16770		objectMap["enableBgp"] = vngclepf.EnableBgp
16771	}
16772	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
16773		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
16774	}
16775	if vngclepf.IpsecPolicies != nil {
16776		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
16777	}
16778	if vngclepf.ResourceGUID != nil {
16779		objectMap["resourceGuid"] = vngclepf.ResourceGUID
16780	}
16781	return json.Marshal(objectMap)
16782}
16783
16784// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
16785// service call
16786type VirtualNetworkGatewayConnectionListResult struct {
16787	autorest.Response `json:"-"`
16788	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
16789	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
16790	// NextLink - READ-ONLY; The URL to get the next set of results.
16791	NextLink *string `json:"nextLink,omitempty"`
16792}
16793
16794// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
16795func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
16796	objectMap := make(map[string]interface{})
16797	if vngclr.Value != nil {
16798		objectMap["value"] = vngclr.Value
16799	}
16800	return json.Marshal(objectMap)
16801}
16802
16803// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
16804// VirtualNetworkGatewayConnection values.
16805type VirtualNetworkGatewayConnectionListResultIterator struct {
16806	i    int
16807	page VirtualNetworkGatewayConnectionListResultPage
16808}
16809
16810// NextWithContext advances to the next value.  If there was an error making
16811// the request the iterator does not advance and the error is returned.
16812func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
16813	if tracing.IsEnabled() {
16814		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
16815		defer func() {
16816			sc := -1
16817			if iter.Response().Response.Response != nil {
16818				sc = iter.Response().Response.Response.StatusCode
16819			}
16820			tracing.EndSpan(ctx, sc, err)
16821		}()
16822	}
16823	iter.i++
16824	if iter.i < len(iter.page.Values()) {
16825		return nil
16826	}
16827	err = iter.page.NextWithContext(ctx)
16828	if err != nil {
16829		iter.i--
16830		return err
16831	}
16832	iter.i = 0
16833	return nil
16834}
16835
16836// Next advances to the next value.  If there was an error making
16837// the request the iterator does not advance and the error is returned.
16838// Deprecated: Use NextWithContext() instead.
16839func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
16840	return iter.NextWithContext(context.Background())
16841}
16842
16843// NotDone returns true if the enumeration should be started or is not yet complete.
16844func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
16845	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16846}
16847
16848// Response returns the raw server response from the last page request.
16849func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
16850	return iter.page.Response()
16851}
16852
16853// Value returns the current value or a zero-initialized value if the
16854// iterator has advanced beyond the end of the collection.
16855func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
16856	if !iter.page.NotDone() {
16857		return VirtualNetworkGatewayConnection{}
16858	}
16859	return iter.page.Values()[iter.i]
16860}
16861
16862// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
16863func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
16864	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
16865}
16866
16867// IsEmpty returns true if the ListResult contains no values.
16868func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
16869	return vngclr.Value == nil || len(*vngclr.Value) == 0
16870}
16871
16872// hasNextLink returns true if the NextLink is not empty.
16873func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
16874	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
16875}
16876
16877// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
16878// It returns nil if no more results exist.
16879func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
16880	if !vngclr.hasNextLink() {
16881		return nil, nil
16882	}
16883	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16884		autorest.AsJSON(),
16885		autorest.AsGet(),
16886		autorest.WithBaseURL(to.String(vngclr.NextLink)))
16887}
16888
16889// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
16890type VirtualNetworkGatewayConnectionListResultPage struct {
16891	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
16892	vngclr VirtualNetworkGatewayConnectionListResult
16893}
16894
16895// NextWithContext advances to the next page of values.  If there was an error making
16896// the request the page does not advance and the error is returned.
16897func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
16898	if tracing.IsEnabled() {
16899		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
16900		defer func() {
16901			sc := -1
16902			if page.Response().Response.Response != nil {
16903				sc = page.Response().Response.Response.StatusCode
16904			}
16905			tracing.EndSpan(ctx, sc, err)
16906		}()
16907	}
16908	for {
16909		next, err := page.fn(ctx, page.vngclr)
16910		if err != nil {
16911			return err
16912		}
16913		page.vngclr = next
16914		if !next.hasNextLink() || !next.IsEmpty() {
16915			break
16916		}
16917	}
16918	return nil
16919}
16920
16921// Next advances to the next page of values.  If there was an error making
16922// the request the page does not advance and the error is returned.
16923// Deprecated: Use NextWithContext() instead.
16924func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
16925	return page.NextWithContext(context.Background())
16926}
16927
16928// NotDone returns true if the page enumeration should be started or is not yet complete.
16929func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
16930	return !page.vngclr.IsEmpty()
16931}
16932
16933// Response returns the raw server response from the last page request.
16934func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
16935	return page.vngclr
16936}
16937
16938// Values returns the slice of values for the current page or nil if there are no values.
16939func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
16940	if page.vngclr.IsEmpty() {
16941		return nil
16942	}
16943	return *page.vngclr.Value
16944}
16945
16946// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
16947func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
16948	return VirtualNetworkGatewayConnectionListResultPage{
16949		fn:     getNextPage,
16950		vngclr: cur,
16951	}
16952}
16953
16954// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
16955type VirtualNetworkGatewayConnectionPropertiesFormat struct {
16956	// AuthorizationKey - The authorizationKey.
16957	AuthorizationKey *string `json:"authorizationKey,omitempty"`
16958	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
16959	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
16960	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
16961	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
16962	// LocalNetworkGateway2 - The reference to local network gateway resource.
16963	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
16964	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
16965	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
16966	// RoutingWeight - The routing weight.
16967	RoutingWeight *int32 `json:"routingWeight,omitempty"`
16968	// SharedKey - The IPSec shared key.
16969	SharedKey *string `json:"sharedKey,omitempty"`
16970	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
16971	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
16972	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
16973	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
16974	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
16975	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
16976	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
16977	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
16978	// Peer - The reference to peerings resource.
16979	Peer *SubResource `json:"peer,omitempty"`
16980	// EnableBgp - EnableBgp flag
16981	EnableBgp *bool `json:"enableBgp,omitempty"`
16982	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
16983	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
16984	// IpsecPolicies - The IPSec Policies to be considered by this connection.
16985	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
16986	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
16987	ResourceGUID *string `json:"resourceGuid,omitempty"`
16988	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16989	ProvisioningState *string `json:"provisioningState,omitempty"`
16990}
16991
16992// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
16993func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
16994	objectMap := make(map[string]interface{})
16995	if vngcpf.AuthorizationKey != nil {
16996		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
16997	}
16998	if vngcpf.VirtualNetworkGateway1 != nil {
16999		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
17000	}
17001	if vngcpf.VirtualNetworkGateway2 != nil {
17002		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
17003	}
17004	if vngcpf.LocalNetworkGateway2 != nil {
17005		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
17006	}
17007	if vngcpf.ConnectionType != "" {
17008		objectMap["connectionType"] = vngcpf.ConnectionType
17009	}
17010	if vngcpf.RoutingWeight != nil {
17011		objectMap["routingWeight"] = vngcpf.RoutingWeight
17012	}
17013	if vngcpf.SharedKey != nil {
17014		objectMap["sharedKey"] = vngcpf.SharedKey
17015	}
17016	if vngcpf.Peer != nil {
17017		objectMap["peer"] = vngcpf.Peer
17018	}
17019	if vngcpf.EnableBgp != nil {
17020		objectMap["enableBgp"] = vngcpf.EnableBgp
17021	}
17022	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
17023		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
17024	}
17025	if vngcpf.IpsecPolicies != nil {
17026		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
17027	}
17028	if vngcpf.ResourceGUID != nil {
17029		objectMap["resourceGuid"] = vngcpf.ResourceGUID
17030	}
17031	return json.Marshal(objectMap)
17032}
17033
17034// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
17035// results of a long-running operation.
17036type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
17037	azure.FutureAPI
17038	// Result returns the result of the asynchronous operation.
17039	// If the operation has not completed it will return an error.
17040	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
17041}
17042
17043// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17044func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17045	var azFuture azure.Future
17046	if err := json.Unmarshal(body, &azFuture); err != nil {
17047		return err
17048	}
17049	future.FutureAPI = &azFuture
17050	future.Result = future.result
17051	return nil
17052}
17053
17054// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
17055func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
17056	var done bool
17057	done, err = future.DoneWithContext(context.Background(), client)
17058	if err != nil {
17059		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17060		return
17061	}
17062	if !done {
17063		vngc.Response.Response = future.Response()
17064		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
17065		return
17066	}
17067	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17068	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
17069		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
17070		if err != nil {
17071			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
17072		}
17073	}
17074	return
17075}
17076
17077// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
17078// a long-running operation.
17079type VirtualNetworkGatewayConnectionsDeleteFuture struct {
17080	azure.FutureAPI
17081	// Result returns the result of the asynchronous operation.
17082	// If the operation has not completed it will return an error.
17083	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
17084}
17085
17086// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17087func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
17088	var azFuture azure.Future
17089	if err := json.Unmarshal(body, &azFuture); err != nil {
17090		return err
17091	}
17092	future.FutureAPI = &azFuture
17093	future.Result = future.result
17094	return nil
17095}
17096
17097// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
17098func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
17099	var done bool
17100	done, err = future.DoneWithContext(context.Background(), client)
17101	if err != nil {
17102		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
17103		return
17104	}
17105	if !done {
17106		ar.Response = future.Response()
17107		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
17108		return
17109	}
17110	ar.Response = future.Response()
17111	return
17112}
17113
17114// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
17115// results of a long-running operation.
17116type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
17117	azure.FutureAPI
17118	// Result returns the result of the asynchronous operation.
17119	// If the operation has not completed it will return an error.
17120	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
17121}
17122
17123// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17124func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
17125	var azFuture azure.Future
17126	if err := json.Unmarshal(body, &azFuture); err != nil {
17127		return err
17128	}
17129	future.FutureAPI = &azFuture
17130	future.Result = future.result
17131	return nil
17132}
17133
17134// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
17135func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
17136	var done bool
17137	done, err = future.DoneWithContext(context.Background(), client)
17138	if err != nil {
17139		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
17140		return
17141	}
17142	if !done {
17143		crsk.Response.Response = future.Response()
17144		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
17145		return
17146	}
17147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17148	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
17149		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
17150		if err != nil {
17151			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
17152		}
17153	}
17154	return
17155}
17156
17157// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
17158// results of a long-running operation.
17159type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
17160	azure.FutureAPI
17161	// Result returns the result of the asynchronous operation.
17162	// If the operation has not completed it will return an error.
17163	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
17164}
17165
17166// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17167func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
17168	var azFuture azure.Future
17169	if err := json.Unmarshal(body, &azFuture); err != nil {
17170		return err
17171	}
17172	future.FutureAPI = &azFuture
17173	future.Result = future.result
17174	return nil
17175}
17176
17177// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
17178func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
17179	var done bool
17180	done, err = future.DoneWithContext(context.Background(), client)
17181	if err != nil {
17182		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
17183		return
17184	}
17185	if !done {
17186		csk.Response.Response = future.Response()
17187		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
17188		return
17189	}
17190	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17191	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
17192		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
17193		if err != nil {
17194			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
17195		}
17196	}
17197	return
17198}
17199
17200// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
17201// results of a long-running operation.
17202type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
17203	azure.FutureAPI
17204	// Result returns the result of the asynchronous operation.
17205	// If the operation has not completed it will return an error.
17206	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
17207}
17208
17209// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17210func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17211	var azFuture azure.Future
17212	if err := json.Unmarshal(body, &azFuture); err != nil {
17213		return err
17214	}
17215	future.FutureAPI = &azFuture
17216	future.Result = future.result
17217	return nil
17218}
17219
17220// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
17221func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
17222	var done bool
17223	done, err = future.DoneWithContext(context.Background(), client)
17224	if err != nil {
17225		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17226		return
17227	}
17228	if !done {
17229		vngcle.Response.Response = future.Response()
17230		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
17231		return
17232	}
17233	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17234	if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
17235		vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
17236		if err != nil {
17237			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
17238		}
17239	}
17240	return
17241}
17242
17243// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
17244type VirtualNetworkGatewayIPConfiguration struct {
17245	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
17246	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
17247	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17248	Name *string `json:"name,omitempty"`
17249	// Etag - A unique read-only string that changes whenever the resource is updated.
17250	Etag *string `json:"etag,omitempty"`
17251	// ID - Resource ID.
17252	ID *string `json:"id,omitempty"`
17253}
17254
17255// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
17256func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
17257	objectMap := make(map[string]interface{})
17258	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
17259		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
17260	}
17261	if vngic.Name != nil {
17262		objectMap["name"] = vngic.Name
17263	}
17264	if vngic.Etag != nil {
17265		objectMap["etag"] = vngic.Etag
17266	}
17267	if vngic.ID != nil {
17268		objectMap["id"] = vngic.ID
17269	}
17270	return json.Marshal(objectMap)
17271}
17272
17273// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
17274func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
17275	var m map[string]*json.RawMessage
17276	err := json.Unmarshal(body, &m)
17277	if err != nil {
17278		return err
17279	}
17280	for k, v := range m {
17281		switch k {
17282		case "properties":
17283			if v != nil {
17284				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
17285				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
17286				if err != nil {
17287					return err
17288				}
17289				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
17290			}
17291		case "name":
17292			if v != nil {
17293				var name string
17294				err = json.Unmarshal(*v, &name)
17295				if err != nil {
17296					return err
17297				}
17298				vngic.Name = &name
17299			}
17300		case "etag":
17301			if v != nil {
17302				var etag string
17303				err = json.Unmarshal(*v, &etag)
17304				if err != nil {
17305					return err
17306				}
17307				vngic.Etag = &etag
17308			}
17309		case "id":
17310			if v != nil {
17311				var ID string
17312				err = json.Unmarshal(*v, &ID)
17313				if err != nil {
17314					return err
17315				}
17316				vngic.ID = &ID
17317			}
17318		}
17319	}
17320
17321	return nil
17322}
17323
17324// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
17325type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
17326	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
17327	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
17328	// Subnet - The reference of the subnet resource.
17329	Subnet *SubResource `json:"subnet,omitempty"`
17330	// PublicIPAddress - The reference of the public IP resource.
17331	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
17332	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17333	ProvisioningState *string `json:"provisioningState,omitempty"`
17334}
17335
17336// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
17337func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
17338	objectMap := make(map[string]interface{})
17339	if vngicpf.PrivateIPAllocationMethod != "" {
17340		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
17341	}
17342	if vngicpf.Subnet != nil {
17343		objectMap["subnet"] = vngicpf.Subnet
17344	}
17345	if vngicpf.PublicIPAddress != nil {
17346		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
17347	}
17348	return json.Marshal(objectMap)
17349}
17350
17351// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
17352// service call
17353type VirtualNetworkGatewayListConnectionsResult struct {
17354	autorest.Response `json:"-"`
17355	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
17356	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
17357	// NextLink - READ-ONLY; The URL to get the next set of results.
17358	NextLink *string `json:"nextLink,omitempty"`
17359}
17360
17361// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
17362func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
17363	objectMap := make(map[string]interface{})
17364	if vnglcr.Value != nil {
17365		objectMap["value"] = vnglcr.Value
17366	}
17367	return json.Marshal(objectMap)
17368}
17369
17370// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
17371// VirtualNetworkGatewayConnectionListEntity values.
17372type VirtualNetworkGatewayListConnectionsResultIterator struct {
17373	i    int
17374	page VirtualNetworkGatewayListConnectionsResultPage
17375}
17376
17377// NextWithContext advances to the next value.  If there was an error making
17378// the request the iterator does not advance and the error is returned.
17379func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
17380	if tracing.IsEnabled() {
17381		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
17382		defer func() {
17383			sc := -1
17384			if iter.Response().Response.Response != nil {
17385				sc = iter.Response().Response.Response.StatusCode
17386			}
17387			tracing.EndSpan(ctx, sc, err)
17388		}()
17389	}
17390	iter.i++
17391	if iter.i < len(iter.page.Values()) {
17392		return nil
17393	}
17394	err = iter.page.NextWithContext(ctx)
17395	if err != nil {
17396		iter.i--
17397		return err
17398	}
17399	iter.i = 0
17400	return nil
17401}
17402
17403// Next advances to the next value.  If there was an error making
17404// the request the iterator does not advance and the error is returned.
17405// Deprecated: Use NextWithContext() instead.
17406func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
17407	return iter.NextWithContext(context.Background())
17408}
17409
17410// NotDone returns true if the enumeration should be started or is not yet complete.
17411func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
17412	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17413}
17414
17415// Response returns the raw server response from the last page request.
17416func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
17417	return iter.page.Response()
17418}
17419
17420// Value returns the current value or a zero-initialized value if the
17421// iterator has advanced beyond the end of the collection.
17422func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
17423	if !iter.page.NotDone() {
17424		return VirtualNetworkGatewayConnectionListEntity{}
17425	}
17426	return iter.page.Values()[iter.i]
17427}
17428
17429// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
17430func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
17431	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
17432}
17433
17434// IsEmpty returns true if the ListResult contains no values.
17435func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
17436	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
17437}
17438
17439// hasNextLink returns true if the NextLink is not empty.
17440func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
17441	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
17442}
17443
17444// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
17445// It returns nil if no more results exist.
17446func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17447	if !vnglcr.hasNextLink() {
17448		return nil, nil
17449	}
17450	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17451		autorest.AsJSON(),
17452		autorest.AsGet(),
17453		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
17454}
17455
17456// VirtualNetworkGatewayListConnectionsResultPage contains a page of
17457// VirtualNetworkGatewayConnectionListEntity values.
17458type VirtualNetworkGatewayListConnectionsResultPage struct {
17459	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
17460	vnglcr VirtualNetworkGatewayListConnectionsResult
17461}
17462
17463// NextWithContext advances to the next page of values.  If there was an error making
17464// the request the page does not advance and the error is returned.
17465func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17466	if tracing.IsEnabled() {
17467		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
17468		defer func() {
17469			sc := -1
17470			if page.Response().Response.Response != nil {
17471				sc = page.Response().Response.Response.StatusCode
17472			}
17473			tracing.EndSpan(ctx, sc, err)
17474		}()
17475	}
17476	for {
17477		next, err := page.fn(ctx, page.vnglcr)
17478		if err != nil {
17479			return err
17480		}
17481		page.vnglcr = next
17482		if !next.hasNextLink() || !next.IsEmpty() {
17483			break
17484		}
17485	}
17486	return nil
17487}
17488
17489// Next advances to the next page of values.  If there was an error making
17490// the request the page does not advance and the error is returned.
17491// Deprecated: Use NextWithContext() instead.
17492func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
17493	return page.NextWithContext(context.Background())
17494}
17495
17496// NotDone returns true if the page enumeration should be started or is not yet complete.
17497func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
17498	return !page.vnglcr.IsEmpty()
17499}
17500
17501// Response returns the raw server response from the last page request.
17502func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
17503	return page.vnglcr
17504}
17505
17506// Values returns the slice of values for the current page or nil if there are no values.
17507func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
17508	if page.vnglcr.IsEmpty() {
17509		return nil
17510	}
17511	return *page.vnglcr.Value
17512}
17513
17514// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
17515func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
17516	return VirtualNetworkGatewayListConnectionsResultPage{
17517		fn:     getNextPage,
17518		vnglcr: cur,
17519	}
17520}
17521
17522// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
17523type VirtualNetworkGatewayListResult struct {
17524	autorest.Response `json:"-"`
17525	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
17526	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
17527	// NextLink - READ-ONLY; The URL to get the next set of results.
17528	NextLink *string `json:"nextLink,omitempty"`
17529}
17530
17531// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
17532func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17533	objectMap := make(map[string]interface{})
17534	if vnglr.Value != nil {
17535		objectMap["value"] = vnglr.Value
17536	}
17537	return json.Marshal(objectMap)
17538}
17539
17540// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
17541// values.
17542type VirtualNetworkGatewayListResultIterator struct {
17543	i    int
17544	page VirtualNetworkGatewayListResultPage
17545}
17546
17547// NextWithContext advances to the next value.  If there was an error making
17548// the request the iterator does not advance and the error is returned.
17549func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17550	if tracing.IsEnabled() {
17551		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
17552		defer func() {
17553			sc := -1
17554			if iter.Response().Response.Response != nil {
17555				sc = iter.Response().Response.Response.StatusCode
17556			}
17557			tracing.EndSpan(ctx, sc, err)
17558		}()
17559	}
17560	iter.i++
17561	if iter.i < len(iter.page.Values()) {
17562		return nil
17563	}
17564	err = iter.page.NextWithContext(ctx)
17565	if err != nil {
17566		iter.i--
17567		return err
17568	}
17569	iter.i = 0
17570	return nil
17571}
17572
17573// Next advances to the next value.  If there was an error making
17574// the request the iterator does not advance and the error is returned.
17575// Deprecated: Use NextWithContext() instead.
17576func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
17577	return iter.NextWithContext(context.Background())
17578}
17579
17580// NotDone returns true if the enumeration should be started or is not yet complete.
17581func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
17582	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17583}
17584
17585// Response returns the raw server response from the last page request.
17586func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
17587	return iter.page.Response()
17588}
17589
17590// Value returns the current value or a zero-initialized value if the
17591// iterator has advanced beyond the end of the collection.
17592func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
17593	if !iter.page.NotDone() {
17594		return VirtualNetworkGateway{}
17595	}
17596	return iter.page.Values()[iter.i]
17597}
17598
17599// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
17600func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
17601	return VirtualNetworkGatewayListResultIterator{page: page}
17602}
17603
17604// IsEmpty returns true if the ListResult contains no values.
17605func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
17606	return vnglr.Value == nil || len(*vnglr.Value) == 0
17607}
17608
17609// hasNextLink returns true if the NextLink is not empty.
17610func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
17611	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
17612}
17613
17614// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17615// It returns nil if no more results exist.
17616func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17617	if !vnglr.hasNextLink() {
17618		return nil, nil
17619	}
17620	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17621		autorest.AsJSON(),
17622		autorest.AsGet(),
17623		autorest.WithBaseURL(to.String(vnglr.NextLink)))
17624}
17625
17626// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
17627type VirtualNetworkGatewayListResultPage struct {
17628	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
17629	vnglr VirtualNetworkGatewayListResult
17630}
17631
17632// NextWithContext advances to the next page of values.  If there was an error making
17633// the request the page does not advance and the error is returned.
17634func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17635	if tracing.IsEnabled() {
17636		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
17637		defer func() {
17638			sc := -1
17639			if page.Response().Response.Response != nil {
17640				sc = page.Response().Response.Response.StatusCode
17641			}
17642			tracing.EndSpan(ctx, sc, err)
17643		}()
17644	}
17645	for {
17646		next, err := page.fn(ctx, page.vnglr)
17647		if err != nil {
17648			return err
17649		}
17650		page.vnglr = next
17651		if !next.hasNextLink() || !next.IsEmpty() {
17652			break
17653		}
17654	}
17655	return nil
17656}
17657
17658// Next advances to the next page of values.  If there was an error making
17659// the request the page does not advance and the error is returned.
17660// Deprecated: Use NextWithContext() instead.
17661func (page *VirtualNetworkGatewayListResultPage) Next() error {
17662	return page.NextWithContext(context.Background())
17663}
17664
17665// NotDone returns true if the page enumeration should be started or is not yet complete.
17666func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
17667	return !page.vnglr.IsEmpty()
17668}
17669
17670// Response returns the raw server response from the last page request.
17671func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
17672	return page.vnglr
17673}
17674
17675// Values returns the slice of values for the current page or nil if there are no values.
17676func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
17677	if page.vnglr.IsEmpty() {
17678		return nil
17679	}
17680	return *page.vnglr.Value
17681}
17682
17683// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
17684func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
17685	return VirtualNetworkGatewayListResultPage{
17686		fn:    getNextPage,
17687		vnglr: cur,
17688	}
17689}
17690
17691// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
17692type VirtualNetworkGatewayPropertiesFormat struct {
17693	// IPConfigurations - IP configurations for virtual network gateway.
17694	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
17695	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
17696	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
17697	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
17698	VpnType VpnType `json:"vpnType,omitempty"`
17699	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
17700	EnableBgp *bool `json:"enableBgp,omitempty"`
17701	// ActiveActive - ActiveActive flag
17702	ActiveActive *bool `json:"activeActive,omitempty"`
17703	// 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.
17704	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
17705	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
17706	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
17707	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
17708	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
17709	// BgpSettings - Virtual network gateway's BGP speaker settings.
17710	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17711	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
17712	ResourceGUID *string `json:"resourceGuid,omitempty"`
17713	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17714	ProvisioningState *string `json:"provisioningState,omitempty"`
17715}
17716
17717// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
17718func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17719	objectMap := make(map[string]interface{})
17720	if vngpf.IPConfigurations != nil {
17721		objectMap["ipConfigurations"] = vngpf.IPConfigurations
17722	}
17723	if vngpf.GatewayType != "" {
17724		objectMap["gatewayType"] = vngpf.GatewayType
17725	}
17726	if vngpf.VpnType != "" {
17727		objectMap["vpnType"] = vngpf.VpnType
17728	}
17729	if vngpf.EnableBgp != nil {
17730		objectMap["enableBgp"] = vngpf.EnableBgp
17731	}
17732	if vngpf.ActiveActive != nil {
17733		objectMap["activeActive"] = vngpf.ActiveActive
17734	}
17735	if vngpf.GatewayDefaultSite != nil {
17736		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
17737	}
17738	if vngpf.Sku != nil {
17739		objectMap["sku"] = vngpf.Sku
17740	}
17741	if vngpf.VpnClientConfiguration != nil {
17742		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
17743	}
17744	if vngpf.BgpSettings != nil {
17745		objectMap["bgpSettings"] = vngpf.BgpSettings
17746	}
17747	if vngpf.ResourceGUID != nil {
17748		objectMap["resourceGuid"] = vngpf.ResourceGUID
17749	}
17750	return json.Marshal(objectMap)
17751}
17752
17753// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17754// long-running operation.
17755type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
17756	azure.FutureAPI
17757	// Result returns the result of the asynchronous operation.
17758	// If the operation has not completed it will return an error.
17759	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
17760}
17761
17762// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17763func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17764	var azFuture azure.Future
17765	if err := json.Unmarshal(body, &azFuture); err != nil {
17766		return err
17767	}
17768	future.FutureAPI = &azFuture
17769	future.Result = future.result
17770	return nil
17771}
17772
17773// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
17774func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
17775	var done bool
17776	done, err = future.DoneWithContext(context.Background(), client)
17777	if err != nil {
17778		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17779		return
17780	}
17781	if !done {
17782		vng.Response.Response = future.Response()
17783		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
17784		return
17785	}
17786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17787	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
17788		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
17789		if err != nil {
17790			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
17791		}
17792	}
17793	return
17794}
17795
17796// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
17797// long-running operation.
17798type VirtualNetworkGatewaysDeleteFuture struct {
17799	azure.FutureAPI
17800	// Result returns the result of the asynchronous operation.
17801	// If the operation has not completed it will return an error.
17802	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
17803}
17804
17805// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17806func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
17807	var azFuture azure.Future
17808	if err := json.Unmarshal(body, &azFuture); err != nil {
17809		return err
17810	}
17811	future.FutureAPI = &azFuture
17812	future.Result = future.result
17813	return nil
17814}
17815
17816// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
17817func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
17818	var done bool
17819	done, err = future.DoneWithContext(context.Background(), client)
17820	if err != nil {
17821		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
17822		return
17823	}
17824	if !done {
17825		ar.Response = future.Response()
17826		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
17827		return
17828	}
17829	ar.Response = future.Response()
17830	return
17831}
17832
17833// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
17834// results of a long-running operation.
17835type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
17836	azure.FutureAPI
17837	// Result returns the result of the asynchronous operation.
17838	// If the operation has not completed it will return an error.
17839	Result func(VirtualNetworkGatewaysClient) (String, error)
17840}
17841
17842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17843func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
17844	var azFuture azure.Future
17845	if err := json.Unmarshal(body, &azFuture); err != nil {
17846		return err
17847	}
17848	future.FutureAPI = &azFuture
17849	future.Result = future.result
17850	return nil
17851}
17852
17853// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
17854func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
17855	var done bool
17856	done, err = future.DoneWithContext(context.Background(), client)
17857	if err != nil {
17858		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
17859		return
17860	}
17861	if !done {
17862		s.Response.Response = future.Response()
17863		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
17864		return
17865	}
17866	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17867	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
17868		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
17869		if err != nil {
17870			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
17871		}
17872	}
17873	return
17874}
17875
17876// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
17877// of a long-running operation.
17878type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
17879	azure.FutureAPI
17880	// Result returns the result of the asynchronous operation.
17881	// If the operation has not completed it will return an error.
17882	Result func(VirtualNetworkGatewaysClient) (String, error)
17883}
17884
17885// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17886func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
17887	var azFuture azure.Future
17888	if err := json.Unmarshal(body, &azFuture); err != nil {
17889		return err
17890	}
17891	future.FutureAPI = &azFuture
17892	future.Result = future.result
17893	return nil
17894}
17895
17896// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
17897func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
17898	var done bool
17899	done, err = future.DoneWithContext(context.Background(), client)
17900	if err != nil {
17901		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
17902		return
17903	}
17904	if !done {
17905		s.Response.Response = future.Response()
17906		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
17907		return
17908	}
17909	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17910	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
17911		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
17912		if err != nil {
17913			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
17914		}
17915	}
17916	return
17917}
17918
17919// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
17920// of a long-running operation.
17921type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
17922	azure.FutureAPI
17923	// Result returns the result of the asynchronous operation.
17924	// If the operation has not completed it will return an error.
17925	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
17926}
17927
17928// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17929func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
17930	var azFuture azure.Future
17931	if err := json.Unmarshal(body, &azFuture); err != nil {
17932		return err
17933	}
17934	future.FutureAPI = &azFuture
17935	future.Result = future.result
17936	return nil
17937}
17938
17939// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
17940func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
17941	var done bool
17942	done, err = future.DoneWithContext(context.Background(), client)
17943	if err != nil {
17944		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
17945		return
17946	}
17947	if !done {
17948		grlr.Response.Response = future.Response()
17949		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
17950		return
17951	}
17952	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17953	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
17954		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
17955		if err != nil {
17956			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
17957		}
17958	}
17959	return
17960}
17961
17962// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
17963// a long-running operation.
17964type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
17965	azure.FutureAPI
17966	// Result returns the result of the asynchronous operation.
17967	// If the operation has not completed it will return an error.
17968	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
17969}
17970
17971// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17972func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
17973	var azFuture azure.Future
17974	if err := json.Unmarshal(body, &azFuture); err != nil {
17975		return err
17976	}
17977	future.FutureAPI = &azFuture
17978	future.Result = future.result
17979	return nil
17980}
17981
17982// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
17983func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
17984	var done bool
17985	done, err = future.DoneWithContext(context.Background(), client)
17986	if err != nil {
17987		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
17988		return
17989	}
17990	if !done {
17991		bpslr.Response.Response = future.Response()
17992		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
17993		return
17994	}
17995	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17996	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
17997		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
17998		if err != nil {
17999			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
18000		}
18001	}
18002	return
18003}
18004
18005// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
18006// a long-running operation.
18007type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
18008	azure.FutureAPI
18009	// Result returns the result of the asynchronous operation.
18010	// If the operation has not completed it will return an error.
18011	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
18012}
18013
18014// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18015func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
18016	var azFuture azure.Future
18017	if err := json.Unmarshal(body, &azFuture); err != nil {
18018		return err
18019	}
18020	future.FutureAPI = &azFuture
18021	future.Result = future.result
18022	return nil
18023}
18024
18025// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
18026func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
18027	var done bool
18028	done, err = future.DoneWithContext(context.Background(), client)
18029	if err != nil {
18030		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
18031		return
18032	}
18033	if !done {
18034		grlr.Response.Response = future.Response()
18035		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
18036		return
18037	}
18038	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18039	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
18040		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
18041		if err != nil {
18042			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
18043		}
18044	}
18045	return
18046}
18047
18048// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
18049// results of a long-running operation.
18050type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
18051	azure.FutureAPI
18052	// Result returns the result of the asynchronous operation.
18053	// If the operation has not completed it will return an error.
18054	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
18055}
18056
18057// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18058func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
18059	var azFuture azure.Future
18060	if err := json.Unmarshal(body, &azFuture); err != nil {
18061		return err
18062	}
18063	future.FutureAPI = &azFuture
18064	future.Result = future.result
18065	return nil
18066}
18067
18068// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
18069func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
18070	var done bool
18071	done, err = future.DoneWithContext(context.Background(), client)
18072	if err != nil {
18073		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
18074		return
18075	}
18076	if !done {
18077		vcipp.Response.Response = future.Response()
18078		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
18079		return
18080	}
18081	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18082	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
18083		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
18084		if err != nil {
18085			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
18086		}
18087	}
18088	return
18089}
18090
18091// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
18092// results of a long-running operation.
18093type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
18094	azure.FutureAPI
18095	// Result returns the result of the asynchronous operation.
18096	// If the operation has not completed it will return an error.
18097	Result func(VirtualNetworkGatewaysClient) (String, error)
18098}
18099
18100// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18101func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
18102	var azFuture azure.Future
18103	if err := json.Unmarshal(body, &azFuture); err != nil {
18104		return err
18105	}
18106	future.FutureAPI = &azFuture
18107	future.Result = future.result
18108	return nil
18109}
18110
18111// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
18112func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
18113	var done bool
18114	done, err = future.DoneWithContext(context.Background(), client)
18115	if err != nil {
18116		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
18117		return
18118	}
18119	if !done {
18120		s.Response.Response = future.Response()
18121		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
18122		return
18123	}
18124	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18125	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
18126		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
18127		if err != nil {
18128			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
18129		}
18130	}
18131	return
18132}
18133
18134// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
18135type VirtualNetworkGatewaySku struct {
18136	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
18137	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
18138	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
18139	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
18140	// Capacity - The capacity.
18141	Capacity *int32 `json:"capacity,omitempty"`
18142}
18143
18144// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
18145// long-running operation.
18146type VirtualNetworkGatewaysResetFuture struct {
18147	azure.FutureAPI
18148	// Result returns the result of the asynchronous operation.
18149	// If the operation has not completed it will return an error.
18150	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
18151}
18152
18153// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18154func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
18155	var azFuture azure.Future
18156	if err := json.Unmarshal(body, &azFuture); err != nil {
18157		return err
18158	}
18159	future.FutureAPI = &azFuture
18160	future.Result = future.result
18161	return nil
18162}
18163
18164// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
18165func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
18166	var done bool
18167	done, err = future.DoneWithContext(context.Background(), client)
18168	if err != nil {
18169		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
18170		return
18171	}
18172	if !done {
18173		vng.Response.Response = future.Response()
18174		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
18175		return
18176	}
18177	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18178	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
18179		vng, err = client.ResetResponder(vng.Response.Response)
18180		if err != nil {
18181			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
18182		}
18183	}
18184	return
18185}
18186
18187// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
18188// results of a long-running operation.
18189type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
18190	azure.FutureAPI
18191	// Result returns the result of the asynchronous operation.
18192	// If the operation has not completed it will return an error.
18193	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
18194}
18195
18196// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18197func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
18198	var azFuture azure.Future
18199	if err := json.Unmarshal(body, &azFuture); err != nil {
18200		return err
18201	}
18202	future.FutureAPI = &azFuture
18203	future.Result = future.result
18204	return nil
18205}
18206
18207// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
18208func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
18209	var done bool
18210	done, err = future.DoneWithContext(context.Background(), client)
18211	if err != nil {
18212		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
18213		return
18214	}
18215	if !done {
18216		vcipp.Response.Response = future.Response()
18217		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
18218		return
18219	}
18220	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18221	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
18222		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
18223		if err != nil {
18224			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
18225		}
18226	}
18227	return
18228}
18229
18230// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18231// long-running operation.
18232type VirtualNetworkGatewaysUpdateTagsFuture struct {
18233	azure.FutureAPI
18234	// Result returns the result of the asynchronous operation.
18235	// If the operation has not completed it will return an error.
18236	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
18237}
18238
18239// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18240func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18241	var azFuture azure.Future
18242	if err := json.Unmarshal(body, &azFuture); err != nil {
18243		return err
18244	}
18245	future.FutureAPI = &azFuture
18246	future.Result = future.result
18247	return nil
18248}
18249
18250// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
18251func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
18252	var done bool
18253	done, err = future.DoneWithContext(context.Background(), client)
18254	if err != nil {
18255		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18256		return
18257	}
18258	if !done {
18259		vng.Response.Response = future.Response()
18260		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
18261		return
18262	}
18263	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18264	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
18265		vng, err = client.UpdateTagsResponder(vng.Response.Response)
18266		if err != nil {
18267			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
18268		}
18269	}
18270	return
18271}
18272
18273// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
18274type VirtualNetworkListResult struct {
18275	autorest.Response `json:"-"`
18276	// Value - Gets a list of VirtualNetwork resources in a resource group.
18277	Value *[]VirtualNetwork `json:"value,omitempty"`
18278	// NextLink - The URL to get the next set of results.
18279	NextLink *string `json:"nextLink,omitempty"`
18280}
18281
18282// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
18283type VirtualNetworkListResultIterator struct {
18284	i    int
18285	page VirtualNetworkListResultPage
18286}
18287
18288// NextWithContext advances to the next value.  If there was an error making
18289// the request the iterator does not advance and the error is returned.
18290func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
18291	if tracing.IsEnabled() {
18292		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
18293		defer func() {
18294			sc := -1
18295			if iter.Response().Response.Response != nil {
18296				sc = iter.Response().Response.Response.StatusCode
18297			}
18298			tracing.EndSpan(ctx, sc, err)
18299		}()
18300	}
18301	iter.i++
18302	if iter.i < len(iter.page.Values()) {
18303		return nil
18304	}
18305	err = iter.page.NextWithContext(ctx)
18306	if err != nil {
18307		iter.i--
18308		return err
18309	}
18310	iter.i = 0
18311	return nil
18312}
18313
18314// Next advances to the next value.  If there was an error making
18315// the request the iterator does not advance and the error is returned.
18316// Deprecated: Use NextWithContext() instead.
18317func (iter *VirtualNetworkListResultIterator) Next() error {
18318	return iter.NextWithContext(context.Background())
18319}
18320
18321// NotDone returns true if the enumeration should be started or is not yet complete.
18322func (iter VirtualNetworkListResultIterator) NotDone() bool {
18323	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18324}
18325
18326// Response returns the raw server response from the last page request.
18327func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
18328	return iter.page.Response()
18329}
18330
18331// Value returns the current value or a zero-initialized value if the
18332// iterator has advanced beyond the end of the collection.
18333func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
18334	if !iter.page.NotDone() {
18335		return VirtualNetwork{}
18336	}
18337	return iter.page.Values()[iter.i]
18338}
18339
18340// Creates a new instance of the VirtualNetworkListResultIterator type.
18341func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
18342	return VirtualNetworkListResultIterator{page: page}
18343}
18344
18345// IsEmpty returns true if the ListResult contains no values.
18346func (vnlr VirtualNetworkListResult) IsEmpty() bool {
18347	return vnlr.Value == nil || len(*vnlr.Value) == 0
18348}
18349
18350// hasNextLink returns true if the NextLink is not empty.
18351func (vnlr VirtualNetworkListResult) hasNextLink() bool {
18352	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
18353}
18354
18355// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
18356// It returns nil if no more results exist.
18357func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
18358	if !vnlr.hasNextLink() {
18359		return nil, nil
18360	}
18361	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18362		autorest.AsJSON(),
18363		autorest.AsGet(),
18364		autorest.WithBaseURL(to.String(vnlr.NextLink)))
18365}
18366
18367// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
18368type VirtualNetworkListResultPage struct {
18369	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
18370	vnlr VirtualNetworkListResult
18371}
18372
18373// NextWithContext advances to the next page of values.  If there was an error making
18374// the request the page does not advance and the error is returned.
18375func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
18376	if tracing.IsEnabled() {
18377		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
18378		defer func() {
18379			sc := -1
18380			if page.Response().Response.Response != nil {
18381				sc = page.Response().Response.Response.StatusCode
18382			}
18383			tracing.EndSpan(ctx, sc, err)
18384		}()
18385	}
18386	for {
18387		next, err := page.fn(ctx, page.vnlr)
18388		if err != nil {
18389			return err
18390		}
18391		page.vnlr = next
18392		if !next.hasNextLink() || !next.IsEmpty() {
18393			break
18394		}
18395	}
18396	return nil
18397}
18398
18399// Next advances to the next page of values.  If there was an error making
18400// the request the page does not advance and the error is returned.
18401// Deprecated: Use NextWithContext() instead.
18402func (page *VirtualNetworkListResultPage) Next() error {
18403	return page.NextWithContext(context.Background())
18404}
18405
18406// NotDone returns true if the page enumeration should be started or is not yet complete.
18407func (page VirtualNetworkListResultPage) NotDone() bool {
18408	return !page.vnlr.IsEmpty()
18409}
18410
18411// Response returns the raw server response from the last page request.
18412func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
18413	return page.vnlr
18414}
18415
18416// Values returns the slice of values for the current page or nil if there are no values.
18417func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
18418	if page.vnlr.IsEmpty() {
18419		return nil
18420	}
18421	return *page.vnlr.Value
18422}
18423
18424// Creates a new instance of the VirtualNetworkListResultPage type.
18425func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
18426	return VirtualNetworkListResultPage{
18427		fn:   getNextPage,
18428		vnlr: cur,
18429	}
18430}
18431
18432// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
18433type VirtualNetworkListUsageResult struct {
18434	autorest.Response `json:"-"`
18435	// Value - READ-ONLY; VirtualNetwork usage stats.
18436	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
18437	// NextLink - The URL to get the next set of results.
18438	NextLink *string `json:"nextLink,omitempty"`
18439}
18440
18441// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
18442func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
18443	objectMap := make(map[string]interface{})
18444	if vnlur.NextLink != nil {
18445		objectMap["nextLink"] = vnlur.NextLink
18446	}
18447	return json.Marshal(objectMap)
18448}
18449
18450// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
18451// values.
18452type VirtualNetworkListUsageResultIterator struct {
18453	i    int
18454	page VirtualNetworkListUsageResultPage
18455}
18456
18457// NextWithContext advances to the next value.  If there was an error making
18458// the request the iterator does not advance and the error is returned.
18459func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
18460	if tracing.IsEnabled() {
18461		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
18462		defer func() {
18463			sc := -1
18464			if iter.Response().Response.Response != nil {
18465				sc = iter.Response().Response.Response.StatusCode
18466			}
18467			tracing.EndSpan(ctx, sc, err)
18468		}()
18469	}
18470	iter.i++
18471	if iter.i < len(iter.page.Values()) {
18472		return nil
18473	}
18474	err = iter.page.NextWithContext(ctx)
18475	if err != nil {
18476		iter.i--
18477		return err
18478	}
18479	iter.i = 0
18480	return nil
18481}
18482
18483// Next advances to the next value.  If there was an error making
18484// the request the iterator does not advance and the error is returned.
18485// Deprecated: Use NextWithContext() instead.
18486func (iter *VirtualNetworkListUsageResultIterator) Next() error {
18487	return iter.NextWithContext(context.Background())
18488}
18489
18490// NotDone returns true if the enumeration should be started or is not yet complete.
18491func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
18492	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18493}
18494
18495// Response returns the raw server response from the last page request.
18496func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
18497	return iter.page.Response()
18498}
18499
18500// Value returns the current value or a zero-initialized value if the
18501// iterator has advanced beyond the end of the collection.
18502func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
18503	if !iter.page.NotDone() {
18504		return VirtualNetworkUsage{}
18505	}
18506	return iter.page.Values()[iter.i]
18507}
18508
18509// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
18510func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
18511	return VirtualNetworkListUsageResultIterator{page: page}
18512}
18513
18514// IsEmpty returns true if the ListResult contains no values.
18515func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
18516	return vnlur.Value == nil || len(*vnlur.Value) == 0
18517}
18518
18519// hasNextLink returns true if the NextLink is not empty.
18520func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
18521	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
18522}
18523
18524// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
18525// It returns nil if no more results exist.
18526func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
18527	if !vnlur.hasNextLink() {
18528		return nil, nil
18529	}
18530	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18531		autorest.AsJSON(),
18532		autorest.AsGet(),
18533		autorest.WithBaseURL(to.String(vnlur.NextLink)))
18534}
18535
18536// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
18537type VirtualNetworkListUsageResultPage struct {
18538	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
18539	vnlur VirtualNetworkListUsageResult
18540}
18541
18542// NextWithContext advances to the next page of values.  If there was an error making
18543// the request the page does not advance and the error is returned.
18544func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
18545	if tracing.IsEnabled() {
18546		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
18547		defer func() {
18548			sc := -1
18549			if page.Response().Response.Response != nil {
18550				sc = page.Response().Response.Response.StatusCode
18551			}
18552			tracing.EndSpan(ctx, sc, err)
18553		}()
18554	}
18555	for {
18556		next, err := page.fn(ctx, page.vnlur)
18557		if err != nil {
18558			return err
18559		}
18560		page.vnlur = next
18561		if !next.hasNextLink() || !next.IsEmpty() {
18562			break
18563		}
18564	}
18565	return nil
18566}
18567
18568// Next advances to the next page of values.  If there was an error making
18569// the request the page does not advance and the error is returned.
18570// Deprecated: Use NextWithContext() instead.
18571func (page *VirtualNetworkListUsageResultPage) Next() error {
18572	return page.NextWithContext(context.Background())
18573}
18574
18575// NotDone returns true if the page enumeration should be started or is not yet complete.
18576func (page VirtualNetworkListUsageResultPage) NotDone() bool {
18577	return !page.vnlur.IsEmpty()
18578}
18579
18580// Response returns the raw server response from the last page request.
18581func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
18582	return page.vnlur
18583}
18584
18585// Values returns the slice of values for the current page or nil if there are no values.
18586func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
18587	if page.vnlur.IsEmpty() {
18588		return nil
18589	}
18590	return *page.vnlur.Value
18591}
18592
18593// Creates a new instance of the VirtualNetworkListUsageResultPage type.
18594func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
18595	return VirtualNetworkListUsageResultPage{
18596		fn:    getNextPage,
18597		vnlur: cur,
18598	}
18599}
18600
18601// VirtualNetworkPeering peerings in a virtual network resource.
18602type VirtualNetworkPeering struct {
18603	autorest.Response `json:"-"`
18604	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
18605	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
18606	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18607	Name *string `json:"name,omitempty"`
18608	// Etag - A unique read-only string that changes whenever the resource is updated.
18609	Etag *string `json:"etag,omitempty"`
18610	// ID - Resource ID.
18611	ID *string `json:"id,omitempty"`
18612}
18613
18614// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
18615func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
18616	objectMap := make(map[string]interface{})
18617	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
18618		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
18619	}
18620	if vnp.Name != nil {
18621		objectMap["name"] = vnp.Name
18622	}
18623	if vnp.Etag != nil {
18624		objectMap["etag"] = vnp.Etag
18625	}
18626	if vnp.ID != nil {
18627		objectMap["id"] = vnp.ID
18628	}
18629	return json.Marshal(objectMap)
18630}
18631
18632// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
18633func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
18634	var m map[string]*json.RawMessage
18635	err := json.Unmarshal(body, &m)
18636	if err != nil {
18637		return err
18638	}
18639	for k, v := range m {
18640		switch k {
18641		case "properties":
18642			if v != nil {
18643				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
18644				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
18645				if err != nil {
18646					return err
18647				}
18648				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
18649			}
18650		case "name":
18651			if v != nil {
18652				var name string
18653				err = json.Unmarshal(*v, &name)
18654				if err != nil {
18655					return err
18656				}
18657				vnp.Name = &name
18658			}
18659		case "etag":
18660			if v != nil {
18661				var etag string
18662				err = json.Unmarshal(*v, &etag)
18663				if err != nil {
18664					return err
18665				}
18666				vnp.Etag = &etag
18667			}
18668		case "id":
18669			if v != nil {
18670				var ID string
18671				err = json.Unmarshal(*v, &ID)
18672				if err != nil {
18673					return err
18674				}
18675				vnp.ID = &ID
18676			}
18677		}
18678	}
18679
18680	return nil
18681}
18682
18683// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
18684// belong to a virtual network.
18685type VirtualNetworkPeeringListResult struct {
18686	autorest.Response `json:"-"`
18687	// Value - The peerings in a virtual network.
18688	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
18689	// NextLink - The URL to get the next set of results.
18690	NextLink *string `json:"nextLink,omitempty"`
18691}
18692
18693// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
18694// values.
18695type VirtualNetworkPeeringListResultIterator struct {
18696	i    int
18697	page VirtualNetworkPeeringListResultPage
18698}
18699
18700// NextWithContext advances to the next value.  If there was an error making
18701// the request the iterator does not advance and the error is returned.
18702func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
18703	if tracing.IsEnabled() {
18704		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
18705		defer func() {
18706			sc := -1
18707			if iter.Response().Response.Response != nil {
18708				sc = iter.Response().Response.Response.StatusCode
18709			}
18710			tracing.EndSpan(ctx, sc, err)
18711		}()
18712	}
18713	iter.i++
18714	if iter.i < len(iter.page.Values()) {
18715		return nil
18716	}
18717	err = iter.page.NextWithContext(ctx)
18718	if err != nil {
18719		iter.i--
18720		return err
18721	}
18722	iter.i = 0
18723	return nil
18724}
18725
18726// Next advances to the next value.  If there was an error making
18727// the request the iterator does not advance and the error is returned.
18728// Deprecated: Use NextWithContext() instead.
18729func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
18730	return iter.NextWithContext(context.Background())
18731}
18732
18733// NotDone returns true if the enumeration should be started or is not yet complete.
18734func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
18735	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18736}
18737
18738// Response returns the raw server response from the last page request.
18739func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
18740	return iter.page.Response()
18741}
18742
18743// Value returns the current value or a zero-initialized value if the
18744// iterator has advanced beyond the end of the collection.
18745func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
18746	if !iter.page.NotDone() {
18747		return VirtualNetworkPeering{}
18748	}
18749	return iter.page.Values()[iter.i]
18750}
18751
18752// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
18753func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
18754	return VirtualNetworkPeeringListResultIterator{page: page}
18755}
18756
18757// IsEmpty returns true if the ListResult contains no values.
18758func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
18759	return vnplr.Value == nil || len(*vnplr.Value) == 0
18760}
18761
18762// hasNextLink returns true if the NextLink is not empty.
18763func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
18764	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
18765}
18766
18767// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
18768// It returns nil if no more results exist.
18769func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
18770	if !vnplr.hasNextLink() {
18771		return nil, nil
18772	}
18773	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18774		autorest.AsJSON(),
18775		autorest.AsGet(),
18776		autorest.WithBaseURL(to.String(vnplr.NextLink)))
18777}
18778
18779// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
18780type VirtualNetworkPeeringListResultPage struct {
18781	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
18782	vnplr VirtualNetworkPeeringListResult
18783}
18784
18785// NextWithContext advances to the next page of values.  If there was an error making
18786// the request the page does not advance and the error is returned.
18787func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
18788	if tracing.IsEnabled() {
18789		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
18790		defer func() {
18791			sc := -1
18792			if page.Response().Response.Response != nil {
18793				sc = page.Response().Response.Response.StatusCode
18794			}
18795			tracing.EndSpan(ctx, sc, err)
18796		}()
18797	}
18798	for {
18799		next, err := page.fn(ctx, page.vnplr)
18800		if err != nil {
18801			return err
18802		}
18803		page.vnplr = next
18804		if !next.hasNextLink() || !next.IsEmpty() {
18805			break
18806		}
18807	}
18808	return nil
18809}
18810
18811// Next advances to the next page of values.  If there was an error making
18812// the request the page does not advance and the error is returned.
18813// Deprecated: Use NextWithContext() instead.
18814func (page *VirtualNetworkPeeringListResultPage) Next() error {
18815	return page.NextWithContext(context.Background())
18816}
18817
18818// NotDone returns true if the page enumeration should be started or is not yet complete.
18819func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
18820	return !page.vnplr.IsEmpty()
18821}
18822
18823// Response returns the raw server response from the last page request.
18824func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
18825	return page.vnplr
18826}
18827
18828// Values returns the slice of values for the current page or nil if there are no values.
18829func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
18830	if page.vnplr.IsEmpty() {
18831		return nil
18832	}
18833	return *page.vnplr.Value
18834}
18835
18836// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
18837func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
18838	return VirtualNetworkPeeringListResultPage{
18839		fn:    getNextPage,
18840		vnplr: cur,
18841	}
18842}
18843
18844// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
18845type VirtualNetworkPeeringPropertiesFormat struct {
18846	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
18847	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
18848	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
18849	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
18850	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
18851	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
18852	// 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.
18853	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
18854	// 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).
18855	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
18856	// RemoteAddressSpace - The reference of the remote virtual network address space.
18857	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
18858	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
18859	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
18860	// ProvisioningState - The provisioning state of the resource.
18861	ProvisioningState *string `json:"provisioningState,omitempty"`
18862}
18863
18864// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18865// long-running operation.
18866type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
18867	azure.FutureAPI
18868	// Result returns the result of the asynchronous operation.
18869	// If the operation has not completed it will return an error.
18870	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
18871}
18872
18873// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18874func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18875	var azFuture azure.Future
18876	if err := json.Unmarshal(body, &azFuture); err != nil {
18877		return err
18878	}
18879	future.FutureAPI = &azFuture
18880	future.Result = future.result
18881	return nil
18882}
18883
18884// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
18885func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
18886	var done bool
18887	done, err = future.DoneWithContext(context.Background(), client)
18888	if err != nil {
18889		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18890		return
18891	}
18892	if !done {
18893		vnp.Response.Response = future.Response()
18894		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
18895		return
18896	}
18897	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18898	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
18899		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
18900		if err != nil {
18901			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
18902		}
18903	}
18904	return
18905}
18906
18907// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
18908// long-running operation.
18909type VirtualNetworkPeeringsDeleteFuture struct {
18910	azure.FutureAPI
18911	// Result returns the result of the asynchronous operation.
18912	// If the operation has not completed it will return an error.
18913	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
18914}
18915
18916// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18917func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
18918	var azFuture azure.Future
18919	if err := json.Unmarshal(body, &azFuture); err != nil {
18920		return err
18921	}
18922	future.FutureAPI = &azFuture
18923	future.Result = future.result
18924	return nil
18925}
18926
18927// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
18928func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
18929	var done bool
18930	done, err = future.DoneWithContext(context.Background(), client)
18931	if err != nil {
18932		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
18933		return
18934	}
18935	if !done {
18936		ar.Response = future.Response()
18937		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
18938		return
18939	}
18940	ar.Response = future.Response()
18941	return
18942}
18943
18944// VirtualNetworkPropertiesFormat properties of the virtual network.
18945type VirtualNetworkPropertiesFormat struct {
18946	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
18947	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
18948	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
18949	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
18950	// Subnets - A list of subnets in a Virtual Network.
18951	Subnets *[]Subnet `json:"subnets,omitempty"`
18952	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
18953	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
18954	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
18955	ResourceGUID *string `json:"resourceGuid,omitempty"`
18956	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18957	ProvisioningState *string `json:"provisioningState,omitempty"`
18958	// 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.
18959	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
18960	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
18961	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
18962	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
18963	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
18964}
18965
18966// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18967// long-running operation.
18968type VirtualNetworksCreateOrUpdateFuture struct {
18969	azure.FutureAPI
18970	// Result returns the result of the asynchronous operation.
18971	// If the operation has not completed it will return an error.
18972	Result func(VirtualNetworksClient) (VirtualNetwork, error)
18973}
18974
18975// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18976func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18977	var azFuture azure.Future
18978	if err := json.Unmarshal(body, &azFuture); err != nil {
18979		return err
18980	}
18981	future.FutureAPI = &azFuture
18982	future.Result = future.result
18983	return nil
18984}
18985
18986// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
18987func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
18988	var done bool
18989	done, err = future.DoneWithContext(context.Background(), client)
18990	if err != nil {
18991		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18992		return
18993	}
18994	if !done {
18995		vn.Response.Response = future.Response()
18996		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
18997		return
18998	}
18999	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19000	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
19001		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
19002		if err != nil {
19003			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
19004		}
19005	}
19006	return
19007}
19008
19009// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19010// operation.
19011type VirtualNetworksDeleteFuture struct {
19012	azure.FutureAPI
19013	// Result returns the result of the asynchronous operation.
19014	// If the operation has not completed it will return an error.
19015	Result func(VirtualNetworksClient) (autorest.Response, error)
19016}
19017
19018// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19019func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
19020	var azFuture azure.Future
19021	if err := json.Unmarshal(body, &azFuture); err != nil {
19022		return err
19023	}
19024	future.FutureAPI = &azFuture
19025	future.Result = future.result
19026	return nil
19027}
19028
19029// result is the default implementation for VirtualNetworksDeleteFuture.Result.
19030func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
19031	var done bool
19032	done, err = future.DoneWithContext(context.Background(), client)
19033	if err != nil {
19034		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
19035		return
19036	}
19037	if !done {
19038		ar.Response = future.Response()
19039		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
19040		return
19041	}
19042	ar.Response = future.Response()
19043	return
19044}
19045
19046// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19047// long-running operation.
19048type VirtualNetworksUpdateTagsFuture struct {
19049	azure.FutureAPI
19050	// Result returns the result of the asynchronous operation.
19051	// If the operation has not completed it will return an error.
19052	Result func(VirtualNetworksClient) (VirtualNetwork, error)
19053}
19054
19055// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19056func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19057	var azFuture azure.Future
19058	if err := json.Unmarshal(body, &azFuture); err != nil {
19059		return err
19060	}
19061	future.FutureAPI = &azFuture
19062	future.Result = future.result
19063	return nil
19064}
19065
19066// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
19067func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
19068	var done bool
19069	done, err = future.DoneWithContext(context.Background(), client)
19070	if err != nil {
19071		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19072		return
19073	}
19074	if !done {
19075		vn.Response.Response = future.Response()
19076		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
19077		return
19078	}
19079	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19080	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
19081		vn, err = client.UpdateTagsResponder(vn.Response.Response)
19082		if err != nil {
19083			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
19084		}
19085	}
19086	return
19087}
19088
19089// VirtualNetworkUsage usage details for subnet.
19090type VirtualNetworkUsage struct {
19091	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
19092	CurrentValue *float64 `json:"currentValue,omitempty"`
19093	// ID - READ-ONLY; Subnet identifier.
19094	ID *string `json:"id,omitempty"`
19095	// Limit - READ-ONLY; Indicates the size of the subnet.
19096	Limit *float64 `json:"limit,omitempty"`
19097	// Name - READ-ONLY; The name containing common and localized value for usage.
19098	Name *VirtualNetworkUsageName `json:"name,omitempty"`
19099	// Unit - READ-ONLY; Usage units. Returns 'Count'
19100	Unit *string `json:"unit,omitempty"`
19101}
19102
19103// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
19104func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
19105	objectMap := make(map[string]interface{})
19106	return json.Marshal(objectMap)
19107}
19108
19109// VirtualNetworkUsageName usage strings container.
19110type VirtualNetworkUsageName struct {
19111	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
19112	LocalizedValue *string `json:"localizedValue,omitempty"`
19113	// Value - READ-ONLY; Subnet size and usage string.
19114	Value *string `json:"value,omitempty"`
19115}
19116
19117// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
19118func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
19119	objectMap := make(map[string]interface{})
19120	return json.Marshal(objectMap)
19121}
19122
19123// VpnClientConfiguration vpnClientConfiguration for P2S client.
19124type VpnClientConfiguration struct {
19125	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
19126	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
19127	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
19128	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
19129	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
19130	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
19131	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
19132	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
19133	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
19134	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
19135	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
19136	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
19137	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
19138	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
19139}
19140
19141// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
19142type VpnClientIPsecParameters struct {
19143	autorest.Response `json:"-"`
19144	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
19145	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
19146	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
19147	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
19148	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
19149	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
19150	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
19151	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
19152	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
19153	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
19154	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
19155	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
19156	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
19157	DhGroup DhGroup `json:"dhGroup,omitempty"`
19158	// 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'
19159	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
19160}
19161
19162// VpnClientParameters vpn Client Parameters for package generation
19163type VpnClientParameters struct {
19164	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
19165	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
19166	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
19167	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
19168	// 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.
19169	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
19170	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
19171	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
19172}
19173
19174// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
19175type VpnClientRevokedCertificate struct {
19176	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
19177	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
19178	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19179	Name *string `json:"name,omitempty"`
19180	// Etag - A unique read-only string that changes whenever the resource is updated.
19181	Etag *string `json:"etag,omitempty"`
19182	// ID - Resource ID.
19183	ID *string `json:"id,omitempty"`
19184}
19185
19186// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
19187func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
19188	objectMap := make(map[string]interface{})
19189	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
19190		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
19191	}
19192	if vcrc.Name != nil {
19193		objectMap["name"] = vcrc.Name
19194	}
19195	if vcrc.Etag != nil {
19196		objectMap["etag"] = vcrc.Etag
19197	}
19198	if vcrc.ID != nil {
19199		objectMap["id"] = vcrc.ID
19200	}
19201	return json.Marshal(objectMap)
19202}
19203
19204// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
19205func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
19206	var m map[string]*json.RawMessage
19207	err := json.Unmarshal(body, &m)
19208	if err != nil {
19209		return err
19210	}
19211	for k, v := range m {
19212		switch k {
19213		case "properties":
19214			if v != nil {
19215				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
19216				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
19217				if err != nil {
19218					return err
19219				}
19220				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
19221			}
19222		case "name":
19223			if v != nil {
19224				var name string
19225				err = json.Unmarshal(*v, &name)
19226				if err != nil {
19227					return err
19228				}
19229				vcrc.Name = &name
19230			}
19231		case "etag":
19232			if v != nil {
19233				var etag string
19234				err = json.Unmarshal(*v, &etag)
19235				if err != nil {
19236					return err
19237				}
19238				vcrc.Etag = &etag
19239			}
19240		case "id":
19241			if v != nil {
19242				var ID string
19243				err = json.Unmarshal(*v, &ID)
19244				if err != nil {
19245					return err
19246				}
19247				vcrc.ID = &ID
19248			}
19249		}
19250	}
19251
19252	return nil
19253}
19254
19255// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
19256// network gateway.
19257type VpnClientRevokedCertificatePropertiesFormat struct {
19258	// Thumbprint - The revoked VPN client certificate thumbprint.
19259	Thumbprint *string `json:"thumbprint,omitempty"`
19260	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19261	ProvisioningState *string `json:"provisioningState,omitempty"`
19262}
19263
19264// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
19265func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19266	objectMap := make(map[string]interface{})
19267	if vcrcpf.Thumbprint != nil {
19268		objectMap["thumbprint"] = vcrcpf.Thumbprint
19269	}
19270	return json.Marshal(objectMap)
19271}
19272
19273// VpnClientRootCertificate VPN client root certificate of virtual network gateway
19274type VpnClientRootCertificate struct {
19275	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
19276	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19277	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19278	Name *string `json:"name,omitempty"`
19279	// Etag - A unique read-only string that changes whenever the resource is updated.
19280	Etag *string `json:"etag,omitempty"`
19281	// ID - Resource ID.
19282	ID *string `json:"id,omitempty"`
19283}
19284
19285// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
19286func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
19287	objectMap := make(map[string]interface{})
19288	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
19289		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
19290	}
19291	if vcrc.Name != nil {
19292		objectMap["name"] = vcrc.Name
19293	}
19294	if vcrc.Etag != nil {
19295		objectMap["etag"] = vcrc.Etag
19296	}
19297	if vcrc.ID != nil {
19298		objectMap["id"] = vcrc.ID
19299	}
19300	return json.Marshal(objectMap)
19301}
19302
19303// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
19304func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
19305	var m map[string]*json.RawMessage
19306	err := json.Unmarshal(body, &m)
19307	if err != nil {
19308		return err
19309	}
19310	for k, v := range m {
19311		switch k {
19312		case "properties":
19313			if v != nil {
19314				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
19315				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
19316				if err != nil {
19317					return err
19318				}
19319				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
19320			}
19321		case "name":
19322			if v != nil {
19323				var name string
19324				err = json.Unmarshal(*v, &name)
19325				if err != nil {
19326					return err
19327				}
19328				vcrc.Name = &name
19329			}
19330		case "etag":
19331			if v != nil {
19332				var etag string
19333				err = json.Unmarshal(*v, &etag)
19334				if err != nil {
19335					return err
19336				}
19337				vcrc.Etag = &etag
19338			}
19339		case "id":
19340			if v != nil {
19341				var ID string
19342				err = json.Unmarshal(*v, &ID)
19343				if err != nil {
19344					return err
19345				}
19346				vcrc.ID = &ID
19347			}
19348		}
19349	}
19350
19351	return nil
19352}
19353
19354// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
19355type VpnClientRootCertificatePropertiesFormat struct {
19356	// PublicCertData - The certificate public data.
19357	PublicCertData *string `json:"publicCertData,omitempty"`
19358	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19359	ProvisioningState *string `json:"provisioningState,omitempty"`
19360}
19361
19362// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
19363func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19364	objectMap := make(map[string]interface{})
19365	if vcrcpf.PublicCertData != nil {
19366		objectMap["publicCertData"] = vcrcpf.PublicCertData
19367	}
19368	return json.Marshal(objectMap)
19369}
19370
19371// VpnDeviceScriptParameters vpn device configuration script generation parameters
19372type VpnDeviceScriptParameters struct {
19373	// Vendor - The vendor for the vpn device.
19374	Vendor *string `json:"vendor,omitempty"`
19375	// DeviceFamily - The device family for the vpn device.
19376	DeviceFamily *string `json:"deviceFamily,omitempty"`
19377	// FirmwareVersion - The firmware version for the vpn device.
19378	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
19379}
19380
19381// Watcher network watcher in a resource group.
19382type Watcher struct {
19383	autorest.Response `json:"-"`
19384	// Etag - A unique read-only string that changes whenever the resource is updated.
19385	Etag                     *string `json:"etag,omitempty"`
19386	*WatcherPropertiesFormat `json:"properties,omitempty"`
19387	// ID - Resource ID.
19388	ID *string `json:"id,omitempty"`
19389	// Name - READ-ONLY; Resource name.
19390	Name *string `json:"name,omitempty"`
19391	// Type - READ-ONLY; Resource type.
19392	Type *string `json:"type,omitempty"`
19393	// Location - Resource location.
19394	Location *string `json:"location,omitempty"`
19395	// Tags - Resource tags.
19396	Tags map[string]*string `json:"tags"`
19397}
19398
19399// MarshalJSON is the custom marshaler for Watcher.
19400func (w Watcher) MarshalJSON() ([]byte, error) {
19401	objectMap := make(map[string]interface{})
19402	if w.Etag != nil {
19403		objectMap["etag"] = w.Etag
19404	}
19405	if w.WatcherPropertiesFormat != nil {
19406		objectMap["properties"] = w.WatcherPropertiesFormat
19407	}
19408	if w.ID != nil {
19409		objectMap["id"] = w.ID
19410	}
19411	if w.Location != nil {
19412		objectMap["location"] = w.Location
19413	}
19414	if w.Tags != nil {
19415		objectMap["tags"] = w.Tags
19416	}
19417	return json.Marshal(objectMap)
19418}
19419
19420// UnmarshalJSON is the custom unmarshaler for Watcher struct.
19421func (w *Watcher) UnmarshalJSON(body []byte) error {
19422	var m map[string]*json.RawMessage
19423	err := json.Unmarshal(body, &m)
19424	if err != nil {
19425		return err
19426	}
19427	for k, v := range m {
19428		switch k {
19429		case "etag":
19430			if v != nil {
19431				var etag string
19432				err = json.Unmarshal(*v, &etag)
19433				if err != nil {
19434					return err
19435				}
19436				w.Etag = &etag
19437			}
19438		case "properties":
19439			if v != nil {
19440				var watcherPropertiesFormat WatcherPropertiesFormat
19441				err = json.Unmarshal(*v, &watcherPropertiesFormat)
19442				if err != nil {
19443					return err
19444				}
19445				w.WatcherPropertiesFormat = &watcherPropertiesFormat
19446			}
19447		case "id":
19448			if v != nil {
19449				var ID string
19450				err = json.Unmarshal(*v, &ID)
19451				if err != nil {
19452					return err
19453				}
19454				w.ID = &ID
19455			}
19456		case "name":
19457			if v != nil {
19458				var name string
19459				err = json.Unmarshal(*v, &name)
19460				if err != nil {
19461					return err
19462				}
19463				w.Name = &name
19464			}
19465		case "type":
19466			if v != nil {
19467				var typeVar string
19468				err = json.Unmarshal(*v, &typeVar)
19469				if err != nil {
19470					return err
19471				}
19472				w.Type = &typeVar
19473			}
19474		case "location":
19475			if v != nil {
19476				var location string
19477				err = json.Unmarshal(*v, &location)
19478				if err != nil {
19479					return err
19480				}
19481				w.Location = &location
19482			}
19483		case "tags":
19484			if v != nil {
19485				var tags map[string]*string
19486				err = json.Unmarshal(*v, &tags)
19487				if err != nil {
19488					return err
19489				}
19490				w.Tags = tags
19491			}
19492		}
19493	}
19494
19495	return nil
19496}
19497
19498// WatcherListResult list of network watcher resources.
19499type WatcherListResult struct {
19500	autorest.Response `json:"-"`
19501	Value             *[]Watcher `json:"value,omitempty"`
19502}
19503
19504// WatcherPropertiesFormat the network watcher properties.
19505type WatcherPropertiesFormat struct {
19506	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19507	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19508}
19509
19510// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
19511func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
19512	objectMap := make(map[string]interface{})
19513	return json.Marshal(objectMap)
19514}
19515
19516// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
19517// long-running operation.
19518type WatchersCheckConnectivityFuture struct {
19519	azure.FutureAPI
19520	// Result returns the result of the asynchronous operation.
19521	// If the operation has not completed it will return an error.
19522	Result func(WatchersClient) (ConnectivityInformation, error)
19523}
19524
19525// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19526func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
19527	var azFuture azure.Future
19528	if err := json.Unmarshal(body, &azFuture); err != nil {
19529		return err
19530	}
19531	future.FutureAPI = &azFuture
19532	future.Result = future.result
19533	return nil
19534}
19535
19536// result is the default implementation for WatchersCheckConnectivityFuture.Result.
19537func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
19538	var done bool
19539	done, err = future.DoneWithContext(context.Background(), client)
19540	if err != nil {
19541		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
19542		return
19543	}
19544	if !done {
19545		ci.Response.Response = future.Response()
19546		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
19547		return
19548	}
19549	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19550	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
19551		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
19552		if err != nil {
19553			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
19554		}
19555	}
19556	return
19557}
19558
19559// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19560// operation.
19561type WatchersDeleteFuture struct {
19562	azure.FutureAPI
19563	// Result returns the result of the asynchronous operation.
19564	// If the operation has not completed it will return an error.
19565	Result func(WatchersClient) (autorest.Response, error)
19566}
19567
19568// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19569func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
19570	var azFuture azure.Future
19571	if err := json.Unmarshal(body, &azFuture); err != nil {
19572		return err
19573	}
19574	future.FutureAPI = &azFuture
19575	future.Result = future.result
19576	return nil
19577}
19578
19579// result is the default implementation for WatchersDeleteFuture.Result.
19580func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
19581	var done bool
19582	done, err = future.DoneWithContext(context.Background(), client)
19583	if err != nil {
19584		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
19585		return
19586	}
19587	if !done {
19588		ar.Response = future.Response()
19589		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
19590		return
19591	}
19592	ar.Response = future.Response()
19593	return
19594}
19595
19596// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
19597// long-running operation.
19598type WatchersGetAzureReachabilityReportFuture struct {
19599	azure.FutureAPI
19600	// Result returns the result of the asynchronous operation.
19601	// If the operation has not completed it will return an error.
19602	Result func(WatchersClient) (AzureReachabilityReport, error)
19603}
19604
19605// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19606func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
19607	var azFuture azure.Future
19608	if err := json.Unmarshal(body, &azFuture); err != nil {
19609		return err
19610	}
19611	future.FutureAPI = &azFuture
19612	future.Result = future.result
19613	return nil
19614}
19615
19616// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
19617func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
19618	var done bool
19619	done, err = future.DoneWithContext(context.Background(), client)
19620	if err != nil {
19621		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
19622		return
19623	}
19624	if !done {
19625		arr.Response.Response = future.Response()
19626		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
19627		return
19628	}
19629	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19630	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
19631		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
19632		if err != nil {
19633			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
19634		}
19635	}
19636	return
19637}
19638
19639// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
19640// long-running operation.
19641type WatchersGetFlowLogStatusFuture struct {
19642	azure.FutureAPI
19643	// Result returns the result of the asynchronous operation.
19644	// If the operation has not completed it will return an error.
19645	Result func(WatchersClient) (FlowLogInformation, error)
19646}
19647
19648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19649func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
19650	var azFuture azure.Future
19651	if err := json.Unmarshal(body, &azFuture); err != nil {
19652		return err
19653	}
19654	future.FutureAPI = &azFuture
19655	future.Result = future.result
19656	return nil
19657}
19658
19659// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
19660func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
19661	var done bool
19662	done, err = future.DoneWithContext(context.Background(), client)
19663	if err != nil {
19664		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
19665		return
19666	}
19667	if !done {
19668		fli.Response.Response = future.Response()
19669		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
19670		return
19671	}
19672	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19673	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
19674		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
19675		if err != nil {
19676			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
19677		}
19678	}
19679	return
19680}
19681
19682// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
19683// operation.
19684type WatchersGetNextHopFuture struct {
19685	azure.FutureAPI
19686	// Result returns the result of the asynchronous operation.
19687	// If the operation has not completed it will return an error.
19688	Result func(WatchersClient) (NextHopResult, error)
19689}
19690
19691// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19692func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
19693	var azFuture azure.Future
19694	if err := json.Unmarshal(body, &azFuture); err != nil {
19695		return err
19696	}
19697	future.FutureAPI = &azFuture
19698	future.Result = future.result
19699	return nil
19700}
19701
19702// result is the default implementation for WatchersGetNextHopFuture.Result.
19703func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
19704	var done bool
19705	done, err = future.DoneWithContext(context.Background(), client)
19706	if err != nil {
19707		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
19708		return
19709	}
19710	if !done {
19711		nhr.Response.Response = future.Response()
19712		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
19713		return
19714	}
19715	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19716	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
19717		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
19718		if err != nil {
19719			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
19720		}
19721	}
19722	return
19723}
19724
19725// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
19726// long-running operation.
19727type WatchersGetTroubleshootingFuture struct {
19728	azure.FutureAPI
19729	// Result returns the result of the asynchronous operation.
19730	// If the operation has not completed it will return an error.
19731	Result func(WatchersClient) (TroubleshootingResult, error)
19732}
19733
19734// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19735func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
19736	var azFuture azure.Future
19737	if err := json.Unmarshal(body, &azFuture); err != nil {
19738		return err
19739	}
19740	future.FutureAPI = &azFuture
19741	future.Result = future.result
19742	return nil
19743}
19744
19745// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
19746func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
19747	var done bool
19748	done, err = future.DoneWithContext(context.Background(), client)
19749	if err != nil {
19750		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
19751		return
19752	}
19753	if !done {
19754		tr.Response.Response = future.Response()
19755		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
19756		return
19757	}
19758	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19759	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
19760		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
19761		if err != nil {
19762			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
19763		}
19764	}
19765	return
19766}
19767
19768// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
19769// long-running operation.
19770type WatchersGetTroubleshootingResultFuture struct {
19771	azure.FutureAPI
19772	// Result returns the result of the asynchronous operation.
19773	// If the operation has not completed it will return an error.
19774	Result func(WatchersClient) (TroubleshootingResult, error)
19775}
19776
19777// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19778func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
19779	var azFuture azure.Future
19780	if err := json.Unmarshal(body, &azFuture); err != nil {
19781		return err
19782	}
19783	future.FutureAPI = &azFuture
19784	future.Result = future.result
19785	return nil
19786}
19787
19788// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
19789func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
19790	var done bool
19791	done, err = future.DoneWithContext(context.Background(), client)
19792	if err != nil {
19793		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
19794		return
19795	}
19796	if !done {
19797		tr.Response.Response = future.Response()
19798		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
19799		return
19800	}
19801	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19802	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
19803		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
19804		if err != nil {
19805			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
19806		}
19807	}
19808	return
19809}
19810
19811// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
19812// long-running operation.
19813type WatchersGetVMSecurityRulesFuture struct {
19814	azure.FutureAPI
19815	// Result returns the result of the asynchronous operation.
19816	// If the operation has not completed it will return an error.
19817	Result func(WatchersClient) (SecurityGroupViewResult, error)
19818}
19819
19820// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19821func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
19822	var azFuture azure.Future
19823	if err := json.Unmarshal(body, &azFuture); err != nil {
19824		return err
19825	}
19826	future.FutureAPI = &azFuture
19827	future.Result = future.result
19828	return nil
19829}
19830
19831// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
19832func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
19833	var done bool
19834	done, err = future.DoneWithContext(context.Background(), client)
19835	if err != nil {
19836		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
19837		return
19838	}
19839	if !done {
19840		sgvr.Response.Response = future.Response()
19841		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
19842		return
19843	}
19844	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19845	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
19846		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
19847		if err != nil {
19848			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
19849		}
19850	}
19851	return
19852}
19853
19854// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
19855// long-running operation.
19856type WatchersListAvailableProvidersFuture struct {
19857	azure.FutureAPI
19858	// Result returns the result of the asynchronous operation.
19859	// If the operation has not completed it will return an error.
19860	Result func(WatchersClient) (AvailableProvidersList, error)
19861}
19862
19863// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19864func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
19865	var azFuture azure.Future
19866	if err := json.Unmarshal(body, &azFuture); err != nil {
19867		return err
19868	}
19869	future.FutureAPI = &azFuture
19870	future.Result = future.result
19871	return nil
19872}
19873
19874// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
19875func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
19876	var done bool
19877	done, err = future.DoneWithContext(context.Background(), client)
19878	if err != nil {
19879		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
19880		return
19881	}
19882	if !done {
19883		apl.Response.Response = future.Response()
19884		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
19885		return
19886	}
19887	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19888	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
19889		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
19890		if err != nil {
19891			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
19892		}
19893	}
19894	return
19895}
19896
19897// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
19898// long-running operation.
19899type WatchersSetFlowLogConfigurationFuture struct {
19900	azure.FutureAPI
19901	// Result returns the result of the asynchronous operation.
19902	// If the operation has not completed it will return an error.
19903	Result func(WatchersClient) (FlowLogInformation, error)
19904}
19905
19906// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19907func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
19908	var azFuture azure.Future
19909	if err := json.Unmarshal(body, &azFuture); err != nil {
19910		return err
19911	}
19912	future.FutureAPI = &azFuture
19913	future.Result = future.result
19914	return nil
19915}
19916
19917// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
19918func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
19919	var done bool
19920	done, err = future.DoneWithContext(context.Background(), client)
19921	if err != nil {
19922		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
19923		return
19924	}
19925	if !done {
19926		fli.Response.Response = future.Response()
19927		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
19928		return
19929	}
19930	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19931	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
19932		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
19933		if err != nil {
19934			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
19935		}
19936	}
19937	return
19938}
19939
19940// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
19941// operation.
19942type WatchersVerifyIPFlowFuture struct {
19943	azure.FutureAPI
19944	// Result returns the result of the asynchronous operation.
19945	// If the operation has not completed it will return an error.
19946	Result func(WatchersClient) (VerificationIPFlowResult, error)
19947}
19948
19949// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19950func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
19951	var azFuture azure.Future
19952	if err := json.Unmarshal(body, &azFuture); err != nil {
19953		return err
19954	}
19955	future.FutureAPI = &azFuture
19956	future.Result = future.result
19957	return nil
19958}
19959
19960// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
19961func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
19962	var done bool
19963	done, err = future.DoneWithContext(context.Background(), client)
19964	if err != nil {
19965		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
19966		return
19967	}
19968	if !done {
19969		vifr.Response.Response = future.Response()
19970		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
19971		return
19972	}
19973	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19974	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
19975		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
19976		if err != nil {
19977			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
19978		}
19979	}
19980	return
19981}
19982