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/2017-11-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}
2677
2678// ApplicationSecurityGroup an application security group in a resource group.
2679type ApplicationSecurityGroup struct {
2680	autorest.Response `json:"-"`
2681	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2682	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2683	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2684	Etag *string `json:"etag,omitempty"`
2685	// ID - Resource ID.
2686	ID *string `json:"id,omitempty"`
2687	// Name - READ-ONLY; Resource name.
2688	Name *string `json:"name,omitempty"`
2689	// Type - READ-ONLY; Resource type.
2690	Type *string `json:"type,omitempty"`
2691	// Location - Resource location.
2692	Location *string `json:"location,omitempty"`
2693	// Tags - Resource tags.
2694	Tags map[string]*string `json:"tags"`
2695}
2696
2697// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2698func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2699	objectMap := make(map[string]interface{})
2700	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2701		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2702	}
2703	if asg.ID != nil {
2704		objectMap["id"] = asg.ID
2705	}
2706	if asg.Location != nil {
2707		objectMap["location"] = asg.Location
2708	}
2709	if asg.Tags != nil {
2710		objectMap["tags"] = asg.Tags
2711	}
2712	return json.Marshal(objectMap)
2713}
2714
2715// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2716func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2717	var m map[string]*json.RawMessage
2718	err := json.Unmarshal(body, &m)
2719	if err != nil {
2720		return err
2721	}
2722	for k, v := range m {
2723		switch k {
2724		case "properties":
2725			if v != nil {
2726				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2727				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2728				if err != nil {
2729					return err
2730				}
2731				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2732			}
2733		case "etag":
2734			if v != nil {
2735				var etag string
2736				err = json.Unmarshal(*v, &etag)
2737				if err != nil {
2738					return err
2739				}
2740				asg.Etag = &etag
2741			}
2742		case "id":
2743			if v != nil {
2744				var ID string
2745				err = json.Unmarshal(*v, &ID)
2746				if err != nil {
2747					return err
2748				}
2749				asg.ID = &ID
2750			}
2751		case "name":
2752			if v != nil {
2753				var name string
2754				err = json.Unmarshal(*v, &name)
2755				if err != nil {
2756					return err
2757				}
2758				asg.Name = &name
2759			}
2760		case "type":
2761			if v != nil {
2762				var typeVar string
2763				err = json.Unmarshal(*v, &typeVar)
2764				if err != nil {
2765					return err
2766				}
2767				asg.Type = &typeVar
2768			}
2769		case "location":
2770			if v != nil {
2771				var location string
2772				err = json.Unmarshal(*v, &location)
2773				if err != nil {
2774					return err
2775				}
2776				asg.Location = &location
2777			}
2778		case "tags":
2779			if v != nil {
2780				var tags map[string]*string
2781				err = json.Unmarshal(*v, &tags)
2782				if err != nil {
2783					return err
2784				}
2785				asg.Tags = tags
2786			}
2787		}
2788	}
2789
2790	return nil
2791}
2792
2793// ApplicationSecurityGroupListResult a list of application security groups.
2794type ApplicationSecurityGroupListResult struct {
2795	autorest.Response `json:"-"`
2796	// Value - A list of application security groups.
2797	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2798	// NextLink - READ-ONLY; The URL to get the next set of results.
2799	NextLink *string `json:"nextLink,omitempty"`
2800}
2801
2802// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2803func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2804	objectMap := make(map[string]interface{})
2805	if asglr.Value != nil {
2806		objectMap["value"] = asglr.Value
2807	}
2808	return json.Marshal(objectMap)
2809}
2810
2811// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2812// ApplicationSecurityGroup values.
2813type ApplicationSecurityGroupListResultIterator struct {
2814	i    int
2815	page ApplicationSecurityGroupListResultPage
2816}
2817
2818// NextWithContext advances to the next value.  If there was an error making
2819// the request the iterator does not advance and the error is returned.
2820func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2821	if tracing.IsEnabled() {
2822		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2823		defer func() {
2824			sc := -1
2825			if iter.Response().Response.Response != nil {
2826				sc = iter.Response().Response.Response.StatusCode
2827			}
2828			tracing.EndSpan(ctx, sc, err)
2829		}()
2830	}
2831	iter.i++
2832	if iter.i < len(iter.page.Values()) {
2833		return nil
2834	}
2835	err = iter.page.NextWithContext(ctx)
2836	if err != nil {
2837		iter.i--
2838		return err
2839	}
2840	iter.i = 0
2841	return nil
2842}
2843
2844// Next advances to the next value.  If there was an error making
2845// the request the iterator does not advance and the error is returned.
2846// Deprecated: Use NextWithContext() instead.
2847func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2848	return iter.NextWithContext(context.Background())
2849}
2850
2851// NotDone returns true if the enumeration should be started or is not yet complete.
2852func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2854}
2855
2856// Response returns the raw server response from the last page request.
2857func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2858	return iter.page.Response()
2859}
2860
2861// Value returns the current value or a zero-initialized value if the
2862// iterator has advanced beyond the end of the collection.
2863func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2864	if !iter.page.NotDone() {
2865		return ApplicationSecurityGroup{}
2866	}
2867	return iter.page.Values()[iter.i]
2868}
2869
2870// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2871func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2872	return ApplicationSecurityGroupListResultIterator{page: page}
2873}
2874
2875// IsEmpty returns true if the ListResult contains no values.
2876func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2877	return asglr.Value == nil || len(*asglr.Value) == 0
2878}
2879
2880// hasNextLink returns true if the NextLink is not empty.
2881func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2882	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2883}
2884
2885// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2886// It returns nil if no more results exist.
2887func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2888	if !asglr.hasNextLink() {
2889		return nil, nil
2890	}
2891	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2892		autorest.AsJSON(),
2893		autorest.AsGet(),
2894		autorest.WithBaseURL(to.String(asglr.NextLink)))
2895}
2896
2897// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2898type ApplicationSecurityGroupListResultPage struct {
2899	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2900	asglr ApplicationSecurityGroupListResult
2901}
2902
2903// NextWithContext advances to the next page of values.  If there was an error making
2904// the request the page does not advance and the error is returned.
2905func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2906	if tracing.IsEnabled() {
2907		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2908		defer func() {
2909			sc := -1
2910			if page.Response().Response.Response != nil {
2911				sc = page.Response().Response.Response.StatusCode
2912			}
2913			tracing.EndSpan(ctx, sc, err)
2914		}()
2915	}
2916	for {
2917		next, err := page.fn(ctx, page.asglr)
2918		if err != nil {
2919			return err
2920		}
2921		page.asglr = next
2922		if !next.hasNextLink() || !next.IsEmpty() {
2923			break
2924		}
2925	}
2926	return nil
2927}
2928
2929// Next advances to the next page of values.  If there was an error making
2930// the request the page does not advance and the error is returned.
2931// Deprecated: Use NextWithContext() instead.
2932func (page *ApplicationSecurityGroupListResultPage) Next() error {
2933	return page.NextWithContext(context.Background())
2934}
2935
2936// NotDone returns true if the page enumeration should be started or is not yet complete.
2937func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2938	return !page.asglr.IsEmpty()
2939}
2940
2941// Response returns the raw server response from the last page request.
2942func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2943	return page.asglr
2944}
2945
2946// Values returns the slice of values for the current page or nil if there are no values.
2947func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2948	if page.asglr.IsEmpty() {
2949		return nil
2950	}
2951	return *page.asglr.Value
2952}
2953
2954// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2955func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2956	return ApplicationSecurityGroupListResultPage{
2957		fn:    getNextPage,
2958		asglr: cur,
2959	}
2960}
2961
2962// ApplicationSecurityGroupPropertiesFormat application security group properties.
2963type ApplicationSecurityGroupPropertiesFormat struct {
2964	// 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.
2965	ResourceGUID *string `json:"resourceGuid,omitempty"`
2966	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2967	ProvisioningState *string `json:"provisioningState,omitempty"`
2968}
2969
2970// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
2971func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
2972	objectMap := make(map[string]interface{})
2973	return json.Marshal(objectMap)
2974}
2975
2976// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2977// of a long-running operation.
2978type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2979	azure.FutureAPI
2980	// Result returns the result of the asynchronous operation.
2981	// If the operation has not completed it will return an error.
2982	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2983}
2984
2985// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2986func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2987	var azFuture azure.Future
2988	if err := json.Unmarshal(body, &azFuture); err != nil {
2989		return err
2990	}
2991	future.FutureAPI = &azFuture
2992	future.Result = future.result
2993	return nil
2994}
2995
2996// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
2997func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
2998	var done bool
2999	done, err = future.DoneWithContext(context.Background(), client)
3000	if err != nil {
3001		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3002		return
3003	}
3004	if !done {
3005		asg.Response.Response = future.Response()
3006		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3007		return
3008	}
3009	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3010	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3011		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3012		if err != nil {
3013			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3014		}
3015	}
3016	return
3017}
3018
3019// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3020// long-running operation.
3021type ApplicationSecurityGroupsDeleteFuture struct {
3022	azure.FutureAPI
3023	// Result returns the result of the asynchronous operation.
3024	// If the operation has not completed it will return an error.
3025	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3026}
3027
3028// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3029func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3030	var azFuture azure.Future
3031	if err := json.Unmarshal(body, &azFuture); err != nil {
3032		return err
3033	}
3034	future.FutureAPI = &azFuture
3035	future.Result = future.result
3036	return nil
3037}
3038
3039// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3040func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3041	var done bool
3042	done, err = future.DoneWithContext(context.Background(), client)
3043	if err != nil {
3044		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3045		return
3046	}
3047	if !done {
3048		ar.Response = future.Response()
3049		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3050		return
3051	}
3052	ar.Response = future.Response()
3053	return
3054}
3055
3056// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3057// that belongs to an ExpressRouteCircuit.
3058type AuthorizationListResult struct {
3059	autorest.Response `json:"-"`
3060	// Value - The authorizations in an ExpressRoute Circuit.
3061	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3062	// NextLink - The URL to get the next set of results.
3063	NextLink *string `json:"nextLink,omitempty"`
3064}
3065
3066// AuthorizationListResultIterator provides access to a complete listing of
3067// ExpressRouteCircuitAuthorization values.
3068type AuthorizationListResultIterator struct {
3069	i    int
3070	page AuthorizationListResultPage
3071}
3072
3073// NextWithContext advances to the next value.  If there was an error making
3074// the request the iterator does not advance and the error is returned.
3075func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3076	if tracing.IsEnabled() {
3077		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3078		defer func() {
3079			sc := -1
3080			if iter.Response().Response.Response != nil {
3081				sc = iter.Response().Response.Response.StatusCode
3082			}
3083			tracing.EndSpan(ctx, sc, err)
3084		}()
3085	}
3086	iter.i++
3087	if iter.i < len(iter.page.Values()) {
3088		return nil
3089	}
3090	err = iter.page.NextWithContext(ctx)
3091	if err != nil {
3092		iter.i--
3093		return err
3094	}
3095	iter.i = 0
3096	return nil
3097}
3098
3099// Next advances to the next value.  If there was an error making
3100// the request the iterator does not advance and the error is returned.
3101// Deprecated: Use NextWithContext() instead.
3102func (iter *AuthorizationListResultIterator) Next() error {
3103	return iter.NextWithContext(context.Background())
3104}
3105
3106// NotDone returns true if the enumeration should be started or is not yet complete.
3107func (iter AuthorizationListResultIterator) NotDone() bool {
3108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3109}
3110
3111// Response returns the raw server response from the last page request.
3112func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3113	return iter.page.Response()
3114}
3115
3116// Value returns the current value or a zero-initialized value if the
3117// iterator has advanced beyond the end of the collection.
3118func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3119	if !iter.page.NotDone() {
3120		return ExpressRouteCircuitAuthorization{}
3121	}
3122	return iter.page.Values()[iter.i]
3123}
3124
3125// Creates a new instance of the AuthorizationListResultIterator type.
3126func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3127	return AuthorizationListResultIterator{page: page}
3128}
3129
3130// IsEmpty returns true if the ListResult contains no values.
3131func (alr AuthorizationListResult) IsEmpty() bool {
3132	return alr.Value == nil || len(*alr.Value) == 0
3133}
3134
3135// hasNextLink returns true if the NextLink is not empty.
3136func (alr AuthorizationListResult) hasNextLink() bool {
3137	return alr.NextLink != nil && len(*alr.NextLink) != 0
3138}
3139
3140// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3141// It returns nil if no more results exist.
3142func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3143	if !alr.hasNextLink() {
3144		return nil, nil
3145	}
3146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3147		autorest.AsJSON(),
3148		autorest.AsGet(),
3149		autorest.WithBaseURL(to.String(alr.NextLink)))
3150}
3151
3152// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3153type AuthorizationListResultPage struct {
3154	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3155	alr AuthorizationListResult
3156}
3157
3158// NextWithContext advances to the next page of values.  If there was an error making
3159// the request the page does not advance and the error is returned.
3160func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3161	if tracing.IsEnabled() {
3162		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3163		defer func() {
3164			sc := -1
3165			if page.Response().Response.Response != nil {
3166				sc = page.Response().Response.Response.StatusCode
3167			}
3168			tracing.EndSpan(ctx, sc, err)
3169		}()
3170	}
3171	for {
3172		next, err := page.fn(ctx, page.alr)
3173		if err != nil {
3174			return err
3175		}
3176		page.alr = next
3177		if !next.hasNextLink() || !next.IsEmpty() {
3178			break
3179		}
3180	}
3181	return nil
3182}
3183
3184// Next advances to the next page of values.  If there was an error making
3185// the request the page does not advance and the error is returned.
3186// Deprecated: Use NextWithContext() instead.
3187func (page *AuthorizationListResultPage) Next() error {
3188	return page.NextWithContext(context.Background())
3189}
3190
3191// NotDone returns true if the page enumeration should be started or is not yet complete.
3192func (page AuthorizationListResultPage) NotDone() bool {
3193	return !page.alr.IsEmpty()
3194}
3195
3196// Response returns the raw server response from the last page request.
3197func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3198	return page.alr
3199}
3200
3201// Values returns the slice of values for the current page or nil if there are no values.
3202func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3203	if page.alr.IsEmpty() {
3204		return nil
3205	}
3206	return *page.alr.Value
3207}
3208
3209// Creates a new instance of the AuthorizationListResultPage type.
3210func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3211	return AuthorizationListResultPage{
3212		fn:  getNextPage,
3213		alr: cur,
3214	}
3215}
3216
3217// AuthorizationPropertiesFormat ...
3218type AuthorizationPropertiesFormat struct {
3219	// AuthorizationKey - The authorization key.
3220	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3221	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3222	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3223	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3224	ProvisioningState *string `json:"provisioningState,omitempty"`
3225}
3226
3227// Availability availability of the metric.
3228type Availability struct {
3229	// TimeGrain - The time grain of the availability.
3230	TimeGrain *string `json:"timeGrain,omitempty"`
3231	// Retention - The retention of the availability.
3232	Retention *string `json:"retention,omitempty"`
3233	// BlobDuration - Duration of the availability blob.
3234	BlobDuration *string `json:"blobDuration,omitempty"`
3235}
3236
3237// AvailableProvidersList list of available countries with details.
3238type AvailableProvidersList struct {
3239	autorest.Response `json:"-"`
3240	// Countries - List of available countries.
3241	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3242}
3243
3244// AvailableProvidersListCity city or town details.
3245type AvailableProvidersListCity struct {
3246	// CityName - The city or town name.
3247	CityName *string `json:"cityName,omitempty"`
3248	// Providers - A list of Internet service providers.
3249	Providers *[]string `json:"providers,omitempty"`
3250}
3251
3252// AvailableProvidersListCountry country details.
3253type AvailableProvidersListCountry struct {
3254	// CountryName - The country name.
3255	CountryName *string `json:"countryName,omitempty"`
3256	// Providers - A list of Internet service providers.
3257	Providers *[]string `json:"providers,omitempty"`
3258	// States - List of available states in the country.
3259	States *[]AvailableProvidersListState `json:"states,omitempty"`
3260}
3261
3262// AvailableProvidersListParameters constraints that determine the list of available Internet service
3263// providers.
3264type AvailableProvidersListParameters struct {
3265	// AzureLocations - A list of Azure regions.
3266	AzureLocations *[]string `json:"azureLocations,omitempty"`
3267	// Country - The country for available providers list.
3268	Country *string `json:"country,omitempty"`
3269	// State - The state for available providers list.
3270	State *string `json:"state,omitempty"`
3271	// City - The city or town for available providers list.
3272	City *string `json:"city,omitempty"`
3273}
3274
3275// AvailableProvidersListState state details.
3276type AvailableProvidersListState struct {
3277	// StateName - The state name.
3278	StateName *string `json:"stateName,omitempty"`
3279	// Providers - A list of Internet service providers.
3280	Providers *[]string `json:"providers,omitempty"`
3281	// Cities - List of available cities or towns in the state.
3282	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3283}
3284
3285// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3286// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3287// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3288// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3289// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3290// and error information regarding the failure.
3291type AzureAsyncOperationResult struct {
3292	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3293	Status OperationStatus `json:"status,omitempty"`
3294	Error  *Error          `json:"error,omitempty"`
3295}
3296
3297// AzureReachabilityReport azure reachability report details.
3298type AzureReachabilityReport struct {
3299	autorest.Response `json:"-"`
3300	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3301	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3302	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3303	// ReachabilityReport - List of Azure reachability report items.
3304	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3305}
3306
3307// AzureReachabilityReportItem azure reachability report details for a given provider location.
3308type AzureReachabilityReportItem struct {
3309	// Provider - The Internet service provider.
3310	Provider *string `json:"provider,omitempty"`
3311	// AzureLocation - The Azure region.
3312	AzureLocation *string `json:"azureLocation,omitempty"`
3313	// Latencies - List of latency details for each of the time series.
3314	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3315}
3316
3317// AzureReachabilityReportLatencyInfo details on latency for a time series.
3318type AzureReachabilityReportLatencyInfo struct {
3319	// TimeStamp - The time stamp.
3320	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3321	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3322	Score *int32 `json:"score,omitempty"`
3323}
3324
3325// AzureReachabilityReportLocation parameters that define a geographic location.
3326type AzureReachabilityReportLocation struct {
3327	// Country - The name of the country.
3328	Country *string `json:"country,omitempty"`
3329	// State - The name of the state.
3330	State *string `json:"state,omitempty"`
3331	// City - The name of the city or town.
3332	City *string `json:"city,omitempty"`
3333}
3334
3335// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3336type AzureReachabilityReportParameters struct {
3337	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3338	// Providers - List of Internet service providers.
3339	Providers *[]string `json:"providers,omitempty"`
3340	// AzureLocations - Optional Azure regions to scope the query to.
3341	AzureLocations *[]string `json:"azureLocations,omitempty"`
3342	// StartTime - The start time for the Azure reachability report.
3343	StartTime *date.Time `json:"startTime,omitempty"`
3344	// EndTime - The end time for the Azure reachability report.
3345	EndTime *date.Time `json:"endTime,omitempty"`
3346}
3347
3348// BackendAddressPool pool of backend IP addresses.
3349type BackendAddressPool struct {
3350	autorest.Response `json:"-"`
3351	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3352	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3353	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3354	Name *string `json:"name,omitempty"`
3355	// Etag - A unique read-only string that changes whenever the resource is updated.
3356	Etag *string `json:"etag,omitempty"`
3357	// ID - Resource ID.
3358	ID *string `json:"id,omitempty"`
3359}
3360
3361// MarshalJSON is the custom marshaler for BackendAddressPool.
3362func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3363	objectMap := make(map[string]interface{})
3364	if bap.BackendAddressPoolPropertiesFormat != nil {
3365		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3366	}
3367	if bap.Name != nil {
3368		objectMap["name"] = bap.Name
3369	}
3370	if bap.Etag != nil {
3371		objectMap["etag"] = bap.Etag
3372	}
3373	if bap.ID != nil {
3374		objectMap["id"] = bap.ID
3375	}
3376	return json.Marshal(objectMap)
3377}
3378
3379// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3380func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3381	var m map[string]*json.RawMessage
3382	err := json.Unmarshal(body, &m)
3383	if err != nil {
3384		return err
3385	}
3386	for k, v := range m {
3387		switch k {
3388		case "properties":
3389			if v != nil {
3390				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3391				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3392				if err != nil {
3393					return err
3394				}
3395				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3396			}
3397		case "name":
3398			if v != nil {
3399				var name string
3400				err = json.Unmarshal(*v, &name)
3401				if err != nil {
3402					return err
3403				}
3404				bap.Name = &name
3405			}
3406		case "etag":
3407			if v != nil {
3408				var etag string
3409				err = json.Unmarshal(*v, &etag)
3410				if err != nil {
3411					return err
3412				}
3413				bap.Etag = &etag
3414			}
3415		case "id":
3416			if v != nil {
3417				var ID string
3418				err = json.Unmarshal(*v, &ID)
3419				if err != nil {
3420					return err
3421				}
3422				bap.ID = &ID
3423			}
3424		}
3425	}
3426
3427	return nil
3428}
3429
3430// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3431type BackendAddressPoolPropertiesFormat struct {
3432	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3433	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3434	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3435	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3436	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3437	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3438	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3439	ProvisioningState *string `json:"provisioningState,omitempty"`
3440}
3441
3442// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3443func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3444	objectMap := make(map[string]interface{})
3445	if bappf.ProvisioningState != nil {
3446		objectMap["provisioningState"] = bappf.ProvisioningState
3447	}
3448	return json.Marshal(objectMap)
3449}
3450
3451// BGPCommunity contains bgp community information offered in Service Community resources.
3452type BGPCommunity struct {
3453	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3454	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3455	// CommunityName - The name of the bgp community. e.g. Skype.
3456	CommunityName *string `json:"communityName,omitempty"`
3457	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3458	CommunityValue *string `json:"communityValue,omitempty"`
3459	// CommunityPrefixes - The prefixes that the bgp community contains.
3460	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3461	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3462	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3463	// ServiceGroup - The service group of the bgp community contains.
3464	ServiceGroup *string `json:"serviceGroup,omitempty"`
3465}
3466
3467// BgpPeerStatus BGP peer status details
3468type BgpPeerStatus struct {
3469	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3470	LocalAddress *string `json:"localAddress,omitempty"`
3471	// Neighbor - READ-ONLY; The remote BGP peer
3472	Neighbor *string `json:"neighbor,omitempty"`
3473	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3474	Asn *int32 `json:"asn,omitempty"`
3475	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3476	State BgpPeerState `json:"state,omitempty"`
3477	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3478	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3479	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3480	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3481	// MessagesSent - READ-ONLY; The number of BGP messages sent
3482	MessagesSent *int64 `json:"messagesSent,omitempty"`
3483	// MessagesReceived - READ-ONLY; The number of BGP messages received
3484	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3485}
3486
3487// MarshalJSON is the custom marshaler for BgpPeerStatus.
3488func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
3489	objectMap := make(map[string]interface{})
3490	return json.Marshal(objectMap)
3491}
3492
3493// BgpPeerStatusListResult response for list BGP peer status API service call
3494type BgpPeerStatusListResult struct {
3495	autorest.Response `json:"-"`
3496	// Value - List of BGP peers
3497	Value *[]BgpPeerStatus `json:"value,omitempty"`
3498}
3499
3500// BgpServiceCommunity service Community Properties.
3501type BgpServiceCommunity struct {
3502	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3503	// ID - Resource ID.
3504	ID *string `json:"id,omitempty"`
3505	// Name - READ-ONLY; Resource name.
3506	Name *string `json:"name,omitempty"`
3507	// Type - READ-ONLY; Resource type.
3508	Type *string `json:"type,omitempty"`
3509	// Location - Resource location.
3510	Location *string `json:"location,omitempty"`
3511	// Tags - Resource tags.
3512	Tags map[string]*string `json:"tags"`
3513}
3514
3515// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3516func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3517	objectMap := make(map[string]interface{})
3518	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3519		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3520	}
3521	if bsc.ID != nil {
3522		objectMap["id"] = bsc.ID
3523	}
3524	if bsc.Location != nil {
3525		objectMap["location"] = bsc.Location
3526	}
3527	if bsc.Tags != nil {
3528		objectMap["tags"] = bsc.Tags
3529	}
3530	return json.Marshal(objectMap)
3531}
3532
3533// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3534func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3535	var m map[string]*json.RawMessage
3536	err := json.Unmarshal(body, &m)
3537	if err != nil {
3538		return err
3539	}
3540	for k, v := range m {
3541		switch k {
3542		case "properties":
3543			if v != nil {
3544				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3545				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3546				if err != nil {
3547					return err
3548				}
3549				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3550			}
3551		case "id":
3552			if v != nil {
3553				var ID string
3554				err = json.Unmarshal(*v, &ID)
3555				if err != nil {
3556					return err
3557				}
3558				bsc.ID = &ID
3559			}
3560		case "name":
3561			if v != nil {
3562				var name string
3563				err = json.Unmarshal(*v, &name)
3564				if err != nil {
3565					return err
3566				}
3567				bsc.Name = &name
3568			}
3569		case "type":
3570			if v != nil {
3571				var typeVar string
3572				err = json.Unmarshal(*v, &typeVar)
3573				if err != nil {
3574					return err
3575				}
3576				bsc.Type = &typeVar
3577			}
3578		case "location":
3579			if v != nil {
3580				var location string
3581				err = json.Unmarshal(*v, &location)
3582				if err != nil {
3583					return err
3584				}
3585				bsc.Location = &location
3586			}
3587		case "tags":
3588			if v != nil {
3589				var tags map[string]*string
3590				err = json.Unmarshal(*v, &tags)
3591				if err != nil {
3592					return err
3593				}
3594				bsc.Tags = tags
3595			}
3596		}
3597	}
3598
3599	return nil
3600}
3601
3602// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3603type BgpServiceCommunityListResult struct {
3604	autorest.Response `json:"-"`
3605	// Value - A list of service community resources.
3606	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3607	// NextLink - The URL to get the next set of results.
3608	NextLink *string `json:"nextLink,omitempty"`
3609}
3610
3611// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3612// values.
3613type BgpServiceCommunityListResultIterator struct {
3614	i    int
3615	page BgpServiceCommunityListResultPage
3616}
3617
3618// NextWithContext advances to the next value.  If there was an error making
3619// the request the iterator does not advance and the error is returned.
3620func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3621	if tracing.IsEnabled() {
3622		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3623		defer func() {
3624			sc := -1
3625			if iter.Response().Response.Response != nil {
3626				sc = iter.Response().Response.Response.StatusCode
3627			}
3628			tracing.EndSpan(ctx, sc, err)
3629		}()
3630	}
3631	iter.i++
3632	if iter.i < len(iter.page.Values()) {
3633		return nil
3634	}
3635	err = iter.page.NextWithContext(ctx)
3636	if err != nil {
3637		iter.i--
3638		return err
3639	}
3640	iter.i = 0
3641	return nil
3642}
3643
3644// Next advances to the next value.  If there was an error making
3645// the request the iterator does not advance and the error is returned.
3646// Deprecated: Use NextWithContext() instead.
3647func (iter *BgpServiceCommunityListResultIterator) Next() error {
3648	return iter.NextWithContext(context.Background())
3649}
3650
3651// NotDone returns true if the enumeration should be started or is not yet complete.
3652func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3653	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3654}
3655
3656// Response returns the raw server response from the last page request.
3657func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3658	return iter.page.Response()
3659}
3660
3661// Value returns the current value or a zero-initialized value if the
3662// iterator has advanced beyond the end of the collection.
3663func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3664	if !iter.page.NotDone() {
3665		return BgpServiceCommunity{}
3666	}
3667	return iter.page.Values()[iter.i]
3668}
3669
3670// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3671func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3672	return BgpServiceCommunityListResultIterator{page: page}
3673}
3674
3675// IsEmpty returns true if the ListResult contains no values.
3676func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3677	return bsclr.Value == nil || len(*bsclr.Value) == 0
3678}
3679
3680// hasNextLink returns true if the NextLink is not empty.
3681func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3682	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3683}
3684
3685// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3686// It returns nil if no more results exist.
3687func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3688	if !bsclr.hasNextLink() {
3689		return nil, nil
3690	}
3691	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3692		autorest.AsJSON(),
3693		autorest.AsGet(),
3694		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3695}
3696
3697// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3698type BgpServiceCommunityListResultPage struct {
3699	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3700	bsclr BgpServiceCommunityListResult
3701}
3702
3703// NextWithContext advances to the next page of values.  If there was an error making
3704// the request the page does not advance and the error is returned.
3705func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3706	if tracing.IsEnabled() {
3707		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3708		defer func() {
3709			sc := -1
3710			if page.Response().Response.Response != nil {
3711				sc = page.Response().Response.Response.StatusCode
3712			}
3713			tracing.EndSpan(ctx, sc, err)
3714		}()
3715	}
3716	for {
3717		next, err := page.fn(ctx, page.bsclr)
3718		if err != nil {
3719			return err
3720		}
3721		page.bsclr = next
3722		if !next.hasNextLink() || !next.IsEmpty() {
3723			break
3724		}
3725	}
3726	return nil
3727}
3728
3729// Next advances to the next page of values.  If there was an error making
3730// the request the page does not advance and the error is returned.
3731// Deprecated: Use NextWithContext() instead.
3732func (page *BgpServiceCommunityListResultPage) Next() error {
3733	return page.NextWithContext(context.Background())
3734}
3735
3736// NotDone returns true if the page enumeration should be started or is not yet complete.
3737func (page BgpServiceCommunityListResultPage) NotDone() bool {
3738	return !page.bsclr.IsEmpty()
3739}
3740
3741// Response returns the raw server response from the last page request.
3742func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3743	return page.bsclr
3744}
3745
3746// Values returns the slice of values for the current page or nil if there are no values.
3747func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3748	if page.bsclr.IsEmpty() {
3749		return nil
3750	}
3751	return *page.bsclr.Value
3752}
3753
3754// Creates a new instance of the BgpServiceCommunityListResultPage type.
3755func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3756	return BgpServiceCommunityListResultPage{
3757		fn:    getNextPage,
3758		bsclr: cur,
3759	}
3760}
3761
3762// BgpServiceCommunityPropertiesFormat properties of Service Community.
3763type BgpServiceCommunityPropertiesFormat struct {
3764	// ServiceName - The name of the bgp community. e.g. Skype.
3765	ServiceName *string `json:"serviceName,omitempty"`
3766	// BgpCommunities - Get a list of bgp communities.
3767	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3768}
3769
3770// BgpSettings BGP settings details
3771type BgpSettings struct {
3772	// Asn - The BGP speaker's ASN.
3773	Asn *int64 `json:"asn,omitempty"`
3774	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3775	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3776	// PeerWeight - The weight added to routes learned from this BGP speaker.
3777	PeerWeight *int32 `json:"peerWeight,omitempty"`
3778}
3779
3780// ConnectionMonitor parameters that define the operation to create a connection monitor.
3781type ConnectionMonitor struct {
3782	// Location - Connection monitor location.
3783	Location *string `json:"location,omitempty"`
3784	// Tags - Connection monitor tags.
3785	Tags                         map[string]*string `json:"tags"`
3786	*ConnectionMonitorParameters `json:"properties,omitempty"`
3787}
3788
3789// MarshalJSON is the custom marshaler for ConnectionMonitor.
3790func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
3791	objectMap := make(map[string]interface{})
3792	if cm.Location != nil {
3793		objectMap["location"] = cm.Location
3794	}
3795	if cm.Tags != nil {
3796		objectMap["tags"] = cm.Tags
3797	}
3798	if cm.ConnectionMonitorParameters != nil {
3799		objectMap["properties"] = cm.ConnectionMonitorParameters
3800	}
3801	return json.Marshal(objectMap)
3802}
3803
3804// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
3805func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
3806	var m map[string]*json.RawMessage
3807	err := json.Unmarshal(body, &m)
3808	if err != nil {
3809		return err
3810	}
3811	for k, v := range m {
3812		switch k {
3813		case "location":
3814			if v != nil {
3815				var location string
3816				err = json.Unmarshal(*v, &location)
3817				if err != nil {
3818					return err
3819				}
3820				cm.Location = &location
3821			}
3822		case "tags":
3823			if v != nil {
3824				var tags map[string]*string
3825				err = json.Unmarshal(*v, &tags)
3826				if err != nil {
3827					return err
3828				}
3829				cm.Tags = tags
3830			}
3831		case "properties":
3832			if v != nil {
3833				var connectionMonitorParameters ConnectionMonitorParameters
3834				err = json.Unmarshal(*v, &connectionMonitorParameters)
3835				if err != nil {
3836					return err
3837				}
3838				cm.ConnectionMonitorParameters = &connectionMonitorParameters
3839			}
3840		}
3841	}
3842
3843	return nil
3844}
3845
3846// ConnectionMonitorDestination describes the destination of connection monitor.
3847type ConnectionMonitorDestination struct {
3848	// ResourceID - The ID of the resource used as the destination by connection monitor.
3849	ResourceID *string `json:"resourceId,omitempty"`
3850	// Address - Address of the connection monitor destination (IP or domain name).
3851	Address *string `json:"address,omitempty"`
3852	// Port - The destination port used by connection monitor.
3853	Port *int32 `json:"port,omitempty"`
3854}
3855
3856// ConnectionMonitorListResult list of connection monitors.
3857type ConnectionMonitorListResult struct {
3858	autorest.Response `json:"-"`
3859	// Value - Information about connection monitors.
3860	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
3861}
3862
3863// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
3864type ConnectionMonitorParameters struct {
3865	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
3866	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
3867	// AutoStart - Determines if the connection monitor will start automatically once created.
3868	AutoStart *bool `json:"autoStart,omitempty"`
3869	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3870	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3871}
3872
3873// ConnectionMonitorQueryResult list of connection states snapshots.
3874type ConnectionMonitorQueryResult struct {
3875	autorest.Response `json:"-"`
3876	// States - Information about connection states.
3877	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
3878}
3879
3880// ConnectionMonitorResult information about the connection monitor.
3881type ConnectionMonitorResult struct {
3882	autorest.Response `json:"-"`
3883	// Name - READ-ONLY; Name of the connection monitor.
3884	Name *string `json:"name,omitempty"`
3885	// ID - READ-ONLY; ID of the connection monitor.
3886	ID   *string `json:"id,omitempty"`
3887	Etag *string `json:"etag,omitempty"`
3888	// Type - READ-ONLY; Connection monitor type.
3889	Type *string `json:"type,omitempty"`
3890	// Location - Connection monitor location.
3891	Location *string `json:"location,omitempty"`
3892	// Tags - Connection monitor tags.
3893	Tags                               map[string]*string `json:"tags"`
3894	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
3895}
3896
3897// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
3898func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
3899	objectMap := make(map[string]interface{})
3900	if cmr.Etag != nil {
3901		objectMap["etag"] = cmr.Etag
3902	}
3903	if cmr.Location != nil {
3904		objectMap["location"] = cmr.Location
3905	}
3906	if cmr.Tags != nil {
3907		objectMap["tags"] = cmr.Tags
3908	}
3909	if cmr.ConnectionMonitorResultProperties != nil {
3910		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
3911	}
3912	return json.Marshal(objectMap)
3913}
3914
3915// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
3916func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
3917	var m map[string]*json.RawMessage
3918	err := json.Unmarshal(body, &m)
3919	if err != nil {
3920		return err
3921	}
3922	for k, v := range m {
3923		switch k {
3924		case "name":
3925			if v != nil {
3926				var name string
3927				err = json.Unmarshal(*v, &name)
3928				if err != nil {
3929					return err
3930				}
3931				cmr.Name = &name
3932			}
3933		case "id":
3934			if v != nil {
3935				var ID string
3936				err = json.Unmarshal(*v, &ID)
3937				if err != nil {
3938					return err
3939				}
3940				cmr.ID = &ID
3941			}
3942		case "etag":
3943			if v != nil {
3944				var etag string
3945				err = json.Unmarshal(*v, &etag)
3946				if err != nil {
3947					return err
3948				}
3949				cmr.Etag = &etag
3950			}
3951		case "type":
3952			if v != nil {
3953				var typeVar string
3954				err = json.Unmarshal(*v, &typeVar)
3955				if err != nil {
3956					return err
3957				}
3958				cmr.Type = &typeVar
3959			}
3960		case "location":
3961			if v != nil {
3962				var location string
3963				err = json.Unmarshal(*v, &location)
3964				if err != nil {
3965					return err
3966				}
3967				cmr.Location = &location
3968			}
3969		case "tags":
3970			if v != nil {
3971				var tags map[string]*string
3972				err = json.Unmarshal(*v, &tags)
3973				if err != nil {
3974					return err
3975				}
3976				cmr.Tags = tags
3977			}
3978		case "properties":
3979			if v != nil {
3980				var connectionMonitorResultProperties ConnectionMonitorResultProperties
3981				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
3982				if err != nil {
3983					return err
3984				}
3985				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
3986			}
3987		}
3988	}
3989
3990	return nil
3991}
3992
3993// ConnectionMonitorResultProperties describes the properties of a connection monitor.
3994type ConnectionMonitorResultProperties struct {
3995	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3996	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3997	// StartTime - The date and time when the connection monitor was started.
3998	StartTime *date.Time `json:"startTime,omitempty"`
3999	// MonitoringStatus - The monitoring status of the connection monitor.
4000	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4001	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4002	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4003	// AutoStart - Determines if the connection monitor will start automatically once created.
4004	AutoStart *bool `json:"autoStart,omitempty"`
4005	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4006	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4007}
4008
4009// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4010// long-running operation.
4011type ConnectionMonitorsCreateOrUpdateFuture struct {
4012	azure.FutureAPI
4013	// Result returns the result of the asynchronous operation.
4014	// If the operation has not completed it will return an error.
4015	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4016}
4017
4018// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4019func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4020	var azFuture azure.Future
4021	if err := json.Unmarshal(body, &azFuture); err != nil {
4022		return err
4023	}
4024	future.FutureAPI = &azFuture
4025	future.Result = future.result
4026	return nil
4027}
4028
4029// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
4030func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
4031	var done bool
4032	done, err = future.DoneWithContext(context.Background(), client)
4033	if err != nil {
4034		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4035		return
4036	}
4037	if !done {
4038		cmr.Response.Response = future.Response()
4039		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
4040		return
4041	}
4042	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4043	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
4044		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
4045		if err != nil {
4046			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
4047		}
4048	}
4049	return
4050}
4051
4052// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4053// long-running operation.
4054type ConnectionMonitorsDeleteFuture struct {
4055	azure.FutureAPI
4056	// Result returns the result of the asynchronous operation.
4057	// If the operation has not completed it will return an error.
4058	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4059}
4060
4061// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4062func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
4063	var azFuture azure.Future
4064	if err := json.Unmarshal(body, &azFuture); err != nil {
4065		return err
4066	}
4067	future.FutureAPI = &azFuture
4068	future.Result = future.result
4069	return nil
4070}
4071
4072// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
4073func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4074	var done bool
4075	done, err = future.DoneWithContext(context.Background(), client)
4076	if err != nil {
4077		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
4078		return
4079	}
4080	if !done {
4081		ar.Response = future.Response()
4082		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
4083		return
4084	}
4085	ar.Response = future.Response()
4086	return
4087}
4088
4089// ConnectionMonitorSource describes the source of connection monitor.
4090type ConnectionMonitorSource struct {
4091	// ResourceID - The ID of the resource used as the source by connection monitor.
4092	ResourceID *string `json:"resourceId,omitempty"`
4093	// Port - The source port used by connection monitor.
4094	Port *int32 `json:"port,omitempty"`
4095}
4096
4097// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4098// operation.
4099type ConnectionMonitorsQueryFuture struct {
4100	azure.FutureAPI
4101	// Result returns the result of the asynchronous operation.
4102	// If the operation has not completed it will return an error.
4103	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4104}
4105
4106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4107func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
4108	var azFuture azure.Future
4109	if err := json.Unmarshal(body, &azFuture); err != nil {
4110		return err
4111	}
4112	future.FutureAPI = &azFuture
4113	future.Result = future.result
4114	return nil
4115}
4116
4117// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
4118func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
4119	var done bool
4120	done, err = future.DoneWithContext(context.Background(), client)
4121	if err != nil {
4122		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
4123		return
4124	}
4125	if !done {
4126		cmqr.Response.Response = future.Response()
4127		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
4128		return
4129	}
4130	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4131	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
4132		cmqr, err = client.QueryResponder(cmqr.Response.Response)
4133		if err != nil {
4134			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
4135		}
4136	}
4137	return
4138}
4139
4140// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4141// operation.
4142type ConnectionMonitorsStartFuture struct {
4143	azure.FutureAPI
4144	// Result returns the result of the asynchronous operation.
4145	// If the operation has not completed it will return an error.
4146	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4147}
4148
4149// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4150func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
4151	var azFuture azure.Future
4152	if err := json.Unmarshal(body, &azFuture); err != nil {
4153		return err
4154	}
4155	future.FutureAPI = &azFuture
4156	future.Result = future.result
4157	return nil
4158}
4159
4160// result is the default implementation for ConnectionMonitorsStartFuture.Result.
4161func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4162	var done bool
4163	done, err = future.DoneWithContext(context.Background(), client)
4164	if err != nil {
4165		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
4166		return
4167	}
4168	if !done {
4169		ar.Response = future.Response()
4170		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
4171		return
4172	}
4173	ar.Response = future.Response()
4174	return
4175}
4176
4177// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4178// operation.
4179type ConnectionMonitorsStopFuture struct {
4180	azure.FutureAPI
4181	// Result returns the result of the asynchronous operation.
4182	// If the operation has not completed it will return an error.
4183	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4184}
4185
4186// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4187func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
4188	var azFuture azure.Future
4189	if err := json.Unmarshal(body, &azFuture); err != nil {
4190		return err
4191	}
4192	future.FutureAPI = &azFuture
4193	future.Result = future.result
4194	return nil
4195}
4196
4197// result is the default implementation for ConnectionMonitorsStopFuture.Result.
4198func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4199	var done bool
4200	done, err = future.DoneWithContext(context.Background(), client)
4201	if err != nil {
4202		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
4203		return
4204	}
4205	if !done {
4206		ar.Response = future.Response()
4207		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
4208		return
4209	}
4210	ar.Response = future.Response()
4211	return
4212}
4213
4214// ConnectionResetSharedKey the virtual network connection reset shared key
4215type ConnectionResetSharedKey struct {
4216	autorest.Response `json:"-"`
4217	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4218	KeyLength *int32 `json:"keyLength,omitempty"`
4219}
4220
4221// ConnectionSharedKey response for GetConnectionSharedKey API service call
4222type ConnectionSharedKey struct {
4223	autorest.Response `json:"-"`
4224	// Value - The virtual network connection shared key value.
4225	Value *string `json:"value,omitempty"`
4226}
4227
4228// ConnectionStateSnapshot connection state snapshot.
4229type ConnectionStateSnapshot struct {
4230	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4231	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4232	// StartTime - The start time of the connection snapshot.
4233	StartTime *date.Time `json:"startTime,omitempty"`
4234	// EndTime - The end time of the connection snapshot.
4235	EndTime *date.Time `json:"endTime,omitempty"`
4236	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4237	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4238	// Hops - READ-ONLY; List of hops between the source and the destination.
4239	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4240}
4241
4242// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
4243func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
4244	objectMap := make(map[string]interface{})
4245	if CSS.ConnectionState != "" {
4246		objectMap["connectionState"] = CSS.ConnectionState
4247	}
4248	if CSS.StartTime != nil {
4249		objectMap["startTime"] = CSS.StartTime
4250	}
4251	if CSS.EndTime != nil {
4252		objectMap["endTime"] = CSS.EndTime
4253	}
4254	if CSS.EvaluationState != "" {
4255		objectMap["evaluationState"] = CSS.EvaluationState
4256	}
4257	return json.Marshal(objectMap)
4258}
4259
4260// ConnectivityDestination parameters that define destination of connection.
4261type ConnectivityDestination struct {
4262	// ResourceID - The ID of the resource to which a connection attempt will be made.
4263	ResourceID *string `json:"resourceId,omitempty"`
4264	// Address - The IP address or URI the resource to which a connection attempt will be made.
4265	Address *string `json:"address,omitempty"`
4266	// Port - Port on which check connectivity will be performed.
4267	Port *int32 `json:"port,omitempty"`
4268}
4269
4270// ConnectivityHop information about a hop between the source and the destination.
4271type ConnectivityHop struct {
4272	// Type - READ-ONLY; The type of the hop.
4273	Type *string `json:"type,omitempty"`
4274	// ID - READ-ONLY; The ID of the hop.
4275	ID *string `json:"id,omitempty"`
4276	// Address - READ-ONLY; The IP address of the hop.
4277	Address *string `json:"address,omitempty"`
4278	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
4279	ResourceID *string `json:"resourceId,omitempty"`
4280	// NextHopIds - READ-ONLY; List of next hop identifiers.
4281	NextHopIds *[]string `json:"nextHopIds,omitempty"`
4282	// Issues - READ-ONLY; List of issues.
4283	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
4284}
4285
4286// MarshalJSON is the custom marshaler for ConnectivityHop.
4287func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
4288	objectMap := make(map[string]interface{})
4289	return json.Marshal(objectMap)
4290}
4291
4292// ConnectivityInformation information on the connectivity status.
4293type ConnectivityInformation struct {
4294	autorest.Response `json:"-"`
4295	// Hops - READ-ONLY; List of hops between the source and the destination.
4296	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4297	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
4298	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
4299	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
4300	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4301	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
4302	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4303	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
4304	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4305	// ProbesSent - READ-ONLY; Total number of probes sent.
4306	ProbesSent *int32 `json:"probesSent,omitempty"`
4307	// ProbesFailed - READ-ONLY; Number of failed probes.
4308	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4309}
4310
4311// MarshalJSON is the custom marshaler for ConnectivityInformation.
4312func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
4313	objectMap := make(map[string]interface{})
4314	return json.Marshal(objectMap)
4315}
4316
4317// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
4318type ConnectivityIssue struct {
4319	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
4320	Origin Origin `json:"origin,omitempty"`
4321	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
4322	Severity Severity `json:"severity,omitempty"`
4323	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
4324	Type IssueType `json:"type,omitempty"`
4325	// Context - READ-ONLY; Provides additional context on the issue.
4326	Context *[]map[string]*string `json:"context,omitempty"`
4327}
4328
4329// MarshalJSON is the custom marshaler for ConnectivityIssue.
4330func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
4331	objectMap := make(map[string]interface{})
4332	return json.Marshal(objectMap)
4333}
4334
4335// ConnectivityParameters parameters that determine how the connectivity check will be performed.
4336type ConnectivityParameters struct {
4337	Source      *ConnectivitySource      `json:"source,omitempty"`
4338	Destination *ConnectivityDestination `json:"destination,omitempty"`
4339}
4340
4341// ConnectivitySource parameters that define the source of the connection.
4342type ConnectivitySource struct {
4343	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
4344	ResourceID *string `json:"resourceId,omitempty"`
4345	// Port - The source port from which a connectivity check will be performed.
4346	Port *int32 `json:"port,omitempty"`
4347}
4348
4349// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
4350// network. Standard DHCP option for a subnet overrides VNET DHCP options.
4351type DhcpOptions struct {
4352	// DNSServers - The list of DNS servers IP addresses.
4353	DNSServers *[]string `json:"dnsServers,omitempty"`
4354}
4355
4356// Dimension dimension of the metric.
4357type Dimension struct {
4358	// Name - The name of the dimension.
4359	Name *string `json:"name,omitempty"`
4360	// DisplayName - The display name of the dimension.
4361	DisplayName *string `json:"displayName,omitempty"`
4362	// InternalName - The internal name of the dimension.
4363	InternalName *string `json:"internalName,omitempty"`
4364}
4365
4366// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
4367type DNSNameAvailabilityResult struct {
4368	autorest.Response `json:"-"`
4369	// Available - Domain availability (True/False).
4370	Available *bool `json:"available,omitempty"`
4371}
4372
4373// EffectiveNetworkSecurityGroup effective network security group.
4374type EffectiveNetworkSecurityGroup struct {
4375	// NetworkSecurityGroup - The ID of network security group that is applied.
4376	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
4377	// Association - Associated resources.
4378	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
4379	// EffectiveSecurityRules - A collection of effective security rules.
4380	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
4381	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
4382	TagMap map[string][]string `json:"tagMap"`
4383}
4384
4385// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
4386func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
4387	objectMap := make(map[string]interface{})
4388	if ensg.NetworkSecurityGroup != nil {
4389		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
4390	}
4391	if ensg.Association != nil {
4392		objectMap["association"] = ensg.Association
4393	}
4394	if ensg.EffectiveSecurityRules != nil {
4395		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
4396	}
4397	if ensg.TagMap != nil {
4398		objectMap["tagMap"] = ensg.TagMap
4399	}
4400	return json.Marshal(objectMap)
4401}
4402
4403// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
4404type EffectiveNetworkSecurityGroupAssociation struct {
4405	// Subnet - The ID of the subnet if assigned.
4406	Subnet *SubResource `json:"subnet,omitempty"`
4407	// NetworkInterface - The ID of the network interface if assigned.
4408	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
4409}
4410
4411// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
4412// call.
4413type EffectiveNetworkSecurityGroupListResult struct {
4414	autorest.Response `json:"-"`
4415	// Value - A list of effective network security groups.
4416	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
4417	// NextLink - READ-ONLY; The URL to get the next set of results.
4418	NextLink *string `json:"nextLink,omitempty"`
4419}
4420
4421// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
4422func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4423	objectMap := make(map[string]interface{})
4424	if ensglr.Value != nil {
4425		objectMap["value"] = ensglr.Value
4426	}
4427	return json.Marshal(objectMap)
4428}
4429
4430// EffectiveNetworkSecurityRule effective network security rules.
4431type EffectiveNetworkSecurityRule struct {
4432	// Name - The name of the security rule specified by the user (if created by the user).
4433	Name *string `json:"name,omitempty"`
4434	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
4435	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
4436	// SourcePortRange - The source port or range.
4437	SourcePortRange *string `json:"sourcePortRange,omitempty"`
4438	// DestinationPortRange - The destination port or range.
4439	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
4440	// 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 (*)
4441	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
4442	// 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 (*)
4443	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
4444	// SourceAddressPrefix - The source address prefix.
4445	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
4446	// DestinationAddressPrefix - The destination address prefix.
4447	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
4448	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4449	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
4450	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4451	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
4452	// ExpandedSourceAddressPrefix - The expanded source address prefix.
4453	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
4454	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
4455	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
4456	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
4457	Access SecurityRuleAccess `json:"access,omitempty"`
4458	// Priority - The priority of the rule.
4459	Priority *int32 `json:"priority,omitempty"`
4460	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
4461	Direction SecurityRuleDirection `json:"direction,omitempty"`
4462}
4463
4464// EffectiveRoute effective Route
4465type EffectiveRoute struct {
4466	// Name - The name of the user defined route. This is optional.
4467	Name *string `json:"name,omitempty"`
4468	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
4469	Source EffectiveRouteSource `json:"source,omitempty"`
4470	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
4471	State EffectiveRouteState `json:"state,omitempty"`
4472	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
4473	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
4474	// NextHopIPAddress - The IP address of the next hop of the effective route.
4475	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
4476	// 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'
4477	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
4478}
4479
4480// EffectiveRouteListResult response for list effective route API service call.
4481type EffectiveRouteListResult struct {
4482	autorest.Response `json:"-"`
4483	// Value - A list of effective routes.
4484	Value *[]EffectiveRoute `json:"value,omitempty"`
4485	// NextLink - READ-ONLY; The URL to get the next set of results.
4486	NextLink *string `json:"nextLink,omitempty"`
4487}
4488
4489// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
4490func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
4491	objectMap := make(map[string]interface{})
4492	if erlr.Value != nil {
4493		objectMap["value"] = erlr.Value
4494	}
4495	return json.Marshal(objectMap)
4496}
4497
4498// EndpointServiceResult endpoint service.
4499type EndpointServiceResult struct {
4500	// Name - READ-ONLY; Name of the endpoint service.
4501	Name *string `json:"name,omitempty"`
4502	// Type - READ-ONLY; Type of the endpoint service.
4503	Type *string `json:"type,omitempty"`
4504	// ID - Resource ID.
4505	ID *string `json:"id,omitempty"`
4506}
4507
4508// MarshalJSON is the custom marshaler for EndpointServiceResult.
4509func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
4510	objectMap := make(map[string]interface{})
4511	if esr.ID != nil {
4512		objectMap["id"] = esr.ID
4513	}
4514	return json.Marshal(objectMap)
4515}
4516
4517// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
4518type EndpointServicesListResult struct {
4519	autorest.Response `json:"-"`
4520	// Value - List of available endpoint services in a region.
4521	Value *[]EndpointServiceResult `json:"value,omitempty"`
4522	// NextLink - The URL to get the next set of results.
4523	NextLink *string `json:"nextLink,omitempty"`
4524}
4525
4526// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
4527// values.
4528type EndpointServicesListResultIterator struct {
4529	i    int
4530	page EndpointServicesListResultPage
4531}
4532
4533// NextWithContext advances to the next value.  If there was an error making
4534// the request the iterator does not advance and the error is returned.
4535func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
4536	if tracing.IsEnabled() {
4537		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
4538		defer func() {
4539			sc := -1
4540			if iter.Response().Response.Response != nil {
4541				sc = iter.Response().Response.Response.StatusCode
4542			}
4543			tracing.EndSpan(ctx, sc, err)
4544		}()
4545	}
4546	iter.i++
4547	if iter.i < len(iter.page.Values()) {
4548		return nil
4549	}
4550	err = iter.page.NextWithContext(ctx)
4551	if err != nil {
4552		iter.i--
4553		return err
4554	}
4555	iter.i = 0
4556	return nil
4557}
4558
4559// Next advances to the next value.  If there was an error making
4560// the request the iterator does not advance and the error is returned.
4561// Deprecated: Use NextWithContext() instead.
4562func (iter *EndpointServicesListResultIterator) Next() error {
4563	return iter.NextWithContext(context.Background())
4564}
4565
4566// NotDone returns true if the enumeration should be started or is not yet complete.
4567func (iter EndpointServicesListResultIterator) NotDone() bool {
4568	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4569}
4570
4571// Response returns the raw server response from the last page request.
4572func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
4573	return iter.page.Response()
4574}
4575
4576// Value returns the current value or a zero-initialized value if the
4577// iterator has advanced beyond the end of the collection.
4578func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
4579	if !iter.page.NotDone() {
4580		return EndpointServiceResult{}
4581	}
4582	return iter.page.Values()[iter.i]
4583}
4584
4585// Creates a new instance of the EndpointServicesListResultIterator type.
4586func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
4587	return EndpointServicesListResultIterator{page: page}
4588}
4589
4590// IsEmpty returns true if the ListResult contains no values.
4591func (eslr EndpointServicesListResult) IsEmpty() bool {
4592	return eslr.Value == nil || len(*eslr.Value) == 0
4593}
4594
4595// hasNextLink returns true if the NextLink is not empty.
4596func (eslr EndpointServicesListResult) hasNextLink() bool {
4597	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
4598}
4599
4600// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
4601// It returns nil if no more results exist.
4602func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
4603	if !eslr.hasNextLink() {
4604		return nil, nil
4605	}
4606	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4607		autorest.AsJSON(),
4608		autorest.AsGet(),
4609		autorest.WithBaseURL(to.String(eslr.NextLink)))
4610}
4611
4612// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
4613type EndpointServicesListResultPage struct {
4614	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
4615	eslr EndpointServicesListResult
4616}
4617
4618// NextWithContext advances to the next page of values.  If there was an error making
4619// the request the page does not advance and the error is returned.
4620func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
4621	if tracing.IsEnabled() {
4622		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
4623		defer func() {
4624			sc := -1
4625			if page.Response().Response.Response != nil {
4626				sc = page.Response().Response.Response.StatusCode
4627			}
4628			tracing.EndSpan(ctx, sc, err)
4629		}()
4630	}
4631	for {
4632		next, err := page.fn(ctx, page.eslr)
4633		if err != nil {
4634			return err
4635		}
4636		page.eslr = next
4637		if !next.hasNextLink() || !next.IsEmpty() {
4638			break
4639		}
4640	}
4641	return nil
4642}
4643
4644// Next advances to the next page of values.  If there was an error making
4645// the request the page does not advance and the error is returned.
4646// Deprecated: Use NextWithContext() instead.
4647func (page *EndpointServicesListResultPage) Next() error {
4648	return page.NextWithContext(context.Background())
4649}
4650
4651// NotDone returns true if the page enumeration should be started or is not yet complete.
4652func (page EndpointServicesListResultPage) NotDone() bool {
4653	return !page.eslr.IsEmpty()
4654}
4655
4656// Response returns the raw server response from the last page request.
4657func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
4658	return page.eslr
4659}
4660
4661// Values returns the slice of values for the current page or nil if there are no values.
4662func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
4663	if page.eslr.IsEmpty() {
4664		return nil
4665	}
4666	return *page.eslr.Value
4667}
4668
4669// Creates a new instance of the EndpointServicesListResultPage type.
4670func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
4671	return EndpointServicesListResultPage{
4672		fn:   getNextPage,
4673		eslr: cur,
4674	}
4675}
4676
4677// Error ...
4678type Error struct {
4679	Code       *string         `json:"code,omitempty"`
4680	Message    *string         `json:"message,omitempty"`
4681	Target     *string         `json:"target,omitempty"`
4682	Details    *[]ErrorDetails `json:"details,omitempty"`
4683	InnerError *string         `json:"innerError,omitempty"`
4684}
4685
4686// ErrorDetails ...
4687type ErrorDetails struct {
4688	Code    *string `json:"code,omitempty"`
4689	Target  *string `json:"target,omitempty"`
4690	Message *string `json:"message,omitempty"`
4691}
4692
4693// ExpressRouteCircuit expressRouteCircuit resource
4694type ExpressRouteCircuit struct {
4695	autorest.Response `json:"-"`
4696	// Sku - The SKU.
4697	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
4698	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
4699	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4700	Etag *string `json:"etag,omitempty"`
4701	// ID - Resource ID.
4702	ID *string `json:"id,omitempty"`
4703	// Name - READ-ONLY; Resource name.
4704	Name *string `json:"name,omitempty"`
4705	// Type - READ-ONLY; Resource type.
4706	Type *string `json:"type,omitempty"`
4707	// Location - Resource location.
4708	Location *string `json:"location,omitempty"`
4709	// Tags - Resource tags.
4710	Tags map[string]*string `json:"tags"`
4711}
4712
4713// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
4714func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
4715	objectMap := make(map[string]interface{})
4716	if erc.Sku != nil {
4717		objectMap["sku"] = erc.Sku
4718	}
4719	if erc.ExpressRouteCircuitPropertiesFormat != nil {
4720		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
4721	}
4722	if erc.ID != nil {
4723		objectMap["id"] = erc.ID
4724	}
4725	if erc.Location != nil {
4726		objectMap["location"] = erc.Location
4727	}
4728	if erc.Tags != nil {
4729		objectMap["tags"] = erc.Tags
4730	}
4731	return json.Marshal(objectMap)
4732}
4733
4734// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
4735func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
4736	var m map[string]*json.RawMessage
4737	err := json.Unmarshal(body, &m)
4738	if err != nil {
4739		return err
4740	}
4741	for k, v := range m {
4742		switch k {
4743		case "sku":
4744			if v != nil {
4745				var sku ExpressRouteCircuitSku
4746				err = json.Unmarshal(*v, &sku)
4747				if err != nil {
4748					return err
4749				}
4750				erc.Sku = &sku
4751			}
4752		case "properties":
4753			if v != nil {
4754				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
4755				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
4756				if err != nil {
4757					return err
4758				}
4759				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
4760			}
4761		case "etag":
4762			if v != nil {
4763				var etag string
4764				err = json.Unmarshal(*v, &etag)
4765				if err != nil {
4766					return err
4767				}
4768				erc.Etag = &etag
4769			}
4770		case "id":
4771			if v != nil {
4772				var ID string
4773				err = json.Unmarshal(*v, &ID)
4774				if err != nil {
4775					return err
4776				}
4777				erc.ID = &ID
4778			}
4779		case "name":
4780			if v != nil {
4781				var name string
4782				err = json.Unmarshal(*v, &name)
4783				if err != nil {
4784					return err
4785				}
4786				erc.Name = &name
4787			}
4788		case "type":
4789			if v != nil {
4790				var typeVar string
4791				err = json.Unmarshal(*v, &typeVar)
4792				if err != nil {
4793					return err
4794				}
4795				erc.Type = &typeVar
4796			}
4797		case "location":
4798			if v != nil {
4799				var location string
4800				err = json.Unmarshal(*v, &location)
4801				if err != nil {
4802					return err
4803				}
4804				erc.Location = &location
4805			}
4806		case "tags":
4807			if v != nil {
4808				var tags map[string]*string
4809				err = json.Unmarshal(*v, &tags)
4810				if err != nil {
4811					return err
4812				}
4813				erc.Tags = tags
4814			}
4815		}
4816	}
4817
4818	return nil
4819}
4820
4821// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
4822type ExpressRouteCircuitArpTable struct {
4823	// Age - Age
4824	Age *int32 `json:"age,omitempty"`
4825	// Interface - Interface
4826	Interface *string `json:"interface,omitempty"`
4827	// IPAddress - The IP address.
4828	IPAddress *string `json:"ipAddress,omitempty"`
4829	// MacAddress - The MAC address.
4830	MacAddress *string `json:"macAddress,omitempty"`
4831}
4832
4833// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
4834type ExpressRouteCircuitAuthorization struct {
4835	autorest.Response              `json:"-"`
4836	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
4837	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4838	Name *string `json:"name,omitempty"`
4839	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4840	Etag *string `json:"etag,omitempty"`
4841	// ID - Resource ID.
4842	ID *string `json:"id,omitempty"`
4843}
4844
4845// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
4846func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
4847	objectMap := make(map[string]interface{})
4848	if erca.AuthorizationPropertiesFormat != nil {
4849		objectMap["properties"] = erca.AuthorizationPropertiesFormat
4850	}
4851	if erca.Name != nil {
4852		objectMap["name"] = erca.Name
4853	}
4854	if erca.ID != nil {
4855		objectMap["id"] = erca.ID
4856	}
4857	return json.Marshal(objectMap)
4858}
4859
4860// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
4861func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
4862	var m map[string]*json.RawMessage
4863	err := json.Unmarshal(body, &m)
4864	if err != nil {
4865		return err
4866	}
4867	for k, v := range m {
4868		switch k {
4869		case "properties":
4870			if v != nil {
4871				var authorizationPropertiesFormat AuthorizationPropertiesFormat
4872				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
4873				if err != nil {
4874					return err
4875				}
4876				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
4877			}
4878		case "name":
4879			if v != nil {
4880				var name string
4881				err = json.Unmarshal(*v, &name)
4882				if err != nil {
4883					return err
4884				}
4885				erca.Name = &name
4886			}
4887		case "etag":
4888			if v != nil {
4889				var etag string
4890				err = json.Unmarshal(*v, &etag)
4891				if err != nil {
4892					return err
4893				}
4894				erca.Etag = &etag
4895			}
4896		case "id":
4897			if v != nil {
4898				var ID string
4899				err = json.Unmarshal(*v, &ID)
4900				if err != nil {
4901					return err
4902				}
4903				erca.ID = &ID
4904			}
4905		}
4906	}
4907
4908	return nil
4909}
4910
4911// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
4912// results of a long-running operation.
4913type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
4914	azure.FutureAPI
4915	// Result returns the result of the asynchronous operation.
4916	// If the operation has not completed it will return an error.
4917	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
4918}
4919
4920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4921func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4922	var azFuture azure.Future
4923	if err := json.Unmarshal(body, &azFuture); err != nil {
4924		return err
4925	}
4926	future.FutureAPI = &azFuture
4927	future.Result = future.result
4928	return nil
4929}
4930
4931// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
4932func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
4933	var done bool
4934	done, err = future.DoneWithContext(context.Background(), client)
4935	if err != nil {
4936		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4937		return
4938	}
4939	if !done {
4940		erca.Response.Response = future.Response()
4941		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
4942		return
4943	}
4944	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4945	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
4946		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
4947		if err != nil {
4948			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
4949		}
4950	}
4951	return
4952}
4953
4954// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
4955// of a long-running operation.
4956type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
4957	azure.FutureAPI
4958	// Result returns the result of the asynchronous operation.
4959	// If the operation has not completed it will return an error.
4960	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
4961}
4962
4963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4964func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
4965	var azFuture azure.Future
4966	if err := json.Unmarshal(body, &azFuture); err != nil {
4967		return err
4968	}
4969	future.FutureAPI = &azFuture
4970	future.Result = future.result
4971	return nil
4972}
4973
4974// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
4975func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
4976	var done bool
4977	done, err = future.DoneWithContext(context.Background(), client)
4978	if err != nil {
4979		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
4980		return
4981	}
4982	if !done {
4983		ar.Response = future.Response()
4984		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
4985		return
4986	}
4987	ar.Response = future.Response()
4988	return
4989}
4990
4991// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
4992type ExpressRouteCircuitListResult struct {
4993	autorest.Response `json:"-"`
4994	// Value - A list of ExpressRouteCircuits in a resource group.
4995	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
4996	// NextLink - The URL to get the next set of results.
4997	NextLink *string `json:"nextLink,omitempty"`
4998}
4999
5000// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
5001// values.
5002type ExpressRouteCircuitListResultIterator struct {
5003	i    int
5004	page ExpressRouteCircuitListResultPage
5005}
5006
5007// NextWithContext advances to the next value.  If there was an error making
5008// the request the iterator does not advance and the error is returned.
5009func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
5010	if tracing.IsEnabled() {
5011		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
5012		defer func() {
5013			sc := -1
5014			if iter.Response().Response.Response != nil {
5015				sc = iter.Response().Response.Response.StatusCode
5016			}
5017			tracing.EndSpan(ctx, sc, err)
5018		}()
5019	}
5020	iter.i++
5021	if iter.i < len(iter.page.Values()) {
5022		return nil
5023	}
5024	err = iter.page.NextWithContext(ctx)
5025	if err != nil {
5026		iter.i--
5027		return err
5028	}
5029	iter.i = 0
5030	return nil
5031}
5032
5033// Next advances to the next value.  If there was an error making
5034// the request the iterator does not advance and the error is returned.
5035// Deprecated: Use NextWithContext() instead.
5036func (iter *ExpressRouteCircuitListResultIterator) Next() error {
5037	return iter.NextWithContext(context.Background())
5038}
5039
5040// NotDone returns true if the enumeration should be started or is not yet complete.
5041func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
5042	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5043}
5044
5045// Response returns the raw server response from the last page request.
5046func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
5047	return iter.page.Response()
5048}
5049
5050// Value returns the current value or a zero-initialized value if the
5051// iterator has advanced beyond the end of the collection.
5052func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
5053	if !iter.page.NotDone() {
5054		return ExpressRouteCircuit{}
5055	}
5056	return iter.page.Values()[iter.i]
5057}
5058
5059// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
5060func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
5061	return ExpressRouteCircuitListResultIterator{page: page}
5062}
5063
5064// IsEmpty returns true if the ListResult contains no values.
5065func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
5066	return erclr.Value == nil || len(*erclr.Value) == 0
5067}
5068
5069// hasNextLink returns true if the NextLink is not empty.
5070func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
5071	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
5072}
5073
5074// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
5075// It returns nil if no more results exist.
5076func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
5077	if !erclr.hasNextLink() {
5078		return nil, nil
5079	}
5080	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5081		autorest.AsJSON(),
5082		autorest.AsGet(),
5083		autorest.WithBaseURL(to.String(erclr.NextLink)))
5084}
5085
5086// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
5087type ExpressRouteCircuitListResultPage struct {
5088	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
5089	erclr ExpressRouteCircuitListResult
5090}
5091
5092// NextWithContext advances to the next page of values.  If there was an error making
5093// the request the page does not advance and the error is returned.
5094func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
5095	if tracing.IsEnabled() {
5096		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
5097		defer func() {
5098			sc := -1
5099			if page.Response().Response.Response != nil {
5100				sc = page.Response().Response.Response.StatusCode
5101			}
5102			tracing.EndSpan(ctx, sc, err)
5103		}()
5104	}
5105	for {
5106		next, err := page.fn(ctx, page.erclr)
5107		if err != nil {
5108			return err
5109		}
5110		page.erclr = next
5111		if !next.hasNextLink() || !next.IsEmpty() {
5112			break
5113		}
5114	}
5115	return nil
5116}
5117
5118// Next advances to the next page of values.  If there was an error making
5119// the request the page does not advance and the error is returned.
5120// Deprecated: Use NextWithContext() instead.
5121func (page *ExpressRouteCircuitListResultPage) Next() error {
5122	return page.NextWithContext(context.Background())
5123}
5124
5125// NotDone returns true if the page enumeration should be started or is not yet complete.
5126func (page ExpressRouteCircuitListResultPage) NotDone() bool {
5127	return !page.erclr.IsEmpty()
5128}
5129
5130// Response returns the raw server response from the last page request.
5131func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
5132	return page.erclr
5133}
5134
5135// Values returns the slice of values for the current page or nil if there are no values.
5136func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
5137	if page.erclr.IsEmpty() {
5138		return nil
5139	}
5140	return *page.erclr.Value
5141}
5142
5143// Creates a new instance of the ExpressRouteCircuitListResultPage type.
5144func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
5145	return ExpressRouteCircuitListResultPage{
5146		fn:    getNextPage,
5147		erclr: cur,
5148	}
5149}
5150
5151// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
5152type ExpressRouteCircuitPeering struct {
5153	autorest.Response                           `json:"-"`
5154	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
5155	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5156	Name *string `json:"name,omitempty"`
5157	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5158	Etag *string `json:"etag,omitempty"`
5159	// ID - Resource ID.
5160	ID *string `json:"id,omitempty"`
5161}
5162
5163// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
5164func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
5165	objectMap := make(map[string]interface{})
5166	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
5167		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
5168	}
5169	if ercp.Name != nil {
5170		objectMap["name"] = ercp.Name
5171	}
5172	if ercp.ID != nil {
5173		objectMap["id"] = ercp.ID
5174	}
5175	return json.Marshal(objectMap)
5176}
5177
5178// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
5179func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
5180	var m map[string]*json.RawMessage
5181	err := json.Unmarshal(body, &m)
5182	if err != nil {
5183		return err
5184	}
5185	for k, v := range m {
5186		switch k {
5187		case "properties":
5188			if v != nil {
5189				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
5190				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
5191				if err != nil {
5192					return err
5193				}
5194				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
5195			}
5196		case "name":
5197			if v != nil {
5198				var name string
5199				err = json.Unmarshal(*v, &name)
5200				if err != nil {
5201					return err
5202				}
5203				ercp.Name = &name
5204			}
5205		case "etag":
5206			if v != nil {
5207				var etag string
5208				err = json.Unmarshal(*v, &etag)
5209				if err != nil {
5210					return err
5211				}
5212				ercp.Etag = &etag
5213			}
5214		case "id":
5215			if v != nil {
5216				var ID string
5217				err = json.Unmarshal(*v, &ID)
5218				if err != nil {
5219					return err
5220				}
5221				ercp.ID = &ID
5222			}
5223		}
5224	}
5225
5226	return nil
5227}
5228
5229// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
5230type ExpressRouteCircuitPeeringConfig struct {
5231	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
5232	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
5233	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
5234	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
5235	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
5236	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
5237	// LegacyMode - The legacy mode of the peering.
5238	LegacyMode *int32 `json:"legacyMode,omitempty"`
5239	// CustomerASN - The CustomerASN of the peering.
5240	CustomerASN *int32 `json:"customerASN,omitempty"`
5241	// RoutingRegistryName - The RoutingRegistryName of the configuration.
5242	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
5243}
5244
5245// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
5246// that belong to an ExpressRouteCircuit.
5247type ExpressRouteCircuitPeeringListResult struct {
5248	autorest.Response `json:"-"`
5249	// Value - The peerings in an express route circuit.
5250	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
5251	// NextLink - The URL to get the next set of results.
5252	NextLink *string `json:"nextLink,omitempty"`
5253}
5254
5255// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
5256// ExpressRouteCircuitPeering values.
5257type ExpressRouteCircuitPeeringListResultIterator struct {
5258	i    int
5259	page ExpressRouteCircuitPeeringListResultPage
5260}
5261
5262// NextWithContext advances to the next value.  If there was an error making
5263// the request the iterator does not advance and the error is returned.
5264func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
5265	if tracing.IsEnabled() {
5266		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
5267		defer func() {
5268			sc := -1
5269			if iter.Response().Response.Response != nil {
5270				sc = iter.Response().Response.Response.StatusCode
5271			}
5272			tracing.EndSpan(ctx, sc, err)
5273		}()
5274	}
5275	iter.i++
5276	if iter.i < len(iter.page.Values()) {
5277		return nil
5278	}
5279	err = iter.page.NextWithContext(ctx)
5280	if err != nil {
5281		iter.i--
5282		return err
5283	}
5284	iter.i = 0
5285	return nil
5286}
5287
5288// Next advances to the next value.  If there was an error making
5289// the request the iterator does not advance and the error is returned.
5290// Deprecated: Use NextWithContext() instead.
5291func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
5292	return iter.NextWithContext(context.Background())
5293}
5294
5295// NotDone returns true if the enumeration should be started or is not yet complete.
5296func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
5297	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5298}
5299
5300// Response returns the raw server response from the last page request.
5301func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
5302	return iter.page.Response()
5303}
5304
5305// Value returns the current value or a zero-initialized value if the
5306// iterator has advanced beyond the end of the collection.
5307func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
5308	if !iter.page.NotDone() {
5309		return ExpressRouteCircuitPeering{}
5310	}
5311	return iter.page.Values()[iter.i]
5312}
5313
5314// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
5315func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
5316	return ExpressRouteCircuitPeeringListResultIterator{page: page}
5317}
5318
5319// IsEmpty returns true if the ListResult contains no values.
5320func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
5321	return ercplr.Value == nil || len(*ercplr.Value) == 0
5322}
5323
5324// hasNextLink returns true if the NextLink is not empty.
5325func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
5326	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
5327}
5328
5329// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
5330// It returns nil if no more results exist.
5331func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
5332	if !ercplr.hasNextLink() {
5333		return nil, nil
5334	}
5335	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5336		autorest.AsJSON(),
5337		autorest.AsGet(),
5338		autorest.WithBaseURL(to.String(ercplr.NextLink)))
5339}
5340
5341// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
5342type ExpressRouteCircuitPeeringListResultPage struct {
5343	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
5344	ercplr ExpressRouteCircuitPeeringListResult
5345}
5346
5347// NextWithContext advances to the next page of values.  If there was an error making
5348// the request the page does not advance and the error is returned.
5349func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
5350	if tracing.IsEnabled() {
5351		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
5352		defer func() {
5353			sc := -1
5354			if page.Response().Response.Response != nil {
5355				sc = page.Response().Response.Response.StatusCode
5356			}
5357			tracing.EndSpan(ctx, sc, err)
5358		}()
5359	}
5360	for {
5361		next, err := page.fn(ctx, page.ercplr)
5362		if err != nil {
5363			return err
5364		}
5365		page.ercplr = next
5366		if !next.hasNextLink() || !next.IsEmpty() {
5367			break
5368		}
5369	}
5370	return nil
5371}
5372
5373// Next advances to the next page of values.  If there was an error making
5374// the request the page does not advance and the error is returned.
5375// Deprecated: Use NextWithContext() instead.
5376func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
5377	return page.NextWithContext(context.Background())
5378}
5379
5380// NotDone returns true if the page enumeration should be started or is not yet complete.
5381func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
5382	return !page.ercplr.IsEmpty()
5383}
5384
5385// Response returns the raw server response from the last page request.
5386func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
5387	return page.ercplr
5388}
5389
5390// Values returns the slice of values for the current page or nil if there are no values.
5391func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
5392	if page.ercplr.IsEmpty() {
5393		return nil
5394	}
5395	return *page.ercplr.Value
5396}
5397
5398// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
5399func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
5400	return ExpressRouteCircuitPeeringListResultPage{
5401		fn:     getNextPage,
5402		ercplr: cur,
5403	}
5404}
5405
5406// ExpressRouteCircuitPeeringPropertiesFormat ...
5407type ExpressRouteCircuitPeeringPropertiesFormat struct {
5408	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
5409	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
5410	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
5411	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
5412	// AzureASN - The Azure ASN.
5413	AzureASN *int32 `json:"azureASN,omitempty"`
5414	// PeerASN - The peer ASN.
5415	PeerASN *int64 `json:"peerASN,omitempty"`
5416	// PrimaryPeerAddressPrefix - The primary address prefix.
5417	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
5418	// SecondaryPeerAddressPrefix - The secondary address prefix.
5419	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
5420	// PrimaryAzurePort - The primary port.
5421	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
5422	// SecondaryAzurePort - The secondary port.
5423	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
5424	// SharedKey - The shared key.
5425	SharedKey *string `json:"sharedKey,omitempty"`
5426	// VlanID - The VLAN ID.
5427	VlanID *int32 `json:"vlanId,omitempty"`
5428	// MicrosoftPeeringConfig - The Microsoft peering configuration.
5429	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
5430	// Stats - Gets peering stats.
5431	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
5432	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5433	ProvisioningState *string `json:"provisioningState,omitempty"`
5434	// GatewayManagerEtag - The GatewayManager Etag.
5435	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5436	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
5437	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
5438	// RouteFilter - The reference of the RouteFilter resource.
5439	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
5440	// Ipv6PeeringConfig - The IPv6 peering configuration.
5441	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
5442}
5443
5444// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
5445// of a long-running operation.
5446type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
5447	azure.FutureAPI
5448	// Result returns the result of the asynchronous operation.
5449	// If the operation has not completed it will return an error.
5450	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
5451}
5452
5453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5454func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5455	var azFuture azure.Future
5456	if err := json.Unmarshal(body, &azFuture); err != nil {
5457		return err
5458	}
5459	future.FutureAPI = &azFuture
5460	future.Result = future.result
5461	return nil
5462}
5463
5464// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
5465func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
5466	var done bool
5467	done, err = future.DoneWithContext(context.Background(), client)
5468	if err != nil {
5469		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5470		return
5471	}
5472	if !done {
5473		ercp.Response.Response = future.Response()
5474		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
5475		return
5476	}
5477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5478	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
5479		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
5480		if err != nil {
5481			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
5482		}
5483	}
5484	return
5485}
5486
5487// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
5488// long-running operation.
5489type ExpressRouteCircuitPeeringsDeleteFuture struct {
5490	azure.FutureAPI
5491	// Result returns the result of the asynchronous operation.
5492	// If the operation has not completed it will return an error.
5493	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
5494}
5495
5496// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5497func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
5498	var azFuture azure.Future
5499	if err := json.Unmarshal(body, &azFuture); err != nil {
5500		return err
5501	}
5502	future.FutureAPI = &azFuture
5503	future.Result = future.result
5504	return nil
5505}
5506
5507// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
5508func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
5509	var done bool
5510	done, err = future.DoneWithContext(context.Background(), client)
5511	if err != nil {
5512		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
5513		return
5514	}
5515	if !done {
5516		ar.Response = future.Response()
5517		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
5518		return
5519	}
5520	ar.Response = future.Response()
5521	return
5522}
5523
5524// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
5525type ExpressRouteCircuitPropertiesFormat struct {
5526	// AllowClassicOperations - Allow classic operations
5527	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
5528	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
5529	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
5530	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
5531	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
5532	// Authorizations - The list of authorizations.
5533	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
5534	// Peerings - The list of peerings.
5535	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
5536	// ServiceKey - The ServiceKey.
5537	ServiceKey *string `json:"serviceKey,omitempty"`
5538	// ServiceProviderNotes - The ServiceProviderNotes.
5539	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
5540	// ServiceProviderProperties - The ServiceProviderProperties.
5541	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
5542	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5543	ProvisioningState *string `json:"provisioningState,omitempty"`
5544	// GatewayManagerEtag - The GatewayManager Etag.
5545	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5546}
5547
5548// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
5549type ExpressRouteCircuitRoutesTable struct {
5550	// NetworkProperty - network
5551	NetworkProperty *string `json:"network,omitempty"`
5552	// NextHop - nextHop
5553	NextHop *string `json:"nextHop,omitempty"`
5554	// LocPrf - locPrf
5555	LocPrf *string `json:"locPrf,omitempty"`
5556	// Weight - weight.
5557	Weight *int32 `json:"weight,omitempty"`
5558	// Path - path
5559	Path *string `json:"path,omitempty"`
5560}
5561
5562// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
5563type ExpressRouteCircuitRoutesTableSummary struct {
5564	// Neighbor - Neighbor
5565	Neighbor *string `json:"neighbor,omitempty"`
5566	// V - BGP version number spoken to the neighbor.
5567	V *int32 `json:"v,omitempty"`
5568	// As - Autonomous system number.
5569	As *int32 `json:"as,omitempty"`
5570	// 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.
5571	UpDown *string `json:"upDown,omitempty"`
5572	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
5573	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
5574}
5575
5576// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
5577// Circuits API.
5578type ExpressRouteCircuitsArpTableListResult struct {
5579	autorest.Response `json:"-"`
5580	// Value - Gets list of the ARP table.
5581	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
5582	// NextLink - The URL to get the next set of results.
5583	NextLink *string `json:"nextLink,omitempty"`
5584}
5585
5586// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5587// long-running operation.
5588type ExpressRouteCircuitsCreateOrUpdateFuture struct {
5589	azure.FutureAPI
5590	// Result returns the result of the asynchronous operation.
5591	// If the operation has not completed it will return an error.
5592	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5593}
5594
5595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5596func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5597	var azFuture azure.Future
5598	if err := json.Unmarshal(body, &azFuture); err != nil {
5599		return err
5600	}
5601	future.FutureAPI = &azFuture
5602	future.Result = future.result
5603	return nil
5604}
5605
5606// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
5607func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5608	var done bool
5609	done, err = future.DoneWithContext(context.Background(), client)
5610	if err != nil {
5611		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5612		return
5613	}
5614	if !done {
5615		erc.Response.Response = future.Response()
5616		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
5617		return
5618	}
5619	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5620	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5621		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
5622		if err != nil {
5623			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
5624		}
5625	}
5626	return
5627}
5628
5629// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
5630// long-running operation.
5631type ExpressRouteCircuitsDeleteFuture struct {
5632	azure.FutureAPI
5633	// Result returns the result of the asynchronous operation.
5634	// If the operation has not completed it will return an error.
5635	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
5636}
5637
5638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5639func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
5640	var azFuture azure.Future
5641	if err := json.Unmarshal(body, &azFuture); err != nil {
5642		return err
5643	}
5644	future.FutureAPI = &azFuture
5645	future.Result = future.result
5646	return nil
5647}
5648
5649// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
5650func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
5651	var done bool
5652	done, err = future.DoneWithContext(context.Background(), client)
5653	if err != nil {
5654		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
5655		return
5656	}
5657	if !done {
5658		ar.Response = future.Response()
5659		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
5660		return
5661	}
5662	ar.Response = future.Response()
5663	return
5664}
5665
5666// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
5667// ExpressRouteCircuit.
5668type ExpressRouteCircuitServiceProviderProperties struct {
5669	// ServiceProviderName - The serviceProviderName.
5670	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
5671	// PeeringLocation - The peering location.
5672	PeeringLocation *string `json:"peeringLocation,omitempty"`
5673	// BandwidthInMbps - The BandwidthInMbps.
5674	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
5675}
5676
5677// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
5678type ExpressRouteCircuitSku struct {
5679	// Name - The name of the SKU.
5680	Name *string `json:"name,omitempty"`
5681	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
5682	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
5683	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
5684	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
5685}
5686
5687// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
5688// long-running operation.
5689type ExpressRouteCircuitsListArpTableFuture struct {
5690	azure.FutureAPI
5691	// Result returns the result of the asynchronous operation.
5692	// If the operation has not completed it will return an error.
5693	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
5694}
5695
5696// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5697func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
5698	var azFuture azure.Future
5699	if err := json.Unmarshal(body, &azFuture); err != nil {
5700		return err
5701	}
5702	future.FutureAPI = &azFuture
5703	future.Result = future.result
5704	return nil
5705}
5706
5707// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
5708func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
5709	var done bool
5710	done, err = future.DoneWithContext(context.Background(), client)
5711	if err != nil {
5712		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
5713		return
5714	}
5715	if !done {
5716		ercatlr.Response.Response = future.Response()
5717		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
5718		return
5719	}
5720	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5721	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
5722		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
5723		if err != nil {
5724			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
5725		}
5726	}
5727	return
5728}
5729
5730// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
5731// long-running operation.
5732type ExpressRouteCircuitsListRoutesTableFuture struct {
5733	azure.FutureAPI
5734	// Result returns the result of the asynchronous operation.
5735	// If the operation has not completed it will return an error.
5736	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
5737}
5738
5739// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5740func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
5741	var azFuture azure.Future
5742	if err := json.Unmarshal(body, &azFuture); err != nil {
5743		return err
5744	}
5745	future.FutureAPI = &azFuture
5746	future.Result = future.result
5747	return nil
5748}
5749
5750// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
5751func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
5752	var done bool
5753	done, err = future.DoneWithContext(context.Background(), client)
5754	if err != nil {
5755		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
5756		return
5757	}
5758	if !done {
5759		ercrtlr.Response.Response = future.Response()
5760		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
5761		return
5762	}
5763	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5764	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
5765		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
5766		if err != nil {
5767			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
5768		}
5769	}
5770	return
5771}
5772
5773// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
5774// results of a long-running operation.
5775type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
5776	azure.FutureAPI
5777	// Result returns the result of the asynchronous operation.
5778	// If the operation has not completed it will return an error.
5779	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
5780}
5781
5782// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5783func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
5784	var azFuture azure.Future
5785	if err := json.Unmarshal(body, &azFuture); err != nil {
5786		return err
5787	}
5788	future.FutureAPI = &azFuture
5789	future.Result = future.result
5790	return nil
5791}
5792
5793// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
5794func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
5795	var done bool
5796	done, err = future.DoneWithContext(context.Background(), client)
5797	if err != nil {
5798		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
5799		return
5800	}
5801	if !done {
5802		ercrtslr.Response.Response = future.Response()
5803		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
5804		return
5805	}
5806	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5807	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
5808		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
5809		if err != nil {
5810			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
5811		}
5812	}
5813	return
5814}
5815
5816// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
5817// Circuits API.
5818type ExpressRouteCircuitsRoutesTableListResult struct {
5819	autorest.Response `json:"-"`
5820	// Value - The list of routes table.
5821	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
5822	// NextLink - The URL to get the next set of results.
5823	NextLink *string `json:"nextLink,omitempty"`
5824}
5825
5826// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
5827// Express Route Circuits API.
5828type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
5829	autorest.Response `json:"-"`
5830	// Value - A list of the routes table.
5831	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
5832	// NextLink - The URL to get the next set of results.
5833	NextLink *string `json:"nextLink,omitempty"`
5834}
5835
5836// ExpressRouteCircuitStats contains stats associated with the peering.
5837type ExpressRouteCircuitStats struct {
5838	autorest.Response `json:"-"`
5839	// PrimarybytesIn - Gets BytesIn of the peering.
5840	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
5841	// PrimarybytesOut - Gets BytesOut of the peering.
5842	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
5843	// SecondarybytesIn - Gets BytesIn of the peering.
5844	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
5845	// SecondarybytesOut - Gets BytesOut of the peering.
5846	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
5847}
5848
5849// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5850// long-running operation.
5851type ExpressRouteCircuitsUpdateTagsFuture struct {
5852	azure.FutureAPI
5853	// Result returns the result of the asynchronous operation.
5854	// If the operation has not completed it will return an error.
5855	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5856}
5857
5858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5859func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
5860	var azFuture azure.Future
5861	if err := json.Unmarshal(body, &azFuture); err != nil {
5862		return err
5863	}
5864	future.FutureAPI = &azFuture
5865	future.Result = future.result
5866	return nil
5867}
5868
5869// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
5870func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5871	var done bool
5872	done, err = future.DoneWithContext(context.Background(), client)
5873	if err != nil {
5874		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
5875		return
5876	}
5877	if !done {
5878		erc.Response.Response = future.Response()
5879		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
5880		return
5881	}
5882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5883	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5884		erc, err = client.UpdateTagsResponder(erc.Response.Response)
5885		if err != nil {
5886			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
5887		}
5888	}
5889	return
5890}
5891
5892// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
5893type ExpressRouteServiceProvider struct {
5894	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
5895	// ID - Resource ID.
5896	ID *string `json:"id,omitempty"`
5897	// Name - READ-ONLY; Resource name.
5898	Name *string `json:"name,omitempty"`
5899	// Type - READ-ONLY; Resource type.
5900	Type *string `json:"type,omitempty"`
5901	// Location - Resource location.
5902	Location *string `json:"location,omitempty"`
5903	// Tags - Resource tags.
5904	Tags map[string]*string `json:"tags"`
5905}
5906
5907// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
5908func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
5909	objectMap := make(map[string]interface{})
5910	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
5911		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
5912	}
5913	if ersp.ID != nil {
5914		objectMap["id"] = ersp.ID
5915	}
5916	if ersp.Location != nil {
5917		objectMap["location"] = ersp.Location
5918	}
5919	if ersp.Tags != nil {
5920		objectMap["tags"] = ersp.Tags
5921	}
5922	return json.Marshal(objectMap)
5923}
5924
5925// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
5926func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
5927	var m map[string]*json.RawMessage
5928	err := json.Unmarshal(body, &m)
5929	if err != nil {
5930		return err
5931	}
5932	for k, v := range m {
5933		switch k {
5934		case "properties":
5935			if v != nil {
5936				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
5937				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
5938				if err != nil {
5939					return err
5940				}
5941				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
5942			}
5943		case "id":
5944			if v != nil {
5945				var ID string
5946				err = json.Unmarshal(*v, &ID)
5947				if err != nil {
5948					return err
5949				}
5950				ersp.ID = &ID
5951			}
5952		case "name":
5953			if v != nil {
5954				var name string
5955				err = json.Unmarshal(*v, &name)
5956				if err != nil {
5957					return err
5958				}
5959				ersp.Name = &name
5960			}
5961		case "type":
5962			if v != nil {
5963				var typeVar string
5964				err = json.Unmarshal(*v, &typeVar)
5965				if err != nil {
5966					return err
5967				}
5968				ersp.Type = &typeVar
5969			}
5970		case "location":
5971			if v != nil {
5972				var location string
5973				err = json.Unmarshal(*v, &location)
5974				if err != nil {
5975					return err
5976				}
5977				ersp.Location = &location
5978			}
5979		case "tags":
5980			if v != nil {
5981				var tags map[string]*string
5982				err = json.Unmarshal(*v, &tags)
5983				if err != nil {
5984					return err
5985				}
5986				ersp.Tags = tags
5987			}
5988		}
5989	}
5990
5991	return nil
5992}
5993
5994// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
5995// resources.
5996type ExpressRouteServiceProviderBandwidthsOffered struct {
5997	// OfferName - The OfferName.
5998	OfferName *string `json:"offerName,omitempty"`
5999	// ValueInMbps - The ValueInMbps.
6000	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
6001}
6002
6003// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
6004type ExpressRouteServiceProviderListResult struct {
6005	autorest.Response `json:"-"`
6006	// Value - A list of ExpressRouteResourceProvider resources.
6007	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
6008	// NextLink - The URL to get the next set of results.
6009	NextLink *string `json:"nextLink,omitempty"`
6010}
6011
6012// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
6013// ExpressRouteServiceProvider values.
6014type ExpressRouteServiceProviderListResultIterator struct {
6015	i    int
6016	page ExpressRouteServiceProviderListResultPage
6017}
6018
6019// NextWithContext advances to the next value.  If there was an error making
6020// the request the iterator does not advance and the error is returned.
6021func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
6022	if tracing.IsEnabled() {
6023		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
6024		defer func() {
6025			sc := -1
6026			if iter.Response().Response.Response != nil {
6027				sc = iter.Response().Response.Response.StatusCode
6028			}
6029			tracing.EndSpan(ctx, sc, err)
6030		}()
6031	}
6032	iter.i++
6033	if iter.i < len(iter.page.Values()) {
6034		return nil
6035	}
6036	err = iter.page.NextWithContext(ctx)
6037	if err != nil {
6038		iter.i--
6039		return err
6040	}
6041	iter.i = 0
6042	return nil
6043}
6044
6045// Next advances to the next value.  If there was an error making
6046// the request the iterator does not advance and the error is returned.
6047// Deprecated: Use NextWithContext() instead.
6048func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
6049	return iter.NextWithContext(context.Background())
6050}
6051
6052// NotDone returns true if the enumeration should be started or is not yet complete.
6053func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
6054	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6055}
6056
6057// Response returns the raw server response from the last page request.
6058func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
6059	return iter.page.Response()
6060}
6061
6062// Value returns the current value or a zero-initialized value if the
6063// iterator has advanced beyond the end of the collection.
6064func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
6065	if !iter.page.NotDone() {
6066		return ExpressRouteServiceProvider{}
6067	}
6068	return iter.page.Values()[iter.i]
6069}
6070
6071// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
6072func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
6073	return ExpressRouteServiceProviderListResultIterator{page: page}
6074}
6075
6076// IsEmpty returns true if the ListResult contains no values.
6077func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
6078	return ersplr.Value == nil || len(*ersplr.Value) == 0
6079}
6080
6081// hasNextLink returns true if the NextLink is not empty.
6082func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
6083	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
6084}
6085
6086// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
6087// It returns nil if no more results exist.
6088func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
6089	if !ersplr.hasNextLink() {
6090		return nil, nil
6091	}
6092	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6093		autorest.AsJSON(),
6094		autorest.AsGet(),
6095		autorest.WithBaseURL(to.String(ersplr.NextLink)))
6096}
6097
6098// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
6099type ExpressRouteServiceProviderListResultPage struct {
6100	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
6101	ersplr ExpressRouteServiceProviderListResult
6102}
6103
6104// NextWithContext advances to the next page of values.  If there was an error making
6105// the request the page does not advance and the error is returned.
6106func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
6107	if tracing.IsEnabled() {
6108		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
6109		defer func() {
6110			sc := -1
6111			if page.Response().Response.Response != nil {
6112				sc = page.Response().Response.Response.StatusCode
6113			}
6114			tracing.EndSpan(ctx, sc, err)
6115		}()
6116	}
6117	for {
6118		next, err := page.fn(ctx, page.ersplr)
6119		if err != nil {
6120			return err
6121		}
6122		page.ersplr = next
6123		if !next.hasNextLink() || !next.IsEmpty() {
6124			break
6125		}
6126	}
6127	return nil
6128}
6129
6130// Next advances to the next page of values.  If there was an error making
6131// the request the page does not advance and the error is returned.
6132// Deprecated: Use NextWithContext() instead.
6133func (page *ExpressRouteServiceProviderListResultPage) Next() error {
6134	return page.NextWithContext(context.Background())
6135}
6136
6137// NotDone returns true if the page enumeration should be started or is not yet complete.
6138func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
6139	return !page.ersplr.IsEmpty()
6140}
6141
6142// Response returns the raw server response from the last page request.
6143func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
6144	return page.ersplr
6145}
6146
6147// Values returns the slice of values for the current page or nil if there are no values.
6148func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
6149	if page.ersplr.IsEmpty() {
6150		return nil
6151	}
6152	return *page.ersplr.Value
6153}
6154
6155// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
6156func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
6157	return ExpressRouteServiceProviderListResultPage{
6158		fn:     getNextPage,
6159		ersplr: cur,
6160	}
6161}
6162
6163// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
6164type ExpressRouteServiceProviderPropertiesFormat struct {
6165	// PeeringLocations - Get a list of peering locations.
6166	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
6167	// BandwidthsOffered - Gets bandwidths offered.
6168	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
6169	// ProvisioningState - Gets the provisioning state of the resource.
6170	ProvisioningState *string `json:"provisioningState,omitempty"`
6171}
6172
6173// FlowLogInformation information on the configuration of flow log.
6174type FlowLogInformation struct {
6175	autorest.Response `json:"-"`
6176	// TargetResourceID - The ID of the resource to configure for flow logging.
6177	TargetResourceID   *string `json:"targetResourceId,omitempty"`
6178	*FlowLogProperties `json:"properties,omitempty"`
6179}
6180
6181// MarshalJSON is the custom marshaler for FlowLogInformation.
6182func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
6183	objectMap := make(map[string]interface{})
6184	if fli.TargetResourceID != nil {
6185		objectMap["targetResourceId"] = fli.TargetResourceID
6186	}
6187	if fli.FlowLogProperties != nil {
6188		objectMap["properties"] = fli.FlowLogProperties
6189	}
6190	return json.Marshal(objectMap)
6191}
6192
6193// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
6194func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
6195	var m map[string]*json.RawMessage
6196	err := json.Unmarshal(body, &m)
6197	if err != nil {
6198		return err
6199	}
6200	for k, v := range m {
6201		switch k {
6202		case "targetResourceId":
6203			if v != nil {
6204				var targetResourceID string
6205				err = json.Unmarshal(*v, &targetResourceID)
6206				if err != nil {
6207					return err
6208				}
6209				fli.TargetResourceID = &targetResourceID
6210			}
6211		case "properties":
6212			if v != nil {
6213				var flowLogProperties FlowLogProperties
6214				err = json.Unmarshal(*v, &flowLogProperties)
6215				if err != nil {
6216					return err
6217				}
6218				fli.FlowLogProperties = &flowLogProperties
6219			}
6220		}
6221	}
6222
6223	return nil
6224}
6225
6226// FlowLogProperties parameters that define the configuration of flow log.
6227type FlowLogProperties struct {
6228	// StorageID - ID of the storage account which is used to store the flow log.
6229	StorageID *string `json:"storageId,omitempty"`
6230	// Enabled - Flag to enable/disable flow logging.
6231	Enabled         *bool                      `json:"enabled,omitempty"`
6232	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
6233}
6234
6235// FlowLogStatusParameters parameters that define a resource to query flow log status.
6236type FlowLogStatusParameters struct {
6237	// TargetResourceID - The target resource where getting the flow logging status.
6238	TargetResourceID *string `json:"targetResourceId,omitempty"`
6239}
6240
6241// FrontendIPConfiguration frontend IP address of the load balancer.
6242type FrontendIPConfiguration struct {
6243	autorest.Response `json:"-"`
6244	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
6245	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6246	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6247	Name *string `json:"name,omitempty"`
6248	// Etag - A unique read-only string that changes whenever the resource is updated.
6249	Etag *string `json:"etag,omitempty"`
6250	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
6251	Zones *[]string `json:"zones,omitempty"`
6252	// ID - Resource ID.
6253	ID *string `json:"id,omitempty"`
6254}
6255
6256// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
6257func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
6258	objectMap := make(map[string]interface{})
6259	if fic.FrontendIPConfigurationPropertiesFormat != nil {
6260		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
6261	}
6262	if fic.Name != nil {
6263		objectMap["name"] = fic.Name
6264	}
6265	if fic.Etag != nil {
6266		objectMap["etag"] = fic.Etag
6267	}
6268	if fic.Zones != nil {
6269		objectMap["zones"] = fic.Zones
6270	}
6271	if fic.ID != nil {
6272		objectMap["id"] = fic.ID
6273	}
6274	return json.Marshal(objectMap)
6275}
6276
6277// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
6278func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
6279	var m map[string]*json.RawMessage
6280	err := json.Unmarshal(body, &m)
6281	if err != nil {
6282		return err
6283	}
6284	for k, v := range m {
6285		switch k {
6286		case "properties":
6287			if v != nil {
6288				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
6289				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
6290				if err != nil {
6291					return err
6292				}
6293				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
6294			}
6295		case "name":
6296			if v != nil {
6297				var name string
6298				err = json.Unmarshal(*v, &name)
6299				if err != nil {
6300					return err
6301				}
6302				fic.Name = &name
6303			}
6304		case "etag":
6305			if v != nil {
6306				var etag string
6307				err = json.Unmarshal(*v, &etag)
6308				if err != nil {
6309					return err
6310				}
6311				fic.Etag = &etag
6312			}
6313		case "zones":
6314			if v != nil {
6315				var zones []string
6316				err = json.Unmarshal(*v, &zones)
6317				if err != nil {
6318					return err
6319				}
6320				fic.Zones = &zones
6321			}
6322		case "id":
6323			if v != nil {
6324				var ID string
6325				err = json.Unmarshal(*v, &ID)
6326				if err != nil {
6327					return err
6328				}
6329				fic.ID = &ID
6330			}
6331		}
6332	}
6333
6334	return nil
6335}
6336
6337// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
6338type FrontendIPConfigurationPropertiesFormat struct {
6339	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
6340	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
6341	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
6342	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
6343	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
6344	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
6345	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
6346	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
6347	// PrivateIPAddress - The private IP address of the IP configuration.
6348	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6349	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6350	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6351	// Subnet - The reference of the subnet resource.
6352	Subnet *Subnet `json:"subnet,omitempty"`
6353	// PublicIPAddress - The reference of the Public IP resource.
6354	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6355	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6356	ProvisioningState *string `json:"provisioningState,omitempty"`
6357}
6358
6359// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
6360func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6361	objectMap := make(map[string]interface{})
6362	if ficpf.PrivateIPAddress != nil {
6363		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
6364	}
6365	if ficpf.PrivateIPAllocationMethod != "" {
6366		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
6367	}
6368	if ficpf.Subnet != nil {
6369		objectMap["subnet"] = ficpf.Subnet
6370	}
6371	if ficpf.PublicIPAddress != nil {
6372		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
6373	}
6374	if ficpf.ProvisioningState != nil {
6375		objectMap["provisioningState"] = ficpf.ProvisioningState
6376	}
6377	return json.Marshal(objectMap)
6378}
6379
6380// GatewayRoute gateway routing details
6381type GatewayRoute struct {
6382	// LocalAddress - READ-ONLY; The gateway's local address
6383	LocalAddress *string `json:"localAddress,omitempty"`
6384	// NetworkProperty - READ-ONLY; The route's network prefix
6385	NetworkProperty *string `json:"network,omitempty"`
6386	// NextHop - READ-ONLY; The route's next hop
6387	NextHop *string `json:"nextHop,omitempty"`
6388	// SourcePeer - READ-ONLY; The peer this route was learned from
6389	SourcePeer *string `json:"sourcePeer,omitempty"`
6390	// Origin - READ-ONLY; The source this route was learned from
6391	Origin *string `json:"origin,omitempty"`
6392	// AsPath - READ-ONLY; The route's AS path sequence
6393	AsPath *string `json:"asPath,omitempty"`
6394	// Weight - READ-ONLY; The route's weight
6395	Weight *int32 `json:"weight,omitempty"`
6396}
6397
6398// MarshalJSON is the custom marshaler for GatewayRoute.
6399func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
6400	objectMap := make(map[string]interface{})
6401	return json.Marshal(objectMap)
6402}
6403
6404// GatewayRouteListResult list of virtual network gateway routes
6405type GatewayRouteListResult struct {
6406	autorest.Response `json:"-"`
6407	// Value - List of gateway routes
6408	Value *[]GatewayRoute `json:"value,omitempty"`
6409}
6410
6411// InboundNatPool inbound NAT pool of the load balancer.
6412type InboundNatPool struct {
6413	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
6414	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
6415	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6416	Name *string `json:"name,omitempty"`
6417	// Etag - A unique read-only string that changes whenever the resource is updated.
6418	Etag *string `json:"etag,omitempty"`
6419	// ID - Resource ID.
6420	ID *string `json:"id,omitempty"`
6421}
6422
6423// MarshalJSON is the custom marshaler for InboundNatPool.
6424func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
6425	objectMap := make(map[string]interface{})
6426	if inp.InboundNatPoolPropertiesFormat != nil {
6427		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
6428	}
6429	if inp.Name != nil {
6430		objectMap["name"] = inp.Name
6431	}
6432	if inp.Etag != nil {
6433		objectMap["etag"] = inp.Etag
6434	}
6435	if inp.ID != nil {
6436		objectMap["id"] = inp.ID
6437	}
6438	return json.Marshal(objectMap)
6439}
6440
6441// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
6442func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
6443	var m map[string]*json.RawMessage
6444	err := json.Unmarshal(body, &m)
6445	if err != nil {
6446		return err
6447	}
6448	for k, v := range m {
6449		switch k {
6450		case "properties":
6451			if v != nil {
6452				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
6453				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
6454				if err != nil {
6455					return err
6456				}
6457				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
6458			}
6459		case "name":
6460			if v != nil {
6461				var name string
6462				err = json.Unmarshal(*v, &name)
6463				if err != nil {
6464					return err
6465				}
6466				inp.Name = &name
6467			}
6468		case "etag":
6469			if v != nil {
6470				var etag string
6471				err = json.Unmarshal(*v, &etag)
6472				if err != nil {
6473					return err
6474				}
6475				inp.Etag = &etag
6476			}
6477		case "id":
6478			if v != nil {
6479				var ID string
6480				err = json.Unmarshal(*v, &ID)
6481				if err != nil {
6482					return err
6483				}
6484				inp.ID = &ID
6485			}
6486		}
6487	}
6488
6489	return nil
6490}
6491
6492// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
6493type InboundNatPoolPropertiesFormat struct {
6494	// FrontendIPConfiguration - A reference to frontend IP addresses.
6495	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6496	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6497	Protocol TransportProtocol `json:"protocol,omitempty"`
6498	// 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.
6499	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
6500	// 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.
6501	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
6502	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
6503	BackendPort *int32 `json:"backendPort,omitempty"`
6504	// 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.
6505	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6506	// 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.
6507	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6508	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6509	ProvisioningState *string `json:"provisioningState,omitempty"`
6510}
6511
6512// InboundNatRule inbound NAT rule of the load balancer.
6513type InboundNatRule struct {
6514	autorest.Response `json:"-"`
6515	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
6516	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
6517	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6518	Name *string `json:"name,omitempty"`
6519	// Etag - A unique read-only string that changes whenever the resource is updated.
6520	Etag *string `json:"etag,omitempty"`
6521	// ID - Resource ID.
6522	ID *string `json:"id,omitempty"`
6523}
6524
6525// MarshalJSON is the custom marshaler for InboundNatRule.
6526func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
6527	objectMap := make(map[string]interface{})
6528	if inr.InboundNatRulePropertiesFormat != nil {
6529		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
6530	}
6531	if inr.Name != nil {
6532		objectMap["name"] = inr.Name
6533	}
6534	if inr.Etag != nil {
6535		objectMap["etag"] = inr.Etag
6536	}
6537	if inr.ID != nil {
6538		objectMap["id"] = inr.ID
6539	}
6540	return json.Marshal(objectMap)
6541}
6542
6543// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
6544func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
6545	var m map[string]*json.RawMessage
6546	err := json.Unmarshal(body, &m)
6547	if err != nil {
6548		return err
6549	}
6550	for k, v := range m {
6551		switch k {
6552		case "properties":
6553			if v != nil {
6554				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
6555				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
6556				if err != nil {
6557					return err
6558				}
6559				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
6560			}
6561		case "name":
6562			if v != nil {
6563				var name string
6564				err = json.Unmarshal(*v, &name)
6565				if err != nil {
6566					return err
6567				}
6568				inr.Name = &name
6569			}
6570		case "etag":
6571			if v != nil {
6572				var etag string
6573				err = json.Unmarshal(*v, &etag)
6574				if err != nil {
6575					return err
6576				}
6577				inr.Etag = &etag
6578			}
6579		case "id":
6580			if v != nil {
6581				var ID string
6582				err = json.Unmarshal(*v, &ID)
6583				if err != nil {
6584					return err
6585				}
6586				inr.ID = &ID
6587			}
6588		}
6589	}
6590
6591	return nil
6592}
6593
6594// InboundNatRuleListResult response for ListInboundNatRule API service call.
6595type InboundNatRuleListResult struct {
6596	autorest.Response `json:"-"`
6597	// Value - A list of inbound nat rules in a load balancer.
6598	Value *[]InboundNatRule `json:"value,omitempty"`
6599	// NextLink - READ-ONLY; The URL to get the next set of results.
6600	NextLink *string `json:"nextLink,omitempty"`
6601}
6602
6603// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
6604func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
6605	objectMap := make(map[string]interface{})
6606	if inrlr.Value != nil {
6607		objectMap["value"] = inrlr.Value
6608	}
6609	return json.Marshal(objectMap)
6610}
6611
6612// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
6613type InboundNatRuleListResultIterator struct {
6614	i    int
6615	page InboundNatRuleListResultPage
6616}
6617
6618// NextWithContext advances to the next value.  If there was an error making
6619// the request the iterator does not advance and the error is returned.
6620func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
6621	if tracing.IsEnabled() {
6622		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
6623		defer func() {
6624			sc := -1
6625			if iter.Response().Response.Response != nil {
6626				sc = iter.Response().Response.Response.StatusCode
6627			}
6628			tracing.EndSpan(ctx, sc, err)
6629		}()
6630	}
6631	iter.i++
6632	if iter.i < len(iter.page.Values()) {
6633		return nil
6634	}
6635	err = iter.page.NextWithContext(ctx)
6636	if err != nil {
6637		iter.i--
6638		return err
6639	}
6640	iter.i = 0
6641	return nil
6642}
6643
6644// Next advances to the next value.  If there was an error making
6645// the request the iterator does not advance and the error is returned.
6646// Deprecated: Use NextWithContext() instead.
6647func (iter *InboundNatRuleListResultIterator) Next() error {
6648	return iter.NextWithContext(context.Background())
6649}
6650
6651// NotDone returns true if the enumeration should be started or is not yet complete.
6652func (iter InboundNatRuleListResultIterator) NotDone() bool {
6653	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6654}
6655
6656// Response returns the raw server response from the last page request.
6657func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
6658	return iter.page.Response()
6659}
6660
6661// Value returns the current value or a zero-initialized value if the
6662// iterator has advanced beyond the end of the collection.
6663func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
6664	if !iter.page.NotDone() {
6665		return InboundNatRule{}
6666	}
6667	return iter.page.Values()[iter.i]
6668}
6669
6670// Creates a new instance of the InboundNatRuleListResultIterator type.
6671func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
6672	return InboundNatRuleListResultIterator{page: page}
6673}
6674
6675// IsEmpty returns true if the ListResult contains no values.
6676func (inrlr InboundNatRuleListResult) IsEmpty() bool {
6677	return inrlr.Value == nil || len(*inrlr.Value) == 0
6678}
6679
6680// hasNextLink returns true if the NextLink is not empty.
6681func (inrlr InboundNatRuleListResult) hasNextLink() bool {
6682	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
6683}
6684
6685// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
6686// It returns nil if no more results exist.
6687func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
6688	if !inrlr.hasNextLink() {
6689		return nil, nil
6690	}
6691	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6692		autorest.AsJSON(),
6693		autorest.AsGet(),
6694		autorest.WithBaseURL(to.String(inrlr.NextLink)))
6695}
6696
6697// InboundNatRuleListResultPage contains a page of InboundNatRule values.
6698type InboundNatRuleListResultPage struct {
6699	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
6700	inrlr InboundNatRuleListResult
6701}
6702
6703// NextWithContext advances to the next page of values.  If there was an error making
6704// the request the page does not advance and the error is returned.
6705func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
6706	if tracing.IsEnabled() {
6707		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
6708		defer func() {
6709			sc := -1
6710			if page.Response().Response.Response != nil {
6711				sc = page.Response().Response.Response.StatusCode
6712			}
6713			tracing.EndSpan(ctx, sc, err)
6714		}()
6715	}
6716	for {
6717		next, err := page.fn(ctx, page.inrlr)
6718		if err != nil {
6719			return err
6720		}
6721		page.inrlr = next
6722		if !next.hasNextLink() || !next.IsEmpty() {
6723			break
6724		}
6725	}
6726	return nil
6727}
6728
6729// Next advances to the next page of values.  If there was an error making
6730// the request the page does not advance and the error is returned.
6731// Deprecated: Use NextWithContext() instead.
6732func (page *InboundNatRuleListResultPage) Next() error {
6733	return page.NextWithContext(context.Background())
6734}
6735
6736// NotDone returns true if the page enumeration should be started or is not yet complete.
6737func (page InboundNatRuleListResultPage) NotDone() bool {
6738	return !page.inrlr.IsEmpty()
6739}
6740
6741// Response returns the raw server response from the last page request.
6742func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
6743	return page.inrlr
6744}
6745
6746// Values returns the slice of values for the current page or nil if there are no values.
6747func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
6748	if page.inrlr.IsEmpty() {
6749		return nil
6750	}
6751	return *page.inrlr.Value
6752}
6753
6754// Creates a new instance of the InboundNatRuleListResultPage type.
6755func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
6756	return InboundNatRuleListResultPage{
6757		fn:    getNextPage,
6758		inrlr: cur,
6759	}
6760}
6761
6762// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
6763type InboundNatRulePropertiesFormat struct {
6764	// FrontendIPConfiguration - A reference to frontend IP addresses.
6765	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6766	// 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.
6767	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
6768	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6769	Protocol TransportProtocol `json:"protocol,omitempty"`
6770	// 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.
6771	FrontendPort *int32 `json:"frontendPort,omitempty"`
6772	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
6773	BackendPort *int32 `json:"backendPort,omitempty"`
6774	// 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.
6775	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6776	// 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.
6777	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6778	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6779	ProvisioningState *string `json:"provisioningState,omitempty"`
6780}
6781
6782// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
6783func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
6784	objectMap := make(map[string]interface{})
6785	if inrpf.FrontendIPConfiguration != nil {
6786		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
6787	}
6788	if inrpf.Protocol != "" {
6789		objectMap["protocol"] = inrpf.Protocol
6790	}
6791	if inrpf.FrontendPort != nil {
6792		objectMap["frontendPort"] = inrpf.FrontendPort
6793	}
6794	if inrpf.BackendPort != nil {
6795		objectMap["backendPort"] = inrpf.BackendPort
6796	}
6797	if inrpf.IdleTimeoutInMinutes != nil {
6798		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
6799	}
6800	if inrpf.EnableFloatingIP != nil {
6801		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
6802	}
6803	if inrpf.ProvisioningState != nil {
6804		objectMap["provisioningState"] = inrpf.ProvisioningState
6805	}
6806	return json.Marshal(objectMap)
6807}
6808
6809// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6810// long-running operation.
6811type InboundNatRulesCreateOrUpdateFuture struct {
6812	azure.FutureAPI
6813	// Result returns the result of the asynchronous operation.
6814	// If the operation has not completed it will return an error.
6815	Result func(InboundNatRulesClient) (InboundNatRule, error)
6816}
6817
6818// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6819func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6820	var azFuture azure.Future
6821	if err := json.Unmarshal(body, &azFuture); err != nil {
6822		return err
6823	}
6824	future.FutureAPI = &azFuture
6825	future.Result = future.result
6826	return nil
6827}
6828
6829// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
6830func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
6831	var done bool
6832	done, err = future.DoneWithContext(context.Background(), client)
6833	if err != nil {
6834		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6835		return
6836	}
6837	if !done {
6838		inr.Response.Response = future.Response()
6839		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
6840		return
6841	}
6842	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6843	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
6844		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
6845		if err != nil {
6846			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
6847		}
6848	}
6849	return
6850}
6851
6852// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6853// operation.
6854type InboundNatRulesDeleteFuture struct {
6855	azure.FutureAPI
6856	// Result returns the result of the asynchronous operation.
6857	// If the operation has not completed it will return an error.
6858	Result func(InboundNatRulesClient) (autorest.Response, error)
6859}
6860
6861// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6862func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
6863	var azFuture azure.Future
6864	if err := json.Unmarshal(body, &azFuture); err != nil {
6865		return err
6866	}
6867	future.FutureAPI = &azFuture
6868	future.Result = future.result
6869	return nil
6870}
6871
6872// result is the default implementation for InboundNatRulesDeleteFuture.Result.
6873func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
6874	var done bool
6875	done, err = future.DoneWithContext(context.Background(), client)
6876	if err != nil {
6877		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
6878		return
6879	}
6880	if !done {
6881		ar.Response = future.Response()
6882		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
6883		return
6884	}
6885	ar.Response = future.Response()
6886	return
6887}
6888
6889// Interface a network interface in a resource group.
6890type Interface struct {
6891	autorest.Response `json:"-"`
6892	// InterfacePropertiesFormat - Properties of the network interface.
6893	*InterfacePropertiesFormat `json:"properties,omitempty"`
6894	// Etag - A unique read-only string that changes whenever the resource is updated.
6895	Etag *string `json:"etag,omitempty"`
6896	// ID - Resource ID.
6897	ID *string `json:"id,omitempty"`
6898	// Name - READ-ONLY; Resource name.
6899	Name *string `json:"name,omitempty"`
6900	// Type - READ-ONLY; Resource type.
6901	Type *string `json:"type,omitempty"`
6902	// Location - Resource location.
6903	Location *string `json:"location,omitempty"`
6904	// Tags - Resource tags.
6905	Tags map[string]*string `json:"tags"`
6906}
6907
6908// MarshalJSON is the custom marshaler for Interface.
6909func (i Interface) MarshalJSON() ([]byte, error) {
6910	objectMap := make(map[string]interface{})
6911	if i.InterfacePropertiesFormat != nil {
6912		objectMap["properties"] = i.InterfacePropertiesFormat
6913	}
6914	if i.Etag != nil {
6915		objectMap["etag"] = i.Etag
6916	}
6917	if i.ID != nil {
6918		objectMap["id"] = i.ID
6919	}
6920	if i.Location != nil {
6921		objectMap["location"] = i.Location
6922	}
6923	if i.Tags != nil {
6924		objectMap["tags"] = i.Tags
6925	}
6926	return json.Marshal(objectMap)
6927}
6928
6929// UnmarshalJSON is the custom unmarshaler for Interface struct.
6930func (i *Interface) UnmarshalJSON(body []byte) error {
6931	var m map[string]*json.RawMessage
6932	err := json.Unmarshal(body, &m)
6933	if err != nil {
6934		return err
6935	}
6936	for k, v := range m {
6937		switch k {
6938		case "properties":
6939			if v != nil {
6940				var interfacePropertiesFormat InterfacePropertiesFormat
6941				err = json.Unmarshal(*v, &interfacePropertiesFormat)
6942				if err != nil {
6943					return err
6944				}
6945				i.InterfacePropertiesFormat = &interfacePropertiesFormat
6946			}
6947		case "etag":
6948			if v != nil {
6949				var etag string
6950				err = json.Unmarshal(*v, &etag)
6951				if err != nil {
6952					return err
6953				}
6954				i.Etag = &etag
6955			}
6956		case "id":
6957			if v != nil {
6958				var ID string
6959				err = json.Unmarshal(*v, &ID)
6960				if err != nil {
6961					return err
6962				}
6963				i.ID = &ID
6964			}
6965		case "name":
6966			if v != nil {
6967				var name string
6968				err = json.Unmarshal(*v, &name)
6969				if err != nil {
6970					return err
6971				}
6972				i.Name = &name
6973			}
6974		case "type":
6975			if v != nil {
6976				var typeVar string
6977				err = json.Unmarshal(*v, &typeVar)
6978				if err != nil {
6979					return err
6980				}
6981				i.Type = &typeVar
6982			}
6983		case "location":
6984			if v != nil {
6985				var location string
6986				err = json.Unmarshal(*v, &location)
6987				if err != nil {
6988					return err
6989				}
6990				i.Location = &location
6991			}
6992		case "tags":
6993			if v != nil {
6994				var tags map[string]*string
6995				err = json.Unmarshal(*v, &tags)
6996				if err != nil {
6997					return err
6998				}
6999				i.Tags = tags
7000			}
7001		}
7002	}
7003
7004	return nil
7005}
7006
7007// InterfaceAssociation network interface and its custom security rules.
7008type InterfaceAssociation struct {
7009	// ID - READ-ONLY; Network interface ID.
7010	ID *string `json:"id,omitempty"`
7011	// SecurityRules - Collection of custom security rules.
7012	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
7013}
7014
7015// MarshalJSON is the custom marshaler for InterfaceAssociation.
7016func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
7017	objectMap := make(map[string]interface{})
7018	if ia.SecurityRules != nil {
7019		objectMap["securityRules"] = ia.SecurityRules
7020	}
7021	return json.Marshal(objectMap)
7022}
7023
7024// InterfaceDNSSettings DNS settings of a network interface.
7025type InterfaceDNSSettings struct {
7026	// 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.
7027	DNSServers *[]string `json:"dnsServers,omitempty"`
7028	// 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.
7029	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
7030	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
7031	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
7032	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
7033	InternalFqdn *string `json:"internalFqdn,omitempty"`
7034	// 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.
7035	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
7036}
7037
7038// InterfaceIPConfiguration iPConfiguration in a network interface.
7039type InterfaceIPConfiguration struct {
7040	autorest.Response `json:"-"`
7041	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
7042	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7043	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7044	Name *string `json:"name,omitempty"`
7045	// Etag - A unique read-only string that changes whenever the resource is updated.
7046	Etag *string `json:"etag,omitempty"`
7047	// ID - Resource ID.
7048	ID *string `json:"id,omitempty"`
7049}
7050
7051// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
7052func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7053	objectMap := make(map[string]interface{})
7054	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
7055		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
7056	}
7057	if iic.Name != nil {
7058		objectMap["name"] = iic.Name
7059	}
7060	if iic.Etag != nil {
7061		objectMap["etag"] = iic.Etag
7062	}
7063	if iic.ID != nil {
7064		objectMap["id"] = iic.ID
7065	}
7066	return json.Marshal(objectMap)
7067}
7068
7069// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
7070func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7071	var m map[string]*json.RawMessage
7072	err := json.Unmarshal(body, &m)
7073	if err != nil {
7074		return err
7075	}
7076	for k, v := range m {
7077		switch k {
7078		case "properties":
7079			if v != nil {
7080				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
7081				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
7082				if err != nil {
7083					return err
7084				}
7085				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
7086			}
7087		case "name":
7088			if v != nil {
7089				var name string
7090				err = json.Unmarshal(*v, &name)
7091				if err != nil {
7092					return err
7093				}
7094				iic.Name = &name
7095			}
7096		case "etag":
7097			if v != nil {
7098				var etag string
7099				err = json.Unmarshal(*v, &etag)
7100				if err != nil {
7101					return err
7102				}
7103				iic.Etag = &etag
7104			}
7105		case "id":
7106			if v != nil {
7107				var ID string
7108				err = json.Unmarshal(*v, &ID)
7109				if err != nil {
7110					return err
7111				}
7112				iic.ID = &ID
7113			}
7114		}
7115	}
7116
7117	return nil
7118}
7119
7120// InterfaceIPConfigurationListResult response for list ip configurations API service call.
7121type InterfaceIPConfigurationListResult struct {
7122	autorest.Response `json:"-"`
7123	// Value - A list of ip configurations.
7124	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
7125	// NextLink - READ-ONLY; The URL to get the next set of results.
7126	NextLink *string `json:"nextLink,omitempty"`
7127}
7128
7129// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
7130func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
7131	objectMap := make(map[string]interface{})
7132	if iiclr.Value != nil {
7133		objectMap["value"] = iiclr.Value
7134	}
7135	return json.Marshal(objectMap)
7136}
7137
7138// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
7139// InterfaceIPConfiguration values.
7140type InterfaceIPConfigurationListResultIterator struct {
7141	i    int
7142	page InterfaceIPConfigurationListResultPage
7143}
7144
7145// NextWithContext advances to the next value.  If there was an error making
7146// the request the iterator does not advance and the error is returned.
7147func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
7148	if tracing.IsEnabled() {
7149		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
7150		defer func() {
7151			sc := -1
7152			if iter.Response().Response.Response != nil {
7153				sc = iter.Response().Response.Response.StatusCode
7154			}
7155			tracing.EndSpan(ctx, sc, err)
7156		}()
7157	}
7158	iter.i++
7159	if iter.i < len(iter.page.Values()) {
7160		return nil
7161	}
7162	err = iter.page.NextWithContext(ctx)
7163	if err != nil {
7164		iter.i--
7165		return err
7166	}
7167	iter.i = 0
7168	return nil
7169}
7170
7171// Next advances to the next value.  If there was an error making
7172// the request the iterator does not advance and the error is returned.
7173// Deprecated: Use NextWithContext() instead.
7174func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
7175	return iter.NextWithContext(context.Background())
7176}
7177
7178// NotDone returns true if the enumeration should be started or is not yet complete.
7179func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
7180	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7181}
7182
7183// Response returns the raw server response from the last page request.
7184func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
7185	return iter.page.Response()
7186}
7187
7188// Value returns the current value or a zero-initialized value if the
7189// iterator has advanced beyond the end of the collection.
7190func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
7191	if !iter.page.NotDone() {
7192		return InterfaceIPConfiguration{}
7193	}
7194	return iter.page.Values()[iter.i]
7195}
7196
7197// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
7198func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
7199	return InterfaceIPConfigurationListResultIterator{page: page}
7200}
7201
7202// IsEmpty returns true if the ListResult contains no values.
7203func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
7204	return iiclr.Value == nil || len(*iiclr.Value) == 0
7205}
7206
7207// hasNextLink returns true if the NextLink is not empty.
7208func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
7209	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
7210}
7211
7212// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
7213// It returns nil if no more results exist.
7214func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
7215	if !iiclr.hasNextLink() {
7216		return nil, nil
7217	}
7218	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7219		autorest.AsJSON(),
7220		autorest.AsGet(),
7221		autorest.WithBaseURL(to.String(iiclr.NextLink)))
7222}
7223
7224// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
7225type InterfaceIPConfigurationListResultPage struct {
7226	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
7227	iiclr InterfaceIPConfigurationListResult
7228}
7229
7230// NextWithContext advances to the next page of values.  If there was an error making
7231// the request the page does not advance and the error is returned.
7232func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
7233	if tracing.IsEnabled() {
7234		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
7235		defer func() {
7236			sc := -1
7237			if page.Response().Response.Response != nil {
7238				sc = page.Response().Response.Response.StatusCode
7239			}
7240			tracing.EndSpan(ctx, sc, err)
7241		}()
7242	}
7243	for {
7244		next, err := page.fn(ctx, page.iiclr)
7245		if err != nil {
7246			return err
7247		}
7248		page.iiclr = next
7249		if !next.hasNextLink() || !next.IsEmpty() {
7250			break
7251		}
7252	}
7253	return nil
7254}
7255
7256// Next advances to the next page of values.  If there was an error making
7257// the request the page does not advance and the error is returned.
7258// Deprecated: Use NextWithContext() instead.
7259func (page *InterfaceIPConfigurationListResultPage) Next() error {
7260	return page.NextWithContext(context.Background())
7261}
7262
7263// NotDone returns true if the page enumeration should be started or is not yet complete.
7264func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
7265	return !page.iiclr.IsEmpty()
7266}
7267
7268// Response returns the raw server response from the last page request.
7269func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
7270	return page.iiclr
7271}
7272
7273// Values returns the slice of values for the current page or nil if there are no values.
7274func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
7275	if page.iiclr.IsEmpty() {
7276		return nil
7277	}
7278	return *page.iiclr.Value
7279}
7280
7281// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
7282func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
7283	return InterfaceIPConfigurationListResultPage{
7284		fn:    getNextPage,
7285		iiclr: cur,
7286	}
7287}
7288
7289// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
7290type InterfaceIPConfigurationPropertiesFormat struct {
7291	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
7292	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
7293	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
7294	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
7295	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
7296	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
7297	// PrivateIPAddress - Private IP address of the IP configuration.
7298	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7299	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7300	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7301	// 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'
7302	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
7303	// Subnet - Subnet bound to the IP configuration.
7304	Subnet *Subnet `json:"subnet,omitempty"`
7305	// Primary - Gets whether this is a primary customer address on the network interface.
7306	Primary *bool `json:"primary,omitempty"`
7307	// PublicIPAddress - Public IP address bound to the IP configuration.
7308	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7309	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
7310	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
7311	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7312	ProvisioningState *string `json:"provisioningState,omitempty"`
7313}
7314
7315// InterfaceListResult response for the ListNetworkInterface API service call.
7316type InterfaceListResult struct {
7317	autorest.Response `json:"-"`
7318	// Value - A list of network interfaces in a resource group.
7319	Value *[]Interface `json:"value,omitempty"`
7320	// NextLink - READ-ONLY; The URL to get the next set of results.
7321	NextLink *string `json:"nextLink,omitempty"`
7322}
7323
7324// MarshalJSON is the custom marshaler for InterfaceListResult.
7325func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
7326	objectMap := make(map[string]interface{})
7327	if ilr.Value != nil {
7328		objectMap["value"] = ilr.Value
7329	}
7330	return json.Marshal(objectMap)
7331}
7332
7333// InterfaceListResultIterator provides access to a complete listing of Interface values.
7334type InterfaceListResultIterator struct {
7335	i    int
7336	page InterfaceListResultPage
7337}
7338
7339// NextWithContext advances to the next value.  If there was an error making
7340// the request the iterator does not advance and the error is returned.
7341func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
7342	if tracing.IsEnabled() {
7343		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
7344		defer func() {
7345			sc := -1
7346			if iter.Response().Response.Response != nil {
7347				sc = iter.Response().Response.Response.StatusCode
7348			}
7349			tracing.EndSpan(ctx, sc, err)
7350		}()
7351	}
7352	iter.i++
7353	if iter.i < len(iter.page.Values()) {
7354		return nil
7355	}
7356	err = iter.page.NextWithContext(ctx)
7357	if err != nil {
7358		iter.i--
7359		return err
7360	}
7361	iter.i = 0
7362	return nil
7363}
7364
7365// Next advances to the next value.  If there was an error making
7366// the request the iterator does not advance and the error is returned.
7367// Deprecated: Use NextWithContext() instead.
7368func (iter *InterfaceListResultIterator) Next() error {
7369	return iter.NextWithContext(context.Background())
7370}
7371
7372// NotDone returns true if the enumeration should be started or is not yet complete.
7373func (iter InterfaceListResultIterator) NotDone() bool {
7374	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7375}
7376
7377// Response returns the raw server response from the last page request.
7378func (iter InterfaceListResultIterator) Response() InterfaceListResult {
7379	return iter.page.Response()
7380}
7381
7382// Value returns the current value or a zero-initialized value if the
7383// iterator has advanced beyond the end of the collection.
7384func (iter InterfaceListResultIterator) Value() Interface {
7385	if !iter.page.NotDone() {
7386		return Interface{}
7387	}
7388	return iter.page.Values()[iter.i]
7389}
7390
7391// Creates a new instance of the InterfaceListResultIterator type.
7392func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
7393	return InterfaceListResultIterator{page: page}
7394}
7395
7396// IsEmpty returns true if the ListResult contains no values.
7397func (ilr InterfaceListResult) IsEmpty() bool {
7398	return ilr.Value == nil || len(*ilr.Value) == 0
7399}
7400
7401// hasNextLink returns true if the NextLink is not empty.
7402func (ilr InterfaceListResult) hasNextLink() bool {
7403	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
7404}
7405
7406// interfaceListResultPreparer prepares a request to retrieve the next set of results.
7407// It returns nil if no more results exist.
7408func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
7409	if !ilr.hasNextLink() {
7410		return nil, nil
7411	}
7412	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7413		autorest.AsJSON(),
7414		autorest.AsGet(),
7415		autorest.WithBaseURL(to.String(ilr.NextLink)))
7416}
7417
7418// InterfaceListResultPage contains a page of Interface values.
7419type InterfaceListResultPage struct {
7420	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
7421	ilr InterfaceListResult
7422}
7423
7424// NextWithContext advances to the next page of values.  If there was an error making
7425// the request the page does not advance and the error is returned.
7426func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
7427	if tracing.IsEnabled() {
7428		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
7429		defer func() {
7430			sc := -1
7431			if page.Response().Response.Response != nil {
7432				sc = page.Response().Response.Response.StatusCode
7433			}
7434			tracing.EndSpan(ctx, sc, err)
7435		}()
7436	}
7437	for {
7438		next, err := page.fn(ctx, page.ilr)
7439		if err != nil {
7440			return err
7441		}
7442		page.ilr = next
7443		if !next.hasNextLink() || !next.IsEmpty() {
7444			break
7445		}
7446	}
7447	return nil
7448}
7449
7450// Next advances to the next page of values.  If there was an error making
7451// the request the page does not advance and the error is returned.
7452// Deprecated: Use NextWithContext() instead.
7453func (page *InterfaceListResultPage) Next() error {
7454	return page.NextWithContext(context.Background())
7455}
7456
7457// NotDone returns true if the page enumeration should be started or is not yet complete.
7458func (page InterfaceListResultPage) NotDone() bool {
7459	return !page.ilr.IsEmpty()
7460}
7461
7462// Response returns the raw server response from the last page request.
7463func (page InterfaceListResultPage) Response() InterfaceListResult {
7464	return page.ilr
7465}
7466
7467// Values returns the slice of values for the current page or nil if there are no values.
7468func (page InterfaceListResultPage) Values() []Interface {
7469	if page.ilr.IsEmpty() {
7470		return nil
7471	}
7472	return *page.ilr.Value
7473}
7474
7475// Creates a new instance of the InterfaceListResultPage type.
7476func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
7477	return InterfaceListResultPage{
7478		fn:  getNextPage,
7479		ilr: cur,
7480	}
7481}
7482
7483// InterfaceLoadBalancerListResult response for list ip configurations API service call.
7484type InterfaceLoadBalancerListResult struct {
7485	autorest.Response `json:"-"`
7486	// Value - A list of load balancers.
7487	Value *[]LoadBalancer `json:"value,omitempty"`
7488	// NextLink - READ-ONLY; The URL to get the next set of results.
7489	NextLink *string `json:"nextLink,omitempty"`
7490}
7491
7492// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
7493func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
7494	objectMap := make(map[string]interface{})
7495	if ilblr.Value != nil {
7496		objectMap["value"] = ilblr.Value
7497	}
7498	return json.Marshal(objectMap)
7499}
7500
7501// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
7502type InterfaceLoadBalancerListResultIterator struct {
7503	i    int
7504	page InterfaceLoadBalancerListResultPage
7505}
7506
7507// NextWithContext advances to the next value.  If there was an error making
7508// the request the iterator does not advance and the error is returned.
7509func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
7510	if tracing.IsEnabled() {
7511		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
7512		defer func() {
7513			sc := -1
7514			if iter.Response().Response.Response != nil {
7515				sc = iter.Response().Response.Response.StatusCode
7516			}
7517			tracing.EndSpan(ctx, sc, err)
7518		}()
7519	}
7520	iter.i++
7521	if iter.i < len(iter.page.Values()) {
7522		return nil
7523	}
7524	err = iter.page.NextWithContext(ctx)
7525	if err != nil {
7526		iter.i--
7527		return err
7528	}
7529	iter.i = 0
7530	return nil
7531}
7532
7533// Next advances to the next value.  If there was an error making
7534// the request the iterator does not advance and the error is returned.
7535// Deprecated: Use NextWithContext() instead.
7536func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
7537	return iter.NextWithContext(context.Background())
7538}
7539
7540// NotDone returns true if the enumeration should be started or is not yet complete.
7541func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
7542	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7543}
7544
7545// Response returns the raw server response from the last page request.
7546func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
7547	return iter.page.Response()
7548}
7549
7550// Value returns the current value or a zero-initialized value if the
7551// iterator has advanced beyond the end of the collection.
7552func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
7553	if !iter.page.NotDone() {
7554		return LoadBalancer{}
7555	}
7556	return iter.page.Values()[iter.i]
7557}
7558
7559// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
7560func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
7561	return InterfaceLoadBalancerListResultIterator{page: page}
7562}
7563
7564// IsEmpty returns true if the ListResult contains no values.
7565func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
7566	return ilblr.Value == nil || len(*ilblr.Value) == 0
7567}
7568
7569// hasNextLink returns true if the NextLink is not empty.
7570func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
7571	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
7572}
7573
7574// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
7575// It returns nil if no more results exist.
7576func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
7577	if !ilblr.hasNextLink() {
7578		return nil, nil
7579	}
7580	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7581		autorest.AsJSON(),
7582		autorest.AsGet(),
7583		autorest.WithBaseURL(to.String(ilblr.NextLink)))
7584}
7585
7586// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
7587type InterfaceLoadBalancerListResultPage struct {
7588	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
7589	ilblr InterfaceLoadBalancerListResult
7590}
7591
7592// NextWithContext advances to the next page of values.  If there was an error making
7593// the request the page does not advance and the error is returned.
7594func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
7595	if tracing.IsEnabled() {
7596		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
7597		defer func() {
7598			sc := -1
7599			if page.Response().Response.Response != nil {
7600				sc = page.Response().Response.Response.StatusCode
7601			}
7602			tracing.EndSpan(ctx, sc, err)
7603		}()
7604	}
7605	for {
7606		next, err := page.fn(ctx, page.ilblr)
7607		if err != nil {
7608			return err
7609		}
7610		page.ilblr = next
7611		if !next.hasNextLink() || !next.IsEmpty() {
7612			break
7613		}
7614	}
7615	return nil
7616}
7617
7618// Next advances to the next page of values.  If there was an error making
7619// the request the page does not advance and the error is returned.
7620// Deprecated: Use NextWithContext() instead.
7621func (page *InterfaceLoadBalancerListResultPage) Next() error {
7622	return page.NextWithContext(context.Background())
7623}
7624
7625// NotDone returns true if the page enumeration should be started or is not yet complete.
7626func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
7627	return !page.ilblr.IsEmpty()
7628}
7629
7630// Response returns the raw server response from the last page request.
7631func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
7632	return page.ilblr
7633}
7634
7635// Values returns the slice of values for the current page or nil if there are no values.
7636func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
7637	if page.ilblr.IsEmpty() {
7638		return nil
7639	}
7640	return *page.ilblr.Value
7641}
7642
7643// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
7644func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
7645	return InterfaceLoadBalancerListResultPage{
7646		fn:    getNextPage,
7647		ilblr: cur,
7648	}
7649}
7650
7651// InterfacePropertiesFormat networkInterface properties.
7652type InterfacePropertiesFormat struct {
7653	// VirtualMachine - The reference of a virtual machine.
7654	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
7655	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
7656	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
7657	// IPConfigurations - A list of IPConfigurations of the network interface.
7658	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7659	// DNSSettings - The DNS settings in network interface.
7660	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
7661	// MacAddress - The MAC address of the network interface.
7662	MacAddress *string `json:"macAddress,omitempty"`
7663	// Primary - Gets whether this is a primary network interface on a virtual machine.
7664	Primary *bool `json:"primary,omitempty"`
7665	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
7666	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
7667	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
7668	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
7669	// ResourceGUID - The resource GUID property of the network interface resource.
7670	ResourceGUID *string `json:"resourceGuid,omitempty"`
7671	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7672	ProvisioningState *string `json:"provisioningState,omitempty"`
7673}
7674
7675// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7676// long-running operation.
7677type InterfacesCreateOrUpdateFuture struct {
7678	azure.FutureAPI
7679	// Result returns the result of the asynchronous operation.
7680	// If the operation has not completed it will return an error.
7681	Result func(InterfacesClient) (Interface, error)
7682}
7683
7684// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7685func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7686	var azFuture azure.Future
7687	if err := json.Unmarshal(body, &azFuture); err != nil {
7688		return err
7689	}
7690	future.FutureAPI = &azFuture
7691	future.Result = future.result
7692	return nil
7693}
7694
7695// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
7696func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
7697	var done bool
7698	done, err = future.DoneWithContext(context.Background(), client)
7699	if err != nil {
7700		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7701		return
7702	}
7703	if !done {
7704		i.Response.Response = future.Response()
7705		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
7706		return
7707	}
7708	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7709	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7710		i, err = client.CreateOrUpdateResponder(i.Response.Response)
7711		if err != nil {
7712			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7713		}
7714	}
7715	return
7716}
7717
7718// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7719// operation.
7720type InterfacesDeleteFuture struct {
7721	azure.FutureAPI
7722	// Result returns the result of the asynchronous operation.
7723	// If the operation has not completed it will return an error.
7724	Result func(InterfacesClient) (autorest.Response, error)
7725}
7726
7727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7728func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
7729	var azFuture azure.Future
7730	if err := json.Unmarshal(body, &azFuture); err != nil {
7731		return err
7732	}
7733	future.FutureAPI = &azFuture
7734	future.Result = future.result
7735	return nil
7736}
7737
7738// result is the default implementation for InterfacesDeleteFuture.Result.
7739func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
7740	var done bool
7741	done, err = future.DoneWithContext(context.Background(), client)
7742	if err != nil {
7743		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
7744		return
7745	}
7746	if !done {
7747		ar.Response = future.Response()
7748		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
7749		return
7750	}
7751	ar.Response = future.Response()
7752	return
7753}
7754
7755// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
7756// long-running operation.
7757type InterfacesGetEffectiveRouteTableFuture struct {
7758	azure.FutureAPI
7759	// Result returns the result of the asynchronous operation.
7760	// If the operation has not completed it will return an error.
7761	Result func(InterfacesClient) (EffectiveRouteListResult, error)
7762}
7763
7764// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7765func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
7766	var azFuture azure.Future
7767	if err := json.Unmarshal(body, &azFuture); err != nil {
7768		return err
7769	}
7770	future.FutureAPI = &azFuture
7771	future.Result = future.result
7772	return nil
7773}
7774
7775// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
7776func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
7777	var done bool
7778	done, err = future.DoneWithContext(context.Background(), client)
7779	if err != nil {
7780		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
7781		return
7782	}
7783	if !done {
7784		erlr.Response.Response = future.Response()
7785		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
7786		return
7787	}
7788	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7789	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
7790		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
7791		if err != nil {
7792			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
7793		}
7794	}
7795	return
7796}
7797
7798// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
7799// results of a long-running operation.
7800type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
7801	azure.FutureAPI
7802	// Result returns the result of the asynchronous operation.
7803	// If the operation has not completed it will return an error.
7804	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
7805}
7806
7807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7808func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
7809	var azFuture azure.Future
7810	if err := json.Unmarshal(body, &azFuture); err != nil {
7811		return err
7812	}
7813	future.FutureAPI = &azFuture
7814	future.Result = future.result
7815	return nil
7816}
7817
7818// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
7819func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
7820	var done bool
7821	done, err = future.DoneWithContext(context.Background(), client)
7822	if err != nil {
7823		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
7824		return
7825	}
7826	if !done {
7827		ensglr.Response.Response = future.Response()
7828		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
7829		return
7830	}
7831	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7832	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
7833		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
7834		if err != nil {
7835			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
7836		}
7837	}
7838	return
7839}
7840
7841// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
7842// operation.
7843type InterfacesUpdateTagsFuture struct {
7844	azure.FutureAPI
7845	// Result returns the result of the asynchronous operation.
7846	// If the operation has not completed it will return an error.
7847	Result func(InterfacesClient) (Interface, error)
7848}
7849
7850// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7851func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7852	var azFuture azure.Future
7853	if err := json.Unmarshal(body, &azFuture); err != nil {
7854		return err
7855	}
7856	future.FutureAPI = &azFuture
7857	future.Result = future.result
7858	return nil
7859}
7860
7861// result is the default implementation for InterfacesUpdateTagsFuture.Result.
7862func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
7863	var done bool
7864	done, err = future.DoneWithContext(context.Background(), client)
7865	if err != nil {
7866		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7867		return
7868	}
7869	if !done {
7870		i.Response.Response = future.Response()
7871		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
7872		return
7873	}
7874	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7875	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7876		i, err = client.UpdateTagsResponder(i.Response.Response)
7877		if err != nil {
7878			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
7879		}
7880	}
7881	return
7882}
7883
7884// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
7885type IPAddressAvailabilityResult struct {
7886	autorest.Response `json:"-"`
7887	// Available - Private IP address availability.
7888	Available *bool `json:"available,omitempty"`
7889	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
7890	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
7891}
7892
7893// IPConfiguration IP configuration
7894type IPConfiguration struct {
7895	// IPConfigurationPropertiesFormat - Properties of the IP configuration
7896	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
7897	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7898	Name *string `json:"name,omitempty"`
7899	// Etag - A unique read-only string that changes whenever the resource is updated.
7900	Etag *string `json:"etag,omitempty"`
7901	// ID - Resource ID.
7902	ID *string `json:"id,omitempty"`
7903}
7904
7905// MarshalJSON is the custom marshaler for IPConfiguration.
7906func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
7907	objectMap := make(map[string]interface{})
7908	if ic.IPConfigurationPropertiesFormat != nil {
7909		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
7910	}
7911	if ic.Name != nil {
7912		objectMap["name"] = ic.Name
7913	}
7914	if ic.Etag != nil {
7915		objectMap["etag"] = ic.Etag
7916	}
7917	if ic.ID != nil {
7918		objectMap["id"] = ic.ID
7919	}
7920	return json.Marshal(objectMap)
7921}
7922
7923// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
7924func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
7925	var m map[string]*json.RawMessage
7926	err := json.Unmarshal(body, &m)
7927	if err != nil {
7928		return err
7929	}
7930	for k, v := range m {
7931		switch k {
7932		case "properties":
7933			if v != nil {
7934				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
7935				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
7936				if err != nil {
7937					return err
7938				}
7939				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
7940			}
7941		case "name":
7942			if v != nil {
7943				var name string
7944				err = json.Unmarshal(*v, &name)
7945				if err != nil {
7946					return err
7947				}
7948				ic.Name = &name
7949			}
7950		case "etag":
7951			if v != nil {
7952				var etag string
7953				err = json.Unmarshal(*v, &etag)
7954				if err != nil {
7955					return err
7956				}
7957				ic.Etag = &etag
7958			}
7959		case "id":
7960			if v != nil {
7961				var ID string
7962				err = json.Unmarshal(*v, &ID)
7963				if err != nil {
7964					return err
7965				}
7966				ic.ID = &ID
7967			}
7968		}
7969	}
7970
7971	return nil
7972}
7973
7974// IPConfigurationPropertiesFormat properties of IP configuration.
7975type IPConfigurationPropertiesFormat struct {
7976	// PrivateIPAddress - The private IP address of the IP configuration.
7977	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7978	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7979	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7980	// Subnet - The reference of the subnet resource.
7981	Subnet *Subnet `json:"subnet,omitempty"`
7982	// PublicIPAddress - The reference of the public IP resource.
7983	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7984	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7985	ProvisioningState *string `json:"provisioningState,omitempty"`
7986}
7987
7988// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
7989type IpsecPolicy struct {
7990	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
7991	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
7992	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
7993	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
7994	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
7995	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
7996	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
7997	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
7998	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
7999	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
8000	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
8001	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
8002	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
8003	DhGroup DhGroup `json:"dhGroup,omitempty"`
8004	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
8005	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
8006}
8007
8008// IPTag contains the IpTag associated with the public IP address
8009type IPTag struct {
8010	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
8011	IPTagType *string `json:"ipTagType,omitempty"`
8012	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
8013	Tag *string `json:"tag,omitempty"`
8014}
8015
8016// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
8017type Ipv6ExpressRouteCircuitPeeringConfig struct {
8018	// PrimaryPeerAddressPrefix - The primary address prefix.
8019	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8020	// SecondaryPeerAddressPrefix - The secondary address prefix.
8021	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8022	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8023	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8024	// RouteFilter - The reference of the RouteFilter resource.
8025	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8026	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
8027	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
8028}
8029
8030// LoadBalancer loadBalancer resource
8031type LoadBalancer struct {
8032	autorest.Response `json:"-"`
8033	// Sku - The load balancer SKU.
8034	Sku *LoadBalancerSku `json:"sku,omitempty"`
8035	// LoadBalancerPropertiesFormat - Properties of load balancer.
8036	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
8037	// Etag - A unique read-only string that changes whenever the resource is updated.
8038	Etag *string `json:"etag,omitempty"`
8039	// ID - Resource ID.
8040	ID *string `json:"id,omitempty"`
8041	// Name - READ-ONLY; Resource name.
8042	Name *string `json:"name,omitempty"`
8043	// Type - READ-ONLY; Resource type.
8044	Type *string `json:"type,omitempty"`
8045	// Location - Resource location.
8046	Location *string `json:"location,omitempty"`
8047	// Tags - Resource tags.
8048	Tags map[string]*string `json:"tags"`
8049}
8050
8051// MarshalJSON is the custom marshaler for LoadBalancer.
8052func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
8053	objectMap := make(map[string]interface{})
8054	if lb.Sku != nil {
8055		objectMap["sku"] = lb.Sku
8056	}
8057	if lb.LoadBalancerPropertiesFormat != nil {
8058		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
8059	}
8060	if lb.Etag != nil {
8061		objectMap["etag"] = lb.Etag
8062	}
8063	if lb.ID != nil {
8064		objectMap["id"] = lb.ID
8065	}
8066	if lb.Location != nil {
8067		objectMap["location"] = lb.Location
8068	}
8069	if lb.Tags != nil {
8070		objectMap["tags"] = lb.Tags
8071	}
8072	return json.Marshal(objectMap)
8073}
8074
8075// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
8076func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
8077	var m map[string]*json.RawMessage
8078	err := json.Unmarshal(body, &m)
8079	if err != nil {
8080		return err
8081	}
8082	for k, v := range m {
8083		switch k {
8084		case "sku":
8085			if v != nil {
8086				var sku LoadBalancerSku
8087				err = json.Unmarshal(*v, &sku)
8088				if err != nil {
8089					return err
8090				}
8091				lb.Sku = &sku
8092			}
8093		case "properties":
8094			if v != nil {
8095				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
8096				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
8097				if err != nil {
8098					return err
8099				}
8100				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
8101			}
8102		case "etag":
8103			if v != nil {
8104				var etag string
8105				err = json.Unmarshal(*v, &etag)
8106				if err != nil {
8107					return err
8108				}
8109				lb.Etag = &etag
8110			}
8111		case "id":
8112			if v != nil {
8113				var ID string
8114				err = json.Unmarshal(*v, &ID)
8115				if err != nil {
8116					return err
8117				}
8118				lb.ID = &ID
8119			}
8120		case "name":
8121			if v != nil {
8122				var name string
8123				err = json.Unmarshal(*v, &name)
8124				if err != nil {
8125					return err
8126				}
8127				lb.Name = &name
8128			}
8129		case "type":
8130			if v != nil {
8131				var typeVar string
8132				err = json.Unmarshal(*v, &typeVar)
8133				if err != nil {
8134					return err
8135				}
8136				lb.Type = &typeVar
8137			}
8138		case "location":
8139			if v != nil {
8140				var location string
8141				err = json.Unmarshal(*v, &location)
8142				if err != nil {
8143					return err
8144				}
8145				lb.Location = &location
8146			}
8147		case "tags":
8148			if v != nil {
8149				var tags map[string]*string
8150				err = json.Unmarshal(*v, &tags)
8151				if err != nil {
8152					return err
8153				}
8154				lb.Tags = tags
8155			}
8156		}
8157	}
8158
8159	return nil
8160}
8161
8162// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
8163type LoadBalancerBackendAddressPoolListResult struct {
8164	autorest.Response `json:"-"`
8165	// Value - A list of backend address pools in a load balancer.
8166	Value *[]BackendAddressPool `json:"value,omitempty"`
8167	// NextLink - READ-ONLY; The URL to get the next set of results.
8168	NextLink *string `json:"nextLink,omitempty"`
8169}
8170
8171// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
8172func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
8173	objectMap := make(map[string]interface{})
8174	if lbbaplr.Value != nil {
8175		objectMap["value"] = lbbaplr.Value
8176	}
8177	return json.Marshal(objectMap)
8178}
8179
8180// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
8181// BackendAddressPool values.
8182type LoadBalancerBackendAddressPoolListResultIterator struct {
8183	i    int
8184	page LoadBalancerBackendAddressPoolListResultPage
8185}
8186
8187// NextWithContext advances to the next value.  If there was an error making
8188// the request the iterator does not advance and the error is returned.
8189func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
8190	if tracing.IsEnabled() {
8191		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
8192		defer func() {
8193			sc := -1
8194			if iter.Response().Response.Response != nil {
8195				sc = iter.Response().Response.Response.StatusCode
8196			}
8197			tracing.EndSpan(ctx, sc, err)
8198		}()
8199	}
8200	iter.i++
8201	if iter.i < len(iter.page.Values()) {
8202		return nil
8203	}
8204	err = iter.page.NextWithContext(ctx)
8205	if err != nil {
8206		iter.i--
8207		return err
8208	}
8209	iter.i = 0
8210	return nil
8211}
8212
8213// Next advances to the next value.  If there was an error making
8214// the request the iterator does not advance and the error is returned.
8215// Deprecated: Use NextWithContext() instead.
8216func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
8217	return iter.NextWithContext(context.Background())
8218}
8219
8220// NotDone returns true if the enumeration should be started or is not yet complete.
8221func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
8222	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8223}
8224
8225// Response returns the raw server response from the last page request.
8226func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
8227	return iter.page.Response()
8228}
8229
8230// Value returns the current value or a zero-initialized value if the
8231// iterator has advanced beyond the end of the collection.
8232func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
8233	if !iter.page.NotDone() {
8234		return BackendAddressPool{}
8235	}
8236	return iter.page.Values()[iter.i]
8237}
8238
8239// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
8240func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
8241	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
8242}
8243
8244// IsEmpty returns true if the ListResult contains no values.
8245func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
8246	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
8247}
8248
8249// hasNextLink returns true if the NextLink is not empty.
8250func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
8251	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
8252}
8253
8254// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
8255// It returns nil if no more results exist.
8256func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
8257	if !lbbaplr.hasNextLink() {
8258		return nil, nil
8259	}
8260	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8261		autorest.AsJSON(),
8262		autorest.AsGet(),
8263		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
8264}
8265
8266// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
8267type LoadBalancerBackendAddressPoolListResultPage struct {
8268	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
8269	lbbaplr LoadBalancerBackendAddressPoolListResult
8270}
8271
8272// NextWithContext advances to the next page of values.  If there was an error making
8273// the request the page does not advance and the error is returned.
8274func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
8275	if tracing.IsEnabled() {
8276		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
8277		defer func() {
8278			sc := -1
8279			if page.Response().Response.Response != nil {
8280				sc = page.Response().Response.Response.StatusCode
8281			}
8282			tracing.EndSpan(ctx, sc, err)
8283		}()
8284	}
8285	for {
8286		next, err := page.fn(ctx, page.lbbaplr)
8287		if err != nil {
8288			return err
8289		}
8290		page.lbbaplr = next
8291		if !next.hasNextLink() || !next.IsEmpty() {
8292			break
8293		}
8294	}
8295	return nil
8296}
8297
8298// Next advances to the next page of values.  If there was an error making
8299// the request the page does not advance and the error is returned.
8300// Deprecated: Use NextWithContext() instead.
8301func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
8302	return page.NextWithContext(context.Background())
8303}
8304
8305// NotDone returns true if the page enumeration should be started or is not yet complete.
8306func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
8307	return !page.lbbaplr.IsEmpty()
8308}
8309
8310// Response returns the raw server response from the last page request.
8311func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
8312	return page.lbbaplr
8313}
8314
8315// Values returns the slice of values for the current page or nil if there are no values.
8316func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
8317	if page.lbbaplr.IsEmpty() {
8318		return nil
8319	}
8320	return *page.lbbaplr.Value
8321}
8322
8323// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
8324func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
8325	return LoadBalancerBackendAddressPoolListResultPage{
8326		fn:      getNextPage,
8327		lbbaplr: cur,
8328	}
8329}
8330
8331// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
8332type LoadBalancerFrontendIPConfigurationListResult struct {
8333	autorest.Response `json:"-"`
8334	// Value - A list of frontend IP configurations in a load balancer.
8335	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
8336	// NextLink - READ-ONLY; The URL to get the next set of results.
8337	NextLink *string `json:"nextLink,omitempty"`
8338}
8339
8340// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
8341func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
8342	objectMap := make(map[string]interface{})
8343	if lbficlr.Value != nil {
8344		objectMap["value"] = lbficlr.Value
8345	}
8346	return json.Marshal(objectMap)
8347}
8348
8349// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
8350// FrontendIPConfiguration values.
8351type LoadBalancerFrontendIPConfigurationListResultIterator struct {
8352	i    int
8353	page LoadBalancerFrontendIPConfigurationListResultPage
8354}
8355
8356// NextWithContext advances to the next value.  If there was an error making
8357// the request the iterator does not advance and the error is returned.
8358func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8359	if tracing.IsEnabled() {
8360		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
8361		defer func() {
8362			sc := -1
8363			if iter.Response().Response.Response != nil {
8364				sc = iter.Response().Response.Response.StatusCode
8365			}
8366			tracing.EndSpan(ctx, sc, err)
8367		}()
8368	}
8369	iter.i++
8370	if iter.i < len(iter.page.Values()) {
8371		return nil
8372	}
8373	err = iter.page.NextWithContext(ctx)
8374	if err != nil {
8375		iter.i--
8376		return err
8377	}
8378	iter.i = 0
8379	return nil
8380}
8381
8382// Next advances to the next value.  If there was an error making
8383// the request the iterator does not advance and the error is returned.
8384// Deprecated: Use NextWithContext() instead.
8385func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
8386	return iter.NextWithContext(context.Background())
8387}
8388
8389// NotDone returns true if the enumeration should be started or is not yet complete.
8390func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
8391	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8392}
8393
8394// Response returns the raw server response from the last page request.
8395func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
8396	return iter.page.Response()
8397}
8398
8399// Value returns the current value or a zero-initialized value if the
8400// iterator has advanced beyond the end of the collection.
8401func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
8402	if !iter.page.NotDone() {
8403		return FrontendIPConfiguration{}
8404	}
8405	return iter.page.Values()[iter.i]
8406}
8407
8408// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
8409func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
8410	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
8411}
8412
8413// IsEmpty returns true if the ListResult contains no values.
8414func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
8415	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
8416}
8417
8418// hasNextLink returns true if the NextLink is not empty.
8419func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
8420	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
8421}
8422
8423// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
8424// It returns nil if no more results exist.
8425func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
8426	if !lbficlr.hasNextLink() {
8427		return nil, nil
8428	}
8429	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8430		autorest.AsJSON(),
8431		autorest.AsGet(),
8432		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
8433}
8434
8435// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
8436type LoadBalancerFrontendIPConfigurationListResultPage struct {
8437	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
8438	lbficlr LoadBalancerFrontendIPConfigurationListResult
8439}
8440
8441// NextWithContext advances to the next page of values.  If there was an error making
8442// the request the page does not advance and the error is returned.
8443func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
8444	if tracing.IsEnabled() {
8445		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
8446		defer func() {
8447			sc := -1
8448			if page.Response().Response.Response != nil {
8449				sc = page.Response().Response.Response.StatusCode
8450			}
8451			tracing.EndSpan(ctx, sc, err)
8452		}()
8453	}
8454	for {
8455		next, err := page.fn(ctx, page.lbficlr)
8456		if err != nil {
8457			return err
8458		}
8459		page.lbficlr = next
8460		if !next.hasNextLink() || !next.IsEmpty() {
8461			break
8462		}
8463	}
8464	return nil
8465}
8466
8467// Next advances to the next page of values.  If there was an error making
8468// the request the page does not advance and the error is returned.
8469// Deprecated: Use NextWithContext() instead.
8470func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
8471	return page.NextWithContext(context.Background())
8472}
8473
8474// NotDone returns true if the page enumeration should be started or is not yet complete.
8475func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
8476	return !page.lbficlr.IsEmpty()
8477}
8478
8479// Response returns the raw server response from the last page request.
8480func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
8481	return page.lbficlr
8482}
8483
8484// Values returns the slice of values for the current page or nil if there are no values.
8485func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
8486	if page.lbficlr.IsEmpty() {
8487		return nil
8488	}
8489	return *page.lbficlr.Value
8490}
8491
8492// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
8493func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
8494	return LoadBalancerFrontendIPConfigurationListResultPage{
8495		fn:      getNextPage,
8496		lbficlr: cur,
8497	}
8498}
8499
8500// LoadBalancerListResult response for ListLoadBalancers API service call.
8501type LoadBalancerListResult struct {
8502	autorest.Response `json:"-"`
8503	// Value - A list of load balancers in a resource group.
8504	Value *[]LoadBalancer `json:"value,omitempty"`
8505	// NextLink - READ-ONLY; The URL to get the next set of results.
8506	NextLink *string `json:"nextLink,omitempty"`
8507}
8508
8509// MarshalJSON is the custom marshaler for LoadBalancerListResult.
8510func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
8511	objectMap := make(map[string]interface{})
8512	if lblr.Value != nil {
8513		objectMap["value"] = lblr.Value
8514	}
8515	return json.Marshal(objectMap)
8516}
8517
8518// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
8519type LoadBalancerListResultIterator struct {
8520	i    int
8521	page LoadBalancerListResultPage
8522}
8523
8524// NextWithContext advances to the next value.  If there was an error making
8525// the request the iterator does not advance and the error is returned.
8526func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
8527	if tracing.IsEnabled() {
8528		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
8529		defer func() {
8530			sc := -1
8531			if iter.Response().Response.Response != nil {
8532				sc = iter.Response().Response.Response.StatusCode
8533			}
8534			tracing.EndSpan(ctx, sc, err)
8535		}()
8536	}
8537	iter.i++
8538	if iter.i < len(iter.page.Values()) {
8539		return nil
8540	}
8541	err = iter.page.NextWithContext(ctx)
8542	if err != nil {
8543		iter.i--
8544		return err
8545	}
8546	iter.i = 0
8547	return nil
8548}
8549
8550// Next advances to the next value.  If there was an error making
8551// the request the iterator does not advance and the error is returned.
8552// Deprecated: Use NextWithContext() instead.
8553func (iter *LoadBalancerListResultIterator) Next() error {
8554	return iter.NextWithContext(context.Background())
8555}
8556
8557// NotDone returns true if the enumeration should be started or is not yet complete.
8558func (iter LoadBalancerListResultIterator) NotDone() bool {
8559	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8560}
8561
8562// Response returns the raw server response from the last page request.
8563func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
8564	return iter.page.Response()
8565}
8566
8567// Value returns the current value or a zero-initialized value if the
8568// iterator has advanced beyond the end of the collection.
8569func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
8570	if !iter.page.NotDone() {
8571		return LoadBalancer{}
8572	}
8573	return iter.page.Values()[iter.i]
8574}
8575
8576// Creates a new instance of the LoadBalancerListResultIterator type.
8577func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
8578	return LoadBalancerListResultIterator{page: page}
8579}
8580
8581// IsEmpty returns true if the ListResult contains no values.
8582func (lblr LoadBalancerListResult) IsEmpty() bool {
8583	return lblr.Value == nil || len(*lblr.Value) == 0
8584}
8585
8586// hasNextLink returns true if the NextLink is not empty.
8587func (lblr LoadBalancerListResult) hasNextLink() bool {
8588	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
8589}
8590
8591// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
8592// It returns nil if no more results exist.
8593func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
8594	if !lblr.hasNextLink() {
8595		return nil, nil
8596	}
8597	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8598		autorest.AsJSON(),
8599		autorest.AsGet(),
8600		autorest.WithBaseURL(to.String(lblr.NextLink)))
8601}
8602
8603// LoadBalancerListResultPage contains a page of LoadBalancer values.
8604type LoadBalancerListResultPage struct {
8605	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
8606	lblr LoadBalancerListResult
8607}
8608
8609// NextWithContext advances to the next page of values.  If there was an error making
8610// the request the page does not advance and the error is returned.
8611func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
8612	if tracing.IsEnabled() {
8613		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
8614		defer func() {
8615			sc := -1
8616			if page.Response().Response.Response != nil {
8617				sc = page.Response().Response.Response.StatusCode
8618			}
8619			tracing.EndSpan(ctx, sc, err)
8620		}()
8621	}
8622	for {
8623		next, err := page.fn(ctx, page.lblr)
8624		if err != nil {
8625			return err
8626		}
8627		page.lblr = next
8628		if !next.hasNextLink() || !next.IsEmpty() {
8629			break
8630		}
8631	}
8632	return nil
8633}
8634
8635// Next advances to the next page of values.  If there was an error making
8636// the request the page does not advance and the error is returned.
8637// Deprecated: Use NextWithContext() instead.
8638func (page *LoadBalancerListResultPage) Next() error {
8639	return page.NextWithContext(context.Background())
8640}
8641
8642// NotDone returns true if the page enumeration should be started or is not yet complete.
8643func (page LoadBalancerListResultPage) NotDone() bool {
8644	return !page.lblr.IsEmpty()
8645}
8646
8647// Response returns the raw server response from the last page request.
8648func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
8649	return page.lblr
8650}
8651
8652// Values returns the slice of values for the current page or nil if there are no values.
8653func (page LoadBalancerListResultPage) Values() []LoadBalancer {
8654	if page.lblr.IsEmpty() {
8655		return nil
8656	}
8657	return *page.lblr.Value
8658}
8659
8660// Creates a new instance of the LoadBalancerListResultPage type.
8661func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
8662	return LoadBalancerListResultPage{
8663		fn:   getNextPage,
8664		lblr: cur,
8665	}
8666}
8667
8668// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
8669type LoadBalancerLoadBalancingRuleListResult struct {
8670	autorest.Response `json:"-"`
8671	// Value - A list of load balancing rules in a load balancer.
8672	Value *[]LoadBalancingRule `json:"value,omitempty"`
8673	// NextLink - READ-ONLY; The URL to get the next set of results.
8674	NextLink *string `json:"nextLink,omitempty"`
8675}
8676
8677// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
8678func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
8679	objectMap := make(map[string]interface{})
8680	if lblbrlr.Value != nil {
8681		objectMap["value"] = lblbrlr.Value
8682	}
8683	return json.Marshal(objectMap)
8684}
8685
8686// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
8687// LoadBalancingRule values.
8688type LoadBalancerLoadBalancingRuleListResultIterator struct {
8689	i    int
8690	page LoadBalancerLoadBalancingRuleListResultPage
8691}
8692
8693// NextWithContext advances to the next value.  If there was an error making
8694// the request the iterator does not advance and the error is returned.
8695func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
8696	if tracing.IsEnabled() {
8697		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
8698		defer func() {
8699			sc := -1
8700			if iter.Response().Response.Response != nil {
8701				sc = iter.Response().Response.Response.StatusCode
8702			}
8703			tracing.EndSpan(ctx, sc, err)
8704		}()
8705	}
8706	iter.i++
8707	if iter.i < len(iter.page.Values()) {
8708		return nil
8709	}
8710	err = iter.page.NextWithContext(ctx)
8711	if err != nil {
8712		iter.i--
8713		return err
8714	}
8715	iter.i = 0
8716	return nil
8717}
8718
8719// Next advances to the next value.  If there was an error making
8720// the request the iterator does not advance and the error is returned.
8721// Deprecated: Use NextWithContext() instead.
8722func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
8723	return iter.NextWithContext(context.Background())
8724}
8725
8726// NotDone returns true if the enumeration should be started or is not yet complete.
8727func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
8728	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8729}
8730
8731// Response returns the raw server response from the last page request.
8732func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
8733	return iter.page.Response()
8734}
8735
8736// Value returns the current value or a zero-initialized value if the
8737// iterator has advanced beyond the end of the collection.
8738func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
8739	if !iter.page.NotDone() {
8740		return LoadBalancingRule{}
8741	}
8742	return iter.page.Values()[iter.i]
8743}
8744
8745// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
8746func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
8747	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
8748}
8749
8750// IsEmpty returns true if the ListResult contains no values.
8751func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
8752	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
8753}
8754
8755// hasNextLink returns true if the NextLink is not empty.
8756func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
8757	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
8758}
8759
8760// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
8761// It returns nil if no more results exist.
8762func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
8763	if !lblbrlr.hasNextLink() {
8764		return nil, nil
8765	}
8766	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8767		autorest.AsJSON(),
8768		autorest.AsGet(),
8769		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
8770}
8771
8772// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
8773type LoadBalancerLoadBalancingRuleListResultPage struct {
8774	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
8775	lblbrlr LoadBalancerLoadBalancingRuleListResult
8776}
8777
8778// NextWithContext advances to the next page of values.  If there was an error making
8779// the request the page does not advance and the error is returned.
8780func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
8781	if tracing.IsEnabled() {
8782		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
8783		defer func() {
8784			sc := -1
8785			if page.Response().Response.Response != nil {
8786				sc = page.Response().Response.Response.StatusCode
8787			}
8788			tracing.EndSpan(ctx, sc, err)
8789		}()
8790	}
8791	for {
8792		next, err := page.fn(ctx, page.lblbrlr)
8793		if err != nil {
8794			return err
8795		}
8796		page.lblbrlr = next
8797		if !next.hasNextLink() || !next.IsEmpty() {
8798			break
8799		}
8800	}
8801	return nil
8802}
8803
8804// Next advances to the next page of values.  If there was an error making
8805// the request the page does not advance and the error is returned.
8806// Deprecated: Use NextWithContext() instead.
8807func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
8808	return page.NextWithContext(context.Background())
8809}
8810
8811// NotDone returns true if the page enumeration should be started or is not yet complete.
8812func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
8813	return !page.lblbrlr.IsEmpty()
8814}
8815
8816// Response returns the raw server response from the last page request.
8817func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
8818	return page.lblbrlr
8819}
8820
8821// Values returns the slice of values for the current page or nil if there are no values.
8822func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
8823	if page.lblbrlr.IsEmpty() {
8824		return nil
8825	}
8826	return *page.lblbrlr.Value
8827}
8828
8829// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
8830func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
8831	return LoadBalancerLoadBalancingRuleListResultPage{
8832		fn:      getNextPage,
8833		lblbrlr: cur,
8834	}
8835}
8836
8837// LoadBalancerProbeListResult response for ListProbe API service call.
8838type LoadBalancerProbeListResult struct {
8839	autorest.Response `json:"-"`
8840	// Value - A list of probes in a load balancer.
8841	Value *[]Probe `json:"value,omitempty"`
8842	// NextLink - READ-ONLY; The URL to get the next set of results.
8843	NextLink *string `json:"nextLink,omitempty"`
8844}
8845
8846// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
8847func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
8848	objectMap := make(map[string]interface{})
8849	if lbplr.Value != nil {
8850		objectMap["value"] = lbplr.Value
8851	}
8852	return json.Marshal(objectMap)
8853}
8854
8855// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
8856type LoadBalancerProbeListResultIterator struct {
8857	i    int
8858	page LoadBalancerProbeListResultPage
8859}
8860
8861// NextWithContext advances to the next value.  If there was an error making
8862// the request the iterator does not advance and the error is returned.
8863func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
8864	if tracing.IsEnabled() {
8865		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
8866		defer func() {
8867			sc := -1
8868			if iter.Response().Response.Response != nil {
8869				sc = iter.Response().Response.Response.StatusCode
8870			}
8871			tracing.EndSpan(ctx, sc, err)
8872		}()
8873	}
8874	iter.i++
8875	if iter.i < len(iter.page.Values()) {
8876		return nil
8877	}
8878	err = iter.page.NextWithContext(ctx)
8879	if err != nil {
8880		iter.i--
8881		return err
8882	}
8883	iter.i = 0
8884	return nil
8885}
8886
8887// Next advances to the next value.  If there was an error making
8888// the request the iterator does not advance and the error is returned.
8889// Deprecated: Use NextWithContext() instead.
8890func (iter *LoadBalancerProbeListResultIterator) Next() error {
8891	return iter.NextWithContext(context.Background())
8892}
8893
8894// NotDone returns true if the enumeration should be started or is not yet complete.
8895func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
8896	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8897}
8898
8899// Response returns the raw server response from the last page request.
8900func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
8901	return iter.page.Response()
8902}
8903
8904// Value returns the current value or a zero-initialized value if the
8905// iterator has advanced beyond the end of the collection.
8906func (iter LoadBalancerProbeListResultIterator) Value() Probe {
8907	if !iter.page.NotDone() {
8908		return Probe{}
8909	}
8910	return iter.page.Values()[iter.i]
8911}
8912
8913// Creates a new instance of the LoadBalancerProbeListResultIterator type.
8914func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
8915	return LoadBalancerProbeListResultIterator{page: page}
8916}
8917
8918// IsEmpty returns true if the ListResult contains no values.
8919func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
8920	return lbplr.Value == nil || len(*lbplr.Value) == 0
8921}
8922
8923// hasNextLink returns true if the NextLink is not empty.
8924func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
8925	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
8926}
8927
8928// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
8929// It returns nil if no more results exist.
8930func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
8931	if !lbplr.hasNextLink() {
8932		return nil, nil
8933	}
8934	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8935		autorest.AsJSON(),
8936		autorest.AsGet(),
8937		autorest.WithBaseURL(to.String(lbplr.NextLink)))
8938}
8939
8940// LoadBalancerProbeListResultPage contains a page of Probe values.
8941type LoadBalancerProbeListResultPage struct {
8942	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
8943	lbplr LoadBalancerProbeListResult
8944}
8945
8946// NextWithContext advances to the next page of values.  If there was an error making
8947// the request the page does not advance and the error is returned.
8948func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
8949	if tracing.IsEnabled() {
8950		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
8951		defer func() {
8952			sc := -1
8953			if page.Response().Response.Response != nil {
8954				sc = page.Response().Response.Response.StatusCode
8955			}
8956			tracing.EndSpan(ctx, sc, err)
8957		}()
8958	}
8959	for {
8960		next, err := page.fn(ctx, page.lbplr)
8961		if err != nil {
8962			return err
8963		}
8964		page.lbplr = next
8965		if !next.hasNextLink() || !next.IsEmpty() {
8966			break
8967		}
8968	}
8969	return nil
8970}
8971
8972// Next advances to the next page of values.  If there was an error making
8973// the request the page does not advance and the error is returned.
8974// Deprecated: Use NextWithContext() instead.
8975func (page *LoadBalancerProbeListResultPage) Next() error {
8976	return page.NextWithContext(context.Background())
8977}
8978
8979// NotDone returns true if the page enumeration should be started or is not yet complete.
8980func (page LoadBalancerProbeListResultPage) NotDone() bool {
8981	return !page.lbplr.IsEmpty()
8982}
8983
8984// Response returns the raw server response from the last page request.
8985func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
8986	return page.lbplr
8987}
8988
8989// Values returns the slice of values for the current page or nil if there are no values.
8990func (page LoadBalancerProbeListResultPage) Values() []Probe {
8991	if page.lbplr.IsEmpty() {
8992		return nil
8993	}
8994	return *page.lbplr.Value
8995}
8996
8997// Creates a new instance of the LoadBalancerProbeListResultPage type.
8998func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
8999	return LoadBalancerProbeListResultPage{
9000		fn:    getNextPage,
9001		lbplr: cur,
9002	}
9003}
9004
9005// LoadBalancerPropertiesFormat properties of the load balancer.
9006type LoadBalancerPropertiesFormat struct {
9007	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
9008	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
9009	// BackendAddressPools - Collection of backend address pools used by a load balancer
9010	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
9011	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
9012	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
9013	// Probes - Collection of probe objects used in the load balancer
9014	Probes *[]Probe `json:"probes,omitempty"`
9015	// 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.
9016	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
9017	// 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.
9018	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
9019	// OutboundNatRules - The outbound NAT rules.
9020	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
9021	// ResourceGUID - The resource GUID property of the load balancer resource.
9022	ResourceGUID *string `json:"resourceGuid,omitempty"`
9023	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9024	ProvisioningState *string `json:"provisioningState,omitempty"`
9025}
9026
9027// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9028// long-running operation.
9029type LoadBalancersCreateOrUpdateFuture struct {
9030	azure.FutureAPI
9031	// Result returns the result of the asynchronous operation.
9032	// If the operation has not completed it will return an error.
9033	Result func(LoadBalancersClient) (LoadBalancer, error)
9034}
9035
9036// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9037func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9038	var azFuture azure.Future
9039	if err := json.Unmarshal(body, &azFuture); err != nil {
9040		return err
9041	}
9042	future.FutureAPI = &azFuture
9043	future.Result = future.result
9044	return nil
9045}
9046
9047// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
9048func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9049	var done bool
9050	done, err = future.DoneWithContext(context.Background(), client)
9051	if err != nil {
9052		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9053		return
9054	}
9055	if !done {
9056		lb.Response.Response = future.Response()
9057		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
9058		return
9059	}
9060	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9061	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9062		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
9063		if err != nil {
9064			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
9065		}
9066	}
9067	return
9068}
9069
9070// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9071// operation.
9072type LoadBalancersDeleteFuture struct {
9073	azure.FutureAPI
9074	// Result returns the result of the asynchronous operation.
9075	// If the operation has not completed it will return an error.
9076	Result func(LoadBalancersClient) (autorest.Response, error)
9077}
9078
9079// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9080func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
9081	var azFuture azure.Future
9082	if err := json.Unmarshal(body, &azFuture); err != nil {
9083		return err
9084	}
9085	future.FutureAPI = &azFuture
9086	future.Result = future.result
9087	return nil
9088}
9089
9090// result is the default implementation for LoadBalancersDeleteFuture.Result.
9091func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
9092	var done bool
9093	done, err = future.DoneWithContext(context.Background(), client)
9094	if err != nil {
9095		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
9096		return
9097	}
9098	if !done {
9099		ar.Response = future.Response()
9100		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
9101		return
9102	}
9103	ar.Response = future.Response()
9104	return
9105}
9106
9107// LoadBalancerSku SKU of a load balancer
9108type LoadBalancerSku struct {
9109	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
9110	Name LoadBalancerSkuName `json:"name,omitempty"`
9111}
9112
9113// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
9114// operation.
9115type LoadBalancersUpdateTagsFuture struct {
9116	azure.FutureAPI
9117	// Result returns the result of the asynchronous operation.
9118	// If the operation has not completed it will return an error.
9119	Result func(LoadBalancersClient) (LoadBalancer, error)
9120}
9121
9122// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9123func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9124	var azFuture azure.Future
9125	if err := json.Unmarshal(body, &azFuture); err != nil {
9126		return err
9127	}
9128	future.FutureAPI = &azFuture
9129	future.Result = future.result
9130	return nil
9131}
9132
9133// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
9134func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9135	var done bool
9136	done, err = future.DoneWithContext(context.Background(), client)
9137	if err != nil {
9138		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9139		return
9140	}
9141	if !done {
9142		lb.Response.Response = future.Response()
9143		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
9144		return
9145	}
9146	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9147	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9148		lb, err = client.UpdateTagsResponder(lb.Response.Response)
9149		if err != nil {
9150			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
9151		}
9152	}
9153	return
9154}
9155
9156// LoadBalancingRule a load balancing rule for a load balancer.
9157type LoadBalancingRule struct {
9158	autorest.Response `json:"-"`
9159	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
9160	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
9161	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9162	Name *string `json:"name,omitempty"`
9163	// Etag - A unique read-only string that changes whenever the resource is updated.
9164	Etag *string `json:"etag,omitempty"`
9165	// ID - Resource ID.
9166	ID *string `json:"id,omitempty"`
9167}
9168
9169// MarshalJSON is the custom marshaler for LoadBalancingRule.
9170func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
9171	objectMap := make(map[string]interface{})
9172	if lbr.LoadBalancingRulePropertiesFormat != nil {
9173		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
9174	}
9175	if lbr.Name != nil {
9176		objectMap["name"] = lbr.Name
9177	}
9178	if lbr.Etag != nil {
9179		objectMap["etag"] = lbr.Etag
9180	}
9181	if lbr.ID != nil {
9182		objectMap["id"] = lbr.ID
9183	}
9184	return json.Marshal(objectMap)
9185}
9186
9187// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
9188func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
9189	var m map[string]*json.RawMessage
9190	err := json.Unmarshal(body, &m)
9191	if err != nil {
9192		return err
9193	}
9194	for k, v := range m {
9195		switch k {
9196		case "properties":
9197			if v != nil {
9198				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
9199				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
9200				if err != nil {
9201					return err
9202				}
9203				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
9204			}
9205		case "name":
9206			if v != nil {
9207				var name string
9208				err = json.Unmarshal(*v, &name)
9209				if err != nil {
9210					return err
9211				}
9212				lbr.Name = &name
9213			}
9214		case "etag":
9215			if v != nil {
9216				var etag string
9217				err = json.Unmarshal(*v, &etag)
9218				if err != nil {
9219					return err
9220				}
9221				lbr.Etag = &etag
9222			}
9223		case "id":
9224			if v != nil {
9225				var ID string
9226				err = json.Unmarshal(*v, &ID)
9227				if err != nil {
9228					return err
9229				}
9230				lbr.ID = &ID
9231			}
9232		}
9233	}
9234
9235	return nil
9236}
9237
9238// LoadBalancingRulePropertiesFormat properties of the load balancer.
9239type LoadBalancingRulePropertiesFormat struct {
9240	// FrontendIPConfiguration - A reference to frontend IP addresses.
9241	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9242	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
9243	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
9244	// Probe - The reference of the load balancer probe used by the load balancing rule.
9245	Probe *SubResource `json:"probe,omitempty"`
9246	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9247	Protocol TransportProtocol `json:"protocol,omitempty"`
9248	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
9249	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
9250	// 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"
9251	FrontendPort *int32 `json:"frontendPort,omitempty"`
9252	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
9253	BackendPort *int32 `json:"backendPort,omitempty"`
9254	// 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.
9255	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9256	// 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.
9257	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9258	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
9259	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
9260	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9261	ProvisioningState *string `json:"provisioningState,omitempty"`
9262}
9263
9264// LocalNetworkGateway a common class for general resource information
9265type LocalNetworkGateway struct {
9266	autorest.Response `json:"-"`
9267	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
9268	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
9269	// Etag - A unique read-only string that changes whenever the resource is updated.
9270	Etag *string `json:"etag,omitempty"`
9271	// ID - Resource ID.
9272	ID *string `json:"id,omitempty"`
9273	// Name - READ-ONLY; Resource name.
9274	Name *string `json:"name,omitempty"`
9275	// Type - READ-ONLY; Resource type.
9276	Type *string `json:"type,omitempty"`
9277	// Location - Resource location.
9278	Location *string `json:"location,omitempty"`
9279	// Tags - Resource tags.
9280	Tags map[string]*string `json:"tags"`
9281}
9282
9283// MarshalJSON is the custom marshaler for LocalNetworkGateway.
9284func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
9285	objectMap := make(map[string]interface{})
9286	if lng.LocalNetworkGatewayPropertiesFormat != nil {
9287		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
9288	}
9289	if lng.Etag != nil {
9290		objectMap["etag"] = lng.Etag
9291	}
9292	if lng.ID != nil {
9293		objectMap["id"] = lng.ID
9294	}
9295	if lng.Location != nil {
9296		objectMap["location"] = lng.Location
9297	}
9298	if lng.Tags != nil {
9299		objectMap["tags"] = lng.Tags
9300	}
9301	return json.Marshal(objectMap)
9302}
9303
9304// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
9305func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
9306	var m map[string]*json.RawMessage
9307	err := json.Unmarshal(body, &m)
9308	if err != nil {
9309		return err
9310	}
9311	for k, v := range m {
9312		switch k {
9313		case "properties":
9314			if v != nil {
9315				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
9316				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
9317				if err != nil {
9318					return err
9319				}
9320				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
9321			}
9322		case "etag":
9323			if v != nil {
9324				var etag string
9325				err = json.Unmarshal(*v, &etag)
9326				if err != nil {
9327					return err
9328				}
9329				lng.Etag = &etag
9330			}
9331		case "id":
9332			if v != nil {
9333				var ID string
9334				err = json.Unmarshal(*v, &ID)
9335				if err != nil {
9336					return err
9337				}
9338				lng.ID = &ID
9339			}
9340		case "name":
9341			if v != nil {
9342				var name string
9343				err = json.Unmarshal(*v, &name)
9344				if err != nil {
9345					return err
9346				}
9347				lng.Name = &name
9348			}
9349		case "type":
9350			if v != nil {
9351				var typeVar string
9352				err = json.Unmarshal(*v, &typeVar)
9353				if err != nil {
9354					return err
9355				}
9356				lng.Type = &typeVar
9357			}
9358		case "location":
9359			if v != nil {
9360				var location string
9361				err = json.Unmarshal(*v, &location)
9362				if err != nil {
9363					return err
9364				}
9365				lng.Location = &location
9366			}
9367		case "tags":
9368			if v != nil {
9369				var tags map[string]*string
9370				err = json.Unmarshal(*v, &tags)
9371				if err != nil {
9372					return err
9373				}
9374				lng.Tags = tags
9375			}
9376		}
9377	}
9378
9379	return nil
9380}
9381
9382// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
9383type LocalNetworkGatewayListResult struct {
9384	autorest.Response `json:"-"`
9385	// Value - A list of local network gateways that exists in a resource group.
9386	Value *[]LocalNetworkGateway `json:"value,omitempty"`
9387	// NextLink - READ-ONLY; The URL to get the next set of results.
9388	NextLink *string `json:"nextLink,omitempty"`
9389}
9390
9391// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
9392func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
9393	objectMap := make(map[string]interface{})
9394	if lnglr.Value != nil {
9395		objectMap["value"] = lnglr.Value
9396	}
9397	return json.Marshal(objectMap)
9398}
9399
9400// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
9401// values.
9402type LocalNetworkGatewayListResultIterator struct {
9403	i    int
9404	page LocalNetworkGatewayListResultPage
9405}
9406
9407// NextWithContext advances to the next value.  If there was an error making
9408// the request the iterator does not advance and the error is returned.
9409func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
9410	if tracing.IsEnabled() {
9411		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
9412		defer func() {
9413			sc := -1
9414			if iter.Response().Response.Response != nil {
9415				sc = iter.Response().Response.Response.StatusCode
9416			}
9417			tracing.EndSpan(ctx, sc, err)
9418		}()
9419	}
9420	iter.i++
9421	if iter.i < len(iter.page.Values()) {
9422		return nil
9423	}
9424	err = iter.page.NextWithContext(ctx)
9425	if err != nil {
9426		iter.i--
9427		return err
9428	}
9429	iter.i = 0
9430	return nil
9431}
9432
9433// Next advances to the next value.  If there was an error making
9434// the request the iterator does not advance and the error is returned.
9435// Deprecated: Use NextWithContext() instead.
9436func (iter *LocalNetworkGatewayListResultIterator) Next() error {
9437	return iter.NextWithContext(context.Background())
9438}
9439
9440// NotDone returns true if the enumeration should be started or is not yet complete.
9441func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
9442	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9443}
9444
9445// Response returns the raw server response from the last page request.
9446func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
9447	return iter.page.Response()
9448}
9449
9450// Value returns the current value or a zero-initialized value if the
9451// iterator has advanced beyond the end of the collection.
9452func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
9453	if !iter.page.NotDone() {
9454		return LocalNetworkGateway{}
9455	}
9456	return iter.page.Values()[iter.i]
9457}
9458
9459// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
9460func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
9461	return LocalNetworkGatewayListResultIterator{page: page}
9462}
9463
9464// IsEmpty returns true if the ListResult contains no values.
9465func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
9466	return lnglr.Value == nil || len(*lnglr.Value) == 0
9467}
9468
9469// hasNextLink returns true if the NextLink is not empty.
9470func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
9471	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
9472}
9473
9474// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
9475// It returns nil if no more results exist.
9476func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
9477	if !lnglr.hasNextLink() {
9478		return nil, nil
9479	}
9480	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9481		autorest.AsJSON(),
9482		autorest.AsGet(),
9483		autorest.WithBaseURL(to.String(lnglr.NextLink)))
9484}
9485
9486// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
9487type LocalNetworkGatewayListResultPage struct {
9488	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
9489	lnglr LocalNetworkGatewayListResult
9490}
9491
9492// NextWithContext advances to the next page of values.  If there was an error making
9493// the request the page does not advance and the error is returned.
9494func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
9495	if tracing.IsEnabled() {
9496		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
9497		defer func() {
9498			sc := -1
9499			if page.Response().Response.Response != nil {
9500				sc = page.Response().Response.Response.StatusCode
9501			}
9502			tracing.EndSpan(ctx, sc, err)
9503		}()
9504	}
9505	for {
9506		next, err := page.fn(ctx, page.lnglr)
9507		if err != nil {
9508			return err
9509		}
9510		page.lnglr = next
9511		if !next.hasNextLink() || !next.IsEmpty() {
9512			break
9513		}
9514	}
9515	return nil
9516}
9517
9518// Next advances to the next page of values.  If there was an error making
9519// the request the page does not advance and the error is returned.
9520// Deprecated: Use NextWithContext() instead.
9521func (page *LocalNetworkGatewayListResultPage) Next() error {
9522	return page.NextWithContext(context.Background())
9523}
9524
9525// NotDone returns true if the page enumeration should be started or is not yet complete.
9526func (page LocalNetworkGatewayListResultPage) NotDone() bool {
9527	return !page.lnglr.IsEmpty()
9528}
9529
9530// Response returns the raw server response from the last page request.
9531func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
9532	return page.lnglr
9533}
9534
9535// Values returns the slice of values for the current page or nil if there are no values.
9536func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
9537	if page.lnglr.IsEmpty() {
9538		return nil
9539	}
9540	return *page.lnglr.Value
9541}
9542
9543// Creates a new instance of the LocalNetworkGatewayListResultPage type.
9544func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
9545	return LocalNetworkGatewayListResultPage{
9546		fn:    getNextPage,
9547		lnglr: cur,
9548	}
9549}
9550
9551// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
9552type LocalNetworkGatewayPropertiesFormat struct {
9553	// LocalNetworkAddressSpace - Local network site address space.
9554	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
9555	// GatewayIPAddress - IP address of local network gateway.
9556	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
9557	// BgpSettings - Local network gateway's BGP speaker settings.
9558	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
9559	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
9560	ResourceGUID *string `json:"resourceGuid,omitempty"`
9561	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9562	ProvisioningState *string `json:"provisioningState,omitempty"`
9563}
9564
9565// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
9566func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
9567	objectMap := make(map[string]interface{})
9568	if lngpf.LocalNetworkAddressSpace != nil {
9569		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
9570	}
9571	if lngpf.GatewayIPAddress != nil {
9572		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
9573	}
9574	if lngpf.BgpSettings != nil {
9575		objectMap["bgpSettings"] = lngpf.BgpSettings
9576	}
9577	if lngpf.ResourceGUID != nil {
9578		objectMap["resourceGuid"] = lngpf.ResourceGUID
9579	}
9580	return json.Marshal(objectMap)
9581}
9582
9583// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9584// long-running operation.
9585type LocalNetworkGatewaysCreateOrUpdateFuture struct {
9586	azure.FutureAPI
9587	// Result returns the result of the asynchronous operation.
9588	// If the operation has not completed it will return an error.
9589	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9590}
9591
9592// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9593func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9594	var azFuture azure.Future
9595	if err := json.Unmarshal(body, &azFuture); err != nil {
9596		return err
9597	}
9598	future.FutureAPI = &azFuture
9599	future.Result = future.result
9600	return nil
9601}
9602
9603// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
9604func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9605	var done bool
9606	done, err = future.DoneWithContext(context.Background(), client)
9607	if err != nil {
9608		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9609		return
9610	}
9611	if !done {
9612		lng.Response.Response = future.Response()
9613		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
9614		return
9615	}
9616	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9617	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9618		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
9619		if err != nil {
9620			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
9621		}
9622	}
9623	return
9624}
9625
9626// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9627// long-running operation.
9628type LocalNetworkGatewaysDeleteFuture struct {
9629	azure.FutureAPI
9630	// Result returns the result of the asynchronous operation.
9631	// If the operation has not completed it will return an error.
9632	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
9633}
9634
9635// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9636func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
9637	var azFuture azure.Future
9638	if err := json.Unmarshal(body, &azFuture); err != nil {
9639		return err
9640	}
9641	future.FutureAPI = &azFuture
9642	future.Result = future.result
9643	return nil
9644}
9645
9646// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
9647func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
9648	var done bool
9649	done, err = future.DoneWithContext(context.Background(), client)
9650	if err != nil {
9651		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
9652		return
9653	}
9654	if !done {
9655		ar.Response = future.Response()
9656		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
9657		return
9658	}
9659	ar.Response = future.Response()
9660	return
9661}
9662
9663// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9664// long-running operation.
9665type LocalNetworkGatewaysUpdateTagsFuture struct {
9666	azure.FutureAPI
9667	// Result returns the result of the asynchronous operation.
9668	// If the operation has not completed it will return an error.
9669	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9670}
9671
9672// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9673func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9674	var azFuture azure.Future
9675	if err := json.Unmarshal(body, &azFuture); err != nil {
9676		return err
9677	}
9678	future.FutureAPI = &azFuture
9679	future.Result = future.result
9680	return nil
9681}
9682
9683// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
9684func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9685	var done bool
9686	done, err = future.DoneWithContext(context.Background(), client)
9687	if err != nil {
9688		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9689		return
9690	}
9691	if !done {
9692		lng.Response.Response = future.Response()
9693		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
9694		return
9695	}
9696	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9697	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9698		lng, err = client.UpdateTagsResponder(lng.Response.Response)
9699		if err != nil {
9700			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
9701		}
9702	}
9703	return
9704}
9705
9706// LogSpecification description of logging specification.
9707type LogSpecification struct {
9708	// Name - The name of the specification.
9709	Name *string `json:"name,omitempty"`
9710	// DisplayName - The display name of the specification.
9711	DisplayName *string `json:"displayName,omitempty"`
9712	// BlobDuration - Duration of the blob.
9713	BlobDuration *string `json:"blobDuration,omitempty"`
9714}
9715
9716// MetricSpecification description of metrics specification.
9717type MetricSpecification struct {
9718	// Name - The name of the metric.
9719	Name *string `json:"name,omitempty"`
9720	// DisplayName - The display name of the metric.
9721	DisplayName *string `json:"displayName,omitempty"`
9722	// DisplayDescription - The description of the metric.
9723	DisplayDescription *string `json:"displayDescription,omitempty"`
9724	// Unit - Units the metric to be displayed in.
9725	Unit *string `json:"unit,omitempty"`
9726	// AggregationType - The aggregation type.
9727	AggregationType *string `json:"aggregationType,omitempty"`
9728	// Availabilities - List of availability.
9729	Availabilities *[]Availability `json:"availabilities,omitempty"`
9730	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
9731	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
9732	// FillGapWithZero - Whether gaps would be filled with zeros.
9733	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
9734	// MetricFilterPattern - Pattern for the filter of the metric.
9735	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
9736	// Dimensions - List of dimensions.
9737	Dimensions *[]Dimension `json:"dimensions,omitempty"`
9738	// IsInternal - Whether the metric is internal.
9739	IsInternal *bool `json:"isInternal,omitempty"`
9740	// SourceMdmAccount - The source MDM account.
9741	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
9742	// SourceMdmNamespace - The source MDM namespace.
9743	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
9744	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
9745	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
9746}
9747
9748// NextHopParameters parameters that define the source and destination endpoint.
9749type NextHopParameters struct {
9750	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
9751	TargetResourceID *string `json:"targetResourceId,omitempty"`
9752	// SourceIPAddress - The source IP address.
9753	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
9754	// DestinationIPAddress - The destination IP address.
9755	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
9756	// 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).
9757	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
9758}
9759
9760// NextHopResult the information about next hop from the specified VM.
9761type NextHopResult struct {
9762	autorest.Response `json:"-"`
9763	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
9764	NextHopType NextHopType `json:"nextHopType,omitempty"`
9765	// NextHopIPAddress - Next hop IP Address
9766	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
9767	// 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'.
9768	RouteTableID *string `json:"routeTableId,omitempty"`
9769}
9770
9771// Operation network REST API operation definition.
9772type Operation struct {
9773	// Name - Operation name: {provider}/{resource}/{operation}
9774	Name *string `json:"name,omitempty"`
9775	// Display - Display metadata associated with the operation.
9776	Display *OperationDisplay `json:"display,omitempty"`
9777	// Origin - Origin of the operation.
9778	Origin *string `json:"origin,omitempty"`
9779	// OperationPropertiesFormat - Operation properties format.
9780	*OperationPropertiesFormat `json:"properties,omitempty"`
9781}
9782
9783// MarshalJSON is the custom marshaler for Operation.
9784func (o Operation) MarshalJSON() ([]byte, error) {
9785	objectMap := make(map[string]interface{})
9786	if o.Name != nil {
9787		objectMap["name"] = o.Name
9788	}
9789	if o.Display != nil {
9790		objectMap["display"] = o.Display
9791	}
9792	if o.Origin != nil {
9793		objectMap["origin"] = o.Origin
9794	}
9795	if o.OperationPropertiesFormat != nil {
9796		objectMap["properties"] = o.OperationPropertiesFormat
9797	}
9798	return json.Marshal(objectMap)
9799}
9800
9801// UnmarshalJSON is the custom unmarshaler for Operation struct.
9802func (o *Operation) UnmarshalJSON(body []byte) error {
9803	var m map[string]*json.RawMessage
9804	err := json.Unmarshal(body, &m)
9805	if err != nil {
9806		return err
9807	}
9808	for k, v := range m {
9809		switch k {
9810		case "name":
9811			if v != nil {
9812				var name string
9813				err = json.Unmarshal(*v, &name)
9814				if err != nil {
9815					return err
9816				}
9817				o.Name = &name
9818			}
9819		case "display":
9820			if v != nil {
9821				var display OperationDisplay
9822				err = json.Unmarshal(*v, &display)
9823				if err != nil {
9824					return err
9825				}
9826				o.Display = &display
9827			}
9828		case "origin":
9829			if v != nil {
9830				var origin string
9831				err = json.Unmarshal(*v, &origin)
9832				if err != nil {
9833					return err
9834				}
9835				o.Origin = &origin
9836			}
9837		case "properties":
9838			if v != nil {
9839				var operationPropertiesFormat OperationPropertiesFormat
9840				err = json.Unmarshal(*v, &operationPropertiesFormat)
9841				if err != nil {
9842					return err
9843				}
9844				o.OperationPropertiesFormat = &operationPropertiesFormat
9845			}
9846		}
9847	}
9848
9849	return nil
9850}
9851
9852// OperationDisplay display metadata associated with the operation.
9853type OperationDisplay struct {
9854	// Provider - Service provider: Microsoft Network.
9855	Provider *string `json:"provider,omitempty"`
9856	// Resource - Resource on which the operation is performed.
9857	Resource *string `json:"resource,omitempty"`
9858	// Operation - Type of the operation: get, read, delete, etc.
9859	Operation *string `json:"operation,omitempty"`
9860	// Description - Description of the operation.
9861	Description *string `json:"description,omitempty"`
9862}
9863
9864// OperationListResult result of the request to list Network operations. It contains a list of operations
9865// and a URL link to get the next set of results.
9866type OperationListResult struct {
9867	autorest.Response `json:"-"`
9868	// Value - List of Network operations supported by the Network resource provider.
9869	Value *[]Operation `json:"value,omitempty"`
9870	// NextLink - URL to get the next set of operation list results if there are any.
9871	NextLink *string `json:"nextLink,omitempty"`
9872}
9873
9874// OperationListResultIterator provides access to a complete listing of Operation values.
9875type OperationListResultIterator struct {
9876	i    int
9877	page OperationListResultPage
9878}
9879
9880// NextWithContext advances to the next value.  If there was an error making
9881// the request the iterator does not advance and the error is returned.
9882func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9883	if tracing.IsEnabled() {
9884		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
9885		defer func() {
9886			sc := -1
9887			if iter.Response().Response.Response != nil {
9888				sc = iter.Response().Response.Response.StatusCode
9889			}
9890			tracing.EndSpan(ctx, sc, err)
9891		}()
9892	}
9893	iter.i++
9894	if iter.i < len(iter.page.Values()) {
9895		return nil
9896	}
9897	err = iter.page.NextWithContext(ctx)
9898	if err != nil {
9899		iter.i--
9900		return err
9901	}
9902	iter.i = 0
9903	return nil
9904}
9905
9906// Next advances to the next value.  If there was an error making
9907// the request the iterator does not advance and the error is returned.
9908// Deprecated: Use NextWithContext() instead.
9909func (iter *OperationListResultIterator) Next() error {
9910	return iter.NextWithContext(context.Background())
9911}
9912
9913// NotDone returns true if the enumeration should be started or is not yet complete.
9914func (iter OperationListResultIterator) NotDone() bool {
9915	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9916}
9917
9918// Response returns the raw server response from the last page request.
9919func (iter OperationListResultIterator) Response() OperationListResult {
9920	return iter.page.Response()
9921}
9922
9923// Value returns the current value or a zero-initialized value if the
9924// iterator has advanced beyond the end of the collection.
9925func (iter OperationListResultIterator) Value() Operation {
9926	if !iter.page.NotDone() {
9927		return Operation{}
9928	}
9929	return iter.page.Values()[iter.i]
9930}
9931
9932// Creates a new instance of the OperationListResultIterator type.
9933func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
9934	return OperationListResultIterator{page: page}
9935}
9936
9937// IsEmpty returns true if the ListResult contains no values.
9938func (olr OperationListResult) IsEmpty() bool {
9939	return olr.Value == nil || len(*olr.Value) == 0
9940}
9941
9942// hasNextLink returns true if the NextLink is not empty.
9943func (olr OperationListResult) hasNextLink() bool {
9944	return olr.NextLink != nil && len(*olr.NextLink) != 0
9945}
9946
9947// operationListResultPreparer prepares a request to retrieve the next set of results.
9948// It returns nil if no more results exist.
9949func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
9950	if !olr.hasNextLink() {
9951		return nil, nil
9952	}
9953	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9954		autorest.AsJSON(),
9955		autorest.AsGet(),
9956		autorest.WithBaseURL(to.String(olr.NextLink)))
9957}
9958
9959// OperationListResultPage contains a page of Operation values.
9960type OperationListResultPage struct {
9961	fn  func(context.Context, OperationListResult) (OperationListResult, error)
9962	olr OperationListResult
9963}
9964
9965// NextWithContext advances to the next page of values.  If there was an error making
9966// the request the page does not advance and the error is returned.
9967func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
9968	if tracing.IsEnabled() {
9969		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
9970		defer func() {
9971			sc := -1
9972			if page.Response().Response.Response != nil {
9973				sc = page.Response().Response.Response.StatusCode
9974			}
9975			tracing.EndSpan(ctx, sc, err)
9976		}()
9977	}
9978	for {
9979		next, err := page.fn(ctx, page.olr)
9980		if err != nil {
9981			return err
9982		}
9983		page.olr = next
9984		if !next.hasNextLink() || !next.IsEmpty() {
9985			break
9986		}
9987	}
9988	return nil
9989}
9990
9991// Next advances to the next page of values.  If there was an error making
9992// the request the page does not advance and the error is returned.
9993// Deprecated: Use NextWithContext() instead.
9994func (page *OperationListResultPage) Next() error {
9995	return page.NextWithContext(context.Background())
9996}
9997
9998// NotDone returns true if the page enumeration should be started or is not yet complete.
9999func (page OperationListResultPage) NotDone() bool {
10000	return !page.olr.IsEmpty()
10001}
10002
10003// Response returns the raw server response from the last page request.
10004func (page OperationListResultPage) Response() OperationListResult {
10005	return page.olr
10006}
10007
10008// Values returns the slice of values for the current page or nil if there are no values.
10009func (page OperationListResultPage) Values() []Operation {
10010	if page.olr.IsEmpty() {
10011		return nil
10012	}
10013	return *page.olr.Value
10014}
10015
10016// Creates a new instance of the OperationListResultPage type.
10017func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
10018	return OperationListResultPage{
10019		fn:  getNextPage,
10020		olr: cur,
10021	}
10022}
10023
10024// OperationPropertiesFormat description of operation properties format.
10025type OperationPropertiesFormat struct {
10026	// ServiceSpecification - Specification of the service.
10027	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
10028}
10029
10030// OperationPropertiesFormatServiceSpecification specification of the service.
10031type OperationPropertiesFormatServiceSpecification struct {
10032	// MetricSpecifications - Operation service specification.
10033	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
10034	// LogSpecifications - Operation log specification.
10035	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
10036}
10037
10038// OutboundNatRule outbound NAT pool of the load balancer.
10039type OutboundNatRule struct {
10040	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
10041	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
10042	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10043	Name *string `json:"name,omitempty"`
10044	// Etag - A unique read-only string that changes whenever the resource is updated.
10045	Etag *string `json:"etag,omitempty"`
10046	// ID - Resource ID.
10047	ID *string `json:"id,omitempty"`
10048}
10049
10050// MarshalJSON is the custom marshaler for OutboundNatRule.
10051func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
10052	objectMap := make(map[string]interface{})
10053	if onr.OutboundNatRulePropertiesFormat != nil {
10054		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
10055	}
10056	if onr.Name != nil {
10057		objectMap["name"] = onr.Name
10058	}
10059	if onr.Etag != nil {
10060		objectMap["etag"] = onr.Etag
10061	}
10062	if onr.ID != nil {
10063		objectMap["id"] = onr.ID
10064	}
10065	return json.Marshal(objectMap)
10066}
10067
10068// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
10069func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
10070	var m map[string]*json.RawMessage
10071	err := json.Unmarshal(body, &m)
10072	if err != nil {
10073		return err
10074	}
10075	for k, v := range m {
10076		switch k {
10077		case "properties":
10078			if v != nil {
10079				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
10080				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
10081				if err != nil {
10082					return err
10083				}
10084				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
10085			}
10086		case "name":
10087			if v != nil {
10088				var name string
10089				err = json.Unmarshal(*v, &name)
10090				if err != nil {
10091					return err
10092				}
10093				onr.Name = &name
10094			}
10095		case "etag":
10096			if v != nil {
10097				var etag string
10098				err = json.Unmarshal(*v, &etag)
10099				if err != nil {
10100					return err
10101				}
10102				onr.Etag = &etag
10103			}
10104		case "id":
10105			if v != nil {
10106				var ID string
10107				err = json.Unmarshal(*v, &ID)
10108				if err != nil {
10109					return err
10110				}
10111				onr.ID = &ID
10112			}
10113		}
10114	}
10115
10116	return nil
10117}
10118
10119// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
10120type OutboundNatRulePropertiesFormat struct {
10121	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
10122	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
10123	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
10124	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
10125	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
10126	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
10127	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10128	ProvisioningState *string `json:"provisioningState,omitempty"`
10129}
10130
10131// PacketCapture parameters that define the create packet capture operation.
10132type PacketCapture struct {
10133	*PacketCaptureParameters `json:"properties,omitempty"`
10134}
10135
10136// MarshalJSON is the custom marshaler for PacketCapture.
10137func (pc PacketCapture) MarshalJSON() ([]byte, error) {
10138	objectMap := make(map[string]interface{})
10139	if pc.PacketCaptureParameters != nil {
10140		objectMap["properties"] = pc.PacketCaptureParameters
10141	}
10142	return json.Marshal(objectMap)
10143}
10144
10145// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
10146func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
10147	var m map[string]*json.RawMessage
10148	err := json.Unmarshal(body, &m)
10149	if err != nil {
10150		return err
10151	}
10152	for k, v := range m {
10153		switch k {
10154		case "properties":
10155			if v != nil {
10156				var packetCaptureParameters PacketCaptureParameters
10157				err = json.Unmarshal(*v, &packetCaptureParameters)
10158				if err != nil {
10159					return err
10160				}
10161				pc.PacketCaptureParameters = &packetCaptureParameters
10162			}
10163		}
10164	}
10165
10166	return nil
10167}
10168
10169// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
10170type PacketCaptureFilter struct {
10171	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
10172	Protocol PcProtocol `json:"protocol,omitempty"`
10173	// 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.
10174	LocalIPAddress *string `json:"localIPAddress,omitempty"`
10175	// 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.
10176	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
10177	// 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.
10178	LocalPort *string `json:"localPort,omitempty"`
10179	// 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.
10180	RemotePort *string `json:"remotePort,omitempty"`
10181}
10182
10183// PacketCaptureListResult list of packet capture sessions.
10184type PacketCaptureListResult struct {
10185	autorest.Response `json:"-"`
10186	// Value - Information about packet capture sessions.
10187	Value *[]PacketCaptureResult `json:"value,omitempty"`
10188}
10189
10190// PacketCaptureParameters parameters that define the create packet capture operation.
10191type PacketCaptureParameters struct {
10192	// Target - The ID of the targeted resource, only VM is currently supported.
10193	Target *string `json:"target,omitempty"`
10194	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10195	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10196	// TotalBytesPerSession - Maximum size of the capture output.
10197	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10198	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10199	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10200	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10201	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10202}
10203
10204// PacketCaptureQueryStatusResult status of packet capture session.
10205type PacketCaptureQueryStatusResult struct {
10206	autorest.Response `json:"-"`
10207	// Name - The name of the packet capture resource.
10208	Name *string `json:"name,omitempty"`
10209	// ID - The ID of the packet capture resource.
10210	ID *string `json:"id,omitempty"`
10211	// CaptureStartTime - The start time of the packet capture session.
10212	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
10213	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
10214	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
10215	// StopReason - The reason the current packet capture session was stopped.
10216	StopReason *string `json:"stopReason,omitempty"`
10217	// PacketCaptureError - List of errors of packet capture session.
10218	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
10219}
10220
10221// PacketCaptureResult information about packet capture session.
10222type PacketCaptureResult struct {
10223	autorest.Response `json:"-"`
10224	// Name - READ-ONLY; Name of the packet capture session.
10225	Name *string `json:"name,omitempty"`
10226	// ID - READ-ONLY; ID of the packet capture operation.
10227	ID                             *string `json:"id,omitempty"`
10228	Etag                           *string `json:"etag,omitempty"`
10229	*PacketCaptureResultProperties `json:"properties,omitempty"`
10230}
10231
10232// MarshalJSON is the custom marshaler for PacketCaptureResult.
10233func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
10234	objectMap := make(map[string]interface{})
10235	if pcr.Etag != nil {
10236		objectMap["etag"] = pcr.Etag
10237	}
10238	if pcr.PacketCaptureResultProperties != nil {
10239		objectMap["properties"] = pcr.PacketCaptureResultProperties
10240	}
10241	return json.Marshal(objectMap)
10242}
10243
10244// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
10245func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
10246	var m map[string]*json.RawMessage
10247	err := json.Unmarshal(body, &m)
10248	if err != nil {
10249		return err
10250	}
10251	for k, v := range m {
10252		switch k {
10253		case "name":
10254			if v != nil {
10255				var name string
10256				err = json.Unmarshal(*v, &name)
10257				if err != nil {
10258					return err
10259				}
10260				pcr.Name = &name
10261			}
10262		case "id":
10263			if v != nil {
10264				var ID string
10265				err = json.Unmarshal(*v, &ID)
10266				if err != nil {
10267					return err
10268				}
10269				pcr.ID = &ID
10270			}
10271		case "etag":
10272			if v != nil {
10273				var etag string
10274				err = json.Unmarshal(*v, &etag)
10275				if err != nil {
10276					return err
10277				}
10278				pcr.Etag = &etag
10279			}
10280		case "properties":
10281			if v != nil {
10282				var packetCaptureResultProperties PacketCaptureResultProperties
10283				err = json.Unmarshal(*v, &packetCaptureResultProperties)
10284				if err != nil {
10285					return err
10286				}
10287				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
10288			}
10289		}
10290	}
10291
10292	return nil
10293}
10294
10295// PacketCaptureResultProperties describes the properties of a packet capture session.
10296type PacketCaptureResultProperties struct {
10297	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10298	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10299	// Target - The ID of the targeted resource, only VM is currently supported.
10300	Target *string `json:"target,omitempty"`
10301	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10302	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10303	// TotalBytesPerSession - Maximum size of the capture output.
10304	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10305	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10306	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10307	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10308	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10309}
10310
10311// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
10312// operation.
10313type PacketCapturesCreateFuture struct {
10314	azure.FutureAPI
10315	// Result returns the result of the asynchronous operation.
10316	// If the operation has not completed it will return an error.
10317	Result func(PacketCapturesClient) (PacketCaptureResult, error)
10318}
10319
10320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10321func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
10322	var azFuture azure.Future
10323	if err := json.Unmarshal(body, &azFuture); err != nil {
10324		return err
10325	}
10326	future.FutureAPI = &azFuture
10327	future.Result = future.result
10328	return nil
10329}
10330
10331// result is the default implementation for PacketCapturesCreateFuture.Result.
10332func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
10333	var done bool
10334	done, err = future.DoneWithContext(context.Background(), client)
10335	if err != nil {
10336		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
10337		return
10338	}
10339	if !done {
10340		pcr.Response.Response = future.Response()
10341		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
10342		return
10343	}
10344	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10345	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
10346		pcr, err = client.CreateResponder(pcr.Response.Response)
10347		if err != nil {
10348			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
10349		}
10350	}
10351	return
10352}
10353
10354// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10355// operation.
10356type PacketCapturesDeleteFuture struct {
10357	azure.FutureAPI
10358	// Result returns the result of the asynchronous operation.
10359	// If the operation has not completed it will return an error.
10360	Result func(PacketCapturesClient) (autorest.Response, error)
10361}
10362
10363// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10364func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
10365	var azFuture azure.Future
10366	if err := json.Unmarshal(body, &azFuture); err != nil {
10367		return err
10368	}
10369	future.FutureAPI = &azFuture
10370	future.Result = future.result
10371	return nil
10372}
10373
10374// result is the default implementation for PacketCapturesDeleteFuture.Result.
10375func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10376	var done bool
10377	done, err = future.DoneWithContext(context.Background(), client)
10378	if err != nil {
10379		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
10380		return
10381	}
10382	if !done {
10383		ar.Response = future.Response()
10384		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
10385		return
10386	}
10387	ar.Response = future.Response()
10388	return
10389}
10390
10391// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
10392// operation.
10393type PacketCapturesGetStatusFuture struct {
10394	azure.FutureAPI
10395	// Result returns the result of the asynchronous operation.
10396	// If the operation has not completed it will return an error.
10397	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
10398}
10399
10400// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10401func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
10402	var azFuture azure.Future
10403	if err := json.Unmarshal(body, &azFuture); err != nil {
10404		return err
10405	}
10406	future.FutureAPI = &azFuture
10407	future.Result = future.result
10408	return nil
10409}
10410
10411// result is the default implementation for PacketCapturesGetStatusFuture.Result.
10412func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
10413	var done bool
10414	done, err = future.DoneWithContext(context.Background(), client)
10415	if err != nil {
10416		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
10417		return
10418	}
10419	if !done {
10420		pcqsr.Response.Response = future.Response()
10421		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
10422		return
10423	}
10424	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10425	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
10426		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
10427		if err != nil {
10428			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
10429		}
10430	}
10431	return
10432}
10433
10434// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
10435// operation.
10436type PacketCapturesStopFuture struct {
10437	azure.FutureAPI
10438	// Result returns the result of the asynchronous operation.
10439	// If the operation has not completed it will return an error.
10440	Result func(PacketCapturesClient) (autorest.Response, error)
10441}
10442
10443// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10444func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
10445	var azFuture azure.Future
10446	if err := json.Unmarshal(body, &azFuture); err != nil {
10447		return err
10448	}
10449	future.FutureAPI = &azFuture
10450	future.Result = future.result
10451	return nil
10452}
10453
10454// result is the default implementation for PacketCapturesStopFuture.Result.
10455func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10456	var done bool
10457	done, err = future.DoneWithContext(context.Background(), client)
10458	if err != nil {
10459		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
10460		return
10461	}
10462	if !done {
10463		ar.Response = future.Response()
10464		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
10465		return
10466	}
10467	ar.Response = future.Response()
10468	return
10469}
10470
10471// PacketCaptureStorageLocation describes the storage location for a packet capture session.
10472type PacketCaptureStorageLocation struct {
10473	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
10474	StorageID *string `json:"storageId,omitempty"`
10475	// 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.
10476	StoragePath *string `json:"storagePath,omitempty"`
10477	// 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.
10478	FilePath *string `json:"filePath,omitempty"`
10479}
10480
10481// PatchRouteFilter route Filter Resource.
10482type PatchRouteFilter struct {
10483	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
10484	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10485	Name *string `json:"name,omitempty"`
10486	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10487	Etag *string `json:"etag,omitempty"`
10488	// Type - READ-ONLY; Resource type.
10489	Type *string `json:"type,omitempty"`
10490	// Tags - Resource tags.
10491	Tags map[string]*string `json:"tags"`
10492	// ID - Resource ID.
10493	ID *string `json:"id,omitempty"`
10494}
10495
10496// MarshalJSON is the custom marshaler for PatchRouteFilter.
10497func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
10498	objectMap := make(map[string]interface{})
10499	if prf.RouteFilterPropertiesFormat != nil {
10500		objectMap["properties"] = prf.RouteFilterPropertiesFormat
10501	}
10502	if prf.Tags != nil {
10503		objectMap["tags"] = prf.Tags
10504	}
10505	if prf.ID != nil {
10506		objectMap["id"] = prf.ID
10507	}
10508	return json.Marshal(objectMap)
10509}
10510
10511// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
10512func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
10513	var m map[string]*json.RawMessage
10514	err := json.Unmarshal(body, &m)
10515	if err != nil {
10516		return err
10517	}
10518	for k, v := range m {
10519		switch k {
10520		case "properties":
10521			if v != nil {
10522				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
10523				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
10524				if err != nil {
10525					return err
10526				}
10527				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
10528			}
10529		case "name":
10530			if v != nil {
10531				var name string
10532				err = json.Unmarshal(*v, &name)
10533				if err != nil {
10534					return err
10535				}
10536				prf.Name = &name
10537			}
10538		case "etag":
10539			if v != nil {
10540				var etag string
10541				err = json.Unmarshal(*v, &etag)
10542				if err != nil {
10543					return err
10544				}
10545				prf.Etag = &etag
10546			}
10547		case "type":
10548			if v != nil {
10549				var typeVar string
10550				err = json.Unmarshal(*v, &typeVar)
10551				if err != nil {
10552					return err
10553				}
10554				prf.Type = &typeVar
10555			}
10556		case "tags":
10557			if v != nil {
10558				var tags map[string]*string
10559				err = json.Unmarshal(*v, &tags)
10560				if err != nil {
10561					return err
10562				}
10563				prf.Tags = tags
10564			}
10565		case "id":
10566			if v != nil {
10567				var ID string
10568				err = json.Unmarshal(*v, &ID)
10569				if err != nil {
10570					return err
10571				}
10572				prf.ID = &ID
10573			}
10574		}
10575	}
10576
10577	return nil
10578}
10579
10580// PatchRouteFilterRule route Filter Rule Resource
10581type PatchRouteFilterRule struct {
10582	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
10583	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10584	Name *string `json:"name,omitempty"`
10585	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10586	Etag *string `json:"etag,omitempty"`
10587	// ID - Resource ID.
10588	ID *string `json:"id,omitempty"`
10589}
10590
10591// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
10592func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
10593	objectMap := make(map[string]interface{})
10594	if prfr.RouteFilterRulePropertiesFormat != nil {
10595		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
10596	}
10597	if prfr.ID != nil {
10598		objectMap["id"] = prfr.ID
10599	}
10600	return json.Marshal(objectMap)
10601}
10602
10603// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
10604func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
10605	var m map[string]*json.RawMessage
10606	err := json.Unmarshal(body, &m)
10607	if err != nil {
10608		return err
10609	}
10610	for k, v := range m {
10611		switch k {
10612		case "properties":
10613			if v != nil {
10614				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
10615				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
10616				if err != nil {
10617					return err
10618				}
10619				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
10620			}
10621		case "name":
10622			if v != nil {
10623				var name string
10624				err = json.Unmarshal(*v, &name)
10625				if err != nil {
10626					return err
10627				}
10628				prfr.Name = &name
10629			}
10630		case "etag":
10631			if v != nil {
10632				var etag string
10633				err = json.Unmarshal(*v, &etag)
10634				if err != nil {
10635					return err
10636				}
10637				prfr.Etag = &etag
10638			}
10639		case "id":
10640			if v != nil {
10641				var ID string
10642				err = json.Unmarshal(*v, &ID)
10643				if err != nil {
10644					return err
10645				}
10646				prfr.ID = &ID
10647			}
10648		}
10649	}
10650
10651	return nil
10652}
10653
10654// Probe a load balancer probe.
10655type Probe struct {
10656	autorest.Response `json:"-"`
10657	// ProbePropertiesFormat - Properties of load balancer probe.
10658	*ProbePropertiesFormat `json:"properties,omitempty"`
10659	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10660	Name *string `json:"name,omitempty"`
10661	// Etag - A unique read-only string that changes whenever the resource is updated.
10662	Etag *string `json:"etag,omitempty"`
10663	// ID - Resource ID.
10664	ID *string `json:"id,omitempty"`
10665}
10666
10667// MarshalJSON is the custom marshaler for Probe.
10668func (p Probe) MarshalJSON() ([]byte, error) {
10669	objectMap := make(map[string]interface{})
10670	if p.ProbePropertiesFormat != nil {
10671		objectMap["properties"] = p.ProbePropertiesFormat
10672	}
10673	if p.Name != nil {
10674		objectMap["name"] = p.Name
10675	}
10676	if p.Etag != nil {
10677		objectMap["etag"] = p.Etag
10678	}
10679	if p.ID != nil {
10680		objectMap["id"] = p.ID
10681	}
10682	return json.Marshal(objectMap)
10683}
10684
10685// UnmarshalJSON is the custom unmarshaler for Probe struct.
10686func (p *Probe) UnmarshalJSON(body []byte) error {
10687	var m map[string]*json.RawMessage
10688	err := json.Unmarshal(body, &m)
10689	if err != nil {
10690		return err
10691	}
10692	for k, v := range m {
10693		switch k {
10694		case "properties":
10695			if v != nil {
10696				var probePropertiesFormat ProbePropertiesFormat
10697				err = json.Unmarshal(*v, &probePropertiesFormat)
10698				if err != nil {
10699					return err
10700				}
10701				p.ProbePropertiesFormat = &probePropertiesFormat
10702			}
10703		case "name":
10704			if v != nil {
10705				var name string
10706				err = json.Unmarshal(*v, &name)
10707				if err != nil {
10708					return err
10709				}
10710				p.Name = &name
10711			}
10712		case "etag":
10713			if v != nil {
10714				var etag string
10715				err = json.Unmarshal(*v, &etag)
10716				if err != nil {
10717					return err
10718				}
10719				p.Etag = &etag
10720			}
10721		case "id":
10722			if v != nil {
10723				var ID string
10724				err = json.Unmarshal(*v, &ID)
10725				if err != nil {
10726					return err
10727				}
10728				p.ID = &ID
10729			}
10730		}
10731	}
10732
10733	return nil
10734}
10735
10736// ProbePropertiesFormat load balancer probe resource.
10737type ProbePropertiesFormat struct {
10738	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
10739	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
10740	// Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP'
10741	Protocol ProbeProtocol `json:"protocol,omitempty"`
10742	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
10743	Port *int32 `json:"port,omitempty"`
10744	// 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.
10745	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
10746	// 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.
10747	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
10748	// 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.
10749	RequestPath *string `json:"requestPath,omitempty"`
10750	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10751	ProvisioningState *string `json:"provisioningState,omitempty"`
10752}
10753
10754// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
10755func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
10756	objectMap := make(map[string]interface{})
10757	if ppf.Protocol != "" {
10758		objectMap["protocol"] = ppf.Protocol
10759	}
10760	if ppf.Port != nil {
10761		objectMap["port"] = ppf.Port
10762	}
10763	if ppf.IntervalInSeconds != nil {
10764		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
10765	}
10766	if ppf.NumberOfProbes != nil {
10767		objectMap["numberOfProbes"] = ppf.NumberOfProbes
10768	}
10769	if ppf.RequestPath != nil {
10770		objectMap["requestPath"] = ppf.RequestPath
10771	}
10772	if ppf.ProvisioningState != nil {
10773		objectMap["provisioningState"] = ppf.ProvisioningState
10774	}
10775	return json.Marshal(objectMap)
10776}
10777
10778// PublicIPAddress public IP address resource.
10779type PublicIPAddress struct {
10780	autorest.Response `json:"-"`
10781	// Sku - The public IP address SKU.
10782	Sku *PublicIPAddressSku `json:"sku,omitempty"`
10783	// PublicIPAddressPropertiesFormat - Public IP address properties.
10784	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
10785	// Etag - A unique read-only string that changes whenever the resource is updated.
10786	Etag *string `json:"etag,omitempty"`
10787	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10788	Zones *[]string `json:"zones,omitempty"`
10789	// ID - Resource ID.
10790	ID *string `json:"id,omitempty"`
10791	// Name - READ-ONLY; Resource name.
10792	Name *string `json:"name,omitempty"`
10793	// Type - READ-ONLY; Resource type.
10794	Type *string `json:"type,omitempty"`
10795	// Location - Resource location.
10796	Location *string `json:"location,omitempty"`
10797	// Tags - Resource tags.
10798	Tags map[string]*string `json:"tags"`
10799}
10800
10801// MarshalJSON is the custom marshaler for PublicIPAddress.
10802func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
10803	objectMap := make(map[string]interface{})
10804	if pia.Sku != nil {
10805		objectMap["sku"] = pia.Sku
10806	}
10807	if pia.PublicIPAddressPropertiesFormat != nil {
10808		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
10809	}
10810	if pia.Etag != nil {
10811		objectMap["etag"] = pia.Etag
10812	}
10813	if pia.Zones != nil {
10814		objectMap["zones"] = pia.Zones
10815	}
10816	if pia.ID != nil {
10817		objectMap["id"] = pia.ID
10818	}
10819	if pia.Location != nil {
10820		objectMap["location"] = pia.Location
10821	}
10822	if pia.Tags != nil {
10823		objectMap["tags"] = pia.Tags
10824	}
10825	return json.Marshal(objectMap)
10826}
10827
10828// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
10829func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
10830	var m map[string]*json.RawMessage
10831	err := json.Unmarshal(body, &m)
10832	if err != nil {
10833		return err
10834	}
10835	for k, v := range m {
10836		switch k {
10837		case "sku":
10838			if v != nil {
10839				var sku PublicIPAddressSku
10840				err = json.Unmarshal(*v, &sku)
10841				if err != nil {
10842					return err
10843				}
10844				pia.Sku = &sku
10845			}
10846		case "properties":
10847			if v != nil {
10848				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
10849				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
10850				if err != nil {
10851					return err
10852				}
10853				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
10854			}
10855		case "etag":
10856			if v != nil {
10857				var etag string
10858				err = json.Unmarshal(*v, &etag)
10859				if err != nil {
10860					return err
10861				}
10862				pia.Etag = &etag
10863			}
10864		case "zones":
10865			if v != nil {
10866				var zones []string
10867				err = json.Unmarshal(*v, &zones)
10868				if err != nil {
10869					return err
10870				}
10871				pia.Zones = &zones
10872			}
10873		case "id":
10874			if v != nil {
10875				var ID string
10876				err = json.Unmarshal(*v, &ID)
10877				if err != nil {
10878					return err
10879				}
10880				pia.ID = &ID
10881			}
10882		case "name":
10883			if v != nil {
10884				var name string
10885				err = json.Unmarshal(*v, &name)
10886				if err != nil {
10887					return err
10888				}
10889				pia.Name = &name
10890			}
10891		case "type":
10892			if v != nil {
10893				var typeVar string
10894				err = json.Unmarshal(*v, &typeVar)
10895				if err != nil {
10896					return err
10897				}
10898				pia.Type = &typeVar
10899			}
10900		case "location":
10901			if v != nil {
10902				var location string
10903				err = json.Unmarshal(*v, &location)
10904				if err != nil {
10905					return err
10906				}
10907				pia.Location = &location
10908			}
10909		case "tags":
10910			if v != nil {
10911				var tags map[string]*string
10912				err = json.Unmarshal(*v, &tags)
10913				if err != nil {
10914					return err
10915				}
10916				pia.Tags = tags
10917			}
10918		}
10919	}
10920
10921	return nil
10922}
10923
10924// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
10925type PublicIPAddressDNSSettings struct {
10926	// 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.
10927	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
10928	// 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.
10929	Fqdn *string `json:"fqdn,omitempty"`
10930	// 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.
10931	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
10932}
10933
10934// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10935// long-running operation.
10936type PublicIPAddressesCreateOrUpdateFuture struct {
10937	azure.FutureAPI
10938	// Result returns the result of the asynchronous operation.
10939	// If the operation has not completed it will return an error.
10940	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
10941}
10942
10943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10944func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10945	var azFuture azure.Future
10946	if err := json.Unmarshal(body, &azFuture); err != nil {
10947		return err
10948	}
10949	future.FutureAPI = &azFuture
10950	future.Result = future.result
10951	return nil
10952}
10953
10954// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
10955func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
10956	var done bool
10957	done, err = future.DoneWithContext(context.Background(), client)
10958	if err != nil {
10959		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10960		return
10961	}
10962	if !done {
10963		pia.Response.Response = future.Response()
10964		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
10965		return
10966	}
10967	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10968	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
10969		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
10970		if err != nil {
10971			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
10972		}
10973	}
10974	return
10975}
10976
10977// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10978// operation.
10979type PublicIPAddressesDeleteFuture struct {
10980	azure.FutureAPI
10981	// Result returns the result of the asynchronous operation.
10982	// If the operation has not completed it will return an error.
10983	Result func(PublicIPAddressesClient) (autorest.Response, error)
10984}
10985
10986// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10987func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
10988	var azFuture azure.Future
10989	if err := json.Unmarshal(body, &azFuture); err != nil {
10990		return err
10991	}
10992	future.FutureAPI = &azFuture
10993	future.Result = future.result
10994	return nil
10995}
10996
10997// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
10998func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
10999	var done bool
11000	done, err = future.DoneWithContext(context.Background(), client)
11001	if err != nil {
11002		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
11003		return
11004	}
11005	if !done {
11006		ar.Response = future.Response()
11007		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
11008		return
11009	}
11010	ar.Response = future.Response()
11011	return
11012}
11013
11014// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11015// long-running operation.
11016type PublicIPAddressesUpdateTagsFuture struct {
11017	azure.FutureAPI
11018	// Result returns the result of the asynchronous operation.
11019	// If the operation has not completed it will return an error.
11020	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
11021}
11022
11023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11024func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11025	var azFuture azure.Future
11026	if err := json.Unmarshal(body, &azFuture); err != nil {
11027		return err
11028	}
11029	future.FutureAPI = &azFuture
11030	future.Result = future.result
11031	return nil
11032}
11033
11034// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
11035func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
11036	var done bool
11037	done, err = future.DoneWithContext(context.Background(), client)
11038	if err != nil {
11039		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11040		return
11041	}
11042	if !done {
11043		pia.Response.Response = future.Response()
11044		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
11045		return
11046	}
11047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11048	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
11049		pia, err = client.UpdateTagsResponder(pia.Response.Response)
11050		if err != nil {
11051			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
11052		}
11053	}
11054	return
11055}
11056
11057// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
11058type PublicIPAddressListResult struct {
11059	autorest.Response `json:"-"`
11060	// Value - A list of public IP addresses that exists in a resource group.
11061	Value *[]PublicIPAddress `json:"value,omitempty"`
11062	// NextLink - The URL to get the next set of results.
11063	NextLink *string `json:"nextLink,omitempty"`
11064}
11065
11066// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
11067type PublicIPAddressListResultIterator struct {
11068	i    int
11069	page PublicIPAddressListResultPage
11070}
11071
11072// NextWithContext advances to the next value.  If there was an error making
11073// the request the iterator does not advance and the error is returned.
11074func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
11075	if tracing.IsEnabled() {
11076		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
11077		defer func() {
11078			sc := -1
11079			if iter.Response().Response.Response != nil {
11080				sc = iter.Response().Response.Response.StatusCode
11081			}
11082			tracing.EndSpan(ctx, sc, err)
11083		}()
11084	}
11085	iter.i++
11086	if iter.i < len(iter.page.Values()) {
11087		return nil
11088	}
11089	err = iter.page.NextWithContext(ctx)
11090	if err != nil {
11091		iter.i--
11092		return err
11093	}
11094	iter.i = 0
11095	return nil
11096}
11097
11098// Next advances to the next value.  If there was an error making
11099// the request the iterator does not advance and the error is returned.
11100// Deprecated: Use NextWithContext() instead.
11101func (iter *PublicIPAddressListResultIterator) Next() error {
11102	return iter.NextWithContext(context.Background())
11103}
11104
11105// NotDone returns true if the enumeration should be started or is not yet complete.
11106func (iter PublicIPAddressListResultIterator) NotDone() bool {
11107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11108}
11109
11110// Response returns the raw server response from the last page request.
11111func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
11112	return iter.page.Response()
11113}
11114
11115// Value returns the current value or a zero-initialized value if the
11116// iterator has advanced beyond the end of the collection.
11117func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
11118	if !iter.page.NotDone() {
11119		return PublicIPAddress{}
11120	}
11121	return iter.page.Values()[iter.i]
11122}
11123
11124// Creates a new instance of the PublicIPAddressListResultIterator type.
11125func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
11126	return PublicIPAddressListResultIterator{page: page}
11127}
11128
11129// IsEmpty returns true if the ListResult contains no values.
11130func (pialr PublicIPAddressListResult) IsEmpty() bool {
11131	return pialr.Value == nil || len(*pialr.Value) == 0
11132}
11133
11134// hasNextLink returns true if the NextLink is not empty.
11135func (pialr PublicIPAddressListResult) hasNextLink() bool {
11136	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
11137}
11138
11139// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
11140// It returns nil if no more results exist.
11141func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
11142	if !pialr.hasNextLink() {
11143		return nil, nil
11144	}
11145	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11146		autorest.AsJSON(),
11147		autorest.AsGet(),
11148		autorest.WithBaseURL(to.String(pialr.NextLink)))
11149}
11150
11151// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
11152type PublicIPAddressListResultPage struct {
11153	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
11154	pialr PublicIPAddressListResult
11155}
11156
11157// NextWithContext advances to the next page of values.  If there was an error making
11158// the request the page does not advance and the error is returned.
11159func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
11160	if tracing.IsEnabled() {
11161		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
11162		defer func() {
11163			sc := -1
11164			if page.Response().Response.Response != nil {
11165				sc = page.Response().Response.Response.StatusCode
11166			}
11167			tracing.EndSpan(ctx, sc, err)
11168		}()
11169	}
11170	for {
11171		next, err := page.fn(ctx, page.pialr)
11172		if err != nil {
11173			return err
11174		}
11175		page.pialr = next
11176		if !next.hasNextLink() || !next.IsEmpty() {
11177			break
11178		}
11179	}
11180	return nil
11181}
11182
11183// Next advances to the next page of values.  If there was an error making
11184// the request the page does not advance and the error is returned.
11185// Deprecated: Use NextWithContext() instead.
11186func (page *PublicIPAddressListResultPage) Next() error {
11187	return page.NextWithContext(context.Background())
11188}
11189
11190// NotDone returns true if the page enumeration should be started or is not yet complete.
11191func (page PublicIPAddressListResultPage) NotDone() bool {
11192	return !page.pialr.IsEmpty()
11193}
11194
11195// Response returns the raw server response from the last page request.
11196func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
11197	return page.pialr
11198}
11199
11200// Values returns the slice of values for the current page or nil if there are no values.
11201func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
11202	if page.pialr.IsEmpty() {
11203		return nil
11204	}
11205	return *page.pialr.Value
11206}
11207
11208// Creates a new instance of the PublicIPAddressListResultPage type.
11209func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
11210	return PublicIPAddressListResultPage{
11211		fn:    getNextPage,
11212		pialr: cur,
11213	}
11214}
11215
11216// PublicIPAddressPropertiesFormat public IP address properties.
11217type PublicIPAddressPropertiesFormat struct {
11218	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11219	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
11220	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
11221	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
11222	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
11223	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
11224	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
11225	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
11226	// IPTags - The list of tags associated with the public IP address.
11227	IPTags *[]IPTag `json:"ipTags,omitempty"`
11228	// IPAddress - The IP address associated with the public IP address resource.
11229	IPAddress *string `json:"ipAddress,omitempty"`
11230	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
11231	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11232	// ResourceGUID - The resource GUID property of the public IP resource.
11233	ResourceGUID *string `json:"resourceGuid,omitempty"`
11234	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11235	ProvisioningState *string `json:"provisioningState,omitempty"`
11236}
11237
11238// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
11239func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
11240	objectMap := make(map[string]interface{})
11241	if piapf.PublicIPAllocationMethod != "" {
11242		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
11243	}
11244	if piapf.PublicIPAddressVersion != "" {
11245		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
11246	}
11247	if piapf.DNSSettings != nil {
11248		objectMap["dnsSettings"] = piapf.DNSSettings
11249	}
11250	if piapf.IPTags != nil {
11251		objectMap["ipTags"] = piapf.IPTags
11252	}
11253	if piapf.IPAddress != nil {
11254		objectMap["ipAddress"] = piapf.IPAddress
11255	}
11256	if piapf.IdleTimeoutInMinutes != nil {
11257		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
11258	}
11259	if piapf.ResourceGUID != nil {
11260		objectMap["resourceGuid"] = piapf.ResourceGUID
11261	}
11262	if piapf.ProvisioningState != nil {
11263		objectMap["provisioningState"] = piapf.ProvisioningState
11264	}
11265	return json.Marshal(objectMap)
11266}
11267
11268// PublicIPAddressSku SKU of a public IP address
11269type PublicIPAddressSku struct {
11270	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
11271	Name PublicIPAddressSkuName `json:"name,omitempty"`
11272}
11273
11274// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
11275type QueryTroubleshootingParameters struct {
11276	// TargetResourceID - The target resource ID to query the troubleshooting result.
11277	TargetResourceID *string `json:"targetResourceId,omitempty"`
11278}
11279
11280// Resource common resource representation.
11281type Resource struct {
11282	// ID - Resource ID.
11283	ID *string `json:"id,omitempty"`
11284	// Name - READ-ONLY; Resource name.
11285	Name *string `json:"name,omitempty"`
11286	// Type - READ-ONLY; Resource type.
11287	Type *string `json:"type,omitempty"`
11288	// Location - Resource location.
11289	Location *string `json:"location,omitempty"`
11290	// Tags - Resource tags.
11291	Tags map[string]*string `json:"tags"`
11292}
11293
11294// MarshalJSON is the custom marshaler for Resource.
11295func (r Resource) MarshalJSON() ([]byte, error) {
11296	objectMap := make(map[string]interface{})
11297	if r.ID != nil {
11298		objectMap["id"] = r.ID
11299	}
11300	if r.Location != nil {
11301		objectMap["location"] = r.Location
11302	}
11303	if r.Tags != nil {
11304		objectMap["tags"] = r.Tags
11305	}
11306	return json.Marshal(objectMap)
11307}
11308
11309// ResourceNavigationLink resourceNavigationLink resource.
11310type ResourceNavigationLink struct {
11311	// ResourceNavigationLinkFormat - Resource navigation link properties format.
11312	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
11313	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
11314	Name *string `json:"name,omitempty"`
11315	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11316	Etag *string `json:"etag,omitempty"`
11317	// ID - Resource ID.
11318	ID *string `json:"id,omitempty"`
11319}
11320
11321// MarshalJSON is the custom marshaler for ResourceNavigationLink.
11322func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
11323	objectMap := make(map[string]interface{})
11324	if rnl.ResourceNavigationLinkFormat != nil {
11325		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
11326	}
11327	if rnl.Name != nil {
11328		objectMap["name"] = rnl.Name
11329	}
11330	if rnl.ID != nil {
11331		objectMap["id"] = rnl.ID
11332	}
11333	return json.Marshal(objectMap)
11334}
11335
11336// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
11337func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
11338	var m map[string]*json.RawMessage
11339	err := json.Unmarshal(body, &m)
11340	if err != nil {
11341		return err
11342	}
11343	for k, v := range m {
11344		switch k {
11345		case "properties":
11346			if v != nil {
11347				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
11348				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
11349				if err != nil {
11350					return err
11351				}
11352				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
11353			}
11354		case "name":
11355			if v != nil {
11356				var name string
11357				err = json.Unmarshal(*v, &name)
11358				if err != nil {
11359					return err
11360				}
11361				rnl.Name = &name
11362			}
11363		case "etag":
11364			if v != nil {
11365				var etag string
11366				err = json.Unmarshal(*v, &etag)
11367				if err != nil {
11368					return err
11369				}
11370				rnl.Etag = &etag
11371			}
11372		case "id":
11373			if v != nil {
11374				var ID string
11375				err = json.Unmarshal(*v, &ID)
11376				if err != nil {
11377					return err
11378				}
11379				rnl.ID = &ID
11380			}
11381		}
11382	}
11383
11384	return nil
11385}
11386
11387// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
11388type ResourceNavigationLinkFormat struct {
11389	// LinkedResourceType - Resource type of the linked resource.
11390	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
11391	// Link - Link to the external resource
11392	Link *string `json:"link,omitempty"`
11393	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
11394	ProvisioningState *string `json:"provisioningState,omitempty"`
11395}
11396
11397// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
11398func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
11399	objectMap := make(map[string]interface{})
11400	if rnlf.LinkedResourceType != nil {
11401		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
11402	}
11403	if rnlf.Link != nil {
11404		objectMap["link"] = rnlf.Link
11405	}
11406	return json.Marshal(objectMap)
11407}
11408
11409// RetentionPolicyParameters parameters that define the retention policy for flow log.
11410type RetentionPolicyParameters struct {
11411	// Days - Number of days to retain flow log records.
11412	Days *int32 `json:"days,omitempty"`
11413	// Enabled - Flag to enable/disable retention.
11414	Enabled *bool `json:"enabled,omitempty"`
11415}
11416
11417// Route route resource
11418type Route struct {
11419	autorest.Response `json:"-"`
11420	// RoutePropertiesFormat - Properties of the route.
11421	*RoutePropertiesFormat `json:"properties,omitempty"`
11422	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11423	Name *string `json:"name,omitempty"`
11424	// Etag - A unique read-only string that changes whenever the resource is updated.
11425	Etag *string `json:"etag,omitempty"`
11426	// ID - Resource ID.
11427	ID *string `json:"id,omitempty"`
11428}
11429
11430// MarshalJSON is the custom marshaler for Route.
11431func (r Route) MarshalJSON() ([]byte, error) {
11432	objectMap := make(map[string]interface{})
11433	if r.RoutePropertiesFormat != nil {
11434		objectMap["properties"] = r.RoutePropertiesFormat
11435	}
11436	if r.Name != nil {
11437		objectMap["name"] = r.Name
11438	}
11439	if r.Etag != nil {
11440		objectMap["etag"] = r.Etag
11441	}
11442	if r.ID != nil {
11443		objectMap["id"] = r.ID
11444	}
11445	return json.Marshal(objectMap)
11446}
11447
11448// UnmarshalJSON is the custom unmarshaler for Route struct.
11449func (r *Route) UnmarshalJSON(body []byte) error {
11450	var m map[string]*json.RawMessage
11451	err := json.Unmarshal(body, &m)
11452	if err != nil {
11453		return err
11454	}
11455	for k, v := range m {
11456		switch k {
11457		case "properties":
11458			if v != nil {
11459				var routePropertiesFormat RoutePropertiesFormat
11460				err = json.Unmarshal(*v, &routePropertiesFormat)
11461				if err != nil {
11462					return err
11463				}
11464				r.RoutePropertiesFormat = &routePropertiesFormat
11465			}
11466		case "name":
11467			if v != nil {
11468				var name string
11469				err = json.Unmarshal(*v, &name)
11470				if err != nil {
11471					return err
11472				}
11473				r.Name = &name
11474			}
11475		case "etag":
11476			if v != nil {
11477				var etag string
11478				err = json.Unmarshal(*v, &etag)
11479				if err != nil {
11480					return err
11481				}
11482				r.Etag = &etag
11483			}
11484		case "id":
11485			if v != nil {
11486				var ID string
11487				err = json.Unmarshal(*v, &ID)
11488				if err != nil {
11489					return err
11490				}
11491				r.ID = &ID
11492			}
11493		}
11494	}
11495
11496	return nil
11497}
11498
11499// RouteFilter route Filter Resource.
11500type RouteFilter struct {
11501	autorest.Response            `json:"-"`
11502	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
11503	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11504	Etag *string `json:"etag,omitempty"`
11505	// ID - Resource ID.
11506	ID *string `json:"id,omitempty"`
11507	// Name - READ-ONLY; Resource name.
11508	Name *string `json:"name,omitempty"`
11509	// Type - READ-ONLY; Resource type.
11510	Type *string `json:"type,omitempty"`
11511	// Location - Resource location.
11512	Location *string `json:"location,omitempty"`
11513	// Tags - Resource tags.
11514	Tags map[string]*string `json:"tags"`
11515}
11516
11517// MarshalJSON is the custom marshaler for RouteFilter.
11518func (rf RouteFilter) MarshalJSON() ([]byte, error) {
11519	objectMap := make(map[string]interface{})
11520	if rf.RouteFilterPropertiesFormat != nil {
11521		objectMap["properties"] = rf.RouteFilterPropertiesFormat
11522	}
11523	if rf.ID != nil {
11524		objectMap["id"] = rf.ID
11525	}
11526	if rf.Location != nil {
11527		objectMap["location"] = rf.Location
11528	}
11529	if rf.Tags != nil {
11530		objectMap["tags"] = rf.Tags
11531	}
11532	return json.Marshal(objectMap)
11533}
11534
11535// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
11536func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
11537	var m map[string]*json.RawMessage
11538	err := json.Unmarshal(body, &m)
11539	if err != nil {
11540		return err
11541	}
11542	for k, v := range m {
11543		switch k {
11544		case "properties":
11545			if v != nil {
11546				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
11547				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
11548				if err != nil {
11549					return err
11550				}
11551				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
11552			}
11553		case "etag":
11554			if v != nil {
11555				var etag string
11556				err = json.Unmarshal(*v, &etag)
11557				if err != nil {
11558					return err
11559				}
11560				rf.Etag = &etag
11561			}
11562		case "id":
11563			if v != nil {
11564				var ID string
11565				err = json.Unmarshal(*v, &ID)
11566				if err != nil {
11567					return err
11568				}
11569				rf.ID = &ID
11570			}
11571		case "name":
11572			if v != nil {
11573				var name string
11574				err = json.Unmarshal(*v, &name)
11575				if err != nil {
11576					return err
11577				}
11578				rf.Name = &name
11579			}
11580		case "type":
11581			if v != nil {
11582				var typeVar string
11583				err = json.Unmarshal(*v, &typeVar)
11584				if err != nil {
11585					return err
11586				}
11587				rf.Type = &typeVar
11588			}
11589		case "location":
11590			if v != nil {
11591				var location string
11592				err = json.Unmarshal(*v, &location)
11593				if err != nil {
11594					return err
11595				}
11596				rf.Location = &location
11597			}
11598		case "tags":
11599			if v != nil {
11600				var tags map[string]*string
11601				err = json.Unmarshal(*v, &tags)
11602				if err != nil {
11603					return err
11604				}
11605				rf.Tags = tags
11606			}
11607		}
11608	}
11609
11610	return nil
11611}
11612
11613// RouteFilterListResult response for the ListRouteFilters API service call.
11614type RouteFilterListResult struct {
11615	autorest.Response `json:"-"`
11616	// Value - Gets a list of route filters in a resource group.
11617	Value *[]RouteFilter `json:"value,omitempty"`
11618	// NextLink - The URL to get the next set of results.
11619	NextLink *string `json:"nextLink,omitempty"`
11620}
11621
11622// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
11623type RouteFilterListResultIterator struct {
11624	i    int
11625	page RouteFilterListResultPage
11626}
11627
11628// NextWithContext advances to the next value.  If there was an error making
11629// the request the iterator does not advance and the error is returned.
11630func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
11631	if tracing.IsEnabled() {
11632		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
11633		defer func() {
11634			sc := -1
11635			if iter.Response().Response.Response != nil {
11636				sc = iter.Response().Response.Response.StatusCode
11637			}
11638			tracing.EndSpan(ctx, sc, err)
11639		}()
11640	}
11641	iter.i++
11642	if iter.i < len(iter.page.Values()) {
11643		return nil
11644	}
11645	err = iter.page.NextWithContext(ctx)
11646	if err != nil {
11647		iter.i--
11648		return err
11649	}
11650	iter.i = 0
11651	return nil
11652}
11653
11654// Next advances to the next value.  If there was an error making
11655// the request the iterator does not advance and the error is returned.
11656// Deprecated: Use NextWithContext() instead.
11657func (iter *RouteFilterListResultIterator) Next() error {
11658	return iter.NextWithContext(context.Background())
11659}
11660
11661// NotDone returns true if the enumeration should be started or is not yet complete.
11662func (iter RouteFilterListResultIterator) NotDone() bool {
11663	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11664}
11665
11666// Response returns the raw server response from the last page request.
11667func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
11668	return iter.page.Response()
11669}
11670
11671// Value returns the current value or a zero-initialized value if the
11672// iterator has advanced beyond the end of the collection.
11673func (iter RouteFilterListResultIterator) Value() RouteFilter {
11674	if !iter.page.NotDone() {
11675		return RouteFilter{}
11676	}
11677	return iter.page.Values()[iter.i]
11678}
11679
11680// Creates a new instance of the RouteFilterListResultIterator type.
11681func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
11682	return RouteFilterListResultIterator{page: page}
11683}
11684
11685// IsEmpty returns true if the ListResult contains no values.
11686func (rflr RouteFilterListResult) IsEmpty() bool {
11687	return rflr.Value == nil || len(*rflr.Value) == 0
11688}
11689
11690// hasNextLink returns true if the NextLink is not empty.
11691func (rflr RouteFilterListResult) hasNextLink() bool {
11692	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
11693}
11694
11695// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
11696// It returns nil if no more results exist.
11697func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
11698	if !rflr.hasNextLink() {
11699		return nil, nil
11700	}
11701	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11702		autorest.AsJSON(),
11703		autorest.AsGet(),
11704		autorest.WithBaseURL(to.String(rflr.NextLink)))
11705}
11706
11707// RouteFilterListResultPage contains a page of RouteFilter values.
11708type RouteFilterListResultPage struct {
11709	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
11710	rflr RouteFilterListResult
11711}
11712
11713// NextWithContext advances to the next page of values.  If there was an error making
11714// the request the page does not advance and the error is returned.
11715func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
11716	if tracing.IsEnabled() {
11717		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
11718		defer func() {
11719			sc := -1
11720			if page.Response().Response.Response != nil {
11721				sc = page.Response().Response.Response.StatusCode
11722			}
11723			tracing.EndSpan(ctx, sc, err)
11724		}()
11725	}
11726	for {
11727		next, err := page.fn(ctx, page.rflr)
11728		if err != nil {
11729			return err
11730		}
11731		page.rflr = next
11732		if !next.hasNextLink() || !next.IsEmpty() {
11733			break
11734		}
11735	}
11736	return nil
11737}
11738
11739// Next advances to the next page of values.  If there was an error making
11740// the request the page does not advance and the error is returned.
11741// Deprecated: Use NextWithContext() instead.
11742func (page *RouteFilterListResultPage) Next() error {
11743	return page.NextWithContext(context.Background())
11744}
11745
11746// NotDone returns true if the page enumeration should be started or is not yet complete.
11747func (page RouteFilterListResultPage) NotDone() bool {
11748	return !page.rflr.IsEmpty()
11749}
11750
11751// Response returns the raw server response from the last page request.
11752func (page RouteFilterListResultPage) Response() RouteFilterListResult {
11753	return page.rflr
11754}
11755
11756// Values returns the slice of values for the current page or nil if there are no values.
11757func (page RouteFilterListResultPage) Values() []RouteFilter {
11758	if page.rflr.IsEmpty() {
11759		return nil
11760	}
11761	return *page.rflr.Value
11762}
11763
11764// Creates a new instance of the RouteFilterListResultPage type.
11765func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
11766	return RouteFilterListResultPage{
11767		fn:   getNextPage,
11768		rflr: cur,
11769	}
11770}
11771
11772// RouteFilterPropertiesFormat route Filter Resource
11773type RouteFilterPropertiesFormat struct {
11774	// Rules - Collection of RouteFilterRules contained within a route filter.
11775	Rules *[]RouteFilterRule `json:"rules,omitempty"`
11776	// Peerings - A collection of references to express route circuit peerings.
11777	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
11778	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
11779	ProvisioningState *string `json:"provisioningState,omitempty"`
11780}
11781
11782// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
11783func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
11784	objectMap := make(map[string]interface{})
11785	if rfpf.Rules != nil {
11786		objectMap["rules"] = rfpf.Rules
11787	}
11788	if rfpf.Peerings != nil {
11789		objectMap["peerings"] = rfpf.Peerings
11790	}
11791	return json.Marshal(objectMap)
11792}
11793
11794// RouteFilterRule route Filter Rule Resource
11795type RouteFilterRule struct {
11796	autorest.Response                `json:"-"`
11797	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
11798	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11799	Name *string `json:"name,omitempty"`
11800	// Location - Resource location.
11801	Location *string `json:"location,omitempty"`
11802	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11803	Etag *string `json:"etag,omitempty"`
11804	// ID - Resource ID.
11805	ID *string `json:"id,omitempty"`
11806}
11807
11808// MarshalJSON is the custom marshaler for RouteFilterRule.
11809func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
11810	objectMap := make(map[string]interface{})
11811	if rfr.RouteFilterRulePropertiesFormat != nil {
11812		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
11813	}
11814	if rfr.Name != nil {
11815		objectMap["name"] = rfr.Name
11816	}
11817	if rfr.Location != nil {
11818		objectMap["location"] = rfr.Location
11819	}
11820	if rfr.ID != nil {
11821		objectMap["id"] = rfr.ID
11822	}
11823	return json.Marshal(objectMap)
11824}
11825
11826// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
11827func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
11828	var m map[string]*json.RawMessage
11829	err := json.Unmarshal(body, &m)
11830	if err != nil {
11831		return err
11832	}
11833	for k, v := range m {
11834		switch k {
11835		case "properties":
11836			if v != nil {
11837				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
11838				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
11839				if err != nil {
11840					return err
11841				}
11842				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
11843			}
11844		case "name":
11845			if v != nil {
11846				var name string
11847				err = json.Unmarshal(*v, &name)
11848				if err != nil {
11849					return err
11850				}
11851				rfr.Name = &name
11852			}
11853		case "location":
11854			if v != nil {
11855				var location string
11856				err = json.Unmarshal(*v, &location)
11857				if err != nil {
11858					return err
11859				}
11860				rfr.Location = &location
11861			}
11862		case "etag":
11863			if v != nil {
11864				var etag string
11865				err = json.Unmarshal(*v, &etag)
11866				if err != nil {
11867					return err
11868				}
11869				rfr.Etag = &etag
11870			}
11871		case "id":
11872			if v != nil {
11873				var ID string
11874				err = json.Unmarshal(*v, &ID)
11875				if err != nil {
11876					return err
11877				}
11878				rfr.ID = &ID
11879			}
11880		}
11881	}
11882
11883	return nil
11884}
11885
11886// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
11887type RouteFilterRuleListResult struct {
11888	autorest.Response `json:"-"`
11889	// Value - Gets a list of RouteFilterRules in a resource group.
11890	Value *[]RouteFilterRule `json:"value,omitempty"`
11891	// NextLink - The URL to get the next set of results.
11892	NextLink *string `json:"nextLink,omitempty"`
11893}
11894
11895// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
11896type RouteFilterRuleListResultIterator struct {
11897	i    int
11898	page RouteFilterRuleListResultPage
11899}
11900
11901// NextWithContext advances to the next value.  If there was an error making
11902// the request the iterator does not advance and the error is returned.
11903func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11904	if tracing.IsEnabled() {
11905		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
11906		defer func() {
11907			sc := -1
11908			if iter.Response().Response.Response != nil {
11909				sc = iter.Response().Response.Response.StatusCode
11910			}
11911			tracing.EndSpan(ctx, sc, err)
11912		}()
11913	}
11914	iter.i++
11915	if iter.i < len(iter.page.Values()) {
11916		return nil
11917	}
11918	err = iter.page.NextWithContext(ctx)
11919	if err != nil {
11920		iter.i--
11921		return err
11922	}
11923	iter.i = 0
11924	return nil
11925}
11926
11927// Next advances to the next value.  If there was an error making
11928// the request the iterator does not advance and the error is returned.
11929// Deprecated: Use NextWithContext() instead.
11930func (iter *RouteFilterRuleListResultIterator) Next() error {
11931	return iter.NextWithContext(context.Background())
11932}
11933
11934// NotDone returns true if the enumeration should be started or is not yet complete.
11935func (iter RouteFilterRuleListResultIterator) NotDone() bool {
11936	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11937}
11938
11939// Response returns the raw server response from the last page request.
11940func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
11941	return iter.page.Response()
11942}
11943
11944// Value returns the current value or a zero-initialized value if the
11945// iterator has advanced beyond the end of the collection.
11946func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
11947	if !iter.page.NotDone() {
11948		return RouteFilterRule{}
11949	}
11950	return iter.page.Values()[iter.i]
11951}
11952
11953// Creates a new instance of the RouteFilterRuleListResultIterator type.
11954func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
11955	return RouteFilterRuleListResultIterator{page: page}
11956}
11957
11958// IsEmpty returns true if the ListResult contains no values.
11959func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
11960	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
11961}
11962
11963// hasNextLink returns true if the NextLink is not empty.
11964func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
11965	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
11966}
11967
11968// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
11969// It returns nil if no more results exist.
11970func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
11971	if !rfrlr.hasNextLink() {
11972		return nil, nil
11973	}
11974	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11975		autorest.AsJSON(),
11976		autorest.AsGet(),
11977		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
11978}
11979
11980// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
11981type RouteFilterRuleListResultPage struct {
11982	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
11983	rfrlr RouteFilterRuleListResult
11984}
11985
11986// NextWithContext advances to the next page of values.  If there was an error making
11987// the request the page does not advance and the error is returned.
11988func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
11989	if tracing.IsEnabled() {
11990		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
11991		defer func() {
11992			sc := -1
11993			if page.Response().Response.Response != nil {
11994				sc = page.Response().Response.Response.StatusCode
11995			}
11996			tracing.EndSpan(ctx, sc, err)
11997		}()
11998	}
11999	for {
12000		next, err := page.fn(ctx, page.rfrlr)
12001		if err != nil {
12002			return err
12003		}
12004		page.rfrlr = next
12005		if !next.hasNextLink() || !next.IsEmpty() {
12006			break
12007		}
12008	}
12009	return nil
12010}
12011
12012// Next advances to the next page of values.  If there was an error making
12013// the request the page does not advance and the error is returned.
12014// Deprecated: Use NextWithContext() instead.
12015func (page *RouteFilterRuleListResultPage) Next() error {
12016	return page.NextWithContext(context.Background())
12017}
12018
12019// NotDone returns true if the page enumeration should be started or is not yet complete.
12020func (page RouteFilterRuleListResultPage) NotDone() bool {
12021	return !page.rfrlr.IsEmpty()
12022}
12023
12024// Response returns the raw server response from the last page request.
12025func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
12026	return page.rfrlr
12027}
12028
12029// Values returns the slice of values for the current page or nil if there are no values.
12030func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
12031	if page.rfrlr.IsEmpty() {
12032		return nil
12033	}
12034	return *page.rfrlr.Value
12035}
12036
12037// Creates a new instance of the RouteFilterRuleListResultPage type.
12038func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
12039	return RouteFilterRuleListResultPage{
12040		fn:    getNextPage,
12041		rfrlr: cur,
12042	}
12043}
12044
12045// RouteFilterRulePropertiesFormat route Filter Rule Resource
12046type RouteFilterRulePropertiesFormat struct {
12047	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
12048	Access Access `json:"access,omitempty"`
12049	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
12050	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
12051	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
12052	Communities *[]string `json:"communities,omitempty"`
12053	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
12054	ProvisioningState *string `json:"provisioningState,omitempty"`
12055}
12056
12057// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
12058func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12059	objectMap := make(map[string]interface{})
12060	if rfrpf.Access != "" {
12061		objectMap["access"] = rfrpf.Access
12062	}
12063	if rfrpf.RouteFilterRuleType != nil {
12064		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
12065	}
12066	if rfrpf.Communities != nil {
12067		objectMap["communities"] = rfrpf.Communities
12068	}
12069	return json.Marshal(objectMap)
12070}
12071
12072// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12073// long-running operation.
12074type RouteFilterRulesCreateOrUpdateFuture struct {
12075	azure.FutureAPI
12076	// Result returns the result of the asynchronous operation.
12077	// If the operation has not completed it will return an error.
12078	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12079}
12080
12081// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12082func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12083	var azFuture azure.Future
12084	if err := json.Unmarshal(body, &azFuture); err != nil {
12085		return err
12086	}
12087	future.FutureAPI = &azFuture
12088	future.Result = future.result
12089	return nil
12090}
12091
12092// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
12093func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12094	var done bool
12095	done, err = future.DoneWithContext(context.Background(), client)
12096	if err != nil {
12097		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12098		return
12099	}
12100	if !done {
12101		rfr.Response.Response = future.Response()
12102		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
12103		return
12104	}
12105	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12106	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12107		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
12108		if err != nil {
12109			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12110		}
12111	}
12112	return
12113}
12114
12115// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12116// operation.
12117type RouteFilterRulesDeleteFuture struct {
12118	azure.FutureAPI
12119	// Result returns the result of the asynchronous operation.
12120	// If the operation has not completed it will return an error.
12121	Result func(RouteFilterRulesClient) (autorest.Response, error)
12122}
12123
12124// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12125func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12126	var azFuture azure.Future
12127	if err := json.Unmarshal(body, &azFuture); err != nil {
12128		return err
12129	}
12130	future.FutureAPI = &azFuture
12131	future.Result = future.result
12132	return nil
12133}
12134
12135// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
12136func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
12137	var done bool
12138	done, err = future.DoneWithContext(context.Background(), client)
12139	if err != nil {
12140		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12141		return
12142	}
12143	if !done {
12144		ar.Response = future.Response()
12145		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
12146		return
12147	}
12148	ar.Response = future.Response()
12149	return
12150}
12151
12152// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12153// operation.
12154type RouteFilterRulesUpdateFuture struct {
12155	azure.FutureAPI
12156	// Result returns the result of the asynchronous operation.
12157	// If the operation has not completed it will return an error.
12158	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12159}
12160
12161// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12162func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
12163	var azFuture azure.Future
12164	if err := json.Unmarshal(body, &azFuture); err != nil {
12165		return err
12166	}
12167	future.FutureAPI = &azFuture
12168	future.Result = future.result
12169	return nil
12170}
12171
12172// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
12173func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12174	var done bool
12175	done, err = future.DoneWithContext(context.Background(), client)
12176	if err != nil {
12177		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
12178		return
12179	}
12180	if !done {
12181		rfr.Response.Response = future.Response()
12182		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
12183		return
12184	}
12185	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12186	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12187		rfr, err = client.UpdateResponder(rfr.Response.Response)
12188		if err != nil {
12189			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12190		}
12191	}
12192	return
12193}
12194
12195// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12196// long-running operation.
12197type RouteFiltersCreateOrUpdateFuture struct {
12198	azure.FutureAPI
12199	// Result returns the result of the asynchronous operation.
12200	// If the operation has not completed it will return an error.
12201	Result func(RouteFiltersClient) (RouteFilter, error)
12202}
12203
12204// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12205func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12206	var azFuture azure.Future
12207	if err := json.Unmarshal(body, &azFuture); err != nil {
12208		return err
12209	}
12210	future.FutureAPI = &azFuture
12211	future.Result = future.result
12212	return nil
12213}
12214
12215// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
12216func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12217	var done bool
12218	done, err = future.DoneWithContext(context.Background(), client)
12219	if err != nil {
12220		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12221		return
12222	}
12223	if !done {
12224		rf.Response.Response = future.Response()
12225		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
12226		return
12227	}
12228	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12229	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12230		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
12231		if err != nil {
12232			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12233		}
12234	}
12235	return
12236}
12237
12238// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12239// operation.
12240type RouteFiltersDeleteFuture struct {
12241	azure.FutureAPI
12242	// Result returns the result of the asynchronous operation.
12243	// If the operation has not completed it will return an error.
12244	Result func(RouteFiltersClient) (autorest.Response, error)
12245}
12246
12247// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12248func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
12249	var azFuture azure.Future
12250	if err := json.Unmarshal(body, &azFuture); err != nil {
12251		return err
12252	}
12253	future.FutureAPI = &azFuture
12254	future.Result = future.result
12255	return nil
12256}
12257
12258// result is the default implementation for RouteFiltersDeleteFuture.Result.
12259func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
12260	var done bool
12261	done, err = future.DoneWithContext(context.Background(), client)
12262	if err != nil {
12263		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
12264		return
12265	}
12266	if !done {
12267		ar.Response = future.Response()
12268		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
12269		return
12270	}
12271	ar.Response = future.Response()
12272	return
12273}
12274
12275// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12276// operation.
12277type RouteFiltersUpdateFuture struct {
12278	azure.FutureAPI
12279	// Result returns the result of the asynchronous operation.
12280	// If the operation has not completed it will return an error.
12281	Result func(RouteFiltersClient) (RouteFilter, error)
12282}
12283
12284// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12285func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
12286	var azFuture azure.Future
12287	if err := json.Unmarshal(body, &azFuture); err != nil {
12288		return err
12289	}
12290	future.FutureAPI = &azFuture
12291	future.Result = future.result
12292	return nil
12293}
12294
12295// result is the default implementation for RouteFiltersUpdateFuture.Result.
12296func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12297	var done bool
12298	done, err = future.DoneWithContext(context.Background(), client)
12299	if err != nil {
12300		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
12301		return
12302	}
12303	if !done {
12304		rf.Response.Response = future.Response()
12305		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
12306		return
12307	}
12308	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12309	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12310		rf, err = client.UpdateResponder(rf.Response.Response)
12311		if err != nil {
12312			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12313		}
12314	}
12315	return
12316}
12317
12318// RouteListResult response for the ListRoute API service call
12319type RouteListResult struct {
12320	autorest.Response `json:"-"`
12321	// Value - Gets a list of routes in a resource group.
12322	Value *[]Route `json:"value,omitempty"`
12323	// NextLink - The URL to get the next set of results.
12324	NextLink *string `json:"nextLink,omitempty"`
12325}
12326
12327// RouteListResultIterator provides access to a complete listing of Route values.
12328type RouteListResultIterator struct {
12329	i    int
12330	page RouteListResultPage
12331}
12332
12333// NextWithContext advances to the next value.  If there was an error making
12334// the request the iterator does not advance and the error is returned.
12335func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
12336	if tracing.IsEnabled() {
12337		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
12338		defer func() {
12339			sc := -1
12340			if iter.Response().Response.Response != nil {
12341				sc = iter.Response().Response.Response.StatusCode
12342			}
12343			tracing.EndSpan(ctx, sc, err)
12344		}()
12345	}
12346	iter.i++
12347	if iter.i < len(iter.page.Values()) {
12348		return nil
12349	}
12350	err = iter.page.NextWithContext(ctx)
12351	if err != nil {
12352		iter.i--
12353		return err
12354	}
12355	iter.i = 0
12356	return nil
12357}
12358
12359// Next advances to the next value.  If there was an error making
12360// the request the iterator does not advance and the error is returned.
12361// Deprecated: Use NextWithContext() instead.
12362func (iter *RouteListResultIterator) Next() error {
12363	return iter.NextWithContext(context.Background())
12364}
12365
12366// NotDone returns true if the enumeration should be started or is not yet complete.
12367func (iter RouteListResultIterator) NotDone() bool {
12368	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12369}
12370
12371// Response returns the raw server response from the last page request.
12372func (iter RouteListResultIterator) Response() RouteListResult {
12373	return iter.page.Response()
12374}
12375
12376// Value returns the current value or a zero-initialized value if the
12377// iterator has advanced beyond the end of the collection.
12378func (iter RouteListResultIterator) Value() Route {
12379	if !iter.page.NotDone() {
12380		return Route{}
12381	}
12382	return iter.page.Values()[iter.i]
12383}
12384
12385// Creates a new instance of the RouteListResultIterator type.
12386func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
12387	return RouteListResultIterator{page: page}
12388}
12389
12390// IsEmpty returns true if the ListResult contains no values.
12391func (rlr RouteListResult) IsEmpty() bool {
12392	return rlr.Value == nil || len(*rlr.Value) == 0
12393}
12394
12395// hasNextLink returns true if the NextLink is not empty.
12396func (rlr RouteListResult) hasNextLink() bool {
12397	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
12398}
12399
12400// routeListResultPreparer prepares a request to retrieve the next set of results.
12401// It returns nil if no more results exist.
12402func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
12403	if !rlr.hasNextLink() {
12404		return nil, nil
12405	}
12406	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12407		autorest.AsJSON(),
12408		autorest.AsGet(),
12409		autorest.WithBaseURL(to.String(rlr.NextLink)))
12410}
12411
12412// RouteListResultPage contains a page of Route values.
12413type RouteListResultPage struct {
12414	fn  func(context.Context, RouteListResult) (RouteListResult, error)
12415	rlr RouteListResult
12416}
12417
12418// NextWithContext advances to the next page of values.  If there was an error making
12419// the request the page does not advance and the error is returned.
12420func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
12421	if tracing.IsEnabled() {
12422		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
12423		defer func() {
12424			sc := -1
12425			if page.Response().Response.Response != nil {
12426				sc = page.Response().Response.Response.StatusCode
12427			}
12428			tracing.EndSpan(ctx, sc, err)
12429		}()
12430	}
12431	for {
12432		next, err := page.fn(ctx, page.rlr)
12433		if err != nil {
12434			return err
12435		}
12436		page.rlr = next
12437		if !next.hasNextLink() || !next.IsEmpty() {
12438			break
12439		}
12440	}
12441	return nil
12442}
12443
12444// Next advances to the next page of values.  If there was an error making
12445// the request the page does not advance and the error is returned.
12446// Deprecated: Use NextWithContext() instead.
12447func (page *RouteListResultPage) Next() error {
12448	return page.NextWithContext(context.Background())
12449}
12450
12451// NotDone returns true if the page enumeration should be started or is not yet complete.
12452func (page RouteListResultPage) NotDone() bool {
12453	return !page.rlr.IsEmpty()
12454}
12455
12456// Response returns the raw server response from the last page request.
12457func (page RouteListResultPage) Response() RouteListResult {
12458	return page.rlr
12459}
12460
12461// Values returns the slice of values for the current page or nil if there are no values.
12462func (page RouteListResultPage) Values() []Route {
12463	if page.rlr.IsEmpty() {
12464		return nil
12465	}
12466	return *page.rlr.Value
12467}
12468
12469// Creates a new instance of the RouteListResultPage type.
12470func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
12471	return RouteListResultPage{
12472		fn:  getNextPage,
12473		rlr: cur,
12474	}
12475}
12476
12477// RoutePropertiesFormat route resource
12478type RoutePropertiesFormat struct {
12479	// AddressPrefix - The destination CIDR to which the route applies.
12480	AddressPrefix *string `json:"addressPrefix,omitempty"`
12481	// 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'
12482	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
12483	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
12484	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
12485	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12486	ProvisioningState *string `json:"provisioningState,omitempty"`
12487}
12488
12489// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12490// operation.
12491type RoutesCreateOrUpdateFuture struct {
12492	azure.FutureAPI
12493	// Result returns the result of the asynchronous operation.
12494	// If the operation has not completed it will return an error.
12495	Result func(RoutesClient) (Route, error)
12496}
12497
12498// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12499func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12500	var azFuture azure.Future
12501	if err := json.Unmarshal(body, &azFuture); err != nil {
12502		return err
12503	}
12504	future.FutureAPI = &azFuture
12505	future.Result = future.result
12506	return nil
12507}
12508
12509// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
12510func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
12511	var done bool
12512	done, err = future.DoneWithContext(context.Background(), client)
12513	if err != nil {
12514		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12515		return
12516	}
12517	if !done {
12518		r.Response.Response = future.Response()
12519		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
12520		return
12521	}
12522	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12523	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
12524		r, err = client.CreateOrUpdateResponder(r.Response.Response)
12525		if err != nil {
12526			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
12527		}
12528	}
12529	return
12530}
12531
12532// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
12533type RoutesDeleteFuture struct {
12534	azure.FutureAPI
12535	// Result returns the result of the asynchronous operation.
12536	// If the operation has not completed it will return an error.
12537	Result func(RoutesClient) (autorest.Response, error)
12538}
12539
12540// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12541func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
12542	var azFuture azure.Future
12543	if err := json.Unmarshal(body, &azFuture); err != nil {
12544		return err
12545	}
12546	future.FutureAPI = &azFuture
12547	future.Result = future.result
12548	return nil
12549}
12550
12551// result is the default implementation for RoutesDeleteFuture.Result.
12552func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
12553	var done bool
12554	done, err = future.DoneWithContext(context.Background(), client)
12555	if err != nil {
12556		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
12557		return
12558	}
12559	if !done {
12560		ar.Response = future.Response()
12561		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
12562		return
12563	}
12564	ar.Response = future.Response()
12565	return
12566}
12567
12568// RouteTable route table resource.
12569type RouteTable struct {
12570	autorest.Response `json:"-"`
12571	// RouteTablePropertiesFormat - Properties of the route table.
12572	*RouteTablePropertiesFormat `json:"properties,omitempty"`
12573	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12574	Etag *string `json:"etag,omitempty"`
12575	// ID - Resource ID.
12576	ID *string `json:"id,omitempty"`
12577	// Name - READ-ONLY; Resource name.
12578	Name *string `json:"name,omitempty"`
12579	// Type - READ-ONLY; Resource type.
12580	Type *string `json:"type,omitempty"`
12581	// Location - Resource location.
12582	Location *string `json:"location,omitempty"`
12583	// Tags - Resource tags.
12584	Tags map[string]*string `json:"tags"`
12585}
12586
12587// MarshalJSON is the custom marshaler for RouteTable.
12588func (rt RouteTable) MarshalJSON() ([]byte, error) {
12589	objectMap := make(map[string]interface{})
12590	if rt.RouteTablePropertiesFormat != nil {
12591		objectMap["properties"] = rt.RouteTablePropertiesFormat
12592	}
12593	if rt.Etag != nil {
12594		objectMap["etag"] = rt.Etag
12595	}
12596	if rt.ID != nil {
12597		objectMap["id"] = rt.ID
12598	}
12599	if rt.Location != nil {
12600		objectMap["location"] = rt.Location
12601	}
12602	if rt.Tags != nil {
12603		objectMap["tags"] = rt.Tags
12604	}
12605	return json.Marshal(objectMap)
12606}
12607
12608// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
12609func (rt *RouteTable) UnmarshalJSON(body []byte) error {
12610	var m map[string]*json.RawMessage
12611	err := json.Unmarshal(body, &m)
12612	if err != nil {
12613		return err
12614	}
12615	for k, v := range m {
12616		switch k {
12617		case "properties":
12618			if v != nil {
12619				var routeTablePropertiesFormat RouteTablePropertiesFormat
12620				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
12621				if err != nil {
12622					return err
12623				}
12624				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
12625			}
12626		case "etag":
12627			if v != nil {
12628				var etag string
12629				err = json.Unmarshal(*v, &etag)
12630				if err != nil {
12631					return err
12632				}
12633				rt.Etag = &etag
12634			}
12635		case "id":
12636			if v != nil {
12637				var ID string
12638				err = json.Unmarshal(*v, &ID)
12639				if err != nil {
12640					return err
12641				}
12642				rt.ID = &ID
12643			}
12644		case "name":
12645			if v != nil {
12646				var name string
12647				err = json.Unmarshal(*v, &name)
12648				if err != nil {
12649					return err
12650				}
12651				rt.Name = &name
12652			}
12653		case "type":
12654			if v != nil {
12655				var typeVar string
12656				err = json.Unmarshal(*v, &typeVar)
12657				if err != nil {
12658					return err
12659				}
12660				rt.Type = &typeVar
12661			}
12662		case "location":
12663			if v != nil {
12664				var location string
12665				err = json.Unmarshal(*v, &location)
12666				if err != nil {
12667					return err
12668				}
12669				rt.Location = &location
12670			}
12671		case "tags":
12672			if v != nil {
12673				var tags map[string]*string
12674				err = json.Unmarshal(*v, &tags)
12675				if err != nil {
12676					return err
12677				}
12678				rt.Tags = tags
12679			}
12680		}
12681	}
12682
12683	return nil
12684}
12685
12686// RouteTableListResult response for the ListRouteTable API service call.
12687type RouteTableListResult struct {
12688	autorest.Response `json:"-"`
12689	// Value - Gets a list of route tables in a resource group.
12690	Value *[]RouteTable `json:"value,omitempty"`
12691	// NextLink - The URL to get the next set of results.
12692	NextLink *string `json:"nextLink,omitempty"`
12693}
12694
12695// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
12696type RouteTableListResultIterator struct {
12697	i    int
12698	page RouteTableListResultPage
12699}
12700
12701// NextWithContext advances to the next value.  If there was an error making
12702// the request the iterator does not advance and the error is returned.
12703func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
12704	if tracing.IsEnabled() {
12705		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
12706		defer func() {
12707			sc := -1
12708			if iter.Response().Response.Response != nil {
12709				sc = iter.Response().Response.Response.StatusCode
12710			}
12711			tracing.EndSpan(ctx, sc, err)
12712		}()
12713	}
12714	iter.i++
12715	if iter.i < len(iter.page.Values()) {
12716		return nil
12717	}
12718	err = iter.page.NextWithContext(ctx)
12719	if err != nil {
12720		iter.i--
12721		return err
12722	}
12723	iter.i = 0
12724	return nil
12725}
12726
12727// Next advances to the next value.  If there was an error making
12728// the request the iterator does not advance and the error is returned.
12729// Deprecated: Use NextWithContext() instead.
12730func (iter *RouteTableListResultIterator) Next() error {
12731	return iter.NextWithContext(context.Background())
12732}
12733
12734// NotDone returns true if the enumeration should be started or is not yet complete.
12735func (iter RouteTableListResultIterator) NotDone() bool {
12736	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12737}
12738
12739// Response returns the raw server response from the last page request.
12740func (iter RouteTableListResultIterator) Response() RouteTableListResult {
12741	return iter.page.Response()
12742}
12743
12744// Value returns the current value or a zero-initialized value if the
12745// iterator has advanced beyond the end of the collection.
12746func (iter RouteTableListResultIterator) Value() RouteTable {
12747	if !iter.page.NotDone() {
12748		return RouteTable{}
12749	}
12750	return iter.page.Values()[iter.i]
12751}
12752
12753// Creates a new instance of the RouteTableListResultIterator type.
12754func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
12755	return RouteTableListResultIterator{page: page}
12756}
12757
12758// IsEmpty returns true if the ListResult contains no values.
12759func (rtlr RouteTableListResult) IsEmpty() bool {
12760	return rtlr.Value == nil || len(*rtlr.Value) == 0
12761}
12762
12763// hasNextLink returns true if the NextLink is not empty.
12764func (rtlr RouteTableListResult) hasNextLink() bool {
12765	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
12766}
12767
12768// routeTableListResultPreparer prepares a request to retrieve the next set of results.
12769// It returns nil if no more results exist.
12770func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
12771	if !rtlr.hasNextLink() {
12772		return nil, nil
12773	}
12774	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12775		autorest.AsJSON(),
12776		autorest.AsGet(),
12777		autorest.WithBaseURL(to.String(rtlr.NextLink)))
12778}
12779
12780// RouteTableListResultPage contains a page of RouteTable values.
12781type RouteTableListResultPage struct {
12782	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
12783	rtlr RouteTableListResult
12784}
12785
12786// NextWithContext advances to the next page of values.  If there was an error making
12787// the request the page does not advance and the error is returned.
12788func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
12789	if tracing.IsEnabled() {
12790		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
12791		defer func() {
12792			sc := -1
12793			if page.Response().Response.Response != nil {
12794				sc = page.Response().Response.Response.StatusCode
12795			}
12796			tracing.EndSpan(ctx, sc, err)
12797		}()
12798	}
12799	for {
12800		next, err := page.fn(ctx, page.rtlr)
12801		if err != nil {
12802			return err
12803		}
12804		page.rtlr = next
12805		if !next.hasNextLink() || !next.IsEmpty() {
12806			break
12807		}
12808	}
12809	return nil
12810}
12811
12812// Next advances to the next page of values.  If there was an error making
12813// the request the page does not advance and the error is returned.
12814// Deprecated: Use NextWithContext() instead.
12815func (page *RouteTableListResultPage) Next() error {
12816	return page.NextWithContext(context.Background())
12817}
12818
12819// NotDone returns true if the page enumeration should be started or is not yet complete.
12820func (page RouteTableListResultPage) NotDone() bool {
12821	return !page.rtlr.IsEmpty()
12822}
12823
12824// Response returns the raw server response from the last page request.
12825func (page RouteTableListResultPage) Response() RouteTableListResult {
12826	return page.rtlr
12827}
12828
12829// Values returns the slice of values for the current page or nil if there are no values.
12830func (page RouteTableListResultPage) Values() []RouteTable {
12831	if page.rtlr.IsEmpty() {
12832		return nil
12833	}
12834	return *page.rtlr.Value
12835}
12836
12837// Creates a new instance of the RouteTableListResultPage type.
12838func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
12839	return RouteTableListResultPage{
12840		fn:   getNextPage,
12841		rtlr: cur,
12842	}
12843}
12844
12845// RouteTablePropertiesFormat route Table resource
12846type RouteTablePropertiesFormat struct {
12847	// Routes - Collection of routes contained within a route table.
12848	Routes *[]Route `json:"routes,omitempty"`
12849	// Subnets - READ-ONLY; A collection of references to subnets.
12850	Subnets *[]Subnet `json:"subnets,omitempty"`
12851	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
12852	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
12853	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12854	ProvisioningState *string `json:"provisioningState,omitempty"`
12855}
12856
12857// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
12858func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
12859	objectMap := make(map[string]interface{})
12860	if rtpf.Routes != nil {
12861		objectMap["routes"] = rtpf.Routes
12862	}
12863	if rtpf.DisableBgpRoutePropagation != nil {
12864		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
12865	}
12866	if rtpf.ProvisioningState != nil {
12867		objectMap["provisioningState"] = rtpf.ProvisioningState
12868	}
12869	return json.Marshal(objectMap)
12870}
12871
12872// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12873// long-running operation.
12874type RouteTablesCreateOrUpdateFuture struct {
12875	azure.FutureAPI
12876	// Result returns the result of the asynchronous operation.
12877	// If the operation has not completed it will return an error.
12878	Result func(RouteTablesClient) (RouteTable, error)
12879}
12880
12881// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12882func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12883	var azFuture azure.Future
12884	if err := json.Unmarshal(body, &azFuture); err != nil {
12885		return err
12886	}
12887	future.FutureAPI = &azFuture
12888	future.Result = future.result
12889	return nil
12890}
12891
12892// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
12893func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
12894	var done bool
12895	done, err = future.DoneWithContext(context.Background(), client)
12896	if err != nil {
12897		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12898		return
12899	}
12900	if !done {
12901		rt.Response.Response = future.Response()
12902		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
12903		return
12904	}
12905	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12906	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
12907		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
12908		if err != nil {
12909			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
12910		}
12911	}
12912	return
12913}
12914
12915// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12916// operation.
12917type RouteTablesDeleteFuture struct {
12918	azure.FutureAPI
12919	// Result returns the result of the asynchronous operation.
12920	// If the operation has not completed it will return an error.
12921	Result func(RouteTablesClient) (autorest.Response, error)
12922}
12923
12924// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12925func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
12926	var azFuture azure.Future
12927	if err := json.Unmarshal(body, &azFuture); err != nil {
12928		return err
12929	}
12930	future.FutureAPI = &azFuture
12931	future.Result = future.result
12932	return nil
12933}
12934
12935// result is the default implementation for RouteTablesDeleteFuture.Result.
12936func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
12937	var done bool
12938	done, err = future.DoneWithContext(context.Background(), client)
12939	if err != nil {
12940		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
12941		return
12942	}
12943	if !done {
12944		ar.Response = future.Response()
12945		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
12946		return
12947	}
12948	ar.Response = future.Response()
12949	return
12950}
12951
12952// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12953// operation.
12954type RouteTablesUpdateTagsFuture struct {
12955	azure.FutureAPI
12956	// Result returns the result of the asynchronous operation.
12957	// If the operation has not completed it will return an error.
12958	Result func(RouteTablesClient) (RouteTable, error)
12959}
12960
12961// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12962func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12963	var azFuture azure.Future
12964	if err := json.Unmarshal(body, &azFuture); err != nil {
12965		return err
12966	}
12967	future.FutureAPI = &azFuture
12968	future.Result = future.result
12969	return nil
12970}
12971
12972// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
12973func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
12974	var done bool
12975	done, err = future.DoneWithContext(context.Background(), client)
12976	if err != nil {
12977		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12978		return
12979	}
12980	if !done {
12981		rt.Response.Response = future.Response()
12982		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
12983		return
12984	}
12985	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12986	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
12987		rt, err = client.UpdateTagsResponder(rt.Response.Response)
12988		if err != nil {
12989			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
12990		}
12991	}
12992	return
12993}
12994
12995// SecurityGroup networkSecurityGroup resource.
12996type SecurityGroup struct {
12997	autorest.Response `json:"-"`
12998	// SecurityGroupPropertiesFormat - Properties of the network security group
12999	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
13000	// Etag - A unique read-only string that changes whenever the resource is updated.
13001	Etag *string `json:"etag,omitempty"`
13002	// ID - Resource ID.
13003	ID *string `json:"id,omitempty"`
13004	// Name - READ-ONLY; Resource name.
13005	Name *string `json:"name,omitempty"`
13006	// Type - READ-ONLY; Resource type.
13007	Type *string `json:"type,omitempty"`
13008	// Location - Resource location.
13009	Location *string `json:"location,omitempty"`
13010	// Tags - Resource tags.
13011	Tags map[string]*string `json:"tags"`
13012}
13013
13014// MarshalJSON is the custom marshaler for SecurityGroup.
13015func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
13016	objectMap := make(map[string]interface{})
13017	if sg.SecurityGroupPropertiesFormat != nil {
13018		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
13019	}
13020	if sg.Etag != nil {
13021		objectMap["etag"] = sg.Etag
13022	}
13023	if sg.ID != nil {
13024		objectMap["id"] = sg.ID
13025	}
13026	if sg.Location != nil {
13027		objectMap["location"] = sg.Location
13028	}
13029	if sg.Tags != nil {
13030		objectMap["tags"] = sg.Tags
13031	}
13032	return json.Marshal(objectMap)
13033}
13034
13035// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
13036func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
13037	var m map[string]*json.RawMessage
13038	err := json.Unmarshal(body, &m)
13039	if err != nil {
13040		return err
13041	}
13042	for k, v := range m {
13043		switch k {
13044		case "properties":
13045			if v != nil {
13046				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
13047				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
13048				if err != nil {
13049					return err
13050				}
13051				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
13052			}
13053		case "etag":
13054			if v != nil {
13055				var etag string
13056				err = json.Unmarshal(*v, &etag)
13057				if err != nil {
13058					return err
13059				}
13060				sg.Etag = &etag
13061			}
13062		case "id":
13063			if v != nil {
13064				var ID string
13065				err = json.Unmarshal(*v, &ID)
13066				if err != nil {
13067					return err
13068				}
13069				sg.ID = &ID
13070			}
13071		case "name":
13072			if v != nil {
13073				var name string
13074				err = json.Unmarshal(*v, &name)
13075				if err != nil {
13076					return err
13077				}
13078				sg.Name = &name
13079			}
13080		case "type":
13081			if v != nil {
13082				var typeVar string
13083				err = json.Unmarshal(*v, &typeVar)
13084				if err != nil {
13085					return err
13086				}
13087				sg.Type = &typeVar
13088			}
13089		case "location":
13090			if v != nil {
13091				var location string
13092				err = json.Unmarshal(*v, &location)
13093				if err != nil {
13094					return err
13095				}
13096				sg.Location = &location
13097			}
13098		case "tags":
13099			if v != nil {
13100				var tags map[string]*string
13101				err = json.Unmarshal(*v, &tags)
13102				if err != nil {
13103					return err
13104				}
13105				sg.Tags = tags
13106			}
13107		}
13108	}
13109
13110	return nil
13111}
13112
13113// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
13114type SecurityGroupListResult struct {
13115	autorest.Response `json:"-"`
13116	// Value - A list of NetworkSecurityGroup resources.
13117	Value *[]SecurityGroup `json:"value,omitempty"`
13118	// NextLink - The URL to get the next set of results.
13119	NextLink *string `json:"nextLink,omitempty"`
13120}
13121
13122// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
13123type SecurityGroupListResultIterator struct {
13124	i    int
13125	page SecurityGroupListResultPage
13126}
13127
13128// NextWithContext advances to the next value.  If there was an error making
13129// the request the iterator does not advance and the error is returned.
13130func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
13131	if tracing.IsEnabled() {
13132		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
13133		defer func() {
13134			sc := -1
13135			if iter.Response().Response.Response != nil {
13136				sc = iter.Response().Response.Response.StatusCode
13137			}
13138			tracing.EndSpan(ctx, sc, err)
13139		}()
13140	}
13141	iter.i++
13142	if iter.i < len(iter.page.Values()) {
13143		return nil
13144	}
13145	err = iter.page.NextWithContext(ctx)
13146	if err != nil {
13147		iter.i--
13148		return err
13149	}
13150	iter.i = 0
13151	return nil
13152}
13153
13154// Next advances to the next value.  If there was an error making
13155// the request the iterator does not advance and the error is returned.
13156// Deprecated: Use NextWithContext() instead.
13157func (iter *SecurityGroupListResultIterator) Next() error {
13158	return iter.NextWithContext(context.Background())
13159}
13160
13161// NotDone returns true if the enumeration should be started or is not yet complete.
13162func (iter SecurityGroupListResultIterator) NotDone() bool {
13163	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13164}
13165
13166// Response returns the raw server response from the last page request.
13167func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
13168	return iter.page.Response()
13169}
13170
13171// Value returns the current value or a zero-initialized value if the
13172// iterator has advanced beyond the end of the collection.
13173func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
13174	if !iter.page.NotDone() {
13175		return SecurityGroup{}
13176	}
13177	return iter.page.Values()[iter.i]
13178}
13179
13180// Creates a new instance of the SecurityGroupListResultIterator type.
13181func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
13182	return SecurityGroupListResultIterator{page: page}
13183}
13184
13185// IsEmpty returns true if the ListResult contains no values.
13186func (sglr SecurityGroupListResult) IsEmpty() bool {
13187	return sglr.Value == nil || len(*sglr.Value) == 0
13188}
13189
13190// hasNextLink returns true if the NextLink is not empty.
13191func (sglr SecurityGroupListResult) hasNextLink() bool {
13192	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
13193}
13194
13195// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
13196// It returns nil if no more results exist.
13197func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
13198	if !sglr.hasNextLink() {
13199		return nil, nil
13200	}
13201	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13202		autorest.AsJSON(),
13203		autorest.AsGet(),
13204		autorest.WithBaseURL(to.String(sglr.NextLink)))
13205}
13206
13207// SecurityGroupListResultPage contains a page of SecurityGroup values.
13208type SecurityGroupListResultPage struct {
13209	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
13210	sglr SecurityGroupListResult
13211}
13212
13213// NextWithContext advances to the next page of values.  If there was an error making
13214// the request the page does not advance and the error is returned.
13215func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
13216	if tracing.IsEnabled() {
13217		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
13218		defer func() {
13219			sc := -1
13220			if page.Response().Response.Response != nil {
13221				sc = page.Response().Response.Response.StatusCode
13222			}
13223			tracing.EndSpan(ctx, sc, err)
13224		}()
13225	}
13226	for {
13227		next, err := page.fn(ctx, page.sglr)
13228		if err != nil {
13229			return err
13230		}
13231		page.sglr = next
13232		if !next.hasNextLink() || !next.IsEmpty() {
13233			break
13234		}
13235	}
13236	return nil
13237}
13238
13239// Next advances to the next page of values.  If there was an error making
13240// the request the page does not advance and the error is returned.
13241// Deprecated: Use NextWithContext() instead.
13242func (page *SecurityGroupListResultPage) Next() error {
13243	return page.NextWithContext(context.Background())
13244}
13245
13246// NotDone returns true if the page enumeration should be started or is not yet complete.
13247func (page SecurityGroupListResultPage) NotDone() bool {
13248	return !page.sglr.IsEmpty()
13249}
13250
13251// Response returns the raw server response from the last page request.
13252func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
13253	return page.sglr
13254}
13255
13256// Values returns the slice of values for the current page or nil if there are no values.
13257func (page SecurityGroupListResultPage) Values() []SecurityGroup {
13258	if page.sglr.IsEmpty() {
13259		return nil
13260	}
13261	return *page.sglr.Value
13262}
13263
13264// Creates a new instance of the SecurityGroupListResultPage type.
13265func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
13266	return SecurityGroupListResultPage{
13267		fn:   getNextPage,
13268		sglr: cur,
13269	}
13270}
13271
13272// SecurityGroupNetworkInterface network interface and all its associated security rules.
13273type SecurityGroupNetworkInterface struct {
13274	// ID - ID of the network interface.
13275	ID                       *string                   `json:"id,omitempty"`
13276	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
13277}
13278
13279// SecurityGroupPropertiesFormat network Security Group resource.
13280type SecurityGroupPropertiesFormat struct {
13281	// SecurityRules - A collection of security rules of the network security group.
13282	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13283	// DefaultSecurityRules - The default security rules of network security group.
13284	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13285	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
13286	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13287	// Subnets - READ-ONLY; A collection of references to subnets.
13288	Subnets *[]Subnet `json:"subnets,omitempty"`
13289	// ResourceGUID - The resource GUID property of the network security group resource.
13290	ResourceGUID *string `json:"resourceGuid,omitempty"`
13291	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13292	ProvisioningState *string `json:"provisioningState,omitempty"`
13293}
13294
13295// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
13296func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
13297	objectMap := make(map[string]interface{})
13298	if sgpf.SecurityRules != nil {
13299		objectMap["securityRules"] = sgpf.SecurityRules
13300	}
13301	if sgpf.DefaultSecurityRules != nil {
13302		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
13303	}
13304	if sgpf.ResourceGUID != nil {
13305		objectMap["resourceGuid"] = sgpf.ResourceGUID
13306	}
13307	if sgpf.ProvisioningState != nil {
13308		objectMap["provisioningState"] = sgpf.ProvisioningState
13309	}
13310	return json.Marshal(objectMap)
13311}
13312
13313// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13314// long-running operation.
13315type SecurityGroupsCreateOrUpdateFuture struct {
13316	azure.FutureAPI
13317	// Result returns the result of the asynchronous operation.
13318	// If the operation has not completed it will return an error.
13319	Result func(SecurityGroupsClient) (SecurityGroup, error)
13320}
13321
13322// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13323func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13324	var azFuture azure.Future
13325	if err := json.Unmarshal(body, &azFuture); err != nil {
13326		return err
13327	}
13328	future.FutureAPI = &azFuture
13329	future.Result = future.result
13330	return nil
13331}
13332
13333// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
13334func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13335	var done bool
13336	done, err = future.DoneWithContext(context.Background(), client)
13337	if err != nil {
13338		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13339		return
13340	}
13341	if !done {
13342		sg.Response.Response = future.Response()
13343		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
13344		return
13345	}
13346	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13347	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13348		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
13349		if err != nil {
13350			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
13351		}
13352	}
13353	return
13354}
13355
13356// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13357// operation.
13358type SecurityGroupsDeleteFuture struct {
13359	azure.FutureAPI
13360	// Result returns the result of the asynchronous operation.
13361	// If the operation has not completed it will return an error.
13362	Result func(SecurityGroupsClient) (autorest.Response, error)
13363}
13364
13365// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13366func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
13367	var azFuture azure.Future
13368	if err := json.Unmarshal(body, &azFuture); err != nil {
13369		return err
13370	}
13371	future.FutureAPI = &azFuture
13372	future.Result = future.result
13373	return nil
13374}
13375
13376// result is the default implementation for SecurityGroupsDeleteFuture.Result.
13377func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
13378	var done bool
13379	done, err = future.DoneWithContext(context.Background(), client)
13380	if err != nil {
13381		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
13382		return
13383	}
13384	if !done {
13385		ar.Response = future.Response()
13386		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
13387		return
13388	}
13389	ar.Response = future.Response()
13390	return
13391}
13392
13393// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13394// long-running operation.
13395type SecurityGroupsUpdateTagsFuture struct {
13396	azure.FutureAPI
13397	// Result returns the result of the asynchronous operation.
13398	// If the operation has not completed it will return an error.
13399	Result func(SecurityGroupsClient) (SecurityGroup, error)
13400}
13401
13402// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13403func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13404	var azFuture azure.Future
13405	if err := json.Unmarshal(body, &azFuture); err != nil {
13406		return err
13407	}
13408	future.FutureAPI = &azFuture
13409	future.Result = future.result
13410	return nil
13411}
13412
13413// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
13414func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13415	var done bool
13416	done, err = future.DoneWithContext(context.Background(), client)
13417	if err != nil {
13418		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13419		return
13420	}
13421	if !done {
13422		sg.Response.Response = future.Response()
13423		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
13424		return
13425	}
13426	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13427	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13428		sg, err = client.UpdateTagsResponder(sg.Response.Response)
13429		if err != nil {
13430			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
13431		}
13432	}
13433	return
13434}
13435
13436// SecurityGroupViewParameters parameters that define the VM to check security groups for.
13437type SecurityGroupViewParameters struct {
13438	// TargetResourceID - ID of the target VM.
13439	TargetResourceID *string `json:"targetResourceId,omitempty"`
13440}
13441
13442// SecurityGroupViewResult the information about security rules applied to the specified VM.
13443type SecurityGroupViewResult struct {
13444	autorest.Response `json:"-"`
13445	// NetworkInterfaces - List of network interfaces on the specified VM.
13446	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
13447}
13448
13449// SecurityRule network security rule.
13450type SecurityRule struct {
13451	autorest.Response `json:"-"`
13452	// SecurityRulePropertiesFormat - Properties of the security rule
13453	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
13454	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13455	Name *string `json:"name,omitempty"`
13456	// Etag - A unique read-only string that changes whenever the resource is updated.
13457	Etag *string `json:"etag,omitempty"`
13458	// ID - Resource ID.
13459	ID *string `json:"id,omitempty"`
13460}
13461
13462// MarshalJSON is the custom marshaler for SecurityRule.
13463func (sr SecurityRule) MarshalJSON() ([]byte, error) {
13464	objectMap := make(map[string]interface{})
13465	if sr.SecurityRulePropertiesFormat != nil {
13466		objectMap["properties"] = sr.SecurityRulePropertiesFormat
13467	}
13468	if sr.Name != nil {
13469		objectMap["name"] = sr.Name
13470	}
13471	if sr.Etag != nil {
13472		objectMap["etag"] = sr.Etag
13473	}
13474	if sr.ID != nil {
13475		objectMap["id"] = sr.ID
13476	}
13477	return json.Marshal(objectMap)
13478}
13479
13480// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
13481func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
13482	var m map[string]*json.RawMessage
13483	err := json.Unmarshal(body, &m)
13484	if err != nil {
13485		return err
13486	}
13487	for k, v := range m {
13488		switch k {
13489		case "properties":
13490			if v != nil {
13491				var securityRulePropertiesFormat SecurityRulePropertiesFormat
13492				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
13493				if err != nil {
13494					return err
13495				}
13496				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
13497			}
13498		case "name":
13499			if v != nil {
13500				var name string
13501				err = json.Unmarshal(*v, &name)
13502				if err != nil {
13503					return err
13504				}
13505				sr.Name = &name
13506			}
13507		case "etag":
13508			if v != nil {
13509				var etag string
13510				err = json.Unmarshal(*v, &etag)
13511				if err != nil {
13512					return err
13513				}
13514				sr.Etag = &etag
13515			}
13516		case "id":
13517			if v != nil {
13518				var ID string
13519				err = json.Unmarshal(*v, &ID)
13520				if err != nil {
13521					return err
13522				}
13523				sr.ID = &ID
13524			}
13525		}
13526	}
13527
13528	return nil
13529}
13530
13531// SecurityRuleAssociations all security rules associated with the network interface.
13532type SecurityRuleAssociations struct {
13533	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
13534	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
13535	// DefaultSecurityRules - Collection of default security rules of the network security group.
13536	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13537	// EffectiveSecurityRules - Collection of effective security rules.
13538	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
13539}
13540
13541// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
13542// belongs to a network security group.
13543type SecurityRuleListResult struct {
13544	autorest.Response `json:"-"`
13545	// Value - The security rules in a network security group.
13546	Value *[]SecurityRule `json:"value,omitempty"`
13547	// NextLink - The URL to get the next set of results.
13548	NextLink *string `json:"nextLink,omitempty"`
13549}
13550
13551// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
13552type SecurityRuleListResultIterator struct {
13553	i    int
13554	page SecurityRuleListResultPage
13555}
13556
13557// NextWithContext advances to the next value.  If there was an error making
13558// the request the iterator does not advance and the error is returned.
13559func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13560	if tracing.IsEnabled() {
13561		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
13562		defer func() {
13563			sc := -1
13564			if iter.Response().Response.Response != nil {
13565				sc = iter.Response().Response.Response.StatusCode
13566			}
13567			tracing.EndSpan(ctx, sc, err)
13568		}()
13569	}
13570	iter.i++
13571	if iter.i < len(iter.page.Values()) {
13572		return nil
13573	}
13574	err = iter.page.NextWithContext(ctx)
13575	if err != nil {
13576		iter.i--
13577		return err
13578	}
13579	iter.i = 0
13580	return nil
13581}
13582
13583// Next advances to the next value.  If there was an error making
13584// the request the iterator does not advance and the error is returned.
13585// Deprecated: Use NextWithContext() instead.
13586func (iter *SecurityRuleListResultIterator) Next() error {
13587	return iter.NextWithContext(context.Background())
13588}
13589
13590// NotDone returns true if the enumeration should be started or is not yet complete.
13591func (iter SecurityRuleListResultIterator) NotDone() bool {
13592	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13593}
13594
13595// Response returns the raw server response from the last page request.
13596func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
13597	return iter.page.Response()
13598}
13599
13600// Value returns the current value or a zero-initialized value if the
13601// iterator has advanced beyond the end of the collection.
13602func (iter SecurityRuleListResultIterator) Value() SecurityRule {
13603	if !iter.page.NotDone() {
13604		return SecurityRule{}
13605	}
13606	return iter.page.Values()[iter.i]
13607}
13608
13609// Creates a new instance of the SecurityRuleListResultIterator type.
13610func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
13611	return SecurityRuleListResultIterator{page: page}
13612}
13613
13614// IsEmpty returns true if the ListResult contains no values.
13615func (srlr SecurityRuleListResult) IsEmpty() bool {
13616	return srlr.Value == nil || len(*srlr.Value) == 0
13617}
13618
13619// hasNextLink returns true if the NextLink is not empty.
13620func (srlr SecurityRuleListResult) hasNextLink() bool {
13621	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
13622}
13623
13624// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
13625// It returns nil if no more results exist.
13626func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13627	if !srlr.hasNextLink() {
13628		return nil, nil
13629	}
13630	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13631		autorest.AsJSON(),
13632		autorest.AsGet(),
13633		autorest.WithBaseURL(to.String(srlr.NextLink)))
13634}
13635
13636// SecurityRuleListResultPage contains a page of SecurityRule values.
13637type SecurityRuleListResultPage struct {
13638	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
13639	srlr SecurityRuleListResult
13640}
13641
13642// NextWithContext advances to the next page of values.  If there was an error making
13643// the request the page does not advance and the error is returned.
13644func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13645	if tracing.IsEnabled() {
13646		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
13647		defer func() {
13648			sc := -1
13649			if page.Response().Response.Response != nil {
13650				sc = page.Response().Response.Response.StatusCode
13651			}
13652			tracing.EndSpan(ctx, sc, err)
13653		}()
13654	}
13655	for {
13656		next, err := page.fn(ctx, page.srlr)
13657		if err != nil {
13658			return err
13659		}
13660		page.srlr = next
13661		if !next.hasNextLink() || !next.IsEmpty() {
13662			break
13663		}
13664	}
13665	return nil
13666}
13667
13668// Next advances to the next page of values.  If there was an error making
13669// the request the page does not advance and the error is returned.
13670// Deprecated: Use NextWithContext() instead.
13671func (page *SecurityRuleListResultPage) Next() error {
13672	return page.NextWithContext(context.Background())
13673}
13674
13675// NotDone returns true if the page enumeration should be started or is not yet complete.
13676func (page SecurityRuleListResultPage) NotDone() bool {
13677	return !page.srlr.IsEmpty()
13678}
13679
13680// Response returns the raw server response from the last page request.
13681func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
13682	return page.srlr
13683}
13684
13685// Values returns the slice of values for the current page or nil if there are no values.
13686func (page SecurityRuleListResultPage) Values() []SecurityRule {
13687	if page.srlr.IsEmpty() {
13688		return nil
13689	}
13690	return *page.srlr.Value
13691}
13692
13693// Creates a new instance of the SecurityRuleListResultPage type.
13694func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
13695	return SecurityRuleListResultPage{
13696		fn:   getNextPage,
13697		srlr: cur,
13698	}
13699}
13700
13701// SecurityRulePropertiesFormat security rule resource.
13702type SecurityRulePropertiesFormat struct {
13703	// Description - A description for this rule. Restricted to 140 chars.
13704	Description *string `json:"description,omitempty"`
13705	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
13706	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
13707	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13708	SourcePortRange *string `json:"sourcePortRange,omitempty"`
13709	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13710	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
13711	// 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.
13712	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
13713	// SourceAddressPrefixes - The CIDR or source IP ranges.
13714	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
13715	// SourceApplicationSecurityGroups - The application security group specified as source.
13716	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
13717	// 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.
13718	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
13719	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
13720	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
13721	// DestinationApplicationSecurityGroups - The application security group specified as destination.
13722	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
13723	// SourcePortRanges - The source port ranges.
13724	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
13725	// DestinationPortRanges - The destination port ranges.
13726	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
13727	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
13728	Access SecurityRuleAccess `json:"access,omitempty"`
13729	// 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.
13730	Priority *int32 `json:"priority,omitempty"`
13731	// 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'
13732	Direction SecurityRuleDirection `json:"direction,omitempty"`
13733	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13734	ProvisioningState *string `json:"provisioningState,omitempty"`
13735}
13736
13737// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13738// long-running operation.
13739type SecurityRulesCreateOrUpdateFuture struct {
13740	azure.FutureAPI
13741	// Result returns the result of the asynchronous operation.
13742	// If the operation has not completed it will return an error.
13743	Result func(SecurityRulesClient) (SecurityRule, error)
13744}
13745
13746// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13747func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13748	var azFuture azure.Future
13749	if err := json.Unmarshal(body, &azFuture); err != nil {
13750		return err
13751	}
13752	future.FutureAPI = &azFuture
13753	future.Result = future.result
13754	return nil
13755}
13756
13757// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
13758func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
13759	var done bool
13760	done, err = future.DoneWithContext(context.Background(), client)
13761	if err != nil {
13762		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13763		return
13764	}
13765	if !done {
13766		sr.Response.Response = future.Response()
13767		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
13768		return
13769	}
13770	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13771	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
13772		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
13773		if err != nil {
13774			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
13775		}
13776	}
13777	return
13778}
13779
13780// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13781// operation.
13782type SecurityRulesDeleteFuture struct {
13783	azure.FutureAPI
13784	// Result returns the result of the asynchronous operation.
13785	// If the operation has not completed it will return an error.
13786	Result func(SecurityRulesClient) (autorest.Response, error)
13787}
13788
13789// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13790func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
13791	var azFuture azure.Future
13792	if err := json.Unmarshal(body, &azFuture); err != nil {
13793		return err
13794	}
13795	future.FutureAPI = &azFuture
13796	future.Result = future.result
13797	return nil
13798}
13799
13800// result is the default implementation for SecurityRulesDeleteFuture.Result.
13801func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
13802	var done bool
13803	done, err = future.DoneWithContext(context.Background(), client)
13804	if err != nil {
13805		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
13806		return
13807	}
13808	if !done {
13809		ar.Response = future.Response()
13810		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
13811		return
13812	}
13813	ar.Response = future.Response()
13814	return
13815}
13816
13817// ServiceEndpointPropertiesFormat the service endpoint properties.
13818type ServiceEndpointPropertiesFormat struct {
13819	// Service - The type of the endpoint service.
13820	Service *string `json:"service,omitempty"`
13821	// Locations - A list of locations.
13822	Locations *[]string `json:"locations,omitempty"`
13823	// ProvisioningState - The provisioning state of the resource.
13824	ProvisioningState *string `json:"provisioningState,omitempty"`
13825}
13826
13827// String ...
13828type String struct {
13829	autorest.Response `json:"-"`
13830	Value             *string `json:"value,omitempty"`
13831}
13832
13833// Subnet subnet in a virtual network resource.
13834type Subnet struct {
13835	autorest.Response `json:"-"`
13836	// SubnetPropertiesFormat - Properties of the subnet.
13837	*SubnetPropertiesFormat `json:"properties,omitempty"`
13838	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13839	Name *string `json:"name,omitempty"`
13840	// Etag - A unique read-only string that changes whenever the resource is updated.
13841	Etag *string `json:"etag,omitempty"`
13842	// ID - Resource ID.
13843	ID *string `json:"id,omitempty"`
13844}
13845
13846// MarshalJSON is the custom marshaler for Subnet.
13847func (s Subnet) MarshalJSON() ([]byte, error) {
13848	objectMap := make(map[string]interface{})
13849	if s.SubnetPropertiesFormat != nil {
13850		objectMap["properties"] = s.SubnetPropertiesFormat
13851	}
13852	if s.Name != nil {
13853		objectMap["name"] = s.Name
13854	}
13855	if s.Etag != nil {
13856		objectMap["etag"] = s.Etag
13857	}
13858	if s.ID != nil {
13859		objectMap["id"] = s.ID
13860	}
13861	return json.Marshal(objectMap)
13862}
13863
13864// UnmarshalJSON is the custom unmarshaler for Subnet struct.
13865func (s *Subnet) UnmarshalJSON(body []byte) error {
13866	var m map[string]*json.RawMessage
13867	err := json.Unmarshal(body, &m)
13868	if err != nil {
13869		return err
13870	}
13871	for k, v := range m {
13872		switch k {
13873		case "properties":
13874			if v != nil {
13875				var subnetPropertiesFormat SubnetPropertiesFormat
13876				err = json.Unmarshal(*v, &subnetPropertiesFormat)
13877				if err != nil {
13878					return err
13879				}
13880				s.SubnetPropertiesFormat = &subnetPropertiesFormat
13881			}
13882		case "name":
13883			if v != nil {
13884				var name string
13885				err = json.Unmarshal(*v, &name)
13886				if err != nil {
13887					return err
13888				}
13889				s.Name = &name
13890			}
13891		case "etag":
13892			if v != nil {
13893				var etag string
13894				err = json.Unmarshal(*v, &etag)
13895				if err != nil {
13896					return err
13897				}
13898				s.Etag = &etag
13899			}
13900		case "id":
13901			if v != nil {
13902				var ID string
13903				err = json.Unmarshal(*v, &ID)
13904				if err != nil {
13905					return err
13906				}
13907				s.ID = &ID
13908			}
13909		}
13910	}
13911
13912	return nil
13913}
13914
13915// SubnetAssociation network interface and its custom security rules.
13916type SubnetAssociation struct {
13917	// ID - READ-ONLY; Subnet ID.
13918	ID *string `json:"id,omitempty"`
13919	// SecurityRules - Collection of custom security rules.
13920	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13921}
13922
13923// MarshalJSON is the custom marshaler for SubnetAssociation.
13924func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
13925	objectMap := make(map[string]interface{})
13926	if sa.SecurityRules != nil {
13927		objectMap["securityRules"] = sa.SecurityRules
13928	}
13929	return json.Marshal(objectMap)
13930}
13931
13932// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
13933// network
13934type SubnetListResult struct {
13935	autorest.Response `json:"-"`
13936	// Value - The subnets in a virtual network.
13937	Value *[]Subnet `json:"value,omitempty"`
13938	// NextLink - The URL to get the next set of results.
13939	NextLink *string `json:"nextLink,omitempty"`
13940}
13941
13942// SubnetListResultIterator provides access to a complete listing of Subnet values.
13943type SubnetListResultIterator struct {
13944	i    int
13945	page SubnetListResultPage
13946}
13947
13948// NextWithContext advances to the next value.  If there was an error making
13949// the request the iterator does not advance and the error is returned.
13950func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
13951	if tracing.IsEnabled() {
13952		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
13953		defer func() {
13954			sc := -1
13955			if iter.Response().Response.Response != nil {
13956				sc = iter.Response().Response.Response.StatusCode
13957			}
13958			tracing.EndSpan(ctx, sc, err)
13959		}()
13960	}
13961	iter.i++
13962	if iter.i < len(iter.page.Values()) {
13963		return nil
13964	}
13965	err = iter.page.NextWithContext(ctx)
13966	if err != nil {
13967		iter.i--
13968		return err
13969	}
13970	iter.i = 0
13971	return nil
13972}
13973
13974// Next advances to the next value.  If there was an error making
13975// the request the iterator does not advance and the error is returned.
13976// Deprecated: Use NextWithContext() instead.
13977func (iter *SubnetListResultIterator) Next() error {
13978	return iter.NextWithContext(context.Background())
13979}
13980
13981// NotDone returns true if the enumeration should be started or is not yet complete.
13982func (iter SubnetListResultIterator) NotDone() bool {
13983	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13984}
13985
13986// Response returns the raw server response from the last page request.
13987func (iter SubnetListResultIterator) Response() SubnetListResult {
13988	return iter.page.Response()
13989}
13990
13991// Value returns the current value or a zero-initialized value if the
13992// iterator has advanced beyond the end of the collection.
13993func (iter SubnetListResultIterator) Value() Subnet {
13994	if !iter.page.NotDone() {
13995		return Subnet{}
13996	}
13997	return iter.page.Values()[iter.i]
13998}
13999
14000// Creates a new instance of the SubnetListResultIterator type.
14001func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
14002	return SubnetListResultIterator{page: page}
14003}
14004
14005// IsEmpty returns true if the ListResult contains no values.
14006func (slr SubnetListResult) IsEmpty() bool {
14007	return slr.Value == nil || len(*slr.Value) == 0
14008}
14009
14010// hasNextLink returns true if the NextLink is not empty.
14011func (slr SubnetListResult) hasNextLink() bool {
14012	return slr.NextLink != nil && len(*slr.NextLink) != 0
14013}
14014
14015// subnetListResultPreparer prepares a request to retrieve the next set of results.
14016// It returns nil if no more results exist.
14017func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
14018	if !slr.hasNextLink() {
14019		return nil, nil
14020	}
14021	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14022		autorest.AsJSON(),
14023		autorest.AsGet(),
14024		autorest.WithBaseURL(to.String(slr.NextLink)))
14025}
14026
14027// SubnetListResultPage contains a page of Subnet values.
14028type SubnetListResultPage struct {
14029	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
14030	slr SubnetListResult
14031}
14032
14033// NextWithContext advances to the next page of values.  If there was an error making
14034// the request the page does not advance and the error is returned.
14035func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
14036	if tracing.IsEnabled() {
14037		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
14038		defer func() {
14039			sc := -1
14040			if page.Response().Response.Response != nil {
14041				sc = page.Response().Response.Response.StatusCode
14042			}
14043			tracing.EndSpan(ctx, sc, err)
14044		}()
14045	}
14046	for {
14047		next, err := page.fn(ctx, page.slr)
14048		if err != nil {
14049			return err
14050		}
14051		page.slr = next
14052		if !next.hasNextLink() || !next.IsEmpty() {
14053			break
14054		}
14055	}
14056	return nil
14057}
14058
14059// Next advances to the next page of values.  If there was an error making
14060// the request the page does not advance and the error is returned.
14061// Deprecated: Use NextWithContext() instead.
14062func (page *SubnetListResultPage) Next() error {
14063	return page.NextWithContext(context.Background())
14064}
14065
14066// NotDone returns true if the page enumeration should be started or is not yet complete.
14067func (page SubnetListResultPage) NotDone() bool {
14068	return !page.slr.IsEmpty()
14069}
14070
14071// Response returns the raw server response from the last page request.
14072func (page SubnetListResultPage) Response() SubnetListResult {
14073	return page.slr
14074}
14075
14076// Values returns the slice of values for the current page or nil if there are no values.
14077func (page SubnetListResultPage) Values() []Subnet {
14078	if page.slr.IsEmpty() {
14079		return nil
14080	}
14081	return *page.slr.Value
14082}
14083
14084// Creates a new instance of the SubnetListResultPage type.
14085func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
14086	return SubnetListResultPage{
14087		fn:  getNextPage,
14088		slr: cur,
14089	}
14090}
14091
14092// SubnetPropertiesFormat properties of the subnet.
14093type SubnetPropertiesFormat struct {
14094	// AddressPrefix - The address prefix for the subnet.
14095	AddressPrefix *string `json:"addressPrefix,omitempty"`
14096	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14097	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14098	// RouteTable - The reference of the RouteTable resource.
14099	RouteTable *RouteTable `json:"routeTable,omitempty"`
14100	// ServiceEndpoints - An array of service endpoints.
14101	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
14102	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
14103	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
14104	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
14105	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
14106	// ProvisioningState - The provisioning state of the resource.
14107	ProvisioningState *string `json:"provisioningState,omitempty"`
14108}
14109
14110// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
14111func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
14112	objectMap := make(map[string]interface{})
14113	if spf.AddressPrefix != nil {
14114		objectMap["addressPrefix"] = spf.AddressPrefix
14115	}
14116	if spf.NetworkSecurityGroup != nil {
14117		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
14118	}
14119	if spf.RouteTable != nil {
14120		objectMap["routeTable"] = spf.RouteTable
14121	}
14122	if spf.ServiceEndpoints != nil {
14123		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
14124	}
14125	if spf.ResourceNavigationLinks != nil {
14126		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
14127	}
14128	if spf.ProvisioningState != nil {
14129		objectMap["provisioningState"] = spf.ProvisioningState
14130	}
14131	return json.Marshal(objectMap)
14132}
14133
14134// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14135// operation.
14136type SubnetsCreateOrUpdateFuture struct {
14137	azure.FutureAPI
14138	// Result returns the result of the asynchronous operation.
14139	// If the operation has not completed it will return an error.
14140	Result func(SubnetsClient) (Subnet, error)
14141}
14142
14143// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14144func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14145	var azFuture azure.Future
14146	if err := json.Unmarshal(body, &azFuture); err != nil {
14147		return err
14148	}
14149	future.FutureAPI = &azFuture
14150	future.Result = future.result
14151	return nil
14152}
14153
14154// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
14155func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
14156	var done bool
14157	done, err = future.DoneWithContext(context.Background(), client)
14158	if err != nil {
14159		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14160		return
14161	}
14162	if !done {
14163		s.Response.Response = future.Response()
14164		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
14165		return
14166	}
14167	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14168	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14169		s, err = client.CreateOrUpdateResponder(s.Response.Response)
14170		if err != nil {
14171			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
14172		}
14173	}
14174	return
14175}
14176
14177// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14178// operation.
14179type SubnetsDeleteFuture struct {
14180	azure.FutureAPI
14181	// Result returns the result of the asynchronous operation.
14182	// If the operation has not completed it will return an error.
14183	Result func(SubnetsClient) (autorest.Response, error)
14184}
14185
14186// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14187func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
14188	var azFuture azure.Future
14189	if err := json.Unmarshal(body, &azFuture); err != nil {
14190		return err
14191	}
14192	future.FutureAPI = &azFuture
14193	future.Result = future.result
14194	return nil
14195}
14196
14197// result is the default implementation for SubnetsDeleteFuture.Result.
14198func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
14199	var done bool
14200	done, err = future.DoneWithContext(context.Background(), client)
14201	if err != nil {
14202		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
14203		return
14204	}
14205	if !done {
14206		ar.Response = future.Response()
14207		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
14208		return
14209	}
14210	ar.Response = future.Response()
14211	return
14212}
14213
14214// SubResource reference to another subresource.
14215type SubResource struct {
14216	// ID - Resource ID.
14217	ID *string `json:"id,omitempty"`
14218}
14219
14220// TagsObject tags object for patch operations.
14221type TagsObject struct {
14222	// Tags - Resource tags.
14223	Tags map[string]*string `json:"tags"`
14224}
14225
14226// MarshalJSON is the custom marshaler for TagsObject.
14227func (toVar TagsObject) MarshalJSON() ([]byte, error) {
14228	objectMap := make(map[string]interface{})
14229	if toVar.Tags != nil {
14230		objectMap["tags"] = toVar.Tags
14231	}
14232	return json.Marshal(objectMap)
14233}
14234
14235// Topology topology of the specified resource group.
14236type Topology struct {
14237	autorest.Response `json:"-"`
14238	// ID - READ-ONLY; GUID representing the operation id.
14239	ID *string `json:"id,omitempty"`
14240	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
14241	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
14242	// LastModified - READ-ONLY; The datetime when the topology was last modified.
14243	LastModified *date.Time          `json:"lastModified,omitempty"`
14244	Resources    *[]TopologyResource `json:"resources,omitempty"`
14245}
14246
14247// MarshalJSON is the custom marshaler for Topology.
14248func (t Topology) MarshalJSON() ([]byte, error) {
14249	objectMap := make(map[string]interface{})
14250	if t.Resources != nil {
14251		objectMap["resources"] = t.Resources
14252	}
14253	return json.Marshal(objectMap)
14254}
14255
14256// TopologyAssociation resources that have an association with the parent resource.
14257type TopologyAssociation struct {
14258	// Name - The name of the resource that is associated with the parent resource.
14259	Name *string `json:"name,omitempty"`
14260	// ResourceID - The ID of the resource that is associated with the parent resource.
14261	ResourceID *string `json:"resourceId,omitempty"`
14262	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
14263	AssociationType AssociationType `json:"associationType,omitempty"`
14264}
14265
14266// TopologyParameters parameters that define the representation of topology.
14267type TopologyParameters struct {
14268	// TargetResourceGroupName - The name of the target resource group to perform topology on.
14269	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
14270	// TargetVirtualNetwork - The reference of the Virtual Network resource.
14271	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
14272	// TargetSubnet - The reference of the Subnet resource.
14273	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
14274}
14275
14276// TopologyResource the network resource topology information for the given resource group.
14277type TopologyResource struct {
14278	// Name - Name of the resource.
14279	Name *string `json:"name,omitempty"`
14280	// ID - ID of the resource.
14281	ID *string `json:"id,omitempty"`
14282	// Location - Resource location.
14283	Location *string `json:"location,omitempty"`
14284	// Associations - Holds the associations the resource has with other resources in the resource group.
14285	Associations *[]TopologyAssociation `json:"associations,omitempty"`
14286}
14287
14288// TroubleshootingDetails information gained from troubleshooting of specified resource.
14289type TroubleshootingDetails struct {
14290	// ID - The id of the get troubleshoot operation.
14291	ID *string `json:"id,omitempty"`
14292	// ReasonType - Reason type of failure.
14293	ReasonType *string `json:"reasonType,omitempty"`
14294	// Summary - A summary of troubleshooting.
14295	Summary *string `json:"summary,omitempty"`
14296	// Detail - Details on troubleshooting results.
14297	Detail *string `json:"detail,omitempty"`
14298	// RecommendedActions - List of recommended actions.
14299	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
14300}
14301
14302// TroubleshootingParameters parameters that define the resource to troubleshoot.
14303type TroubleshootingParameters struct {
14304	// TargetResourceID - The target resource to troubleshoot.
14305	TargetResourceID           *string `json:"targetResourceId,omitempty"`
14306	*TroubleshootingProperties `json:"properties,omitempty"`
14307}
14308
14309// MarshalJSON is the custom marshaler for TroubleshootingParameters.
14310func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
14311	objectMap := make(map[string]interface{})
14312	if tp.TargetResourceID != nil {
14313		objectMap["targetResourceId"] = tp.TargetResourceID
14314	}
14315	if tp.TroubleshootingProperties != nil {
14316		objectMap["properties"] = tp.TroubleshootingProperties
14317	}
14318	return json.Marshal(objectMap)
14319}
14320
14321// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
14322func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
14323	var m map[string]*json.RawMessage
14324	err := json.Unmarshal(body, &m)
14325	if err != nil {
14326		return err
14327	}
14328	for k, v := range m {
14329		switch k {
14330		case "targetResourceId":
14331			if v != nil {
14332				var targetResourceID string
14333				err = json.Unmarshal(*v, &targetResourceID)
14334				if err != nil {
14335					return err
14336				}
14337				tp.TargetResourceID = &targetResourceID
14338			}
14339		case "properties":
14340			if v != nil {
14341				var troubleshootingProperties TroubleshootingProperties
14342				err = json.Unmarshal(*v, &troubleshootingProperties)
14343				if err != nil {
14344					return err
14345				}
14346				tp.TroubleshootingProperties = &troubleshootingProperties
14347			}
14348		}
14349	}
14350
14351	return nil
14352}
14353
14354// TroubleshootingProperties storage location provided for troubleshoot.
14355type TroubleshootingProperties struct {
14356	// StorageID - The ID for the storage account to save the troubleshoot result.
14357	StorageID *string `json:"storageId,omitempty"`
14358	// StoragePath - The path to the blob to save the troubleshoot result in.
14359	StoragePath *string `json:"storagePath,omitempty"`
14360}
14361
14362// TroubleshootingRecommendedActions recommended actions based on discovered issues.
14363type TroubleshootingRecommendedActions struct {
14364	// ActionID - ID of the recommended action.
14365	ActionID *string `json:"actionId,omitempty"`
14366	// ActionText - Description of recommended actions.
14367	ActionText *string `json:"actionText,omitempty"`
14368	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
14369	ActionURI *string `json:"actionUri,omitempty"`
14370	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
14371	ActionURIText *string `json:"actionUriText,omitempty"`
14372}
14373
14374// TroubleshootingResult troubleshooting information gained from specified resource.
14375type TroubleshootingResult struct {
14376	autorest.Response `json:"-"`
14377	// StartTime - The start time of the troubleshooting.
14378	StartTime *date.Time `json:"startTime,omitempty"`
14379	// EndTime - The end time of the troubleshooting.
14380	EndTime *date.Time `json:"endTime,omitempty"`
14381	// Code - The result code of the troubleshooting.
14382	Code *string `json:"code,omitempty"`
14383	// Results - Information from troubleshooting.
14384	Results *[]TroubleshootingDetails `json:"results,omitempty"`
14385}
14386
14387// TunnelConnectionHealth virtualNetworkGatewayConnection properties
14388type TunnelConnectionHealth struct {
14389	// Tunnel - READ-ONLY; Tunnel name.
14390	Tunnel *string `json:"tunnel,omitempty"`
14391	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
14392	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
14393	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
14394	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
14395	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
14396	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
14397	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
14398	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
14399}
14400
14401// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
14402func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
14403	objectMap := make(map[string]interface{})
14404	return json.Marshal(objectMap)
14405}
14406
14407// Usage describes network resource usage.
14408type Usage struct {
14409	// ID - READ-ONLY; Resource identifier.
14410	ID *string `json:"id,omitempty"`
14411	// Unit - An enum describing the unit of measurement.
14412	Unit *string `json:"unit,omitempty"`
14413	// CurrentValue - The current value of the usage.
14414	CurrentValue *int64 `json:"currentValue,omitempty"`
14415	// Limit - The limit of usage.
14416	Limit *int64 `json:"limit,omitempty"`
14417	// Name - The name of the type of usage.
14418	Name *UsageName `json:"name,omitempty"`
14419}
14420
14421// MarshalJSON is the custom marshaler for Usage.
14422func (u Usage) MarshalJSON() ([]byte, error) {
14423	objectMap := make(map[string]interface{})
14424	if u.Unit != nil {
14425		objectMap["unit"] = u.Unit
14426	}
14427	if u.CurrentValue != nil {
14428		objectMap["currentValue"] = u.CurrentValue
14429	}
14430	if u.Limit != nil {
14431		objectMap["limit"] = u.Limit
14432	}
14433	if u.Name != nil {
14434		objectMap["name"] = u.Name
14435	}
14436	return json.Marshal(objectMap)
14437}
14438
14439// UsageName the usage names.
14440type UsageName struct {
14441	// Value - A string describing the resource name.
14442	Value *string `json:"value,omitempty"`
14443	// LocalizedValue - A localized string describing the resource name.
14444	LocalizedValue *string `json:"localizedValue,omitempty"`
14445}
14446
14447// UsagesListResult the list usages operation response.
14448type UsagesListResult struct {
14449	autorest.Response `json:"-"`
14450	// Value - The list network resource usages.
14451	Value *[]Usage `json:"value,omitempty"`
14452	// NextLink - URL to get the next set of results.
14453	NextLink *string `json:"nextLink,omitempty"`
14454}
14455
14456// UsagesListResultIterator provides access to a complete listing of Usage values.
14457type UsagesListResultIterator struct {
14458	i    int
14459	page UsagesListResultPage
14460}
14461
14462// NextWithContext advances to the next value.  If there was an error making
14463// the request the iterator does not advance and the error is returned.
14464func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
14465	if tracing.IsEnabled() {
14466		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
14467		defer func() {
14468			sc := -1
14469			if iter.Response().Response.Response != nil {
14470				sc = iter.Response().Response.Response.StatusCode
14471			}
14472			tracing.EndSpan(ctx, sc, err)
14473		}()
14474	}
14475	iter.i++
14476	if iter.i < len(iter.page.Values()) {
14477		return nil
14478	}
14479	err = iter.page.NextWithContext(ctx)
14480	if err != nil {
14481		iter.i--
14482		return err
14483	}
14484	iter.i = 0
14485	return nil
14486}
14487
14488// Next advances to the next value.  If there was an error making
14489// the request the iterator does not advance and the error is returned.
14490// Deprecated: Use NextWithContext() instead.
14491func (iter *UsagesListResultIterator) Next() error {
14492	return iter.NextWithContext(context.Background())
14493}
14494
14495// NotDone returns true if the enumeration should be started or is not yet complete.
14496func (iter UsagesListResultIterator) NotDone() bool {
14497	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14498}
14499
14500// Response returns the raw server response from the last page request.
14501func (iter UsagesListResultIterator) Response() UsagesListResult {
14502	return iter.page.Response()
14503}
14504
14505// Value returns the current value or a zero-initialized value if the
14506// iterator has advanced beyond the end of the collection.
14507func (iter UsagesListResultIterator) Value() Usage {
14508	if !iter.page.NotDone() {
14509		return Usage{}
14510	}
14511	return iter.page.Values()[iter.i]
14512}
14513
14514// Creates a new instance of the UsagesListResultIterator type.
14515func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
14516	return UsagesListResultIterator{page: page}
14517}
14518
14519// IsEmpty returns true if the ListResult contains no values.
14520func (ulr UsagesListResult) IsEmpty() bool {
14521	return ulr.Value == nil || len(*ulr.Value) == 0
14522}
14523
14524// hasNextLink returns true if the NextLink is not empty.
14525func (ulr UsagesListResult) hasNextLink() bool {
14526	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
14527}
14528
14529// usagesListResultPreparer prepares a request to retrieve the next set of results.
14530// It returns nil if no more results exist.
14531func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
14532	if !ulr.hasNextLink() {
14533		return nil, nil
14534	}
14535	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14536		autorest.AsJSON(),
14537		autorest.AsGet(),
14538		autorest.WithBaseURL(to.String(ulr.NextLink)))
14539}
14540
14541// UsagesListResultPage contains a page of Usage values.
14542type UsagesListResultPage struct {
14543	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
14544	ulr UsagesListResult
14545}
14546
14547// NextWithContext advances to the next page of values.  If there was an error making
14548// the request the page does not advance and the error is returned.
14549func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
14550	if tracing.IsEnabled() {
14551		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
14552		defer func() {
14553			sc := -1
14554			if page.Response().Response.Response != nil {
14555				sc = page.Response().Response.Response.StatusCode
14556			}
14557			tracing.EndSpan(ctx, sc, err)
14558		}()
14559	}
14560	for {
14561		next, err := page.fn(ctx, page.ulr)
14562		if err != nil {
14563			return err
14564		}
14565		page.ulr = next
14566		if !next.hasNextLink() || !next.IsEmpty() {
14567			break
14568		}
14569	}
14570	return nil
14571}
14572
14573// Next advances to the next page of values.  If there was an error making
14574// the request the page does not advance and the error is returned.
14575// Deprecated: Use NextWithContext() instead.
14576func (page *UsagesListResultPage) Next() error {
14577	return page.NextWithContext(context.Background())
14578}
14579
14580// NotDone returns true if the page enumeration should be started or is not yet complete.
14581func (page UsagesListResultPage) NotDone() bool {
14582	return !page.ulr.IsEmpty()
14583}
14584
14585// Response returns the raw server response from the last page request.
14586func (page UsagesListResultPage) Response() UsagesListResult {
14587	return page.ulr
14588}
14589
14590// Values returns the slice of values for the current page or nil if there are no values.
14591func (page UsagesListResultPage) Values() []Usage {
14592	if page.ulr.IsEmpty() {
14593		return nil
14594	}
14595	return *page.ulr.Value
14596}
14597
14598// Creates a new instance of the UsagesListResultPage type.
14599func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
14600	return UsagesListResultPage{
14601		fn:  getNextPage,
14602		ulr: cur,
14603	}
14604}
14605
14606// VerificationIPFlowParameters parameters that define the IP flow to be verified.
14607type VerificationIPFlowParameters struct {
14608	// TargetResourceID - The ID of the target resource to perform next-hop on.
14609	TargetResourceID *string `json:"targetResourceId,omitempty"`
14610	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
14611	Direction Direction `json:"direction,omitempty"`
14612	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
14613	Protocol Protocol `json:"protocol,omitempty"`
14614	// 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.
14615	LocalPort *string `json:"localPort,omitempty"`
14616	// 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.
14617	RemotePort *string `json:"remotePort,omitempty"`
14618	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
14619	LocalIPAddress *string `json:"localIPAddress,omitempty"`
14620	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
14621	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
14622	// 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).
14623	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
14624}
14625
14626// VerificationIPFlowResult results of IP flow verification on the target resource.
14627type VerificationIPFlowResult struct {
14628	autorest.Response `json:"-"`
14629	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
14630	Access Access `json:"access,omitempty"`
14631	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
14632	RuleName *string `json:"ruleName,omitempty"`
14633}
14634
14635// VirtualNetwork virtual Network resource.
14636type VirtualNetwork struct {
14637	autorest.Response `json:"-"`
14638	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
14639	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
14640	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14641	Etag *string `json:"etag,omitempty"`
14642	// ID - Resource ID.
14643	ID *string `json:"id,omitempty"`
14644	// Name - READ-ONLY; Resource name.
14645	Name *string `json:"name,omitempty"`
14646	// Type - READ-ONLY; Resource type.
14647	Type *string `json:"type,omitempty"`
14648	// Location - Resource location.
14649	Location *string `json:"location,omitempty"`
14650	// Tags - Resource tags.
14651	Tags map[string]*string `json:"tags"`
14652}
14653
14654// MarshalJSON is the custom marshaler for VirtualNetwork.
14655func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
14656	objectMap := make(map[string]interface{})
14657	if vn.VirtualNetworkPropertiesFormat != nil {
14658		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
14659	}
14660	if vn.Etag != nil {
14661		objectMap["etag"] = vn.Etag
14662	}
14663	if vn.ID != nil {
14664		objectMap["id"] = vn.ID
14665	}
14666	if vn.Location != nil {
14667		objectMap["location"] = vn.Location
14668	}
14669	if vn.Tags != nil {
14670		objectMap["tags"] = vn.Tags
14671	}
14672	return json.Marshal(objectMap)
14673}
14674
14675// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
14676func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
14677	var m map[string]*json.RawMessage
14678	err := json.Unmarshal(body, &m)
14679	if err != nil {
14680		return err
14681	}
14682	for k, v := range m {
14683		switch k {
14684		case "properties":
14685			if v != nil {
14686				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
14687				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
14688				if err != nil {
14689					return err
14690				}
14691				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
14692			}
14693		case "etag":
14694			if v != nil {
14695				var etag string
14696				err = json.Unmarshal(*v, &etag)
14697				if err != nil {
14698					return err
14699				}
14700				vn.Etag = &etag
14701			}
14702		case "id":
14703			if v != nil {
14704				var ID string
14705				err = json.Unmarshal(*v, &ID)
14706				if err != nil {
14707					return err
14708				}
14709				vn.ID = &ID
14710			}
14711		case "name":
14712			if v != nil {
14713				var name string
14714				err = json.Unmarshal(*v, &name)
14715				if err != nil {
14716					return err
14717				}
14718				vn.Name = &name
14719			}
14720		case "type":
14721			if v != nil {
14722				var typeVar string
14723				err = json.Unmarshal(*v, &typeVar)
14724				if err != nil {
14725					return err
14726				}
14727				vn.Type = &typeVar
14728			}
14729		case "location":
14730			if v != nil {
14731				var location string
14732				err = json.Unmarshal(*v, &location)
14733				if err != nil {
14734					return err
14735				}
14736				vn.Location = &location
14737			}
14738		case "tags":
14739			if v != nil {
14740				var tags map[string]*string
14741				err = json.Unmarshal(*v, &tags)
14742				if err != nil {
14743					return err
14744				}
14745				vn.Tags = tags
14746			}
14747		}
14748	}
14749
14750	return nil
14751}
14752
14753// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
14754// resource.
14755type VirtualNetworkConnectionGatewayReference struct {
14756	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
14757	ID *string `json:"id,omitempty"`
14758}
14759
14760// VirtualNetworkGateway a common class for general resource information
14761type VirtualNetworkGateway struct {
14762	autorest.Response `json:"-"`
14763	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
14764	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
14765	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14766	Etag *string `json:"etag,omitempty"`
14767	// ID - Resource ID.
14768	ID *string `json:"id,omitempty"`
14769	// Name - READ-ONLY; Resource name.
14770	Name *string `json:"name,omitempty"`
14771	// Type - READ-ONLY; Resource type.
14772	Type *string `json:"type,omitempty"`
14773	// Location - Resource location.
14774	Location *string `json:"location,omitempty"`
14775	// Tags - Resource tags.
14776	Tags map[string]*string `json:"tags"`
14777}
14778
14779// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
14780func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
14781	objectMap := make(map[string]interface{})
14782	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
14783		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
14784	}
14785	if vng.Etag != nil {
14786		objectMap["etag"] = vng.Etag
14787	}
14788	if vng.ID != nil {
14789		objectMap["id"] = vng.ID
14790	}
14791	if vng.Location != nil {
14792		objectMap["location"] = vng.Location
14793	}
14794	if vng.Tags != nil {
14795		objectMap["tags"] = vng.Tags
14796	}
14797	return json.Marshal(objectMap)
14798}
14799
14800// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
14801func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
14802	var m map[string]*json.RawMessage
14803	err := json.Unmarshal(body, &m)
14804	if err != nil {
14805		return err
14806	}
14807	for k, v := range m {
14808		switch k {
14809		case "properties":
14810			if v != nil {
14811				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
14812				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
14813				if err != nil {
14814					return err
14815				}
14816				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
14817			}
14818		case "etag":
14819			if v != nil {
14820				var etag string
14821				err = json.Unmarshal(*v, &etag)
14822				if err != nil {
14823					return err
14824				}
14825				vng.Etag = &etag
14826			}
14827		case "id":
14828			if v != nil {
14829				var ID string
14830				err = json.Unmarshal(*v, &ID)
14831				if err != nil {
14832					return err
14833				}
14834				vng.ID = &ID
14835			}
14836		case "name":
14837			if v != nil {
14838				var name string
14839				err = json.Unmarshal(*v, &name)
14840				if err != nil {
14841					return err
14842				}
14843				vng.Name = &name
14844			}
14845		case "type":
14846			if v != nil {
14847				var typeVar string
14848				err = json.Unmarshal(*v, &typeVar)
14849				if err != nil {
14850					return err
14851				}
14852				vng.Type = &typeVar
14853			}
14854		case "location":
14855			if v != nil {
14856				var location string
14857				err = json.Unmarshal(*v, &location)
14858				if err != nil {
14859					return err
14860				}
14861				vng.Location = &location
14862			}
14863		case "tags":
14864			if v != nil {
14865				var tags map[string]*string
14866				err = json.Unmarshal(*v, &tags)
14867				if err != nil {
14868					return err
14869				}
14870				vng.Tags = tags
14871			}
14872		}
14873	}
14874
14875	return nil
14876}
14877
14878// VirtualNetworkGatewayConnection a common class for general resource information
14879type VirtualNetworkGatewayConnection struct {
14880	autorest.Response `json:"-"`
14881	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
14882	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
14883	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14884	Etag *string `json:"etag,omitempty"`
14885	// ID - Resource ID.
14886	ID *string `json:"id,omitempty"`
14887	// Name - READ-ONLY; Resource name.
14888	Name *string `json:"name,omitempty"`
14889	// Type - READ-ONLY; Resource type.
14890	Type *string `json:"type,omitempty"`
14891	// Location - Resource location.
14892	Location *string `json:"location,omitempty"`
14893	// Tags - Resource tags.
14894	Tags map[string]*string `json:"tags"`
14895}
14896
14897// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
14898func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
14899	objectMap := make(map[string]interface{})
14900	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
14901		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
14902	}
14903	if vngc.Etag != nil {
14904		objectMap["etag"] = vngc.Etag
14905	}
14906	if vngc.ID != nil {
14907		objectMap["id"] = vngc.ID
14908	}
14909	if vngc.Location != nil {
14910		objectMap["location"] = vngc.Location
14911	}
14912	if vngc.Tags != nil {
14913		objectMap["tags"] = vngc.Tags
14914	}
14915	return json.Marshal(objectMap)
14916}
14917
14918// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
14919func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
14920	var m map[string]*json.RawMessage
14921	err := json.Unmarshal(body, &m)
14922	if err != nil {
14923		return err
14924	}
14925	for k, v := range m {
14926		switch k {
14927		case "properties":
14928			if v != nil {
14929				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
14930				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
14931				if err != nil {
14932					return err
14933				}
14934				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
14935			}
14936		case "etag":
14937			if v != nil {
14938				var etag string
14939				err = json.Unmarshal(*v, &etag)
14940				if err != nil {
14941					return err
14942				}
14943				vngc.Etag = &etag
14944			}
14945		case "id":
14946			if v != nil {
14947				var ID string
14948				err = json.Unmarshal(*v, &ID)
14949				if err != nil {
14950					return err
14951				}
14952				vngc.ID = &ID
14953			}
14954		case "name":
14955			if v != nil {
14956				var name string
14957				err = json.Unmarshal(*v, &name)
14958				if err != nil {
14959					return err
14960				}
14961				vngc.Name = &name
14962			}
14963		case "type":
14964			if v != nil {
14965				var typeVar string
14966				err = json.Unmarshal(*v, &typeVar)
14967				if err != nil {
14968					return err
14969				}
14970				vngc.Type = &typeVar
14971			}
14972		case "location":
14973			if v != nil {
14974				var location string
14975				err = json.Unmarshal(*v, &location)
14976				if err != nil {
14977					return err
14978				}
14979				vngc.Location = &location
14980			}
14981		case "tags":
14982			if v != nil {
14983				var tags map[string]*string
14984				err = json.Unmarshal(*v, &tags)
14985				if err != nil {
14986					return err
14987				}
14988				vngc.Tags = tags
14989			}
14990		}
14991	}
14992
14993	return nil
14994}
14995
14996// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
14997type VirtualNetworkGatewayConnectionListEntity struct {
14998	autorest.Response `json:"-"`
14999	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
15000	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
15001	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15002	Etag *string `json:"etag,omitempty"`
15003	// ID - Resource ID.
15004	ID *string `json:"id,omitempty"`
15005	// Name - READ-ONLY; Resource name.
15006	Name *string `json:"name,omitempty"`
15007	// Type - READ-ONLY; Resource type.
15008	Type *string `json:"type,omitempty"`
15009	// Location - Resource location.
15010	Location *string `json:"location,omitempty"`
15011	// Tags - Resource tags.
15012	Tags map[string]*string `json:"tags"`
15013}
15014
15015// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
15016func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
15017	objectMap := make(map[string]interface{})
15018	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
15019		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15020	}
15021	if vngcle.Etag != nil {
15022		objectMap["etag"] = vngcle.Etag
15023	}
15024	if vngcle.ID != nil {
15025		objectMap["id"] = vngcle.ID
15026	}
15027	if vngcle.Location != nil {
15028		objectMap["location"] = vngcle.Location
15029	}
15030	if vngcle.Tags != nil {
15031		objectMap["tags"] = vngcle.Tags
15032	}
15033	return json.Marshal(objectMap)
15034}
15035
15036// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
15037func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
15038	var m map[string]*json.RawMessage
15039	err := json.Unmarshal(body, &m)
15040	if err != nil {
15041		return err
15042	}
15043	for k, v := range m {
15044		switch k {
15045		case "properties":
15046			if v != nil {
15047				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15048				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
15049				if err != nil {
15050					return err
15051				}
15052				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
15053			}
15054		case "etag":
15055			if v != nil {
15056				var etag string
15057				err = json.Unmarshal(*v, &etag)
15058				if err != nil {
15059					return err
15060				}
15061				vngcle.Etag = &etag
15062			}
15063		case "id":
15064			if v != nil {
15065				var ID string
15066				err = json.Unmarshal(*v, &ID)
15067				if err != nil {
15068					return err
15069				}
15070				vngcle.ID = &ID
15071			}
15072		case "name":
15073			if v != nil {
15074				var name string
15075				err = json.Unmarshal(*v, &name)
15076				if err != nil {
15077					return err
15078				}
15079				vngcle.Name = &name
15080			}
15081		case "type":
15082			if v != nil {
15083				var typeVar string
15084				err = json.Unmarshal(*v, &typeVar)
15085				if err != nil {
15086					return err
15087				}
15088				vngcle.Type = &typeVar
15089			}
15090		case "location":
15091			if v != nil {
15092				var location string
15093				err = json.Unmarshal(*v, &location)
15094				if err != nil {
15095					return err
15096				}
15097				vngcle.Location = &location
15098			}
15099		case "tags":
15100			if v != nil {
15101				var tags map[string]*string
15102				err = json.Unmarshal(*v, &tags)
15103				if err != nil {
15104					return err
15105				}
15106				vngcle.Tags = tags
15107			}
15108		}
15109	}
15110
15111	return nil
15112}
15113
15114// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
15115type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
15116	// AuthorizationKey - The authorizationKey.
15117	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15118	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15119	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
15120	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15121	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
15122	// LocalNetworkGateway2 - The reference to local network gateway resource.
15123	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
15124	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15125	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15126	// RoutingWeight - The routing weight.
15127	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15128	// SharedKey - The IPSec shared key.
15129	SharedKey *string `json:"sharedKey,omitempty"`
15130	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15131	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15132	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15133	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15134	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15135	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15136	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15137	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15138	// Peer - The reference to peerings resource.
15139	Peer *SubResource `json:"peer,omitempty"`
15140	// EnableBgp - EnableBgp flag
15141	EnableBgp *bool `json:"enableBgp,omitempty"`
15142	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15143	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15144	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15145	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15146	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15147	ResourceGUID *string `json:"resourceGuid,omitempty"`
15148	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15149	ProvisioningState *string `json:"provisioningState,omitempty"`
15150}
15151
15152// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
15153func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
15154	objectMap := make(map[string]interface{})
15155	if vngclepf.AuthorizationKey != nil {
15156		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
15157	}
15158	if vngclepf.VirtualNetworkGateway1 != nil {
15159		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
15160	}
15161	if vngclepf.VirtualNetworkGateway2 != nil {
15162		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
15163	}
15164	if vngclepf.LocalNetworkGateway2 != nil {
15165		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
15166	}
15167	if vngclepf.ConnectionType != "" {
15168		objectMap["connectionType"] = vngclepf.ConnectionType
15169	}
15170	if vngclepf.RoutingWeight != nil {
15171		objectMap["routingWeight"] = vngclepf.RoutingWeight
15172	}
15173	if vngclepf.SharedKey != nil {
15174		objectMap["sharedKey"] = vngclepf.SharedKey
15175	}
15176	if vngclepf.Peer != nil {
15177		objectMap["peer"] = vngclepf.Peer
15178	}
15179	if vngclepf.EnableBgp != nil {
15180		objectMap["enableBgp"] = vngclepf.EnableBgp
15181	}
15182	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
15183		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
15184	}
15185	if vngclepf.IpsecPolicies != nil {
15186		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
15187	}
15188	if vngclepf.ResourceGUID != nil {
15189		objectMap["resourceGuid"] = vngclepf.ResourceGUID
15190	}
15191	return json.Marshal(objectMap)
15192}
15193
15194// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
15195// service call
15196type VirtualNetworkGatewayConnectionListResult struct {
15197	autorest.Response `json:"-"`
15198	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15199	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
15200	// NextLink - READ-ONLY; The URL to get the next set of results.
15201	NextLink *string `json:"nextLink,omitempty"`
15202}
15203
15204// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
15205func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
15206	objectMap := make(map[string]interface{})
15207	if vngclr.Value != nil {
15208		objectMap["value"] = vngclr.Value
15209	}
15210	return json.Marshal(objectMap)
15211}
15212
15213// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
15214// VirtualNetworkGatewayConnection values.
15215type VirtualNetworkGatewayConnectionListResultIterator struct {
15216	i    int
15217	page VirtualNetworkGatewayConnectionListResultPage
15218}
15219
15220// NextWithContext advances to the next value.  If there was an error making
15221// the request the iterator does not advance and the error is returned.
15222func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
15223	if tracing.IsEnabled() {
15224		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
15225		defer func() {
15226			sc := -1
15227			if iter.Response().Response.Response != nil {
15228				sc = iter.Response().Response.Response.StatusCode
15229			}
15230			tracing.EndSpan(ctx, sc, err)
15231		}()
15232	}
15233	iter.i++
15234	if iter.i < len(iter.page.Values()) {
15235		return nil
15236	}
15237	err = iter.page.NextWithContext(ctx)
15238	if err != nil {
15239		iter.i--
15240		return err
15241	}
15242	iter.i = 0
15243	return nil
15244}
15245
15246// Next advances to the next value.  If there was an error making
15247// the request the iterator does not advance and the error is returned.
15248// Deprecated: Use NextWithContext() instead.
15249func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
15250	return iter.NextWithContext(context.Background())
15251}
15252
15253// NotDone returns true if the enumeration should be started or is not yet complete.
15254func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
15255	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15256}
15257
15258// Response returns the raw server response from the last page request.
15259func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
15260	return iter.page.Response()
15261}
15262
15263// Value returns the current value or a zero-initialized value if the
15264// iterator has advanced beyond the end of the collection.
15265func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
15266	if !iter.page.NotDone() {
15267		return VirtualNetworkGatewayConnection{}
15268	}
15269	return iter.page.Values()[iter.i]
15270}
15271
15272// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
15273func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
15274	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
15275}
15276
15277// IsEmpty returns true if the ListResult contains no values.
15278func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
15279	return vngclr.Value == nil || len(*vngclr.Value) == 0
15280}
15281
15282// hasNextLink returns true if the NextLink is not empty.
15283func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
15284	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
15285}
15286
15287// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
15288// It returns nil if no more results exist.
15289func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
15290	if !vngclr.hasNextLink() {
15291		return nil, nil
15292	}
15293	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15294		autorest.AsJSON(),
15295		autorest.AsGet(),
15296		autorest.WithBaseURL(to.String(vngclr.NextLink)))
15297}
15298
15299// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
15300type VirtualNetworkGatewayConnectionListResultPage struct {
15301	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
15302	vngclr VirtualNetworkGatewayConnectionListResult
15303}
15304
15305// NextWithContext advances to the next page of values.  If there was an error making
15306// the request the page does not advance and the error is returned.
15307func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
15308	if tracing.IsEnabled() {
15309		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
15310		defer func() {
15311			sc := -1
15312			if page.Response().Response.Response != nil {
15313				sc = page.Response().Response.Response.StatusCode
15314			}
15315			tracing.EndSpan(ctx, sc, err)
15316		}()
15317	}
15318	for {
15319		next, err := page.fn(ctx, page.vngclr)
15320		if err != nil {
15321			return err
15322		}
15323		page.vngclr = next
15324		if !next.hasNextLink() || !next.IsEmpty() {
15325			break
15326		}
15327	}
15328	return nil
15329}
15330
15331// Next advances to the next page of values.  If there was an error making
15332// the request the page does not advance and the error is returned.
15333// Deprecated: Use NextWithContext() instead.
15334func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
15335	return page.NextWithContext(context.Background())
15336}
15337
15338// NotDone returns true if the page enumeration should be started or is not yet complete.
15339func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
15340	return !page.vngclr.IsEmpty()
15341}
15342
15343// Response returns the raw server response from the last page request.
15344func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
15345	return page.vngclr
15346}
15347
15348// Values returns the slice of values for the current page or nil if there are no values.
15349func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
15350	if page.vngclr.IsEmpty() {
15351		return nil
15352	}
15353	return *page.vngclr.Value
15354}
15355
15356// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
15357func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
15358	return VirtualNetworkGatewayConnectionListResultPage{
15359		fn:     getNextPage,
15360		vngclr: cur,
15361	}
15362}
15363
15364// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
15365type VirtualNetworkGatewayConnectionPropertiesFormat struct {
15366	// AuthorizationKey - The authorizationKey.
15367	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15368	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15369	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
15370	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15371	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
15372	// LocalNetworkGateway2 - The reference to local network gateway resource.
15373	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
15374	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15375	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15376	// RoutingWeight - The routing weight.
15377	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15378	// SharedKey - The IPSec shared key.
15379	SharedKey *string `json:"sharedKey,omitempty"`
15380	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15381	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15382	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15383	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15384	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15385	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15386	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15387	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15388	// Peer - The reference to peerings resource.
15389	Peer *SubResource `json:"peer,omitempty"`
15390	// EnableBgp - EnableBgp flag
15391	EnableBgp *bool `json:"enableBgp,omitempty"`
15392	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15393	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15394	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15395	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15396	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15397	ResourceGUID *string `json:"resourceGuid,omitempty"`
15398	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15399	ProvisioningState *string `json:"provisioningState,omitempty"`
15400}
15401
15402// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
15403func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
15404	objectMap := make(map[string]interface{})
15405	if vngcpf.AuthorizationKey != nil {
15406		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
15407	}
15408	if vngcpf.VirtualNetworkGateway1 != nil {
15409		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
15410	}
15411	if vngcpf.VirtualNetworkGateway2 != nil {
15412		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
15413	}
15414	if vngcpf.LocalNetworkGateway2 != nil {
15415		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
15416	}
15417	if vngcpf.ConnectionType != "" {
15418		objectMap["connectionType"] = vngcpf.ConnectionType
15419	}
15420	if vngcpf.RoutingWeight != nil {
15421		objectMap["routingWeight"] = vngcpf.RoutingWeight
15422	}
15423	if vngcpf.SharedKey != nil {
15424		objectMap["sharedKey"] = vngcpf.SharedKey
15425	}
15426	if vngcpf.Peer != nil {
15427		objectMap["peer"] = vngcpf.Peer
15428	}
15429	if vngcpf.EnableBgp != nil {
15430		objectMap["enableBgp"] = vngcpf.EnableBgp
15431	}
15432	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
15433		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
15434	}
15435	if vngcpf.IpsecPolicies != nil {
15436		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
15437	}
15438	if vngcpf.ResourceGUID != nil {
15439		objectMap["resourceGuid"] = vngcpf.ResourceGUID
15440	}
15441	return json.Marshal(objectMap)
15442}
15443
15444// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15445// results of a long-running operation.
15446type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
15447	azure.FutureAPI
15448	// Result returns the result of the asynchronous operation.
15449	// If the operation has not completed it will return an error.
15450	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
15451}
15452
15453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15454func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15455	var azFuture azure.Future
15456	if err := json.Unmarshal(body, &azFuture); err != nil {
15457		return err
15458	}
15459	future.FutureAPI = &azFuture
15460	future.Result = future.result
15461	return nil
15462}
15463
15464// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
15465func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
15466	var done bool
15467	done, err = future.DoneWithContext(context.Background(), client)
15468	if err != nil {
15469		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15470		return
15471	}
15472	if !done {
15473		vngc.Response.Response = future.Response()
15474		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
15475		return
15476	}
15477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15478	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
15479		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
15480		if err != nil {
15481			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
15482		}
15483	}
15484	return
15485}
15486
15487// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
15488// a long-running operation.
15489type VirtualNetworkGatewayConnectionsDeleteFuture struct {
15490	azure.FutureAPI
15491	// Result returns the result of the asynchronous operation.
15492	// If the operation has not completed it will return an error.
15493	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
15494}
15495
15496// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15497func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
15498	var azFuture azure.Future
15499	if err := json.Unmarshal(body, &azFuture); err != nil {
15500		return err
15501	}
15502	future.FutureAPI = &azFuture
15503	future.Result = future.result
15504	return nil
15505}
15506
15507// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
15508func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
15509	var done bool
15510	done, err = future.DoneWithContext(context.Background(), client)
15511	if err != nil {
15512		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
15513		return
15514	}
15515	if !done {
15516		ar.Response = future.Response()
15517		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
15518		return
15519	}
15520	ar.Response = future.Response()
15521	return
15522}
15523
15524// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
15525// results of a long-running operation.
15526type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
15527	azure.FutureAPI
15528	// Result returns the result of the asynchronous operation.
15529	// If the operation has not completed it will return an error.
15530	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
15531}
15532
15533// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15534func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15535	var azFuture azure.Future
15536	if err := json.Unmarshal(body, &azFuture); err != nil {
15537		return err
15538	}
15539	future.FutureAPI = &azFuture
15540	future.Result = future.result
15541	return nil
15542}
15543
15544// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
15545func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
15546	var done bool
15547	done, err = future.DoneWithContext(context.Background(), client)
15548	if err != nil {
15549		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15550		return
15551	}
15552	if !done {
15553		crsk.Response.Response = future.Response()
15554		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
15555		return
15556	}
15557	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15558	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
15559		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
15560		if err != nil {
15561			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
15562		}
15563	}
15564	return
15565}
15566
15567// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
15568// results of a long-running operation.
15569type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
15570	azure.FutureAPI
15571	// Result returns the result of the asynchronous operation.
15572	// If the operation has not completed it will return an error.
15573	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
15574}
15575
15576// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15577func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15578	var azFuture azure.Future
15579	if err := json.Unmarshal(body, &azFuture); err != nil {
15580		return err
15581	}
15582	future.FutureAPI = &azFuture
15583	future.Result = future.result
15584	return nil
15585}
15586
15587// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
15588func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
15589	var done bool
15590	done, err = future.DoneWithContext(context.Background(), client)
15591	if err != nil {
15592		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15593		return
15594	}
15595	if !done {
15596		csk.Response.Response = future.Response()
15597		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
15598		return
15599	}
15600	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15601	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
15602		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
15603		if err != nil {
15604			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
15605		}
15606	}
15607	return
15608}
15609
15610// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
15611// results of a long-running operation.
15612type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
15613	azure.FutureAPI
15614	// Result returns the result of the asynchronous operation.
15615	// If the operation has not completed it will return an error.
15616	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
15617}
15618
15619// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15620func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
15621	var azFuture azure.Future
15622	if err := json.Unmarshal(body, &azFuture); err != nil {
15623		return err
15624	}
15625	future.FutureAPI = &azFuture
15626	future.Result = future.result
15627	return nil
15628}
15629
15630// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
15631func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
15632	var done bool
15633	done, err = future.DoneWithContext(context.Background(), client)
15634	if err != nil {
15635		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15636		return
15637	}
15638	if !done {
15639		vngcle.Response.Response = future.Response()
15640		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
15641		return
15642	}
15643	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15644	if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
15645		vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
15646		if err != nil {
15647			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
15648		}
15649	}
15650	return
15651}
15652
15653// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
15654type VirtualNetworkGatewayIPConfiguration struct {
15655	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
15656	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15657	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15658	Name *string `json:"name,omitempty"`
15659	// Etag - A unique read-only string that changes whenever the resource is updated.
15660	Etag *string `json:"etag,omitempty"`
15661	// ID - Resource ID.
15662	ID *string `json:"id,omitempty"`
15663}
15664
15665// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
15666func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
15667	objectMap := make(map[string]interface{})
15668	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
15669		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
15670	}
15671	if vngic.Name != nil {
15672		objectMap["name"] = vngic.Name
15673	}
15674	if vngic.Etag != nil {
15675		objectMap["etag"] = vngic.Etag
15676	}
15677	if vngic.ID != nil {
15678		objectMap["id"] = vngic.ID
15679	}
15680	return json.Marshal(objectMap)
15681}
15682
15683// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
15684func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
15685	var m map[string]*json.RawMessage
15686	err := json.Unmarshal(body, &m)
15687	if err != nil {
15688		return err
15689	}
15690	for k, v := range m {
15691		switch k {
15692		case "properties":
15693			if v != nil {
15694				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
15695				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
15696				if err != nil {
15697					return err
15698				}
15699				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
15700			}
15701		case "name":
15702			if v != nil {
15703				var name string
15704				err = json.Unmarshal(*v, &name)
15705				if err != nil {
15706					return err
15707				}
15708				vngic.Name = &name
15709			}
15710		case "etag":
15711			if v != nil {
15712				var etag string
15713				err = json.Unmarshal(*v, &etag)
15714				if err != nil {
15715					return err
15716				}
15717				vngic.Etag = &etag
15718			}
15719		case "id":
15720			if v != nil {
15721				var ID string
15722				err = json.Unmarshal(*v, &ID)
15723				if err != nil {
15724					return err
15725				}
15726				vngic.ID = &ID
15727			}
15728		}
15729	}
15730
15731	return nil
15732}
15733
15734// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
15735type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
15736	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
15737	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15738	// Subnet - The reference of the subnet resource.
15739	Subnet *SubResource `json:"subnet,omitempty"`
15740	// PublicIPAddress - The reference of the public IP resource.
15741	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
15742	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15743	ProvisioningState *string `json:"provisioningState,omitempty"`
15744}
15745
15746// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
15747func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15748	objectMap := make(map[string]interface{})
15749	if vngicpf.PrivateIPAllocationMethod != "" {
15750		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
15751	}
15752	if vngicpf.Subnet != nil {
15753		objectMap["subnet"] = vngicpf.Subnet
15754	}
15755	if vngicpf.PublicIPAddress != nil {
15756		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
15757	}
15758	return json.Marshal(objectMap)
15759}
15760
15761// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
15762// service call
15763type VirtualNetworkGatewayListConnectionsResult struct {
15764	autorest.Response `json:"-"`
15765	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15766	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
15767	// NextLink - READ-ONLY; The URL to get the next set of results.
15768	NextLink *string `json:"nextLink,omitempty"`
15769}
15770
15771// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
15772func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
15773	objectMap := make(map[string]interface{})
15774	if vnglcr.Value != nil {
15775		objectMap["value"] = vnglcr.Value
15776	}
15777	return json.Marshal(objectMap)
15778}
15779
15780// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
15781// VirtualNetworkGatewayConnectionListEntity values.
15782type VirtualNetworkGatewayListConnectionsResultIterator struct {
15783	i    int
15784	page VirtualNetworkGatewayListConnectionsResultPage
15785}
15786
15787// NextWithContext advances to the next value.  If there was an error making
15788// the request the iterator does not advance and the error is returned.
15789func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15790	if tracing.IsEnabled() {
15791		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
15792		defer func() {
15793			sc := -1
15794			if iter.Response().Response.Response != nil {
15795				sc = iter.Response().Response.Response.StatusCode
15796			}
15797			tracing.EndSpan(ctx, sc, err)
15798		}()
15799	}
15800	iter.i++
15801	if iter.i < len(iter.page.Values()) {
15802		return nil
15803	}
15804	err = iter.page.NextWithContext(ctx)
15805	if err != nil {
15806		iter.i--
15807		return err
15808	}
15809	iter.i = 0
15810	return nil
15811}
15812
15813// Next advances to the next value.  If there was an error making
15814// the request the iterator does not advance and the error is returned.
15815// Deprecated: Use NextWithContext() instead.
15816func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
15817	return iter.NextWithContext(context.Background())
15818}
15819
15820// NotDone returns true if the enumeration should be started or is not yet complete.
15821func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
15822	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15823}
15824
15825// Response returns the raw server response from the last page request.
15826func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
15827	return iter.page.Response()
15828}
15829
15830// Value returns the current value or a zero-initialized value if the
15831// iterator has advanced beyond the end of the collection.
15832func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
15833	if !iter.page.NotDone() {
15834		return VirtualNetworkGatewayConnectionListEntity{}
15835	}
15836	return iter.page.Values()[iter.i]
15837}
15838
15839// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
15840func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
15841	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
15842}
15843
15844// IsEmpty returns true if the ListResult contains no values.
15845func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
15846	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
15847}
15848
15849// hasNextLink returns true if the NextLink is not empty.
15850func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
15851	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
15852}
15853
15854// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
15855// It returns nil if no more results exist.
15856func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15857	if !vnglcr.hasNextLink() {
15858		return nil, nil
15859	}
15860	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15861		autorest.AsJSON(),
15862		autorest.AsGet(),
15863		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
15864}
15865
15866// VirtualNetworkGatewayListConnectionsResultPage contains a page of
15867// VirtualNetworkGatewayConnectionListEntity values.
15868type VirtualNetworkGatewayListConnectionsResultPage struct {
15869	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
15870	vnglcr VirtualNetworkGatewayListConnectionsResult
15871}
15872
15873// NextWithContext advances to the next page of values.  If there was an error making
15874// the request the page does not advance and the error is returned.
15875func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15876	if tracing.IsEnabled() {
15877		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
15878		defer func() {
15879			sc := -1
15880			if page.Response().Response.Response != nil {
15881				sc = page.Response().Response.Response.StatusCode
15882			}
15883			tracing.EndSpan(ctx, sc, err)
15884		}()
15885	}
15886	for {
15887		next, err := page.fn(ctx, page.vnglcr)
15888		if err != nil {
15889			return err
15890		}
15891		page.vnglcr = next
15892		if !next.hasNextLink() || !next.IsEmpty() {
15893			break
15894		}
15895	}
15896	return nil
15897}
15898
15899// Next advances to the next page of values.  If there was an error making
15900// the request the page does not advance and the error is returned.
15901// Deprecated: Use NextWithContext() instead.
15902func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
15903	return page.NextWithContext(context.Background())
15904}
15905
15906// NotDone returns true if the page enumeration should be started or is not yet complete.
15907func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
15908	return !page.vnglcr.IsEmpty()
15909}
15910
15911// Response returns the raw server response from the last page request.
15912func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
15913	return page.vnglcr
15914}
15915
15916// Values returns the slice of values for the current page or nil if there are no values.
15917func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
15918	if page.vnglcr.IsEmpty() {
15919		return nil
15920	}
15921	return *page.vnglcr.Value
15922}
15923
15924// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
15925func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
15926	return VirtualNetworkGatewayListConnectionsResultPage{
15927		fn:     getNextPage,
15928		vnglcr: cur,
15929	}
15930}
15931
15932// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
15933type VirtualNetworkGatewayListResult struct {
15934	autorest.Response `json:"-"`
15935	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
15936	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
15937	// NextLink - READ-ONLY; The URL to get the next set of results.
15938	NextLink *string `json:"nextLink,omitempty"`
15939}
15940
15941// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
15942func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
15943	objectMap := make(map[string]interface{})
15944	if vnglr.Value != nil {
15945		objectMap["value"] = vnglr.Value
15946	}
15947	return json.Marshal(objectMap)
15948}
15949
15950// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
15951// values.
15952type VirtualNetworkGatewayListResultIterator struct {
15953	i    int
15954	page VirtualNetworkGatewayListResultPage
15955}
15956
15957// NextWithContext advances to the next value.  If there was an error making
15958// the request the iterator does not advance and the error is returned.
15959func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
15960	if tracing.IsEnabled() {
15961		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
15962		defer func() {
15963			sc := -1
15964			if iter.Response().Response.Response != nil {
15965				sc = iter.Response().Response.Response.StatusCode
15966			}
15967			tracing.EndSpan(ctx, sc, err)
15968		}()
15969	}
15970	iter.i++
15971	if iter.i < len(iter.page.Values()) {
15972		return nil
15973	}
15974	err = iter.page.NextWithContext(ctx)
15975	if err != nil {
15976		iter.i--
15977		return err
15978	}
15979	iter.i = 0
15980	return nil
15981}
15982
15983// Next advances to the next value.  If there was an error making
15984// the request the iterator does not advance and the error is returned.
15985// Deprecated: Use NextWithContext() instead.
15986func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
15987	return iter.NextWithContext(context.Background())
15988}
15989
15990// NotDone returns true if the enumeration should be started or is not yet complete.
15991func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
15992	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15993}
15994
15995// Response returns the raw server response from the last page request.
15996func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
15997	return iter.page.Response()
15998}
15999
16000// Value returns the current value or a zero-initialized value if the
16001// iterator has advanced beyond the end of the collection.
16002func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
16003	if !iter.page.NotDone() {
16004		return VirtualNetworkGateway{}
16005	}
16006	return iter.page.Values()[iter.i]
16007}
16008
16009// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
16010func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
16011	return VirtualNetworkGatewayListResultIterator{page: page}
16012}
16013
16014// IsEmpty returns true if the ListResult contains no values.
16015func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
16016	return vnglr.Value == nil || len(*vnglr.Value) == 0
16017}
16018
16019// hasNextLink returns true if the NextLink is not empty.
16020func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
16021	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
16022}
16023
16024// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
16025// It returns nil if no more results exist.
16026func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
16027	if !vnglr.hasNextLink() {
16028		return nil, nil
16029	}
16030	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16031		autorest.AsJSON(),
16032		autorest.AsGet(),
16033		autorest.WithBaseURL(to.String(vnglr.NextLink)))
16034}
16035
16036// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
16037type VirtualNetworkGatewayListResultPage struct {
16038	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
16039	vnglr VirtualNetworkGatewayListResult
16040}
16041
16042// NextWithContext advances to the next page of values.  If there was an error making
16043// the request the page does not advance and the error is returned.
16044func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
16045	if tracing.IsEnabled() {
16046		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
16047		defer func() {
16048			sc := -1
16049			if page.Response().Response.Response != nil {
16050				sc = page.Response().Response.Response.StatusCode
16051			}
16052			tracing.EndSpan(ctx, sc, err)
16053		}()
16054	}
16055	for {
16056		next, err := page.fn(ctx, page.vnglr)
16057		if err != nil {
16058			return err
16059		}
16060		page.vnglr = next
16061		if !next.hasNextLink() || !next.IsEmpty() {
16062			break
16063		}
16064	}
16065	return nil
16066}
16067
16068// Next advances to the next page of values.  If there was an error making
16069// the request the page does not advance and the error is returned.
16070// Deprecated: Use NextWithContext() instead.
16071func (page *VirtualNetworkGatewayListResultPage) Next() error {
16072	return page.NextWithContext(context.Background())
16073}
16074
16075// NotDone returns true if the page enumeration should be started or is not yet complete.
16076func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
16077	return !page.vnglr.IsEmpty()
16078}
16079
16080// Response returns the raw server response from the last page request.
16081func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
16082	return page.vnglr
16083}
16084
16085// Values returns the slice of values for the current page or nil if there are no values.
16086func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
16087	if page.vnglr.IsEmpty() {
16088		return nil
16089	}
16090	return *page.vnglr.Value
16091}
16092
16093// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
16094func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
16095	return VirtualNetworkGatewayListResultPage{
16096		fn:    getNextPage,
16097		vnglr: cur,
16098	}
16099}
16100
16101// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
16102type VirtualNetworkGatewayPropertiesFormat struct {
16103	// IPConfigurations - IP configurations for virtual network gateway.
16104	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
16105	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
16106	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
16107	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
16108	VpnType VpnType `json:"vpnType,omitempty"`
16109	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
16110	EnableBgp *bool `json:"enableBgp,omitempty"`
16111	// ActiveActive - ActiveActive flag
16112	ActiveActive *bool `json:"activeActive,omitempty"`
16113	// 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.
16114	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
16115	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
16116	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
16117	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
16118	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
16119	// BgpSettings - Virtual network gateway's BGP speaker settings.
16120	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
16121	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
16122	ResourceGUID *string `json:"resourceGuid,omitempty"`
16123	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16124	ProvisioningState *string `json:"provisioningState,omitempty"`
16125}
16126
16127// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
16128func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
16129	objectMap := make(map[string]interface{})
16130	if vngpf.IPConfigurations != nil {
16131		objectMap["ipConfigurations"] = vngpf.IPConfigurations
16132	}
16133	if vngpf.GatewayType != "" {
16134		objectMap["gatewayType"] = vngpf.GatewayType
16135	}
16136	if vngpf.VpnType != "" {
16137		objectMap["vpnType"] = vngpf.VpnType
16138	}
16139	if vngpf.EnableBgp != nil {
16140		objectMap["enableBgp"] = vngpf.EnableBgp
16141	}
16142	if vngpf.ActiveActive != nil {
16143		objectMap["activeActive"] = vngpf.ActiveActive
16144	}
16145	if vngpf.GatewayDefaultSite != nil {
16146		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
16147	}
16148	if vngpf.Sku != nil {
16149		objectMap["sku"] = vngpf.Sku
16150	}
16151	if vngpf.VpnClientConfiguration != nil {
16152		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
16153	}
16154	if vngpf.BgpSettings != nil {
16155		objectMap["bgpSettings"] = vngpf.BgpSettings
16156	}
16157	if vngpf.ResourceGUID != nil {
16158		objectMap["resourceGuid"] = vngpf.ResourceGUID
16159	}
16160	return json.Marshal(objectMap)
16161}
16162
16163// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16164// long-running operation.
16165type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
16166	azure.FutureAPI
16167	// Result returns the result of the asynchronous operation.
16168	// If the operation has not completed it will return an error.
16169	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16170}
16171
16172// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16173func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16174	var azFuture azure.Future
16175	if err := json.Unmarshal(body, &azFuture); err != nil {
16176		return err
16177	}
16178	future.FutureAPI = &azFuture
16179	future.Result = future.result
16180	return nil
16181}
16182
16183// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
16184func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16185	var done bool
16186	done, err = future.DoneWithContext(context.Background(), client)
16187	if err != nil {
16188		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16189		return
16190	}
16191	if !done {
16192		vng.Response.Response = future.Response()
16193		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
16194		return
16195	}
16196	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16197	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16198		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
16199		if err != nil {
16200			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
16201		}
16202	}
16203	return
16204}
16205
16206// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
16207// long-running operation.
16208type VirtualNetworkGatewaysDeleteFuture struct {
16209	azure.FutureAPI
16210	// Result returns the result of the asynchronous operation.
16211	// If the operation has not completed it will return an error.
16212	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
16213}
16214
16215// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16216func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
16217	var azFuture azure.Future
16218	if err := json.Unmarshal(body, &azFuture); err != nil {
16219		return err
16220	}
16221	future.FutureAPI = &azFuture
16222	future.Result = future.result
16223	return nil
16224}
16225
16226// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
16227func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
16228	var done bool
16229	done, err = future.DoneWithContext(context.Background(), client)
16230	if err != nil {
16231		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
16232		return
16233	}
16234	if !done {
16235		ar.Response = future.Response()
16236		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
16237		return
16238	}
16239	ar.Response = future.Response()
16240	return
16241}
16242
16243// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
16244// results of a long-running operation.
16245type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
16246	azure.FutureAPI
16247	// Result returns the result of the asynchronous operation.
16248	// If the operation has not completed it will return an error.
16249	Result func(VirtualNetworkGatewaysClient) (String, error)
16250}
16251
16252// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16253func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
16254	var azFuture azure.Future
16255	if err := json.Unmarshal(body, &azFuture); err != nil {
16256		return err
16257	}
16258	future.FutureAPI = &azFuture
16259	future.Result = future.result
16260	return nil
16261}
16262
16263// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
16264func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16265	var done bool
16266	done, err = future.DoneWithContext(context.Background(), client)
16267	if err != nil {
16268		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
16269		return
16270	}
16271	if !done {
16272		s.Response.Response = future.Response()
16273		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
16274		return
16275	}
16276	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16277	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16278		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
16279		if err != nil {
16280			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
16281		}
16282	}
16283	return
16284}
16285
16286// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
16287// of a long-running operation.
16288type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
16289	azure.FutureAPI
16290	// Result returns the result of the asynchronous operation.
16291	// If the operation has not completed it will return an error.
16292	Result func(VirtualNetworkGatewaysClient) (String, error)
16293}
16294
16295// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16296func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
16297	var azFuture azure.Future
16298	if err := json.Unmarshal(body, &azFuture); err != nil {
16299		return err
16300	}
16301	future.FutureAPI = &azFuture
16302	future.Result = future.result
16303	return nil
16304}
16305
16306// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
16307func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16308	var done bool
16309	done, err = future.DoneWithContext(context.Background(), client)
16310	if err != nil {
16311		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
16312		return
16313	}
16314	if !done {
16315		s.Response.Response = future.Response()
16316		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
16317		return
16318	}
16319	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16320	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16321		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
16322		if err != nil {
16323			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
16324		}
16325	}
16326	return
16327}
16328
16329// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
16330// of a long-running operation.
16331type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
16332	azure.FutureAPI
16333	// Result returns the result of the asynchronous operation.
16334	// If the operation has not completed it will return an error.
16335	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16336}
16337
16338// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16339func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
16340	var azFuture azure.Future
16341	if err := json.Unmarshal(body, &azFuture); err != nil {
16342		return err
16343	}
16344	future.FutureAPI = &azFuture
16345	future.Result = future.result
16346	return nil
16347}
16348
16349// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
16350func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16351	var done bool
16352	done, err = future.DoneWithContext(context.Background(), client)
16353	if err != nil {
16354		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
16355		return
16356	}
16357	if !done {
16358		grlr.Response.Response = future.Response()
16359		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
16360		return
16361	}
16362	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16363	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16364		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
16365		if err != nil {
16366			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16367		}
16368	}
16369	return
16370}
16371
16372// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
16373// a long-running operation.
16374type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
16375	azure.FutureAPI
16376	// Result returns the result of the asynchronous operation.
16377	// If the operation has not completed it will return an error.
16378	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
16379}
16380
16381// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16382func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
16383	var azFuture azure.Future
16384	if err := json.Unmarshal(body, &azFuture); err != nil {
16385		return err
16386	}
16387	future.FutureAPI = &azFuture
16388	future.Result = future.result
16389	return nil
16390}
16391
16392// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
16393func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
16394	var done bool
16395	done, err = future.DoneWithContext(context.Background(), client)
16396	if err != nil {
16397		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
16398		return
16399	}
16400	if !done {
16401		bpslr.Response.Response = future.Response()
16402		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
16403		return
16404	}
16405	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16406	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
16407		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
16408		if err != nil {
16409			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
16410		}
16411	}
16412	return
16413}
16414
16415// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
16416// a long-running operation.
16417type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
16418	azure.FutureAPI
16419	// Result returns the result of the asynchronous operation.
16420	// If the operation has not completed it will return an error.
16421	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16422}
16423
16424// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16425func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
16426	var azFuture azure.Future
16427	if err := json.Unmarshal(body, &azFuture); err != nil {
16428		return err
16429	}
16430	future.FutureAPI = &azFuture
16431	future.Result = future.result
16432	return nil
16433}
16434
16435// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
16436func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16437	var done bool
16438	done, err = future.DoneWithContext(context.Background(), client)
16439	if err != nil {
16440		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
16441		return
16442	}
16443	if !done {
16444		grlr.Response.Response = future.Response()
16445		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
16446		return
16447	}
16448	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16449	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16450		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
16451		if err != nil {
16452			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16453		}
16454	}
16455	return
16456}
16457
16458// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
16459// results of a long-running operation.
16460type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
16461	azure.FutureAPI
16462	// Result returns the result of the asynchronous operation.
16463	// If the operation has not completed it will return an error.
16464	Result func(VirtualNetworkGatewaysClient) (String, error)
16465}
16466
16467// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16468func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
16469	var azFuture azure.Future
16470	if err := json.Unmarshal(body, &azFuture); err != nil {
16471		return err
16472	}
16473	future.FutureAPI = &azFuture
16474	future.Result = future.result
16475	return nil
16476}
16477
16478// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
16479func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16480	var done bool
16481	done, err = future.DoneWithContext(context.Background(), client)
16482	if err != nil {
16483		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
16484		return
16485	}
16486	if !done {
16487		s.Response.Response = future.Response()
16488		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
16489		return
16490	}
16491	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16492	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16493		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
16494		if err != nil {
16495			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
16496		}
16497	}
16498	return
16499}
16500
16501// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
16502type VirtualNetworkGatewaySku struct {
16503	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
16504	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
16505	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
16506	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
16507	// Capacity - The capacity.
16508	Capacity *int32 `json:"capacity,omitempty"`
16509}
16510
16511// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
16512// long-running operation.
16513type VirtualNetworkGatewaysResetFuture struct {
16514	azure.FutureAPI
16515	// Result returns the result of the asynchronous operation.
16516	// If the operation has not completed it will return an error.
16517	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16518}
16519
16520// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16521func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
16522	var azFuture azure.Future
16523	if err := json.Unmarshal(body, &azFuture); err != nil {
16524		return err
16525	}
16526	future.FutureAPI = &azFuture
16527	future.Result = future.result
16528	return nil
16529}
16530
16531// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
16532func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16533	var done bool
16534	done, err = future.DoneWithContext(context.Background(), client)
16535	if err != nil {
16536		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
16537		return
16538	}
16539	if !done {
16540		vng.Response.Response = future.Response()
16541		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
16542		return
16543	}
16544	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16545	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16546		vng, err = client.ResetResponder(vng.Response.Response)
16547		if err != nil {
16548			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
16549		}
16550	}
16551	return
16552}
16553
16554// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16555// long-running operation.
16556type VirtualNetworkGatewaysUpdateTagsFuture struct {
16557	azure.FutureAPI
16558	// Result returns the result of the asynchronous operation.
16559	// If the operation has not completed it will return an error.
16560	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16561}
16562
16563// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16564func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16565	var azFuture azure.Future
16566	if err := json.Unmarshal(body, &azFuture); err != nil {
16567		return err
16568	}
16569	future.FutureAPI = &azFuture
16570	future.Result = future.result
16571	return nil
16572}
16573
16574// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
16575func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16576	var done bool
16577	done, err = future.DoneWithContext(context.Background(), client)
16578	if err != nil {
16579		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16580		return
16581	}
16582	if !done {
16583		vng.Response.Response = future.Response()
16584		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
16585		return
16586	}
16587	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16588	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16589		vng, err = client.UpdateTagsResponder(vng.Response.Response)
16590		if err != nil {
16591			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
16592		}
16593	}
16594	return
16595}
16596
16597// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
16598type VirtualNetworkListResult struct {
16599	autorest.Response `json:"-"`
16600	// Value - Gets a list of VirtualNetwork resources in a resource group.
16601	Value *[]VirtualNetwork `json:"value,omitempty"`
16602	// NextLink - The URL to get the next set of results.
16603	NextLink *string `json:"nextLink,omitempty"`
16604}
16605
16606// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
16607type VirtualNetworkListResultIterator struct {
16608	i    int
16609	page VirtualNetworkListResultPage
16610}
16611
16612// NextWithContext advances to the next value.  If there was an error making
16613// the request the iterator does not advance and the error is returned.
16614func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
16615	if tracing.IsEnabled() {
16616		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
16617		defer func() {
16618			sc := -1
16619			if iter.Response().Response.Response != nil {
16620				sc = iter.Response().Response.Response.StatusCode
16621			}
16622			tracing.EndSpan(ctx, sc, err)
16623		}()
16624	}
16625	iter.i++
16626	if iter.i < len(iter.page.Values()) {
16627		return nil
16628	}
16629	err = iter.page.NextWithContext(ctx)
16630	if err != nil {
16631		iter.i--
16632		return err
16633	}
16634	iter.i = 0
16635	return nil
16636}
16637
16638// Next advances to the next value.  If there was an error making
16639// the request the iterator does not advance and the error is returned.
16640// Deprecated: Use NextWithContext() instead.
16641func (iter *VirtualNetworkListResultIterator) Next() error {
16642	return iter.NextWithContext(context.Background())
16643}
16644
16645// NotDone returns true if the enumeration should be started or is not yet complete.
16646func (iter VirtualNetworkListResultIterator) NotDone() bool {
16647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16648}
16649
16650// Response returns the raw server response from the last page request.
16651func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
16652	return iter.page.Response()
16653}
16654
16655// Value returns the current value or a zero-initialized value if the
16656// iterator has advanced beyond the end of the collection.
16657func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
16658	if !iter.page.NotDone() {
16659		return VirtualNetwork{}
16660	}
16661	return iter.page.Values()[iter.i]
16662}
16663
16664// Creates a new instance of the VirtualNetworkListResultIterator type.
16665func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
16666	return VirtualNetworkListResultIterator{page: page}
16667}
16668
16669// IsEmpty returns true if the ListResult contains no values.
16670func (vnlr VirtualNetworkListResult) IsEmpty() bool {
16671	return vnlr.Value == nil || len(*vnlr.Value) == 0
16672}
16673
16674// hasNextLink returns true if the NextLink is not empty.
16675func (vnlr VirtualNetworkListResult) hasNextLink() bool {
16676	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
16677}
16678
16679// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
16680// It returns nil if no more results exist.
16681func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
16682	if !vnlr.hasNextLink() {
16683		return nil, nil
16684	}
16685	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16686		autorest.AsJSON(),
16687		autorest.AsGet(),
16688		autorest.WithBaseURL(to.String(vnlr.NextLink)))
16689}
16690
16691// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
16692type VirtualNetworkListResultPage struct {
16693	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
16694	vnlr VirtualNetworkListResult
16695}
16696
16697// NextWithContext advances to the next page of values.  If there was an error making
16698// the request the page does not advance and the error is returned.
16699func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
16700	if tracing.IsEnabled() {
16701		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
16702		defer func() {
16703			sc := -1
16704			if page.Response().Response.Response != nil {
16705				sc = page.Response().Response.Response.StatusCode
16706			}
16707			tracing.EndSpan(ctx, sc, err)
16708		}()
16709	}
16710	for {
16711		next, err := page.fn(ctx, page.vnlr)
16712		if err != nil {
16713			return err
16714		}
16715		page.vnlr = next
16716		if !next.hasNextLink() || !next.IsEmpty() {
16717			break
16718		}
16719	}
16720	return nil
16721}
16722
16723// Next advances to the next page of values.  If there was an error making
16724// the request the page does not advance and the error is returned.
16725// Deprecated: Use NextWithContext() instead.
16726func (page *VirtualNetworkListResultPage) Next() error {
16727	return page.NextWithContext(context.Background())
16728}
16729
16730// NotDone returns true if the page enumeration should be started or is not yet complete.
16731func (page VirtualNetworkListResultPage) NotDone() bool {
16732	return !page.vnlr.IsEmpty()
16733}
16734
16735// Response returns the raw server response from the last page request.
16736func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
16737	return page.vnlr
16738}
16739
16740// Values returns the slice of values for the current page or nil if there are no values.
16741func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
16742	if page.vnlr.IsEmpty() {
16743		return nil
16744	}
16745	return *page.vnlr.Value
16746}
16747
16748// Creates a new instance of the VirtualNetworkListResultPage type.
16749func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
16750	return VirtualNetworkListResultPage{
16751		fn:   getNextPage,
16752		vnlr: cur,
16753	}
16754}
16755
16756// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
16757type VirtualNetworkListUsageResult struct {
16758	autorest.Response `json:"-"`
16759	// Value - READ-ONLY; VirtualNetwork usage stats.
16760	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
16761	// NextLink - The URL to get the next set of results.
16762	NextLink *string `json:"nextLink,omitempty"`
16763}
16764
16765// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
16766func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
16767	objectMap := make(map[string]interface{})
16768	if vnlur.NextLink != nil {
16769		objectMap["nextLink"] = vnlur.NextLink
16770	}
16771	return json.Marshal(objectMap)
16772}
16773
16774// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
16775// values.
16776type VirtualNetworkListUsageResultIterator struct {
16777	i    int
16778	page VirtualNetworkListUsageResultPage
16779}
16780
16781// NextWithContext advances to the next value.  If there was an error making
16782// the request the iterator does not advance and the error is returned.
16783func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
16784	if tracing.IsEnabled() {
16785		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
16786		defer func() {
16787			sc := -1
16788			if iter.Response().Response.Response != nil {
16789				sc = iter.Response().Response.Response.StatusCode
16790			}
16791			tracing.EndSpan(ctx, sc, err)
16792		}()
16793	}
16794	iter.i++
16795	if iter.i < len(iter.page.Values()) {
16796		return nil
16797	}
16798	err = iter.page.NextWithContext(ctx)
16799	if err != nil {
16800		iter.i--
16801		return err
16802	}
16803	iter.i = 0
16804	return nil
16805}
16806
16807// Next advances to the next value.  If there was an error making
16808// the request the iterator does not advance and the error is returned.
16809// Deprecated: Use NextWithContext() instead.
16810func (iter *VirtualNetworkListUsageResultIterator) Next() error {
16811	return iter.NextWithContext(context.Background())
16812}
16813
16814// NotDone returns true if the enumeration should be started or is not yet complete.
16815func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
16816	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16817}
16818
16819// Response returns the raw server response from the last page request.
16820func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
16821	return iter.page.Response()
16822}
16823
16824// Value returns the current value or a zero-initialized value if the
16825// iterator has advanced beyond the end of the collection.
16826func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
16827	if !iter.page.NotDone() {
16828		return VirtualNetworkUsage{}
16829	}
16830	return iter.page.Values()[iter.i]
16831}
16832
16833// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
16834func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
16835	return VirtualNetworkListUsageResultIterator{page: page}
16836}
16837
16838// IsEmpty returns true if the ListResult contains no values.
16839func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
16840	return vnlur.Value == nil || len(*vnlur.Value) == 0
16841}
16842
16843// hasNextLink returns true if the NextLink is not empty.
16844func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
16845	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
16846}
16847
16848// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
16849// It returns nil if no more results exist.
16850func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
16851	if !vnlur.hasNextLink() {
16852		return nil, nil
16853	}
16854	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16855		autorest.AsJSON(),
16856		autorest.AsGet(),
16857		autorest.WithBaseURL(to.String(vnlur.NextLink)))
16858}
16859
16860// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
16861type VirtualNetworkListUsageResultPage struct {
16862	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
16863	vnlur VirtualNetworkListUsageResult
16864}
16865
16866// NextWithContext advances to the next page of values.  If there was an error making
16867// the request the page does not advance and the error is returned.
16868func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
16869	if tracing.IsEnabled() {
16870		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
16871		defer func() {
16872			sc := -1
16873			if page.Response().Response.Response != nil {
16874				sc = page.Response().Response.Response.StatusCode
16875			}
16876			tracing.EndSpan(ctx, sc, err)
16877		}()
16878	}
16879	for {
16880		next, err := page.fn(ctx, page.vnlur)
16881		if err != nil {
16882			return err
16883		}
16884		page.vnlur = next
16885		if !next.hasNextLink() || !next.IsEmpty() {
16886			break
16887		}
16888	}
16889	return nil
16890}
16891
16892// Next advances to the next page of values.  If there was an error making
16893// the request the page does not advance and the error is returned.
16894// Deprecated: Use NextWithContext() instead.
16895func (page *VirtualNetworkListUsageResultPage) Next() error {
16896	return page.NextWithContext(context.Background())
16897}
16898
16899// NotDone returns true if the page enumeration should be started or is not yet complete.
16900func (page VirtualNetworkListUsageResultPage) NotDone() bool {
16901	return !page.vnlur.IsEmpty()
16902}
16903
16904// Response returns the raw server response from the last page request.
16905func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
16906	return page.vnlur
16907}
16908
16909// Values returns the slice of values for the current page or nil if there are no values.
16910func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
16911	if page.vnlur.IsEmpty() {
16912		return nil
16913	}
16914	return *page.vnlur.Value
16915}
16916
16917// Creates a new instance of the VirtualNetworkListUsageResultPage type.
16918func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
16919	return VirtualNetworkListUsageResultPage{
16920		fn:    getNextPage,
16921		vnlur: cur,
16922	}
16923}
16924
16925// VirtualNetworkPeering peerings in a virtual network resource.
16926type VirtualNetworkPeering struct {
16927	autorest.Response `json:"-"`
16928	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
16929	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
16930	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16931	Name *string `json:"name,omitempty"`
16932	// Etag - A unique read-only string that changes whenever the resource is updated.
16933	Etag *string `json:"etag,omitempty"`
16934	// ID - Resource ID.
16935	ID *string `json:"id,omitempty"`
16936}
16937
16938// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
16939func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
16940	objectMap := make(map[string]interface{})
16941	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
16942		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
16943	}
16944	if vnp.Name != nil {
16945		objectMap["name"] = vnp.Name
16946	}
16947	if vnp.Etag != nil {
16948		objectMap["etag"] = vnp.Etag
16949	}
16950	if vnp.ID != nil {
16951		objectMap["id"] = vnp.ID
16952	}
16953	return json.Marshal(objectMap)
16954}
16955
16956// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
16957func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
16958	var m map[string]*json.RawMessage
16959	err := json.Unmarshal(body, &m)
16960	if err != nil {
16961		return err
16962	}
16963	for k, v := range m {
16964		switch k {
16965		case "properties":
16966			if v != nil {
16967				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
16968				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
16969				if err != nil {
16970					return err
16971				}
16972				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
16973			}
16974		case "name":
16975			if v != nil {
16976				var name string
16977				err = json.Unmarshal(*v, &name)
16978				if err != nil {
16979					return err
16980				}
16981				vnp.Name = &name
16982			}
16983		case "etag":
16984			if v != nil {
16985				var etag string
16986				err = json.Unmarshal(*v, &etag)
16987				if err != nil {
16988					return err
16989				}
16990				vnp.Etag = &etag
16991			}
16992		case "id":
16993			if v != nil {
16994				var ID string
16995				err = json.Unmarshal(*v, &ID)
16996				if err != nil {
16997					return err
16998				}
16999				vnp.ID = &ID
17000			}
17001		}
17002	}
17003
17004	return nil
17005}
17006
17007// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
17008// belong to a virtual network.
17009type VirtualNetworkPeeringListResult struct {
17010	autorest.Response `json:"-"`
17011	// Value - The peerings in a virtual network.
17012	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
17013	// NextLink - The URL to get the next set of results.
17014	NextLink *string `json:"nextLink,omitempty"`
17015}
17016
17017// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
17018// values.
17019type VirtualNetworkPeeringListResultIterator struct {
17020	i    int
17021	page VirtualNetworkPeeringListResultPage
17022}
17023
17024// NextWithContext advances to the next value.  If there was an error making
17025// the request the iterator does not advance and the error is returned.
17026func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
17027	if tracing.IsEnabled() {
17028		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
17029		defer func() {
17030			sc := -1
17031			if iter.Response().Response.Response != nil {
17032				sc = iter.Response().Response.Response.StatusCode
17033			}
17034			tracing.EndSpan(ctx, sc, err)
17035		}()
17036	}
17037	iter.i++
17038	if iter.i < len(iter.page.Values()) {
17039		return nil
17040	}
17041	err = iter.page.NextWithContext(ctx)
17042	if err != nil {
17043		iter.i--
17044		return err
17045	}
17046	iter.i = 0
17047	return nil
17048}
17049
17050// Next advances to the next value.  If there was an error making
17051// the request the iterator does not advance and the error is returned.
17052// Deprecated: Use NextWithContext() instead.
17053func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
17054	return iter.NextWithContext(context.Background())
17055}
17056
17057// NotDone returns true if the enumeration should be started or is not yet complete.
17058func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
17059	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17060}
17061
17062// Response returns the raw server response from the last page request.
17063func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
17064	return iter.page.Response()
17065}
17066
17067// Value returns the current value or a zero-initialized value if the
17068// iterator has advanced beyond the end of the collection.
17069func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
17070	if !iter.page.NotDone() {
17071		return VirtualNetworkPeering{}
17072	}
17073	return iter.page.Values()[iter.i]
17074}
17075
17076// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
17077func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
17078	return VirtualNetworkPeeringListResultIterator{page: page}
17079}
17080
17081// IsEmpty returns true if the ListResult contains no values.
17082func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
17083	return vnplr.Value == nil || len(*vnplr.Value) == 0
17084}
17085
17086// hasNextLink returns true if the NextLink is not empty.
17087func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
17088	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
17089}
17090
17091// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
17092// It returns nil if no more results exist.
17093func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
17094	if !vnplr.hasNextLink() {
17095		return nil, nil
17096	}
17097	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17098		autorest.AsJSON(),
17099		autorest.AsGet(),
17100		autorest.WithBaseURL(to.String(vnplr.NextLink)))
17101}
17102
17103// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
17104type VirtualNetworkPeeringListResultPage struct {
17105	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
17106	vnplr VirtualNetworkPeeringListResult
17107}
17108
17109// NextWithContext advances to the next page of values.  If there was an error making
17110// the request the page does not advance and the error is returned.
17111func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
17112	if tracing.IsEnabled() {
17113		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
17114		defer func() {
17115			sc := -1
17116			if page.Response().Response.Response != nil {
17117				sc = page.Response().Response.Response.StatusCode
17118			}
17119			tracing.EndSpan(ctx, sc, err)
17120		}()
17121	}
17122	for {
17123		next, err := page.fn(ctx, page.vnplr)
17124		if err != nil {
17125			return err
17126		}
17127		page.vnplr = next
17128		if !next.hasNextLink() || !next.IsEmpty() {
17129			break
17130		}
17131	}
17132	return nil
17133}
17134
17135// Next advances to the next page of values.  If there was an error making
17136// the request the page does not advance and the error is returned.
17137// Deprecated: Use NextWithContext() instead.
17138func (page *VirtualNetworkPeeringListResultPage) Next() error {
17139	return page.NextWithContext(context.Background())
17140}
17141
17142// NotDone returns true if the page enumeration should be started or is not yet complete.
17143func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
17144	return !page.vnplr.IsEmpty()
17145}
17146
17147// Response returns the raw server response from the last page request.
17148func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
17149	return page.vnplr
17150}
17151
17152// Values returns the slice of values for the current page or nil if there are no values.
17153func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
17154	if page.vnplr.IsEmpty() {
17155		return nil
17156	}
17157	return *page.vnplr.Value
17158}
17159
17160// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
17161func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
17162	return VirtualNetworkPeeringListResultPage{
17163		fn:    getNextPage,
17164		vnplr: cur,
17165	}
17166}
17167
17168// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
17169type VirtualNetworkPeeringPropertiesFormat struct {
17170	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
17171	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
17172	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
17173	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
17174	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
17175	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
17176	// 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.
17177	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
17178	// 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).
17179	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
17180	// RemoteAddressSpace - The reference of the remote virtual network address space.
17181	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
17182	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
17183	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
17184	// ProvisioningState - The provisioning state of the resource.
17185	ProvisioningState *string `json:"provisioningState,omitempty"`
17186}
17187
17188// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17189// long-running operation.
17190type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
17191	azure.FutureAPI
17192	// Result returns the result of the asynchronous operation.
17193	// If the operation has not completed it will return an error.
17194	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
17195}
17196
17197// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17198func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17199	var azFuture azure.Future
17200	if err := json.Unmarshal(body, &azFuture); err != nil {
17201		return err
17202	}
17203	future.FutureAPI = &azFuture
17204	future.Result = future.result
17205	return nil
17206}
17207
17208// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
17209func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
17210	var done bool
17211	done, err = future.DoneWithContext(context.Background(), client)
17212	if err != nil {
17213		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17214		return
17215	}
17216	if !done {
17217		vnp.Response.Response = future.Response()
17218		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
17219		return
17220	}
17221	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17222	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
17223		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
17224		if err != nil {
17225			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
17226		}
17227	}
17228	return
17229}
17230
17231// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
17232// long-running operation.
17233type VirtualNetworkPeeringsDeleteFuture struct {
17234	azure.FutureAPI
17235	// Result returns the result of the asynchronous operation.
17236	// If the operation has not completed it will return an error.
17237	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
17238}
17239
17240// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17241func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
17242	var azFuture azure.Future
17243	if err := json.Unmarshal(body, &azFuture); err != nil {
17244		return err
17245	}
17246	future.FutureAPI = &azFuture
17247	future.Result = future.result
17248	return nil
17249}
17250
17251// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
17252func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
17253	var done bool
17254	done, err = future.DoneWithContext(context.Background(), client)
17255	if err != nil {
17256		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
17257		return
17258	}
17259	if !done {
17260		ar.Response = future.Response()
17261		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
17262		return
17263	}
17264	ar.Response = future.Response()
17265	return
17266}
17267
17268// VirtualNetworkPropertiesFormat properties of the virtual network.
17269type VirtualNetworkPropertiesFormat struct {
17270	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
17271	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
17272	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
17273	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
17274	// Subnets - A list of subnets in a Virtual Network.
17275	Subnets *[]Subnet `json:"subnets,omitempty"`
17276	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
17277	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
17278	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
17279	ResourceGUID *string `json:"resourceGuid,omitempty"`
17280	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17281	ProvisioningState *string `json:"provisioningState,omitempty"`
17282	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network.
17283	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
17284	// EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network.
17285	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
17286}
17287
17288// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17289// long-running operation.
17290type VirtualNetworksCreateOrUpdateFuture struct {
17291	azure.FutureAPI
17292	// Result returns the result of the asynchronous operation.
17293	// If the operation has not completed it will return an error.
17294	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17295}
17296
17297// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17298func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17299	var azFuture azure.Future
17300	if err := json.Unmarshal(body, &azFuture); err != nil {
17301		return err
17302	}
17303	future.FutureAPI = &azFuture
17304	future.Result = future.result
17305	return nil
17306}
17307
17308// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
17309func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17310	var done bool
17311	done, err = future.DoneWithContext(context.Background(), client)
17312	if err != nil {
17313		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17314		return
17315	}
17316	if !done {
17317		vn.Response.Response = future.Response()
17318		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
17319		return
17320	}
17321	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17322	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17323		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
17324		if err != nil {
17325			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
17326		}
17327	}
17328	return
17329}
17330
17331// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17332// operation.
17333type VirtualNetworksDeleteFuture struct {
17334	azure.FutureAPI
17335	// Result returns the result of the asynchronous operation.
17336	// If the operation has not completed it will return an error.
17337	Result func(VirtualNetworksClient) (autorest.Response, error)
17338}
17339
17340// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17341func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
17342	var azFuture azure.Future
17343	if err := json.Unmarshal(body, &azFuture); err != nil {
17344		return err
17345	}
17346	future.FutureAPI = &azFuture
17347	future.Result = future.result
17348	return nil
17349}
17350
17351// result is the default implementation for VirtualNetworksDeleteFuture.Result.
17352func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
17353	var done bool
17354	done, err = future.DoneWithContext(context.Background(), client)
17355	if err != nil {
17356		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
17357		return
17358	}
17359	if !done {
17360		ar.Response = future.Response()
17361		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
17362		return
17363	}
17364	ar.Response = future.Response()
17365	return
17366}
17367
17368// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17369// long-running operation.
17370type VirtualNetworksUpdateTagsFuture struct {
17371	azure.FutureAPI
17372	// Result returns the result of the asynchronous operation.
17373	// If the operation has not completed it will return an error.
17374	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17375}
17376
17377// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17378func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17379	var azFuture azure.Future
17380	if err := json.Unmarshal(body, &azFuture); err != nil {
17381		return err
17382	}
17383	future.FutureAPI = &azFuture
17384	future.Result = future.result
17385	return nil
17386}
17387
17388// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
17389func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17390	var done bool
17391	done, err = future.DoneWithContext(context.Background(), client)
17392	if err != nil {
17393		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17394		return
17395	}
17396	if !done {
17397		vn.Response.Response = future.Response()
17398		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
17399		return
17400	}
17401	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17402	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17403		vn, err = client.UpdateTagsResponder(vn.Response.Response)
17404		if err != nil {
17405			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
17406		}
17407	}
17408	return
17409}
17410
17411// VirtualNetworkUsage usage details for subnet.
17412type VirtualNetworkUsage struct {
17413	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
17414	CurrentValue *float64 `json:"currentValue,omitempty"`
17415	// ID - READ-ONLY; Subnet identifier.
17416	ID *string `json:"id,omitempty"`
17417	// Limit - READ-ONLY; Indicates the size of the subnet.
17418	Limit *float64 `json:"limit,omitempty"`
17419	// Name - READ-ONLY; The name containing common and localized value for usage.
17420	Name *VirtualNetworkUsageName `json:"name,omitempty"`
17421	// Unit - READ-ONLY; Usage units. Returns 'Count'
17422	Unit *string `json:"unit,omitempty"`
17423}
17424
17425// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
17426func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
17427	objectMap := make(map[string]interface{})
17428	return json.Marshal(objectMap)
17429}
17430
17431// VirtualNetworkUsageName usage strings container.
17432type VirtualNetworkUsageName struct {
17433	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
17434	LocalizedValue *string `json:"localizedValue,omitempty"`
17435	// Value - READ-ONLY; Subnet size and usage string.
17436	Value *string `json:"value,omitempty"`
17437}
17438
17439// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
17440func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
17441	objectMap := make(map[string]interface{})
17442	return json.Marshal(objectMap)
17443}
17444
17445// VpnClientConfiguration vpnClientConfiguration for P2S client.
17446type VpnClientConfiguration struct {
17447	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
17448	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
17449	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
17450	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
17451	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
17452	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
17453	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
17454	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
17455	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
17456	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
17457	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
17458	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
17459}
17460
17461// VpnClientParameters vpn Client Parameters for package generation
17462type VpnClientParameters struct {
17463	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
17464	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
17465	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
17466	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
17467	// 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.
17468	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
17469	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
17470	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
17471}
17472
17473// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
17474type VpnClientRevokedCertificate struct {
17475	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
17476	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
17477	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17478	Name *string `json:"name,omitempty"`
17479	// Etag - A unique read-only string that changes whenever the resource is updated.
17480	Etag *string `json:"etag,omitempty"`
17481	// ID - Resource ID.
17482	ID *string `json:"id,omitempty"`
17483}
17484
17485// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
17486func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
17487	objectMap := make(map[string]interface{})
17488	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
17489		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
17490	}
17491	if vcrc.Name != nil {
17492		objectMap["name"] = vcrc.Name
17493	}
17494	if vcrc.Etag != nil {
17495		objectMap["etag"] = vcrc.Etag
17496	}
17497	if vcrc.ID != nil {
17498		objectMap["id"] = vcrc.ID
17499	}
17500	return json.Marshal(objectMap)
17501}
17502
17503// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
17504func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
17505	var m map[string]*json.RawMessage
17506	err := json.Unmarshal(body, &m)
17507	if err != nil {
17508		return err
17509	}
17510	for k, v := range m {
17511		switch k {
17512		case "properties":
17513			if v != nil {
17514				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
17515				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
17516				if err != nil {
17517					return err
17518				}
17519				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
17520			}
17521		case "name":
17522			if v != nil {
17523				var name string
17524				err = json.Unmarshal(*v, &name)
17525				if err != nil {
17526					return err
17527				}
17528				vcrc.Name = &name
17529			}
17530		case "etag":
17531			if v != nil {
17532				var etag string
17533				err = json.Unmarshal(*v, &etag)
17534				if err != nil {
17535					return err
17536				}
17537				vcrc.Etag = &etag
17538			}
17539		case "id":
17540			if v != nil {
17541				var ID string
17542				err = json.Unmarshal(*v, &ID)
17543				if err != nil {
17544					return err
17545				}
17546				vcrc.ID = &ID
17547			}
17548		}
17549	}
17550
17551	return nil
17552}
17553
17554// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
17555// network gateway.
17556type VpnClientRevokedCertificatePropertiesFormat struct {
17557	// Thumbprint - The revoked VPN client certificate thumbprint.
17558	Thumbprint *string `json:"thumbprint,omitempty"`
17559	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17560	ProvisioningState *string `json:"provisioningState,omitempty"`
17561}
17562
17563// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
17564func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17565	objectMap := make(map[string]interface{})
17566	if vcrcpf.Thumbprint != nil {
17567		objectMap["thumbprint"] = vcrcpf.Thumbprint
17568	}
17569	return json.Marshal(objectMap)
17570}
17571
17572// VpnClientRootCertificate VPN client root certificate of virtual network gateway
17573type VpnClientRootCertificate struct {
17574	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
17575	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
17576	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17577	Name *string `json:"name,omitempty"`
17578	// Etag - A unique read-only string that changes whenever the resource is updated.
17579	Etag *string `json:"etag,omitempty"`
17580	// ID - Resource ID.
17581	ID *string `json:"id,omitempty"`
17582}
17583
17584// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
17585func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
17586	objectMap := make(map[string]interface{})
17587	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
17588		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
17589	}
17590	if vcrc.Name != nil {
17591		objectMap["name"] = vcrc.Name
17592	}
17593	if vcrc.Etag != nil {
17594		objectMap["etag"] = vcrc.Etag
17595	}
17596	if vcrc.ID != nil {
17597		objectMap["id"] = vcrc.ID
17598	}
17599	return json.Marshal(objectMap)
17600}
17601
17602// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
17603func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
17604	var m map[string]*json.RawMessage
17605	err := json.Unmarshal(body, &m)
17606	if err != nil {
17607		return err
17608	}
17609	for k, v := range m {
17610		switch k {
17611		case "properties":
17612			if v != nil {
17613				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
17614				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
17615				if err != nil {
17616					return err
17617				}
17618				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
17619			}
17620		case "name":
17621			if v != nil {
17622				var name string
17623				err = json.Unmarshal(*v, &name)
17624				if err != nil {
17625					return err
17626				}
17627				vcrc.Name = &name
17628			}
17629		case "etag":
17630			if v != nil {
17631				var etag string
17632				err = json.Unmarshal(*v, &etag)
17633				if err != nil {
17634					return err
17635				}
17636				vcrc.Etag = &etag
17637			}
17638		case "id":
17639			if v != nil {
17640				var ID string
17641				err = json.Unmarshal(*v, &ID)
17642				if err != nil {
17643					return err
17644				}
17645				vcrc.ID = &ID
17646			}
17647		}
17648	}
17649
17650	return nil
17651}
17652
17653// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
17654type VpnClientRootCertificatePropertiesFormat struct {
17655	// PublicCertData - The certificate public data.
17656	PublicCertData *string `json:"publicCertData,omitempty"`
17657	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17658	ProvisioningState *string `json:"provisioningState,omitempty"`
17659}
17660
17661// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
17662func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17663	objectMap := make(map[string]interface{})
17664	if vcrcpf.PublicCertData != nil {
17665		objectMap["publicCertData"] = vcrcpf.PublicCertData
17666	}
17667	return json.Marshal(objectMap)
17668}
17669
17670// VpnDeviceScriptParameters vpn device configuration script generation parameters
17671type VpnDeviceScriptParameters struct {
17672	// Vendor - The vendor for the vpn device.
17673	Vendor *string `json:"vendor,omitempty"`
17674	// DeviceFamily - The device family for the vpn device.
17675	DeviceFamily *string `json:"deviceFamily,omitempty"`
17676	// FirmwareVersion - The firmware version for the vpn device.
17677	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
17678}
17679
17680// Watcher network watcher in a resource group.
17681type Watcher struct {
17682	autorest.Response `json:"-"`
17683	// Etag - A unique read-only string that changes whenever the resource is updated.
17684	Etag                     *string `json:"etag,omitempty"`
17685	*WatcherPropertiesFormat `json:"properties,omitempty"`
17686	// ID - Resource ID.
17687	ID *string `json:"id,omitempty"`
17688	// Name - READ-ONLY; Resource name.
17689	Name *string `json:"name,omitempty"`
17690	// Type - READ-ONLY; Resource type.
17691	Type *string `json:"type,omitempty"`
17692	// Location - Resource location.
17693	Location *string `json:"location,omitempty"`
17694	// Tags - Resource tags.
17695	Tags map[string]*string `json:"tags"`
17696}
17697
17698// MarshalJSON is the custom marshaler for Watcher.
17699func (w Watcher) MarshalJSON() ([]byte, error) {
17700	objectMap := make(map[string]interface{})
17701	if w.Etag != nil {
17702		objectMap["etag"] = w.Etag
17703	}
17704	if w.WatcherPropertiesFormat != nil {
17705		objectMap["properties"] = w.WatcherPropertiesFormat
17706	}
17707	if w.ID != nil {
17708		objectMap["id"] = w.ID
17709	}
17710	if w.Location != nil {
17711		objectMap["location"] = w.Location
17712	}
17713	if w.Tags != nil {
17714		objectMap["tags"] = w.Tags
17715	}
17716	return json.Marshal(objectMap)
17717}
17718
17719// UnmarshalJSON is the custom unmarshaler for Watcher struct.
17720func (w *Watcher) UnmarshalJSON(body []byte) error {
17721	var m map[string]*json.RawMessage
17722	err := json.Unmarshal(body, &m)
17723	if err != nil {
17724		return err
17725	}
17726	for k, v := range m {
17727		switch k {
17728		case "etag":
17729			if v != nil {
17730				var etag string
17731				err = json.Unmarshal(*v, &etag)
17732				if err != nil {
17733					return err
17734				}
17735				w.Etag = &etag
17736			}
17737		case "properties":
17738			if v != nil {
17739				var watcherPropertiesFormat WatcherPropertiesFormat
17740				err = json.Unmarshal(*v, &watcherPropertiesFormat)
17741				if err != nil {
17742					return err
17743				}
17744				w.WatcherPropertiesFormat = &watcherPropertiesFormat
17745			}
17746		case "id":
17747			if v != nil {
17748				var ID string
17749				err = json.Unmarshal(*v, &ID)
17750				if err != nil {
17751					return err
17752				}
17753				w.ID = &ID
17754			}
17755		case "name":
17756			if v != nil {
17757				var name string
17758				err = json.Unmarshal(*v, &name)
17759				if err != nil {
17760					return err
17761				}
17762				w.Name = &name
17763			}
17764		case "type":
17765			if v != nil {
17766				var typeVar string
17767				err = json.Unmarshal(*v, &typeVar)
17768				if err != nil {
17769					return err
17770				}
17771				w.Type = &typeVar
17772			}
17773		case "location":
17774			if v != nil {
17775				var location string
17776				err = json.Unmarshal(*v, &location)
17777				if err != nil {
17778					return err
17779				}
17780				w.Location = &location
17781			}
17782		case "tags":
17783			if v != nil {
17784				var tags map[string]*string
17785				err = json.Unmarshal(*v, &tags)
17786				if err != nil {
17787					return err
17788				}
17789				w.Tags = tags
17790			}
17791		}
17792	}
17793
17794	return nil
17795}
17796
17797// WatcherListResult list of network watcher resources.
17798type WatcherListResult struct {
17799	autorest.Response `json:"-"`
17800	Value             *[]Watcher `json:"value,omitempty"`
17801}
17802
17803// WatcherPropertiesFormat the network watcher properties.
17804type WatcherPropertiesFormat struct {
17805	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17806	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17807}
17808
17809// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
17810func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
17811	objectMap := make(map[string]interface{})
17812	return json.Marshal(objectMap)
17813}
17814
17815// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
17816// long-running operation.
17817type WatchersCheckConnectivityFuture struct {
17818	azure.FutureAPI
17819	// Result returns the result of the asynchronous operation.
17820	// If the operation has not completed it will return an error.
17821	Result func(WatchersClient) (ConnectivityInformation, error)
17822}
17823
17824// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17825func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
17826	var azFuture azure.Future
17827	if err := json.Unmarshal(body, &azFuture); err != nil {
17828		return err
17829	}
17830	future.FutureAPI = &azFuture
17831	future.Result = future.result
17832	return nil
17833}
17834
17835// result is the default implementation for WatchersCheckConnectivityFuture.Result.
17836func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
17837	var done bool
17838	done, err = future.DoneWithContext(context.Background(), client)
17839	if err != nil {
17840		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
17841		return
17842	}
17843	if !done {
17844		ci.Response.Response = future.Response()
17845		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
17846		return
17847	}
17848	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17849	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
17850		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
17851		if err != nil {
17852			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
17853		}
17854	}
17855	return
17856}
17857
17858// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17859// operation.
17860type WatchersDeleteFuture struct {
17861	azure.FutureAPI
17862	// Result returns the result of the asynchronous operation.
17863	// If the operation has not completed it will return an error.
17864	Result func(WatchersClient) (autorest.Response, error)
17865}
17866
17867// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17868func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
17869	var azFuture azure.Future
17870	if err := json.Unmarshal(body, &azFuture); err != nil {
17871		return err
17872	}
17873	future.FutureAPI = &azFuture
17874	future.Result = future.result
17875	return nil
17876}
17877
17878// result is the default implementation for WatchersDeleteFuture.Result.
17879func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
17880	var done bool
17881	done, err = future.DoneWithContext(context.Background(), client)
17882	if err != nil {
17883		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
17884		return
17885	}
17886	if !done {
17887		ar.Response = future.Response()
17888		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
17889		return
17890	}
17891	ar.Response = future.Response()
17892	return
17893}
17894
17895// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
17896// long-running operation.
17897type WatchersGetAzureReachabilityReportFuture struct {
17898	azure.FutureAPI
17899	// Result returns the result of the asynchronous operation.
17900	// If the operation has not completed it will return an error.
17901	Result func(WatchersClient) (AzureReachabilityReport, error)
17902}
17903
17904// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17905func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
17906	var azFuture azure.Future
17907	if err := json.Unmarshal(body, &azFuture); err != nil {
17908		return err
17909	}
17910	future.FutureAPI = &azFuture
17911	future.Result = future.result
17912	return nil
17913}
17914
17915// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
17916func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
17917	var done bool
17918	done, err = future.DoneWithContext(context.Background(), client)
17919	if err != nil {
17920		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
17921		return
17922	}
17923	if !done {
17924		arr.Response.Response = future.Response()
17925		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
17926		return
17927	}
17928	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17929	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
17930		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
17931		if err != nil {
17932			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
17933		}
17934	}
17935	return
17936}
17937
17938// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
17939// long-running operation.
17940type WatchersGetFlowLogStatusFuture struct {
17941	azure.FutureAPI
17942	// Result returns the result of the asynchronous operation.
17943	// If the operation has not completed it will return an error.
17944	Result func(WatchersClient) (FlowLogInformation, error)
17945}
17946
17947// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17948func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
17949	var azFuture azure.Future
17950	if err := json.Unmarshal(body, &azFuture); err != nil {
17951		return err
17952	}
17953	future.FutureAPI = &azFuture
17954	future.Result = future.result
17955	return nil
17956}
17957
17958// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
17959func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
17960	var done bool
17961	done, err = future.DoneWithContext(context.Background(), client)
17962	if err != nil {
17963		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
17964		return
17965	}
17966	if !done {
17967		fli.Response.Response = future.Response()
17968		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
17969		return
17970	}
17971	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17972	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
17973		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
17974		if err != nil {
17975			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
17976		}
17977	}
17978	return
17979}
17980
17981// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
17982// operation.
17983type WatchersGetNextHopFuture struct {
17984	azure.FutureAPI
17985	// Result returns the result of the asynchronous operation.
17986	// If the operation has not completed it will return an error.
17987	Result func(WatchersClient) (NextHopResult, error)
17988}
17989
17990// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17991func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
17992	var azFuture azure.Future
17993	if err := json.Unmarshal(body, &azFuture); err != nil {
17994		return err
17995	}
17996	future.FutureAPI = &azFuture
17997	future.Result = future.result
17998	return nil
17999}
18000
18001// result is the default implementation for WatchersGetNextHopFuture.Result.
18002func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
18003	var done bool
18004	done, err = future.DoneWithContext(context.Background(), client)
18005	if err != nil {
18006		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
18007		return
18008	}
18009	if !done {
18010		nhr.Response.Response = future.Response()
18011		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
18012		return
18013	}
18014	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18015	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
18016		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
18017		if err != nil {
18018			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
18019		}
18020	}
18021	return
18022}
18023
18024// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
18025// long-running operation.
18026type WatchersGetTroubleshootingFuture struct {
18027	azure.FutureAPI
18028	// Result returns the result of the asynchronous operation.
18029	// If the operation has not completed it will return an error.
18030	Result func(WatchersClient) (TroubleshootingResult, error)
18031}
18032
18033// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18034func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
18035	var azFuture azure.Future
18036	if err := json.Unmarshal(body, &azFuture); err != nil {
18037		return err
18038	}
18039	future.FutureAPI = &azFuture
18040	future.Result = future.result
18041	return nil
18042}
18043
18044// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
18045func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18046	var done bool
18047	done, err = future.DoneWithContext(context.Background(), client)
18048	if err != nil {
18049		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
18050		return
18051	}
18052	if !done {
18053		tr.Response.Response = future.Response()
18054		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
18055		return
18056	}
18057	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18058	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18059		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
18060		if err != nil {
18061			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
18062		}
18063	}
18064	return
18065}
18066
18067// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
18068// long-running operation.
18069type WatchersGetTroubleshootingResultFuture struct {
18070	azure.FutureAPI
18071	// Result returns the result of the asynchronous operation.
18072	// If the operation has not completed it will return an error.
18073	Result func(WatchersClient) (TroubleshootingResult, error)
18074}
18075
18076// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18077func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
18078	var azFuture azure.Future
18079	if err := json.Unmarshal(body, &azFuture); err != nil {
18080		return err
18081	}
18082	future.FutureAPI = &azFuture
18083	future.Result = future.result
18084	return nil
18085}
18086
18087// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
18088func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18089	var done bool
18090	done, err = future.DoneWithContext(context.Background(), client)
18091	if err != nil {
18092		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
18093		return
18094	}
18095	if !done {
18096		tr.Response.Response = future.Response()
18097		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
18098		return
18099	}
18100	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18101	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18102		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
18103		if err != nil {
18104			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
18105		}
18106	}
18107	return
18108}
18109
18110// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
18111// long-running operation.
18112type WatchersGetVMSecurityRulesFuture struct {
18113	azure.FutureAPI
18114	// Result returns the result of the asynchronous operation.
18115	// If the operation has not completed it will return an error.
18116	Result func(WatchersClient) (SecurityGroupViewResult, error)
18117}
18118
18119// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18120func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
18121	var azFuture azure.Future
18122	if err := json.Unmarshal(body, &azFuture); err != nil {
18123		return err
18124	}
18125	future.FutureAPI = &azFuture
18126	future.Result = future.result
18127	return nil
18128}
18129
18130// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
18131func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
18132	var done bool
18133	done, err = future.DoneWithContext(context.Background(), client)
18134	if err != nil {
18135		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
18136		return
18137	}
18138	if !done {
18139		sgvr.Response.Response = future.Response()
18140		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
18141		return
18142	}
18143	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18144	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
18145		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
18146		if err != nil {
18147			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
18148		}
18149	}
18150	return
18151}
18152
18153// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
18154// long-running operation.
18155type WatchersListAvailableProvidersFuture struct {
18156	azure.FutureAPI
18157	// Result returns the result of the asynchronous operation.
18158	// If the operation has not completed it will return an error.
18159	Result func(WatchersClient) (AvailableProvidersList, error)
18160}
18161
18162// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18163func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
18164	var azFuture azure.Future
18165	if err := json.Unmarshal(body, &azFuture); err != nil {
18166		return err
18167	}
18168	future.FutureAPI = &azFuture
18169	future.Result = future.result
18170	return nil
18171}
18172
18173// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
18174func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
18175	var done bool
18176	done, err = future.DoneWithContext(context.Background(), client)
18177	if err != nil {
18178		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
18179		return
18180	}
18181	if !done {
18182		apl.Response.Response = future.Response()
18183		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
18184		return
18185	}
18186	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18187	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
18188		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
18189		if err != nil {
18190			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
18191		}
18192	}
18193	return
18194}
18195
18196// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
18197// long-running operation.
18198type WatchersSetFlowLogConfigurationFuture struct {
18199	azure.FutureAPI
18200	// Result returns the result of the asynchronous operation.
18201	// If the operation has not completed it will return an error.
18202	Result func(WatchersClient) (FlowLogInformation, error)
18203}
18204
18205// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18206func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
18207	var azFuture azure.Future
18208	if err := json.Unmarshal(body, &azFuture); err != nil {
18209		return err
18210	}
18211	future.FutureAPI = &azFuture
18212	future.Result = future.result
18213	return nil
18214}
18215
18216// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
18217func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
18218	var done bool
18219	done, err = future.DoneWithContext(context.Background(), client)
18220	if err != nil {
18221		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
18222		return
18223	}
18224	if !done {
18225		fli.Response.Response = future.Response()
18226		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
18227		return
18228	}
18229	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18230	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
18231		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
18232		if err != nil {
18233			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
18234		}
18235	}
18236	return
18237}
18238
18239// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
18240// operation.
18241type WatchersVerifyIPFlowFuture struct {
18242	azure.FutureAPI
18243	// Result returns the result of the asynchronous operation.
18244	// If the operation has not completed it will return an error.
18245	Result func(WatchersClient) (VerificationIPFlowResult, error)
18246}
18247
18248// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18249func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
18250	var azFuture azure.Future
18251	if err := json.Unmarshal(body, &azFuture); err != nil {
18252		return err
18253	}
18254	future.FutureAPI = &azFuture
18255	future.Result = future.result
18256	return nil
18257}
18258
18259// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
18260func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
18261	var done bool
18262	done, err = future.DoneWithContext(context.Background(), client)
18263	if err != nil {
18264		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
18265		return
18266	}
18267	if !done {
18268		vifr.Response.Response = future.Response()
18269		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
18270		return
18271	}
18272	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18273	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
18274		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
18275		if err != nil {
18276			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
18277		}
18278	}
18279	return
18280}
18281