1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-01-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response                   `json:"-"`
33	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
34	// Etag - A unique read-only string that changes whenever the resource is updated.
35	Etag *string `json:"etag,omitempty"`
36	// ID - Resource ID.
37	ID *string `json:"id,omitempty"`
38	// Name - READ-ONLY; Resource name.
39	Name *string `json:"name,omitempty"`
40	// Type - READ-ONLY; Resource type.
41	Type *string `json:"type,omitempty"`
42	// Location - Resource location.
43	Location *string `json:"location,omitempty"`
44	// Tags - Resource tags.
45	Tags map[string]*string `json:"tags"`
46}
47
48// MarshalJSON is the custom marshaler for ApplicationGateway.
49func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
50	objectMap := make(map[string]interface{})
51	if ag.ApplicationGatewayPropertiesFormat != nil {
52		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
53	}
54	if ag.Etag != nil {
55		objectMap["etag"] = ag.Etag
56	}
57	if ag.ID != nil {
58		objectMap["id"] = ag.ID
59	}
60	if ag.Location != nil {
61		objectMap["location"] = ag.Location
62	}
63	if ag.Tags != nil {
64		objectMap["tags"] = ag.Tags
65	}
66	return json.Marshal(objectMap)
67}
68
69// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
70func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
71	var m map[string]*json.RawMessage
72	err := json.Unmarshal(body, &m)
73	if err != nil {
74		return err
75	}
76	for k, v := range m {
77		switch k {
78		case "properties":
79			if v != nil {
80				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
81				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
82				if err != nil {
83					return err
84				}
85				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
86			}
87		case "etag":
88			if v != nil {
89				var etag string
90				err = json.Unmarshal(*v, &etag)
91				if err != nil {
92					return err
93				}
94				ag.Etag = &etag
95			}
96		case "id":
97			if v != nil {
98				var ID string
99				err = json.Unmarshal(*v, &ID)
100				if err != nil {
101					return err
102				}
103				ag.ID = &ID
104			}
105		case "name":
106			if v != nil {
107				var name string
108				err = json.Unmarshal(*v, &name)
109				if err != nil {
110					return err
111				}
112				ag.Name = &name
113			}
114		case "type":
115			if v != nil {
116				var typeVar string
117				err = json.Unmarshal(*v, &typeVar)
118				if err != nil {
119					return err
120				}
121				ag.Type = &typeVar
122			}
123		case "location":
124			if v != nil {
125				var location string
126				err = json.Unmarshal(*v, &location)
127				if err != nil {
128					return err
129				}
130				ag.Location = &location
131			}
132		case "tags":
133			if v != nil {
134				var tags map[string]*string
135				err = json.Unmarshal(*v, &tags)
136				if err != nil {
137					return err
138				}
139				ag.Tags = tags
140			}
141		}
142	}
143
144	return nil
145}
146
147// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
148type ApplicationGatewayAuthenticationCertificate struct {
149	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
150	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
151	Name *string `json:"name,omitempty"`
152	// Etag - A unique read-only string that changes whenever the resource is updated.
153	Etag *string `json:"etag,omitempty"`
154	// Type - Type of the resource.
155	Type *string `json:"type,omitempty"`
156	// ID - Resource ID.
157	ID *string `json:"id,omitempty"`
158}
159
160// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
161func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
162	objectMap := make(map[string]interface{})
163	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
164		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
165	}
166	if agac.Name != nil {
167		objectMap["name"] = agac.Name
168	}
169	if agac.Etag != nil {
170		objectMap["etag"] = agac.Etag
171	}
172	if agac.Type != nil {
173		objectMap["type"] = agac.Type
174	}
175	if agac.ID != nil {
176		objectMap["id"] = agac.ID
177	}
178	return json.Marshal(objectMap)
179}
180
181// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
182func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
183	var m map[string]*json.RawMessage
184	err := json.Unmarshal(body, &m)
185	if err != nil {
186		return err
187	}
188	for k, v := range m {
189		switch k {
190		case "properties":
191			if v != nil {
192				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
193				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
194				if err != nil {
195					return err
196				}
197				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
198			}
199		case "name":
200			if v != nil {
201				var name string
202				err = json.Unmarshal(*v, &name)
203				if err != nil {
204					return err
205				}
206				agac.Name = &name
207			}
208		case "etag":
209			if v != nil {
210				var etag string
211				err = json.Unmarshal(*v, &etag)
212				if err != nil {
213					return err
214				}
215				agac.Etag = &etag
216			}
217		case "type":
218			if v != nil {
219				var typeVar string
220				err = json.Unmarshal(*v, &typeVar)
221				if err != nil {
222					return err
223				}
224				agac.Type = &typeVar
225			}
226		case "id":
227			if v != nil {
228				var ID string
229				err = json.Unmarshal(*v, &ID)
230				if err != nil {
231					return err
232				}
233				agac.ID = &ID
234			}
235		}
236	}
237
238	return nil
239}
240
241// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
242// application gateway.
243type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
244	// Data - Certificate public data.
245	Data *string `json:"data,omitempty"`
246	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
247	ProvisioningState *string `json:"provisioningState,omitempty"`
248}
249
250// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
251// call.
252type ApplicationGatewayAvailableSslOptions struct {
253	autorest.Response                                      `json:"-"`
254	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
255	// ID - Resource ID.
256	ID *string `json:"id,omitempty"`
257	// Name - READ-ONLY; Resource name.
258	Name *string `json:"name,omitempty"`
259	// Type - READ-ONLY; Resource type.
260	Type *string `json:"type,omitempty"`
261	// Location - Resource location.
262	Location *string `json:"location,omitempty"`
263	// Tags - Resource tags.
264	Tags map[string]*string `json:"tags"`
265}
266
267// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
268func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
269	objectMap := make(map[string]interface{})
270	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
271		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
272	}
273	if agaso.ID != nil {
274		objectMap["id"] = agaso.ID
275	}
276	if agaso.Location != nil {
277		objectMap["location"] = agaso.Location
278	}
279	if agaso.Tags != nil {
280		objectMap["tags"] = agaso.Tags
281	}
282	return json.Marshal(objectMap)
283}
284
285// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
286func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
287	var m map[string]*json.RawMessage
288	err := json.Unmarshal(body, &m)
289	if err != nil {
290		return err
291	}
292	for k, v := range m {
293		switch k {
294		case "properties":
295			if v != nil {
296				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
297				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
298				if err != nil {
299					return err
300				}
301				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
302			}
303		case "id":
304			if v != nil {
305				var ID string
306				err = json.Unmarshal(*v, &ID)
307				if err != nil {
308					return err
309				}
310				agaso.ID = &ID
311			}
312		case "name":
313			if v != nil {
314				var name string
315				err = json.Unmarshal(*v, &name)
316				if err != nil {
317					return err
318				}
319				agaso.Name = &name
320			}
321		case "type":
322			if v != nil {
323				var typeVar string
324				err = json.Unmarshal(*v, &typeVar)
325				if err != nil {
326					return err
327				}
328				agaso.Type = &typeVar
329			}
330		case "location":
331			if v != nil {
332				var location string
333				err = json.Unmarshal(*v, &location)
334				if err != nil {
335					return err
336				}
337				agaso.Location = &location
338			}
339		case "tags":
340			if v != nil {
341				var tags map[string]*string
342				err = json.Unmarshal(*v, &tags)
343				if err != nil {
344					return err
345				}
346				agaso.Tags = tags
347			}
348		}
349	}
350
351	return nil
352}
353
354// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
355// ApplicationGatewayAvailableSslOptions
356type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
357	// PredefinedPolicies - List of available Ssl predefined policy.
358	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
359	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
360	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
361	// AvailableCipherSuites - List of available Ssl cipher suites.
362	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
363	// AvailableProtocols - List of available Ssl protocols.
364	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
365}
366
367// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
368// service call.
369type ApplicationGatewayAvailableSslPredefinedPolicies struct {
370	autorest.Response `json:"-"`
371	// Value - List of available Ssl predefined policy.
372	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
373	// NextLink - URL to get the next set of results.
374	NextLink *string `json:"nextLink,omitempty"`
375}
376
377// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
378// ApplicationGatewaySslPredefinedPolicy values.
379type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
380	i    int
381	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
382}
383
384// NextWithContext advances to the next value.  If there was an error making
385// the request the iterator does not advance and the error is returned.
386func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
387	if tracing.IsEnabled() {
388		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
389		defer func() {
390			sc := -1
391			if iter.Response().Response.Response != nil {
392				sc = iter.Response().Response.Response.StatusCode
393			}
394			tracing.EndSpan(ctx, sc, err)
395		}()
396	}
397	iter.i++
398	if iter.i < len(iter.page.Values()) {
399		return nil
400	}
401	err = iter.page.NextWithContext(ctx)
402	if err != nil {
403		iter.i--
404		return err
405	}
406	iter.i = 0
407	return nil
408}
409
410// Next advances to the next value.  If there was an error making
411// the request the iterator does not advance and the error is returned.
412// Deprecated: Use NextWithContext() instead.
413func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
414	return iter.NextWithContext(context.Background())
415}
416
417// NotDone returns true if the enumeration should be started or is not yet complete.
418func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
420}
421
422// Response returns the raw server response from the last page request.
423func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
424	return iter.page.Response()
425}
426
427// Value returns the current value or a zero-initialized value if the
428// iterator has advanced beyond the end of the collection.
429func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
430	if !iter.page.NotDone() {
431		return ApplicationGatewaySslPredefinedPolicy{}
432	}
433	return iter.page.Values()[iter.i]
434}
435
436// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
437func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
438	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
439}
440
441// IsEmpty returns true if the ListResult contains no values.
442func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
443	return agaspp.Value == nil || len(*agaspp.Value) == 0
444}
445
446// hasNextLink returns true if the NextLink is not empty.
447func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
448	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
449}
450
451// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
452// It returns nil if no more results exist.
453func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
454	if !agaspp.hasNextLink() {
455		return nil, nil
456	}
457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
458		autorest.AsJSON(),
459		autorest.AsGet(),
460		autorest.WithBaseURL(to.String(agaspp.NextLink)))
461}
462
463// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
464// ApplicationGatewaySslPredefinedPolicy values.
465type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
466	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
467	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
468}
469
470// NextWithContext advances to the next page of values.  If there was an error making
471// the request the page does not advance and the error is returned.
472func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
473	if tracing.IsEnabled() {
474		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
475		defer func() {
476			sc := -1
477			if page.Response().Response.Response != nil {
478				sc = page.Response().Response.Response.StatusCode
479			}
480			tracing.EndSpan(ctx, sc, err)
481		}()
482	}
483	for {
484		next, err := page.fn(ctx, page.agaspp)
485		if err != nil {
486			return err
487		}
488		page.agaspp = next
489		if !next.hasNextLink() || !next.IsEmpty() {
490			break
491		}
492	}
493	return nil
494}
495
496// Next advances to the next page of values.  If there was an error making
497// the request the page does not advance and the error is returned.
498// Deprecated: Use NextWithContext() instead.
499func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
500	return page.NextWithContext(context.Background())
501}
502
503// NotDone returns true if the page enumeration should be started or is not yet complete.
504func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
505	return !page.agaspp.IsEmpty()
506}
507
508// Response returns the raw server response from the last page request.
509func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
510	return page.agaspp
511}
512
513// Values returns the slice of values for the current page or nil if there are no values.
514func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
515	if page.agaspp.IsEmpty() {
516		return nil
517	}
518	return *page.agaspp.Value
519}
520
521// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
522func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
523	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
524		fn:     getNextPage,
525		agaspp: cur,
526	}
527}
528
529// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
530// service call.
531type ApplicationGatewayAvailableWafRuleSetsResult struct {
532	autorest.Response `json:"-"`
533	// Value - The list of application gateway rule sets.
534	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
535}
536
537// ApplicationGatewayBackendAddress backend address of an application gateway.
538type ApplicationGatewayBackendAddress struct {
539	// Fqdn - Fully qualified domain name (FQDN).
540	Fqdn *string `json:"fqdn,omitempty"`
541	// IPAddress - IP address
542	IPAddress *string `json:"ipAddress,omitempty"`
543}
544
545// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
546type ApplicationGatewayBackendAddressPool struct {
547	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
548	// Name - Resource that is unique within a resource group. This name can be used to access the resource.
549	Name *string `json:"name,omitempty"`
550	// Etag - A unique read-only string that changes whenever the resource is updated.
551	Etag *string `json:"etag,omitempty"`
552	// Type - Type of the resource.
553	Type *string `json:"type,omitempty"`
554	// ID - Resource ID.
555	ID *string `json:"id,omitempty"`
556}
557
558// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
559func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
560	objectMap := make(map[string]interface{})
561	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
562		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
563	}
564	if agbap.Name != nil {
565		objectMap["name"] = agbap.Name
566	}
567	if agbap.Etag != nil {
568		objectMap["etag"] = agbap.Etag
569	}
570	if agbap.Type != nil {
571		objectMap["type"] = agbap.Type
572	}
573	if agbap.ID != nil {
574		objectMap["id"] = agbap.ID
575	}
576	return json.Marshal(objectMap)
577}
578
579// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
580func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
581	var m map[string]*json.RawMessage
582	err := json.Unmarshal(body, &m)
583	if err != nil {
584		return err
585	}
586	for k, v := range m {
587		switch k {
588		case "properties":
589			if v != nil {
590				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
591				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
592				if err != nil {
593					return err
594				}
595				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
596			}
597		case "name":
598			if v != nil {
599				var name string
600				err = json.Unmarshal(*v, &name)
601				if err != nil {
602					return err
603				}
604				agbap.Name = &name
605			}
606		case "etag":
607			if v != nil {
608				var etag string
609				err = json.Unmarshal(*v, &etag)
610				if err != nil {
611					return err
612				}
613				agbap.Etag = &etag
614			}
615		case "type":
616			if v != nil {
617				var typeVar string
618				err = json.Unmarshal(*v, &typeVar)
619				if err != nil {
620					return err
621				}
622				agbap.Type = &typeVar
623			}
624		case "id":
625			if v != nil {
626				var ID string
627				err = json.Unmarshal(*v, &ID)
628				if err != nil {
629					return err
630				}
631				agbap.ID = &ID
632			}
633		}
634	}
635
636	return nil
637}
638
639// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
640// application gateway.
641type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
642	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
643	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
644	// BackendAddresses - Backend addresses
645	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
646	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
647	ProvisioningState *string `json:"provisioningState,omitempty"`
648}
649
650// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
651type ApplicationGatewayBackendHealth struct {
652	autorest.Response   `json:"-"`
653	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
654}
655
656// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
657type ApplicationGatewayBackendHealthHTTPSettings struct {
658	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
659	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
660	// Servers - List of ApplicationGatewayBackendHealthServer resources.
661	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
662}
663
664// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
665type ApplicationGatewayBackendHealthPool struct {
666	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
667	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
668	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
669	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
670}
671
672// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
673type ApplicationGatewayBackendHealthServer struct {
674	// Address - IP address or FQDN of backend server.
675	Address *string `json:"address,omitempty"`
676	// IPConfiguration - Reference of IP configuration of backend server.
677	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
678	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
679	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
680}
681
682// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
683type ApplicationGatewayBackendHTTPSettings struct {
684	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
685	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
686	Name *string `json:"name,omitempty"`
687	// Etag - A unique read-only string that changes whenever the resource is updated.
688	Etag *string `json:"etag,omitempty"`
689	// Type - Type of the resource.
690	Type *string `json:"type,omitempty"`
691	// ID - Resource ID.
692	ID *string `json:"id,omitempty"`
693}
694
695// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
696func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
697	objectMap := make(map[string]interface{})
698	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
699		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
700	}
701	if agbhs.Name != nil {
702		objectMap["name"] = agbhs.Name
703	}
704	if agbhs.Etag != nil {
705		objectMap["etag"] = agbhs.Etag
706	}
707	if agbhs.Type != nil {
708		objectMap["type"] = agbhs.Type
709	}
710	if agbhs.ID != nil {
711		objectMap["id"] = agbhs.ID
712	}
713	return json.Marshal(objectMap)
714}
715
716// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
717func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
718	var m map[string]*json.RawMessage
719	err := json.Unmarshal(body, &m)
720	if err != nil {
721		return err
722	}
723	for k, v := range m {
724		switch k {
725		case "properties":
726			if v != nil {
727				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
728				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
729				if err != nil {
730					return err
731				}
732				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
733			}
734		case "name":
735			if v != nil {
736				var name string
737				err = json.Unmarshal(*v, &name)
738				if err != nil {
739					return err
740				}
741				agbhs.Name = &name
742			}
743		case "etag":
744			if v != nil {
745				var etag string
746				err = json.Unmarshal(*v, &etag)
747				if err != nil {
748					return err
749				}
750				agbhs.Etag = &etag
751			}
752		case "type":
753			if v != nil {
754				var typeVar string
755				err = json.Unmarshal(*v, &typeVar)
756				if err != nil {
757					return err
758				}
759				agbhs.Type = &typeVar
760			}
761		case "id":
762			if v != nil {
763				var ID string
764				err = json.Unmarshal(*v, &ID)
765				if err != nil {
766					return err
767				}
768				agbhs.ID = &ID
769			}
770		}
771	}
772
773	return nil
774}
775
776// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
777// application gateway.
778type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
779	// Port - Port
780	Port *int32 `json:"port,omitempty"`
781	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
782	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
783	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
784	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
785	// RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
786	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
787	// Probe - Probe resource of an application gateway.
788	Probe *SubResource `json:"probe,omitempty"`
789	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
790	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
791	// ConnectionDraining - Connection draining of the backend http settings resource.
792	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
793	// HostName - Host header to be sent to the backend servers.
794	HostName *string `json:"hostName,omitempty"`
795	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
796	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
797	// AffinityCookieName - Cookie name to use for the affinity cookie.
798	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
799	// ProbeEnabled - Whether the probe is enabled. Default value is false.
800	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
801	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
802	Path *string `json:"path,omitempty"`
803	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
804	ProvisioningState *string `json:"provisioningState,omitempty"`
805}
806
807// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
808// be active for a specified time after the backend server got removed from the configuration.
809type ApplicationGatewayConnectionDraining struct {
810	// Enabled - Whether connection draining is enabled or not.
811	Enabled *bool `json:"enabled,omitempty"`
812	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
813	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
814}
815
816// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
817// rule group.
818type ApplicationGatewayFirewallDisabledRuleGroup struct {
819	// RuleGroupName - The name of the rule group that will be disabled.
820	RuleGroupName *string `json:"ruleGroupName,omitempty"`
821	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
822	Rules *[]int32 `json:"rules,omitempty"`
823}
824
825// ApplicationGatewayFirewallRule a web application firewall rule.
826type ApplicationGatewayFirewallRule struct {
827	// RuleID - The identifier of the web application firewall rule.
828	RuleID *int32 `json:"ruleId,omitempty"`
829	// Description - The description of the web application firewall rule.
830	Description *string `json:"description,omitempty"`
831}
832
833// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
834type ApplicationGatewayFirewallRuleGroup struct {
835	// RuleGroupName - The name of the web application firewall rule group.
836	RuleGroupName *string `json:"ruleGroupName,omitempty"`
837	// Description - The description of the web application firewall rule group.
838	Description *string `json:"description,omitempty"`
839	// Rules - The rules of the web application firewall rule group.
840	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
841}
842
843// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
844type ApplicationGatewayFirewallRuleSet struct {
845	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
846	// ID - Resource ID.
847	ID *string `json:"id,omitempty"`
848	// Name - READ-ONLY; Resource name.
849	Name *string `json:"name,omitempty"`
850	// Type - READ-ONLY; Resource type.
851	Type *string `json:"type,omitempty"`
852	// Location - Resource location.
853	Location *string `json:"location,omitempty"`
854	// Tags - Resource tags.
855	Tags map[string]*string `json:"tags"`
856}
857
858// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
859func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
860	objectMap := make(map[string]interface{})
861	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
862		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
863	}
864	if agfrs.ID != nil {
865		objectMap["id"] = agfrs.ID
866	}
867	if agfrs.Location != nil {
868		objectMap["location"] = agfrs.Location
869	}
870	if agfrs.Tags != nil {
871		objectMap["tags"] = agfrs.Tags
872	}
873	return json.Marshal(objectMap)
874}
875
876// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
877func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
878	var m map[string]*json.RawMessage
879	err := json.Unmarshal(body, &m)
880	if err != nil {
881		return err
882	}
883	for k, v := range m {
884		switch k {
885		case "properties":
886			if v != nil {
887				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
888				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
889				if err != nil {
890					return err
891				}
892				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
893			}
894		case "id":
895			if v != nil {
896				var ID string
897				err = json.Unmarshal(*v, &ID)
898				if err != nil {
899					return err
900				}
901				agfrs.ID = &ID
902			}
903		case "name":
904			if v != nil {
905				var name string
906				err = json.Unmarshal(*v, &name)
907				if err != nil {
908					return err
909				}
910				agfrs.Name = &name
911			}
912		case "type":
913			if v != nil {
914				var typeVar string
915				err = json.Unmarshal(*v, &typeVar)
916				if err != nil {
917					return err
918				}
919				agfrs.Type = &typeVar
920			}
921		case "location":
922			if v != nil {
923				var location string
924				err = json.Unmarshal(*v, &location)
925				if err != nil {
926					return err
927				}
928				agfrs.Location = &location
929			}
930		case "tags":
931			if v != nil {
932				var tags map[string]*string
933				err = json.Unmarshal(*v, &tags)
934				if err != nil {
935					return err
936				}
937				agfrs.Tags = tags
938			}
939		}
940	}
941
942	return nil
943}
944
945// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
946type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
947	// ProvisioningState - The provisioning state of the web application firewall rule set.
948	ProvisioningState *string `json:"provisioningState,omitempty"`
949	// RuleSetType - The type of the web application firewall rule set.
950	RuleSetType *string `json:"ruleSetType,omitempty"`
951	// RuleSetVersion - The version of the web application firewall rule set type.
952	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
953	// RuleGroups - The rule groups of the web application firewall rule set.
954	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
955}
956
957// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
958type ApplicationGatewayFrontendIPConfiguration struct {
959	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
960	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
961	Name *string `json:"name,omitempty"`
962	// Etag - A unique read-only string that changes whenever the resource is updated.
963	Etag *string `json:"etag,omitempty"`
964	// Type - Type of the resource.
965	Type *string `json:"type,omitempty"`
966	// ID - Resource ID.
967	ID *string `json:"id,omitempty"`
968}
969
970// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
971func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
972	objectMap := make(map[string]interface{})
973	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
974		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
975	}
976	if agfic.Name != nil {
977		objectMap["name"] = agfic.Name
978	}
979	if agfic.Etag != nil {
980		objectMap["etag"] = agfic.Etag
981	}
982	if agfic.Type != nil {
983		objectMap["type"] = agfic.Type
984	}
985	if agfic.ID != nil {
986		objectMap["id"] = agfic.ID
987	}
988	return json.Marshal(objectMap)
989}
990
991// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
992func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
993	var m map[string]*json.RawMessage
994	err := json.Unmarshal(body, &m)
995	if err != nil {
996		return err
997	}
998	for k, v := range m {
999		switch k {
1000		case "properties":
1001			if v != nil {
1002				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1003				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1004				if err != nil {
1005					return err
1006				}
1007				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1008			}
1009		case "name":
1010			if v != nil {
1011				var name string
1012				err = json.Unmarshal(*v, &name)
1013				if err != nil {
1014					return err
1015				}
1016				agfic.Name = &name
1017			}
1018		case "etag":
1019			if v != nil {
1020				var etag string
1021				err = json.Unmarshal(*v, &etag)
1022				if err != nil {
1023					return err
1024				}
1025				agfic.Etag = &etag
1026			}
1027		case "type":
1028			if v != nil {
1029				var typeVar string
1030				err = json.Unmarshal(*v, &typeVar)
1031				if err != nil {
1032					return err
1033				}
1034				agfic.Type = &typeVar
1035			}
1036		case "id":
1037			if v != nil {
1038				var ID string
1039				err = json.Unmarshal(*v, &ID)
1040				if err != nil {
1041					return err
1042				}
1043				agfic.ID = &ID
1044			}
1045		}
1046	}
1047
1048	return nil
1049}
1050
1051// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1052// application gateway.
1053type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1054	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1055	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1056	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1057	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1058	// Subnet - Reference of the subnet resource.
1059	Subnet *SubResource `json:"subnet,omitempty"`
1060	// PublicIPAddress - Reference of the PublicIP resource.
1061	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1062	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1063	ProvisioningState *string `json:"provisioningState,omitempty"`
1064}
1065
1066// ApplicationGatewayFrontendPort frontend port of an application gateway.
1067type ApplicationGatewayFrontendPort struct {
1068	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1069	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1070	Name *string `json:"name,omitempty"`
1071	// Etag - A unique read-only string that changes whenever the resource is updated.
1072	Etag *string `json:"etag,omitempty"`
1073	// Type - Type of the resource.
1074	Type *string `json:"type,omitempty"`
1075	// ID - Resource ID.
1076	ID *string `json:"id,omitempty"`
1077}
1078
1079// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1080func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1081	objectMap := make(map[string]interface{})
1082	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1083		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1084	}
1085	if agfp.Name != nil {
1086		objectMap["name"] = agfp.Name
1087	}
1088	if agfp.Etag != nil {
1089		objectMap["etag"] = agfp.Etag
1090	}
1091	if agfp.Type != nil {
1092		objectMap["type"] = agfp.Type
1093	}
1094	if agfp.ID != nil {
1095		objectMap["id"] = agfp.ID
1096	}
1097	return json.Marshal(objectMap)
1098}
1099
1100// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1101func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1102	var m map[string]*json.RawMessage
1103	err := json.Unmarshal(body, &m)
1104	if err != nil {
1105		return err
1106	}
1107	for k, v := range m {
1108		switch k {
1109		case "properties":
1110			if v != nil {
1111				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1112				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1113				if err != nil {
1114					return err
1115				}
1116				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1117			}
1118		case "name":
1119			if v != nil {
1120				var name string
1121				err = json.Unmarshal(*v, &name)
1122				if err != nil {
1123					return err
1124				}
1125				agfp.Name = &name
1126			}
1127		case "etag":
1128			if v != nil {
1129				var etag string
1130				err = json.Unmarshal(*v, &etag)
1131				if err != nil {
1132					return err
1133				}
1134				agfp.Etag = &etag
1135			}
1136		case "type":
1137			if v != nil {
1138				var typeVar string
1139				err = json.Unmarshal(*v, &typeVar)
1140				if err != nil {
1141					return err
1142				}
1143				agfp.Type = &typeVar
1144			}
1145		case "id":
1146			if v != nil {
1147				var ID string
1148				err = json.Unmarshal(*v, &ID)
1149				if err != nil {
1150					return err
1151				}
1152				agfp.ID = &ID
1153			}
1154		}
1155	}
1156
1157	return nil
1158}
1159
1160// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1161type ApplicationGatewayFrontendPortPropertiesFormat struct {
1162	// Port - Frontend port
1163	Port *int32 `json:"port,omitempty"`
1164	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1165	ProvisioningState *string `json:"provisioningState,omitempty"`
1166}
1167
1168// ApplicationGatewayHTTPListener http listener of an application gateway.
1169type ApplicationGatewayHTTPListener struct {
1170	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1171	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1172	Name *string `json:"name,omitempty"`
1173	// Etag - A unique read-only string that changes whenever the resource is updated.
1174	Etag *string `json:"etag,omitempty"`
1175	// Type - Type of the resource.
1176	Type *string `json:"type,omitempty"`
1177	// ID - Resource ID.
1178	ID *string `json:"id,omitempty"`
1179}
1180
1181// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1182func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1183	objectMap := make(map[string]interface{})
1184	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1185		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1186	}
1187	if aghl.Name != nil {
1188		objectMap["name"] = aghl.Name
1189	}
1190	if aghl.Etag != nil {
1191		objectMap["etag"] = aghl.Etag
1192	}
1193	if aghl.Type != nil {
1194		objectMap["type"] = aghl.Type
1195	}
1196	if aghl.ID != nil {
1197		objectMap["id"] = aghl.ID
1198	}
1199	return json.Marshal(objectMap)
1200}
1201
1202// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1203func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1204	var m map[string]*json.RawMessage
1205	err := json.Unmarshal(body, &m)
1206	if err != nil {
1207		return err
1208	}
1209	for k, v := range m {
1210		switch k {
1211		case "properties":
1212			if v != nil {
1213				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1214				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1215				if err != nil {
1216					return err
1217				}
1218				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1219			}
1220		case "name":
1221			if v != nil {
1222				var name string
1223				err = json.Unmarshal(*v, &name)
1224				if err != nil {
1225					return err
1226				}
1227				aghl.Name = &name
1228			}
1229		case "etag":
1230			if v != nil {
1231				var etag string
1232				err = json.Unmarshal(*v, &etag)
1233				if err != nil {
1234					return err
1235				}
1236				aghl.Etag = &etag
1237			}
1238		case "type":
1239			if v != nil {
1240				var typeVar string
1241				err = json.Unmarshal(*v, &typeVar)
1242				if err != nil {
1243					return err
1244				}
1245				aghl.Type = &typeVar
1246			}
1247		case "id":
1248			if v != nil {
1249				var ID string
1250				err = json.Unmarshal(*v, &ID)
1251				if err != nil {
1252					return err
1253				}
1254				aghl.ID = &ID
1255			}
1256		}
1257	}
1258
1259	return nil
1260}
1261
1262// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1263type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1264	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1265	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1266	// FrontendPort - Frontend port resource of an application gateway.
1267	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1268	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1269	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1270	// HostName - Host name of HTTP listener.
1271	HostName *string `json:"hostName,omitempty"`
1272	// SslCertificate - SSL certificate resource of an application gateway.
1273	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1274	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1275	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1276	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1277	ProvisioningState *string `json:"provisioningState,omitempty"`
1278}
1279
1280// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1281// private IP configuration is allowed.
1282type ApplicationGatewayIPConfiguration struct {
1283	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1284	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1285	Name *string `json:"name,omitempty"`
1286	// Etag - A unique read-only string that changes whenever the resource is updated.
1287	Etag *string `json:"etag,omitempty"`
1288	// Type - Type of the resource.
1289	Type *string `json:"type,omitempty"`
1290	// ID - Resource ID.
1291	ID *string `json:"id,omitempty"`
1292}
1293
1294// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1295func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1296	objectMap := make(map[string]interface{})
1297	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1298		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1299	}
1300	if agic.Name != nil {
1301		objectMap["name"] = agic.Name
1302	}
1303	if agic.Etag != nil {
1304		objectMap["etag"] = agic.Etag
1305	}
1306	if agic.Type != nil {
1307		objectMap["type"] = agic.Type
1308	}
1309	if agic.ID != nil {
1310		objectMap["id"] = agic.ID
1311	}
1312	return json.Marshal(objectMap)
1313}
1314
1315// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1316func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1317	var m map[string]*json.RawMessage
1318	err := json.Unmarshal(body, &m)
1319	if err != nil {
1320		return err
1321	}
1322	for k, v := range m {
1323		switch k {
1324		case "properties":
1325			if v != nil {
1326				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1327				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1328				if err != nil {
1329					return err
1330				}
1331				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1332			}
1333		case "name":
1334			if v != nil {
1335				var name string
1336				err = json.Unmarshal(*v, &name)
1337				if err != nil {
1338					return err
1339				}
1340				agic.Name = &name
1341			}
1342		case "etag":
1343			if v != nil {
1344				var etag string
1345				err = json.Unmarshal(*v, &etag)
1346				if err != nil {
1347					return err
1348				}
1349				agic.Etag = &etag
1350			}
1351		case "type":
1352			if v != nil {
1353				var typeVar string
1354				err = json.Unmarshal(*v, &typeVar)
1355				if err != nil {
1356					return err
1357				}
1358				agic.Type = &typeVar
1359			}
1360		case "id":
1361			if v != nil {
1362				var ID string
1363				err = json.Unmarshal(*v, &ID)
1364				if err != nil {
1365					return err
1366				}
1367				agic.ID = &ID
1368			}
1369		}
1370	}
1371
1372	return nil
1373}
1374
1375// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1376// gateway.
1377type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1378	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1379	Subnet *SubResource `json:"subnet,omitempty"`
1380	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1381	ProvisioningState *string `json:"provisioningState,omitempty"`
1382}
1383
1384// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1385type ApplicationGatewayListResult struct {
1386	autorest.Response `json:"-"`
1387	// Value - List of an application gateways in a resource group.
1388	Value *[]ApplicationGateway `json:"value,omitempty"`
1389	// NextLink - URL to get the next set of results.
1390	NextLink *string `json:"nextLink,omitempty"`
1391}
1392
1393// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1394type ApplicationGatewayListResultIterator struct {
1395	i    int
1396	page ApplicationGatewayListResultPage
1397}
1398
1399// NextWithContext advances to the next value.  If there was an error making
1400// the request the iterator does not advance and the error is returned.
1401func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1402	if tracing.IsEnabled() {
1403		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1404		defer func() {
1405			sc := -1
1406			if iter.Response().Response.Response != nil {
1407				sc = iter.Response().Response.Response.StatusCode
1408			}
1409			tracing.EndSpan(ctx, sc, err)
1410		}()
1411	}
1412	iter.i++
1413	if iter.i < len(iter.page.Values()) {
1414		return nil
1415	}
1416	err = iter.page.NextWithContext(ctx)
1417	if err != nil {
1418		iter.i--
1419		return err
1420	}
1421	iter.i = 0
1422	return nil
1423}
1424
1425// Next advances to the next value.  If there was an error making
1426// the request the iterator does not advance and the error is returned.
1427// Deprecated: Use NextWithContext() instead.
1428func (iter *ApplicationGatewayListResultIterator) Next() error {
1429	return iter.NextWithContext(context.Background())
1430}
1431
1432// NotDone returns true if the enumeration should be started or is not yet complete.
1433func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1434	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1435}
1436
1437// Response returns the raw server response from the last page request.
1438func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1439	return iter.page.Response()
1440}
1441
1442// Value returns the current value or a zero-initialized value if the
1443// iterator has advanced beyond the end of the collection.
1444func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1445	if !iter.page.NotDone() {
1446		return ApplicationGateway{}
1447	}
1448	return iter.page.Values()[iter.i]
1449}
1450
1451// Creates a new instance of the ApplicationGatewayListResultIterator type.
1452func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1453	return ApplicationGatewayListResultIterator{page: page}
1454}
1455
1456// IsEmpty returns true if the ListResult contains no values.
1457func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1458	return aglr.Value == nil || len(*aglr.Value) == 0
1459}
1460
1461// hasNextLink returns true if the NextLink is not empty.
1462func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1463	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1464}
1465
1466// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1467// It returns nil if no more results exist.
1468func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1469	if !aglr.hasNextLink() {
1470		return nil, nil
1471	}
1472	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1473		autorest.AsJSON(),
1474		autorest.AsGet(),
1475		autorest.WithBaseURL(to.String(aglr.NextLink)))
1476}
1477
1478// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1479type ApplicationGatewayListResultPage struct {
1480	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1481	aglr ApplicationGatewayListResult
1482}
1483
1484// NextWithContext advances to the next page of values.  If there was an error making
1485// the request the page does not advance and the error is returned.
1486func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1487	if tracing.IsEnabled() {
1488		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1489		defer func() {
1490			sc := -1
1491			if page.Response().Response.Response != nil {
1492				sc = page.Response().Response.Response.StatusCode
1493			}
1494			tracing.EndSpan(ctx, sc, err)
1495		}()
1496	}
1497	for {
1498		next, err := page.fn(ctx, page.aglr)
1499		if err != nil {
1500			return err
1501		}
1502		page.aglr = next
1503		if !next.hasNextLink() || !next.IsEmpty() {
1504			break
1505		}
1506	}
1507	return nil
1508}
1509
1510// Next advances to the next page of values.  If there was an error making
1511// the request the page does not advance and the error is returned.
1512// Deprecated: Use NextWithContext() instead.
1513func (page *ApplicationGatewayListResultPage) Next() error {
1514	return page.NextWithContext(context.Background())
1515}
1516
1517// NotDone returns true if the page enumeration should be started or is not yet complete.
1518func (page ApplicationGatewayListResultPage) NotDone() bool {
1519	return !page.aglr.IsEmpty()
1520}
1521
1522// Response returns the raw server response from the last page request.
1523func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1524	return page.aglr
1525}
1526
1527// Values returns the slice of values for the current page or nil if there are no values.
1528func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1529	if page.aglr.IsEmpty() {
1530		return nil
1531	}
1532	return *page.aglr.Value
1533}
1534
1535// Creates a new instance of the ApplicationGatewayListResultPage type.
1536func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1537	return ApplicationGatewayListResultPage{
1538		fn:   getNextPage,
1539		aglr: cur,
1540	}
1541}
1542
1543// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1544type ApplicationGatewayPathRule struct {
1545	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1546	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1547	Name *string `json:"name,omitempty"`
1548	// Etag - A unique read-only string that changes whenever the resource is updated.
1549	Etag *string `json:"etag,omitempty"`
1550	// Type - Type of the resource.
1551	Type *string `json:"type,omitempty"`
1552	// ID - Resource ID.
1553	ID *string `json:"id,omitempty"`
1554}
1555
1556// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1557func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1558	objectMap := make(map[string]interface{})
1559	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1560		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1561	}
1562	if agpr.Name != nil {
1563		objectMap["name"] = agpr.Name
1564	}
1565	if agpr.Etag != nil {
1566		objectMap["etag"] = agpr.Etag
1567	}
1568	if agpr.Type != nil {
1569		objectMap["type"] = agpr.Type
1570	}
1571	if agpr.ID != nil {
1572		objectMap["id"] = agpr.ID
1573	}
1574	return json.Marshal(objectMap)
1575}
1576
1577// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1578func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1579	var m map[string]*json.RawMessage
1580	err := json.Unmarshal(body, &m)
1581	if err != nil {
1582		return err
1583	}
1584	for k, v := range m {
1585		switch k {
1586		case "properties":
1587			if v != nil {
1588				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1589				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1590				if err != nil {
1591					return err
1592				}
1593				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1594			}
1595		case "name":
1596			if v != nil {
1597				var name string
1598				err = json.Unmarshal(*v, &name)
1599				if err != nil {
1600					return err
1601				}
1602				agpr.Name = &name
1603			}
1604		case "etag":
1605			if v != nil {
1606				var etag string
1607				err = json.Unmarshal(*v, &etag)
1608				if err != nil {
1609					return err
1610				}
1611				agpr.Etag = &etag
1612			}
1613		case "type":
1614			if v != nil {
1615				var typeVar string
1616				err = json.Unmarshal(*v, &typeVar)
1617				if err != nil {
1618					return err
1619				}
1620				agpr.Type = &typeVar
1621			}
1622		case "id":
1623			if v != nil {
1624				var ID string
1625				err = json.Unmarshal(*v, &ID)
1626				if err != nil {
1627					return err
1628				}
1629				agpr.ID = &ID
1630			}
1631		}
1632	}
1633
1634	return nil
1635}
1636
1637// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1638type ApplicationGatewayPathRulePropertiesFormat struct {
1639	// Paths - Path rules of URL path map.
1640	Paths *[]string `json:"paths,omitempty"`
1641	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1642	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1643	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1644	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1645	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1646	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1647	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1648	ProvisioningState *string `json:"provisioningState,omitempty"`
1649}
1650
1651// ApplicationGatewayProbe probe of the application gateway.
1652type ApplicationGatewayProbe struct {
1653	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1654	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1655	Name *string `json:"name,omitempty"`
1656	// Etag - A unique read-only string that changes whenever the resource is updated.
1657	Etag *string `json:"etag,omitempty"`
1658	// Type - Type of the resource.
1659	Type *string `json:"type,omitempty"`
1660	// ID - Resource ID.
1661	ID *string `json:"id,omitempty"`
1662}
1663
1664// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1665func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1666	objectMap := make(map[string]interface{})
1667	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1668		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1669	}
1670	if agp.Name != nil {
1671		objectMap["name"] = agp.Name
1672	}
1673	if agp.Etag != nil {
1674		objectMap["etag"] = agp.Etag
1675	}
1676	if agp.Type != nil {
1677		objectMap["type"] = agp.Type
1678	}
1679	if agp.ID != nil {
1680		objectMap["id"] = agp.ID
1681	}
1682	return json.Marshal(objectMap)
1683}
1684
1685// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1686func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1687	var m map[string]*json.RawMessage
1688	err := json.Unmarshal(body, &m)
1689	if err != nil {
1690		return err
1691	}
1692	for k, v := range m {
1693		switch k {
1694		case "properties":
1695			if v != nil {
1696				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1697				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1698				if err != nil {
1699					return err
1700				}
1701				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1702			}
1703		case "name":
1704			if v != nil {
1705				var name string
1706				err = json.Unmarshal(*v, &name)
1707				if err != nil {
1708					return err
1709				}
1710				agp.Name = &name
1711			}
1712		case "etag":
1713			if v != nil {
1714				var etag string
1715				err = json.Unmarshal(*v, &etag)
1716				if err != nil {
1717					return err
1718				}
1719				agp.Etag = &etag
1720			}
1721		case "type":
1722			if v != nil {
1723				var typeVar string
1724				err = json.Unmarshal(*v, &typeVar)
1725				if err != nil {
1726					return err
1727				}
1728				agp.Type = &typeVar
1729			}
1730		case "id":
1731			if v != nil {
1732				var ID string
1733				err = json.Unmarshal(*v, &ID)
1734				if err != nil {
1735					return err
1736				}
1737				agp.ID = &ID
1738			}
1739		}
1740	}
1741
1742	return nil
1743}
1744
1745// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1746type ApplicationGatewayProbeHealthResponseMatch struct {
1747	// Body - Body that must be contained in the health response. Default value is empty.
1748	Body *string `json:"body,omitempty"`
1749	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1750	StatusCodes *[]string `json:"statusCodes,omitempty"`
1751}
1752
1753// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1754type ApplicationGatewayProbePropertiesFormat struct {
1755	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1756	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1757	// Host - Host name to send the probe to.
1758	Host *string `json:"host,omitempty"`
1759	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1760	Path *string `json:"path,omitempty"`
1761	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1762	Interval *int32 `json:"interval,omitempty"`
1763	// Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
1764	Timeout *int32 `json:"timeout,omitempty"`
1765	// UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
1766	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1767	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1768	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1769	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1770	MinServers *int32 `json:"minServers,omitempty"`
1771	// Match - Criterion for classifying a healthy probe response.
1772	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1773	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1774	ProvisioningState *string `json:"provisioningState,omitempty"`
1775}
1776
1777// ApplicationGatewayPropertiesFormat properties of the application gateway.
1778type ApplicationGatewayPropertiesFormat struct {
1779	// Sku - SKU of the application gateway resource.
1780	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1781	// SslPolicy - SSL policy of the application gateway resource.
1782	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1783	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1784	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1785	// GatewayIPConfigurations - Subnets of application the gateway resource.
1786	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1787	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1788	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1789	// SslCertificates - SSL certificates of the application gateway resource.
1790	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1791	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1792	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1793	// FrontendPorts - Frontend ports of the application gateway resource.
1794	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1795	// Probes - Probes of the application gateway resource.
1796	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1797	// BackendAddressPools - Backend address pool of the application gateway resource.
1798	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1799	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1800	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1801	// HTTPListeners - Http listeners of the application gateway resource.
1802	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1803	// URLPathMaps - URL path map of the application gateway resource.
1804	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1805	// RequestRoutingRules - Request routing rules of the application gateway resource.
1806	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1807	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1808	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1809	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1810	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1811	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1812	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1813	// ResourceGUID - Resource GUID property of the application gateway resource.
1814	ResourceGUID *string `json:"resourceGuid,omitempty"`
1815	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1816	ProvisioningState *string `json:"provisioningState,omitempty"`
1817}
1818
1819// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1820func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1821	objectMap := make(map[string]interface{})
1822	if agpf.Sku != nil {
1823		objectMap["sku"] = agpf.Sku
1824	}
1825	if agpf.SslPolicy != nil {
1826		objectMap["sslPolicy"] = agpf.SslPolicy
1827	}
1828	if agpf.GatewayIPConfigurations != nil {
1829		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1830	}
1831	if agpf.AuthenticationCertificates != nil {
1832		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1833	}
1834	if agpf.SslCertificates != nil {
1835		objectMap["sslCertificates"] = agpf.SslCertificates
1836	}
1837	if agpf.FrontendIPConfigurations != nil {
1838		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1839	}
1840	if agpf.FrontendPorts != nil {
1841		objectMap["frontendPorts"] = agpf.FrontendPorts
1842	}
1843	if agpf.Probes != nil {
1844		objectMap["probes"] = agpf.Probes
1845	}
1846	if agpf.BackendAddressPools != nil {
1847		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1848	}
1849	if agpf.BackendHTTPSettingsCollection != nil {
1850		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1851	}
1852	if agpf.HTTPListeners != nil {
1853		objectMap["httpListeners"] = agpf.HTTPListeners
1854	}
1855	if agpf.URLPathMaps != nil {
1856		objectMap["urlPathMaps"] = agpf.URLPathMaps
1857	}
1858	if agpf.RequestRoutingRules != nil {
1859		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1860	}
1861	if agpf.RedirectConfigurations != nil {
1862		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1863	}
1864	if agpf.WebApplicationFirewallConfiguration != nil {
1865		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1866	}
1867	if agpf.EnableHTTP2 != nil {
1868		objectMap["enableHttp2"] = agpf.EnableHTTP2
1869	}
1870	if agpf.ResourceGUID != nil {
1871		objectMap["resourceGuid"] = agpf.ResourceGUID
1872	}
1873	if agpf.ProvisioningState != nil {
1874		objectMap["provisioningState"] = agpf.ProvisioningState
1875	}
1876	return json.Marshal(objectMap)
1877}
1878
1879// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1880type ApplicationGatewayRedirectConfiguration struct {
1881	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1882	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1883	Name *string `json:"name,omitempty"`
1884	// Etag - A unique read-only string that changes whenever the resource is updated.
1885	Etag *string `json:"etag,omitempty"`
1886	// Type - Type of the resource.
1887	Type *string `json:"type,omitempty"`
1888	// ID - Resource ID.
1889	ID *string `json:"id,omitempty"`
1890}
1891
1892// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1893func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1894	objectMap := make(map[string]interface{})
1895	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1896		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1897	}
1898	if agrc.Name != nil {
1899		objectMap["name"] = agrc.Name
1900	}
1901	if agrc.Etag != nil {
1902		objectMap["etag"] = agrc.Etag
1903	}
1904	if agrc.Type != nil {
1905		objectMap["type"] = agrc.Type
1906	}
1907	if agrc.ID != nil {
1908		objectMap["id"] = agrc.ID
1909	}
1910	return json.Marshal(objectMap)
1911}
1912
1913// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1914func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1915	var m map[string]*json.RawMessage
1916	err := json.Unmarshal(body, &m)
1917	if err != nil {
1918		return err
1919	}
1920	for k, v := range m {
1921		switch k {
1922		case "properties":
1923			if v != nil {
1924				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1925				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1926				if err != nil {
1927					return err
1928				}
1929				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1930			}
1931		case "name":
1932			if v != nil {
1933				var name string
1934				err = json.Unmarshal(*v, &name)
1935				if err != nil {
1936					return err
1937				}
1938				agrc.Name = &name
1939			}
1940		case "etag":
1941			if v != nil {
1942				var etag string
1943				err = json.Unmarshal(*v, &etag)
1944				if err != nil {
1945					return err
1946				}
1947				agrc.Etag = &etag
1948			}
1949		case "type":
1950			if v != nil {
1951				var typeVar string
1952				err = json.Unmarshal(*v, &typeVar)
1953				if err != nil {
1954					return err
1955				}
1956				agrc.Type = &typeVar
1957			}
1958		case "id":
1959			if v != nil {
1960				var ID string
1961				err = json.Unmarshal(*v, &ID)
1962				if err != nil {
1963					return err
1964				}
1965				agrc.ID = &ID
1966			}
1967		}
1968	}
1969
1970	return nil
1971}
1972
1973// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1974// application gateway.
1975type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1976	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1977	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1978	// TargetListener - Reference to a listener to redirect the request to.
1979	TargetListener *SubResource `json:"targetListener,omitempty"`
1980	// TargetURL - Url to redirect the request to.
1981	TargetURL *string `json:"targetUrl,omitempty"`
1982	// IncludePath - Include path in the redirected url.
1983	IncludePath *bool `json:"includePath,omitempty"`
1984	// IncludeQueryString - Include query string in the redirected url.
1985	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1986	// RequestRoutingRules - Request routing specifying redirect configuration.
1987	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1988	// URLPathMaps - Url path maps specifying default redirect configuration.
1989	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
1990	// PathRules - Path rules specifying redirect configuration.
1991	PathRules *[]SubResource `json:"pathRules,omitempty"`
1992}
1993
1994// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
1995type ApplicationGatewayRequestRoutingRule struct {
1996	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
1997	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1998	Name *string `json:"name,omitempty"`
1999	// Etag - A unique read-only string that changes whenever the resource is updated.
2000	Etag *string `json:"etag,omitempty"`
2001	// Type - Type of the resource.
2002	Type *string `json:"type,omitempty"`
2003	// ID - Resource ID.
2004	ID *string `json:"id,omitempty"`
2005}
2006
2007// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2008func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2009	objectMap := make(map[string]interface{})
2010	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2011		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2012	}
2013	if agrrr.Name != nil {
2014		objectMap["name"] = agrrr.Name
2015	}
2016	if agrrr.Etag != nil {
2017		objectMap["etag"] = agrrr.Etag
2018	}
2019	if agrrr.Type != nil {
2020		objectMap["type"] = agrrr.Type
2021	}
2022	if agrrr.ID != nil {
2023		objectMap["id"] = agrrr.ID
2024	}
2025	return json.Marshal(objectMap)
2026}
2027
2028// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2029func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2030	var m map[string]*json.RawMessage
2031	err := json.Unmarshal(body, &m)
2032	if err != nil {
2033		return err
2034	}
2035	for k, v := range m {
2036		switch k {
2037		case "properties":
2038			if v != nil {
2039				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2040				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2041				if err != nil {
2042					return err
2043				}
2044				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2045			}
2046		case "name":
2047			if v != nil {
2048				var name string
2049				err = json.Unmarshal(*v, &name)
2050				if err != nil {
2051					return err
2052				}
2053				agrrr.Name = &name
2054			}
2055		case "etag":
2056			if v != nil {
2057				var etag string
2058				err = json.Unmarshal(*v, &etag)
2059				if err != nil {
2060					return err
2061				}
2062				agrrr.Etag = &etag
2063			}
2064		case "type":
2065			if v != nil {
2066				var typeVar string
2067				err = json.Unmarshal(*v, &typeVar)
2068				if err != nil {
2069					return err
2070				}
2071				agrrr.Type = &typeVar
2072			}
2073		case "id":
2074			if v != nil {
2075				var ID string
2076				err = json.Unmarshal(*v, &ID)
2077				if err != nil {
2078					return err
2079				}
2080				agrrr.ID = &ID
2081			}
2082		}
2083	}
2084
2085	return nil
2086}
2087
2088// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2089// application gateway.
2090type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2091	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2092	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2093	// BackendAddressPool - Backend address pool resource of the application gateway.
2094	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2095	// BackendHTTPSettings - Frontend port resource of the application gateway.
2096	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2097	// HTTPListener - Http listener resource of the application gateway.
2098	HTTPListener *SubResource `json:"httpListener,omitempty"`
2099	// URLPathMap - URL path map resource of the application gateway.
2100	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2101	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2102	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2103	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2104	ProvisioningState *string `json:"provisioningState,omitempty"`
2105}
2106
2107// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2108// long-running operation.
2109type ApplicationGatewaysBackendHealthFuture struct {
2110	azure.FutureAPI
2111	// Result returns the result of the asynchronous operation.
2112	// If the operation has not completed it will return an error.
2113	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2114}
2115
2116// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2117func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2118	var azFuture azure.Future
2119	if err := json.Unmarshal(body, &azFuture); err != nil {
2120		return err
2121	}
2122	future.FutureAPI = &azFuture
2123	future.Result = future.result
2124	return nil
2125}
2126
2127// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2128func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2129	var done bool
2130	done, err = future.DoneWithContext(context.Background(), client)
2131	if err != nil {
2132		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2133		return
2134	}
2135	if !done {
2136		agbh.Response.Response = future.Response()
2137		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2138		return
2139	}
2140	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2141	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2142		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2143		if err != nil {
2144			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2145		}
2146	}
2147	return
2148}
2149
2150// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2151// long-running operation.
2152type ApplicationGatewaysCreateOrUpdateFuture struct {
2153	azure.FutureAPI
2154	// Result returns the result of the asynchronous operation.
2155	// If the operation has not completed it will return an error.
2156	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2157}
2158
2159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2160func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2161	var azFuture azure.Future
2162	if err := json.Unmarshal(body, &azFuture); err != nil {
2163		return err
2164	}
2165	future.FutureAPI = &azFuture
2166	future.Result = future.result
2167	return nil
2168}
2169
2170// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2171func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2172	var done bool
2173	done, err = future.DoneWithContext(context.Background(), client)
2174	if err != nil {
2175		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2176		return
2177	}
2178	if !done {
2179		ag.Response.Response = future.Response()
2180		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2181		return
2182	}
2183	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2184	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2185		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2186		if err != nil {
2187			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2188		}
2189	}
2190	return
2191}
2192
2193// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2194// long-running operation.
2195type ApplicationGatewaysDeleteFuture struct {
2196	azure.FutureAPI
2197	// Result returns the result of the asynchronous operation.
2198	// If the operation has not completed it will return an error.
2199	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2200}
2201
2202// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2203func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2204	var azFuture azure.Future
2205	if err := json.Unmarshal(body, &azFuture); err != nil {
2206		return err
2207	}
2208	future.FutureAPI = &azFuture
2209	future.Result = future.result
2210	return nil
2211}
2212
2213// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2214func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2215	var done bool
2216	done, err = future.DoneWithContext(context.Background(), client)
2217	if err != nil {
2218		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2219		return
2220	}
2221	if !done {
2222		ar.Response = future.Response()
2223		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2224		return
2225	}
2226	ar.Response = future.Response()
2227	return
2228}
2229
2230// ApplicationGatewaySku SKU of an application gateway
2231type ApplicationGatewaySku struct {
2232	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2233	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2234	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2235	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2236	// Capacity - Capacity (instance count) of an application gateway.
2237	Capacity *int32 `json:"capacity,omitempty"`
2238}
2239
2240// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2241type ApplicationGatewaySslCertificate struct {
2242	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2243	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2244	Name *string `json:"name,omitempty"`
2245	// Etag - A unique read-only string that changes whenever the resource is updated.
2246	Etag *string `json:"etag,omitempty"`
2247	// Type - Type of the resource.
2248	Type *string `json:"type,omitempty"`
2249	// ID - Resource ID.
2250	ID *string `json:"id,omitempty"`
2251}
2252
2253// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2254func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2255	objectMap := make(map[string]interface{})
2256	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2257		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2258	}
2259	if agsc.Name != nil {
2260		objectMap["name"] = agsc.Name
2261	}
2262	if agsc.Etag != nil {
2263		objectMap["etag"] = agsc.Etag
2264	}
2265	if agsc.Type != nil {
2266		objectMap["type"] = agsc.Type
2267	}
2268	if agsc.ID != nil {
2269		objectMap["id"] = agsc.ID
2270	}
2271	return json.Marshal(objectMap)
2272}
2273
2274// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2275func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2276	var m map[string]*json.RawMessage
2277	err := json.Unmarshal(body, &m)
2278	if err != nil {
2279		return err
2280	}
2281	for k, v := range m {
2282		switch k {
2283		case "properties":
2284			if v != nil {
2285				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2286				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2287				if err != nil {
2288					return err
2289				}
2290				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2291			}
2292		case "name":
2293			if v != nil {
2294				var name string
2295				err = json.Unmarshal(*v, &name)
2296				if err != nil {
2297					return err
2298				}
2299				agsc.Name = &name
2300			}
2301		case "etag":
2302			if v != nil {
2303				var etag string
2304				err = json.Unmarshal(*v, &etag)
2305				if err != nil {
2306					return err
2307				}
2308				agsc.Etag = &etag
2309			}
2310		case "type":
2311			if v != nil {
2312				var typeVar string
2313				err = json.Unmarshal(*v, &typeVar)
2314				if err != nil {
2315					return err
2316				}
2317				agsc.Type = &typeVar
2318			}
2319		case "id":
2320			if v != nil {
2321				var ID string
2322				err = json.Unmarshal(*v, &ID)
2323				if err != nil {
2324					return err
2325				}
2326				agsc.ID = &ID
2327			}
2328		}
2329	}
2330
2331	return nil
2332}
2333
2334// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2335// gateway.
2336type ApplicationGatewaySslCertificatePropertiesFormat struct {
2337	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2338	Data *string `json:"data,omitempty"`
2339	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2340	Password *string `json:"password,omitempty"`
2341	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2342	PublicCertData *string `json:"publicCertData,omitempty"`
2343	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2344	ProvisioningState *string `json:"provisioningState,omitempty"`
2345}
2346
2347// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2348type ApplicationGatewaySslPolicy struct {
2349	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2350	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2351	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2352	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2353	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2354	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2355	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2356	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2357	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2358	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2359}
2360
2361// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2362type ApplicationGatewaySslPredefinedPolicy struct {
2363	autorest.Response `json:"-"`
2364	// Name - Name of Ssl predefined policy.
2365	Name                                                   *string `json:"name,omitempty"`
2366	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2367	// ID - Resource ID.
2368	ID *string `json:"id,omitempty"`
2369}
2370
2371// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2372func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2373	objectMap := make(map[string]interface{})
2374	if agspp.Name != nil {
2375		objectMap["name"] = agspp.Name
2376	}
2377	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2378		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2379	}
2380	if agspp.ID != nil {
2381		objectMap["id"] = agspp.ID
2382	}
2383	return json.Marshal(objectMap)
2384}
2385
2386// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2387func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2388	var m map[string]*json.RawMessage
2389	err := json.Unmarshal(body, &m)
2390	if err != nil {
2391		return err
2392	}
2393	for k, v := range m {
2394		switch k {
2395		case "name":
2396			if v != nil {
2397				var name string
2398				err = json.Unmarshal(*v, &name)
2399				if err != nil {
2400					return err
2401				}
2402				agspp.Name = &name
2403			}
2404		case "properties":
2405			if v != nil {
2406				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2407				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2408				if err != nil {
2409					return err
2410				}
2411				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2412			}
2413		case "id":
2414			if v != nil {
2415				var ID string
2416				err = json.Unmarshal(*v, &ID)
2417				if err != nil {
2418					return err
2419				}
2420				agspp.ID = &ID
2421			}
2422		}
2423	}
2424
2425	return nil
2426}
2427
2428// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2429// ApplicationGatewaySslPredefinedPolicy
2430type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2431	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2432	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2433	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2434	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2435}
2436
2437// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2438// long-running operation.
2439type ApplicationGatewaysStartFuture struct {
2440	azure.FutureAPI
2441	// Result returns the result of the asynchronous operation.
2442	// If the operation has not completed it will return an error.
2443	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2444}
2445
2446// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2447func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2448	var azFuture azure.Future
2449	if err := json.Unmarshal(body, &azFuture); err != nil {
2450		return err
2451	}
2452	future.FutureAPI = &azFuture
2453	future.Result = future.result
2454	return nil
2455}
2456
2457// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2458func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2459	var done bool
2460	done, err = future.DoneWithContext(context.Background(), client)
2461	if err != nil {
2462		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2463		return
2464	}
2465	if !done {
2466		ar.Response = future.Response()
2467		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2468		return
2469	}
2470	ar.Response = future.Response()
2471	return
2472}
2473
2474// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2475// operation.
2476type ApplicationGatewaysStopFuture struct {
2477	azure.FutureAPI
2478	// Result returns the result of the asynchronous operation.
2479	// If the operation has not completed it will return an error.
2480	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2481}
2482
2483// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2484func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2485	var azFuture azure.Future
2486	if err := json.Unmarshal(body, &azFuture); err != nil {
2487		return err
2488	}
2489	future.FutureAPI = &azFuture
2490	future.Result = future.result
2491	return nil
2492}
2493
2494// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2495func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2496	var done bool
2497	done, err = future.DoneWithContext(context.Background(), client)
2498	if err != nil {
2499		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2500		return
2501	}
2502	if !done {
2503		ar.Response = future.Response()
2504		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2505		return
2506	}
2507	ar.Response = future.Response()
2508	return
2509}
2510
2511// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2512// long-running operation.
2513type ApplicationGatewaysUpdateTagsFuture struct {
2514	azure.FutureAPI
2515	// Result returns the result of the asynchronous operation.
2516	// If the operation has not completed it will return an error.
2517	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2518}
2519
2520// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2521func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2522	var azFuture azure.Future
2523	if err := json.Unmarshal(body, &azFuture); err != nil {
2524		return err
2525	}
2526	future.FutureAPI = &azFuture
2527	future.Result = future.result
2528	return nil
2529}
2530
2531// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2532func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2533	var done bool
2534	done, err = future.DoneWithContext(context.Background(), client)
2535	if err != nil {
2536		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2537		return
2538	}
2539	if !done {
2540		ag.Response.Response = future.Response()
2541		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2542		return
2543	}
2544	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2545	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2546		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2547		if err != nil {
2548			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2549		}
2550	}
2551	return
2552}
2553
2554// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2555// PathBasedRouting.
2556type ApplicationGatewayURLPathMap struct {
2557	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2558	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2559	Name *string `json:"name,omitempty"`
2560	// Etag - A unique read-only string that changes whenever the resource is updated.
2561	Etag *string `json:"etag,omitempty"`
2562	// Type - Type of the resource.
2563	Type *string `json:"type,omitempty"`
2564	// ID - Resource ID.
2565	ID *string `json:"id,omitempty"`
2566}
2567
2568// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2569func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2570	objectMap := make(map[string]interface{})
2571	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2572		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2573	}
2574	if agupm.Name != nil {
2575		objectMap["name"] = agupm.Name
2576	}
2577	if agupm.Etag != nil {
2578		objectMap["etag"] = agupm.Etag
2579	}
2580	if agupm.Type != nil {
2581		objectMap["type"] = agupm.Type
2582	}
2583	if agupm.ID != nil {
2584		objectMap["id"] = agupm.ID
2585	}
2586	return json.Marshal(objectMap)
2587}
2588
2589// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2590func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2591	var m map[string]*json.RawMessage
2592	err := json.Unmarshal(body, &m)
2593	if err != nil {
2594		return err
2595	}
2596	for k, v := range m {
2597		switch k {
2598		case "properties":
2599			if v != nil {
2600				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2601				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2602				if err != nil {
2603					return err
2604				}
2605				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2606			}
2607		case "name":
2608			if v != nil {
2609				var name string
2610				err = json.Unmarshal(*v, &name)
2611				if err != nil {
2612					return err
2613				}
2614				agupm.Name = &name
2615			}
2616		case "etag":
2617			if v != nil {
2618				var etag string
2619				err = json.Unmarshal(*v, &etag)
2620				if err != nil {
2621					return err
2622				}
2623				agupm.Etag = &etag
2624			}
2625		case "type":
2626			if v != nil {
2627				var typeVar string
2628				err = json.Unmarshal(*v, &typeVar)
2629				if err != nil {
2630					return err
2631				}
2632				agupm.Type = &typeVar
2633			}
2634		case "id":
2635			if v != nil {
2636				var ID string
2637				err = json.Unmarshal(*v, &ID)
2638				if err != nil {
2639					return err
2640				}
2641				agupm.ID = &ID
2642			}
2643		}
2644	}
2645
2646	return nil
2647}
2648
2649// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2650type ApplicationGatewayURLPathMapPropertiesFormat struct {
2651	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2652	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2653	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2654	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2655	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2656	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2657	// PathRules - Path rule of URL path map resource.
2658	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2659	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2660	ProvisioningState *string `json:"provisioningState,omitempty"`
2661}
2662
2663// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2664// configuration.
2665type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2666	// Enabled - Whether the web application firewall is enabled or not.
2667	Enabled *bool `json:"enabled,omitempty"`
2668	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2669	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2670	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2671	RuleSetType *string `json:"ruleSetType,omitempty"`
2672	// RuleSetVersion - The version of the rule set type.
2673	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2674	// DisabledRuleGroups - The disabled rule groups.
2675	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2676	// RequestBodyCheck - Whether allow WAF to check request Body.
2677	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2678	// MaxRequestBodySize - Maximum request body size for WAF.
2679	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2680}
2681
2682// ApplicationSecurityGroup an application security group in a resource group.
2683type ApplicationSecurityGroup struct {
2684	autorest.Response `json:"-"`
2685	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2686	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2687	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2688	Etag *string `json:"etag,omitempty"`
2689	// ID - Resource ID.
2690	ID *string `json:"id,omitempty"`
2691	// Name - READ-ONLY; Resource name.
2692	Name *string `json:"name,omitempty"`
2693	// Type - READ-ONLY; Resource type.
2694	Type *string `json:"type,omitempty"`
2695	// Location - Resource location.
2696	Location *string `json:"location,omitempty"`
2697	// Tags - Resource tags.
2698	Tags map[string]*string `json:"tags"`
2699}
2700
2701// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2702func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2703	objectMap := make(map[string]interface{})
2704	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2705		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2706	}
2707	if asg.ID != nil {
2708		objectMap["id"] = asg.ID
2709	}
2710	if asg.Location != nil {
2711		objectMap["location"] = asg.Location
2712	}
2713	if asg.Tags != nil {
2714		objectMap["tags"] = asg.Tags
2715	}
2716	return json.Marshal(objectMap)
2717}
2718
2719// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2720func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2721	var m map[string]*json.RawMessage
2722	err := json.Unmarshal(body, &m)
2723	if err != nil {
2724		return err
2725	}
2726	for k, v := range m {
2727		switch k {
2728		case "properties":
2729			if v != nil {
2730				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2731				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2732				if err != nil {
2733					return err
2734				}
2735				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2736			}
2737		case "etag":
2738			if v != nil {
2739				var etag string
2740				err = json.Unmarshal(*v, &etag)
2741				if err != nil {
2742					return err
2743				}
2744				asg.Etag = &etag
2745			}
2746		case "id":
2747			if v != nil {
2748				var ID string
2749				err = json.Unmarshal(*v, &ID)
2750				if err != nil {
2751					return err
2752				}
2753				asg.ID = &ID
2754			}
2755		case "name":
2756			if v != nil {
2757				var name string
2758				err = json.Unmarshal(*v, &name)
2759				if err != nil {
2760					return err
2761				}
2762				asg.Name = &name
2763			}
2764		case "type":
2765			if v != nil {
2766				var typeVar string
2767				err = json.Unmarshal(*v, &typeVar)
2768				if err != nil {
2769					return err
2770				}
2771				asg.Type = &typeVar
2772			}
2773		case "location":
2774			if v != nil {
2775				var location string
2776				err = json.Unmarshal(*v, &location)
2777				if err != nil {
2778					return err
2779				}
2780				asg.Location = &location
2781			}
2782		case "tags":
2783			if v != nil {
2784				var tags map[string]*string
2785				err = json.Unmarshal(*v, &tags)
2786				if err != nil {
2787					return err
2788				}
2789				asg.Tags = tags
2790			}
2791		}
2792	}
2793
2794	return nil
2795}
2796
2797// ApplicationSecurityGroupListResult a list of application security groups.
2798type ApplicationSecurityGroupListResult struct {
2799	autorest.Response `json:"-"`
2800	// Value - A list of application security groups.
2801	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2802	// NextLink - READ-ONLY; The URL to get the next set of results.
2803	NextLink *string `json:"nextLink,omitempty"`
2804}
2805
2806// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2807func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2808	objectMap := make(map[string]interface{})
2809	if asglr.Value != nil {
2810		objectMap["value"] = asglr.Value
2811	}
2812	return json.Marshal(objectMap)
2813}
2814
2815// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2816// ApplicationSecurityGroup values.
2817type ApplicationSecurityGroupListResultIterator struct {
2818	i    int
2819	page ApplicationSecurityGroupListResultPage
2820}
2821
2822// NextWithContext advances to the next value.  If there was an error making
2823// the request the iterator does not advance and the error is returned.
2824func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2825	if tracing.IsEnabled() {
2826		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2827		defer func() {
2828			sc := -1
2829			if iter.Response().Response.Response != nil {
2830				sc = iter.Response().Response.Response.StatusCode
2831			}
2832			tracing.EndSpan(ctx, sc, err)
2833		}()
2834	}
2835	iter.i++
2836	if iter.i < len(iter.page.Values()) {
2837		return nil
2838	}
2839	err = iter.page.NextWithContext(ctx)
2840	if err != nil {
2841		iter.i--
2842		return err
2843	}
2844	iter.i = 0
2845	return nil
2846}
2847
2848// Next advances to the next value.  If there was an error making
2849// the request the iterator does not advance and the error is returned.
2850// Deprecated: Use NextWithContext() instead.
2851func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2852	return iter.NextWithContext(context.Background())
2853}
2854
2855// NotDone returns true if the enumeration should be started or is not yet complete.
2856func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2858}
2859
2860// Response returns the raw server response from the last page request.
2861func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2862	return iter.page.Response()
2863}
2864
2865// Value returns the current value or a zero-initialized value if the
2866// iterator has advanced beyond the end of the collection.
2867func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2868	if !iter.page.NotDone() {
2869		return ApplicationSecurityGroup{}
2870	}
2871	return iter.page.Values()[iter.i]
2872}
2873
2874// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2875func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2876	return ApplicationSecurityGroupListResultIterator{page: page}
2877}
2878
2879// IsEmpty returns true if the ListResult contains no values.
2880func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2881	return asglr.Value == nil || len(*asglr.Value) == 0
2882}
2883
2884// hasNextLink returns true if the NextLink is not empty.
2885func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2886	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2887}
2888
2889// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2890// It returns nil if no more results exist.
2891func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2892	if !asglr.hasNextLink() {
2893		return nil, nil
2894	}
2895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2896		autorest.AsJSON(),
2897		autorest.AsGet(),
2898		autorest.WithBaseURL(to.String(asglr.NextLink)))
2899}
2900
2901// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2902type ApplicationSecurityGroupListResultPage struct {
2903	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2904	asglr ApplicationSecurityGroupListResult
2905}
2906
2907// NextWithContext advances to the next page of values.  If there was an error making
2908// the request the page does not advance and the error is returned.
2909func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2910	if tracing.IsEnabled() {
2911		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2912		defer func() {
2913			sc := -1
2914			if page.Response().Response.Response != nil {
2915				sc = page.Response().Response.Response.StatusCode
2916			}
2917			tracing.EndSpan(ctx, sc, err)
2918		}()
2919	}
2920	for {
2921		next, err := page.fn(ctx, page.asglr)
2922		if err != nil {
2923			return err
2924		}
2925		page.asglr = next
2926		if !next.hasNextLink() || !next.IsEmpty() {
2927			break
2928		}
2929	}
2930	return nil
2931}
2932
2933// Next advances to the next page of values.  If there was an error making
2934// the request the page does not advance and the error is returned.
2935// Deprecated: Use NextWithContext() instead.
2936func (page *ApplicationSecurityGroupListResultPage) Next() error {
2937	return page.NextWithContext(context.Background())
2938}
2939
2940// NotDone returns true if the page enumeration should be started or is not yet complete.
2941func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2942	return !page.asglr.IsEmpty()
2943}
2944
2945// Response returns the raw server response from the last page request.
2946func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2947	return page.asglr
2948}
2949
2950// Values returns the slice of values for the current page or nil if there are no values.
2951func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2952	if page.asglr.IsEmpty() {
2953		return nil
2954	}
2955	return *page.asglr.Value
2956}
2957
2958// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2959func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2960	return ApplicationSecurityGroupListResultPage{
2961		fn:    getNextPage,
2962		asglr: cur,
2963	}
2964}
2965
2966// ApplicationSecurityGroupPropertiesFormat application security group properties.
2967type ApplicationSecurityGroupPropertiesFormat struct {
2968	// ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
2969	ResourceGUID *string `json:"resourceGuid,omitempty"`
2970	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2971	ProvisioningState *string `json:"provisioningState,omitempty"`
2972}
2973
2974// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
2975func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
2976	objectMap := make(map[string]interface{})
2977	return json.Marshal(objectMap)
2978}
2979
2980// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2981// of a long-running operation.
2982type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2983	azure.FutureAPI
2984	// Result returns the result of the asynchronous operation.
2985	// If the operation has not completed it will return an error.
2986	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2987}
2988
2989// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2990func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2991	var azFuture azure.Future
2992	if err := json.Unmarshal(body, &azFuture); err != nil {
2993		return err
2994	}
2995	future.FutureAPI = &azFuture
2996	future.Result = future.result
2997	return nil
2998}
2999
3000// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3001func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3002	var done bool
3003	done, err = future.DoneWithContext(context.Background(), client)
3004	if err != nil {
3005		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3006		return
3007	}
3008	if !done {
3009		asg.Response.Response = future.Response()
3010		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3011		return
3012	}
3013	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3014	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3015		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3016		if err != nil {
3017			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3018		}
3019	}
3020	return
3021}
3022
3023// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3024// long-running operation.
3025type ApplicationSecurityGroupsDeleteFuture struct {
3026	azure.FutureAPI
3027	// Result returns the result of the asynchronous operation.
3028	// If the operation has not completed it will return an error.
3029	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3030}
3031
3032// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3033func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3034	var azFuture azure.Future
3035	if err := json.Unmarshal(body, &azFuture); err != nil {
3036		return err
3037	}
3038	future.FutureAPI = &azFuture
3039	future.Result = future.result
3040	return nil
3041}
3042
3043// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3044func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3045	var done bool
3046	done, err = future.DoneWithContext(context.Background(), client)
3047	if err != nil {
3048		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3049		return
3050	}
3051	if !done {
3052		ar.Response = future.Response()
3053		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3054		return
3055	}
3056	ar.Response = future.Response()
3057	return
3058}
3059
3060// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3061// that belongs to an ExpressRouteCircuit.
3062type AuthorizationListResult struct {
3063	autorest.Response `json:"-"`
3064	// Value - The authorizations in an ExpressRoute Circuit.
3065	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3066	// NextLink - The URL to get the next set of results.
3067	NextLink *string `json:"nextLink,omitempty"`
3068}
3069
3070// AuthorizationListResultIterator provides access to a complete listing of
3071// ExpressRouteCircuitAuthorization values.
3072type AuthorizationListResultIterator struct {
3073	i    int
3074	page AuthorizationListResultPage
3075}
3076
3077// NextWithContext advances to the next value.  If there was an error making
3078// the request the iterator does not advance and the error is returned.
3079func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3080	if tracing.IsEnabled() {
3081		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3082		defer func() {
3083			sc := -1
3084			if iter.Response().Response.Response != nil {
3085				sc = iter.Response().Response.Response.StatusCode
3086			}
3087			tracing.EndSpan(ctx, sc, err)
3088		}()
3089	}
3090	iter.i++
3091	if iter.i < len(iter.page.Values()) {
3092		return nil
3093	}
3094	err = iter.page.NextWithContext(ctx)
3095	if err != nil {
3096		iter.i--
3097		return err
3098	}
3099	iter.i = 0
3100	return nil
3101}
3102
3103// Next advances to the next value.  If there was an error making
3104// the request the iterator does not advance and the error is returned.
3105// Deprecated: Use NextWithContext() instead.
3106func (iter *AuthorizationListResultIterator) Next() error {
3107	return iter.NextWithContext(context.Background())
3108}
3109
3110// NotDone returns true if the enumeration should be started or is not yet complete.
3111func (iter AuthorizationListResultIterator) NotDone() bool {
3112	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3113}
3114
3115// Response returns the raw server response from the last page request.
3116func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3117	return iter.page.Response()
3118}
3119
3120// Value returns the current value or a zero-initialized value if the
3121// iterator has advanced beyond the end of the collection.
3122func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3123	if !iter.page.NotDone() {
3124		return ExpressRouteCircuitAuthorization{}
3125	}
3126	return iter.page.Values()[iter.i]
3127}
3128
3129// Creates a new instance of the AuthorizationListResultIterator type.
3130func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3131	return AuthorizationListResultIterator{page: page}
3132}
3133
3134// IsEmpty returns true if the ListResult contains no values.
3135func (alr AuthorizationListResult) IsEmpty() bool {
3136	return alr.Value == nil || len(*alr.Value) == 0
3137}
3138
3139// hasNextLink returns true if the NextLink is not empty.
3140func (alr AuthorizationListResult) hasNextLink() bool {
3141	return alr.NextLink != nil && len(*alr.NextLink) != 0
3142}
3143
3144// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3145// It returns nil if no more results exist.
3146func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3147	if !alr.hasNextLink() {
3148		return nil, nil
3149	}
3150	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3151		autorest.AsJSON(),
3152		autorest.AsGet(),
3153		autorest.WithBaseURL(to.String(alr.NextLink)))
3154}
3155
3156// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3157type AuthorizationListResultPage struct {
3158	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3159	alr AuthorizationListResult
3160}
3161
3162// NextWithContext advances to the next page of values.  If there was an error making
3163// the request the page does not advance and the error is returned.
3164func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3165	if tracing.IsEnabled() {
3166		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3167		defer func() {
3168			sc := -1
3169			if page.Response().Response.Response != nil {
3170				sc = page.Response().Response.Response.StatusCode
3171			}
3172			tracing.EndSpan(ctx, sc, err)
3173		}()
3174	}
3175	for {
3176		next, err := page.fn(ctx, page.alr)
3177		if err != nil {
3178			return err
3179		}
3180		page.alr = next
3181		if !next.hasNextLink() || !next.IsEmpty() {
3182			break
3183		}
3184	}
3185	return nil
3186}
3187
3188// Next advances to the next page of values.  If there was an error making
3189// the request the page does not advance and the error is returned.
3190// Deprecated: Use NextWithContext() instead.
3191func (page *AuthorizationListResultPage) Next() error {
3192	return page.NextWithContext(context.Background())
3193}
3194
3195// NotDone returns true if the page enumeration should be started or is not yet complete.
3196func (page AuthorizationListResultPage) NotDone() bool {
3197	return !page.alr.IsEmpty()
3198}
3199
3200// Response returns the raw server response from the last page request.
3201func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3202	return page.alr
3203}
3204
3205// Values returns the slice of values for the current page or nil if there are no values.
3206func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3207	if page.alr.IsEmpty() {
3208		return nil
3209	}
3210	return *page.alr.Value
3211}
3212
3213// Creates a new instance of the AuthorizationListResultPage type.
3214func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3215	return AuthorizationListResultPage{
3216		fn:  getNextPage,
3217		alr: cur,
3218	}
3219}
3220
3221// AuthorizationPropertiesFormat ...
3222type AuthorizationPropertiesFormat struct {
3223	// AuthorizationKey - The authorization key.
3224	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3225	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3226	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3227	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3228	ProvisioningState *string `json:"provisioningState,omitempty"`
3229}
3230
3231// Availability availability of the metric.
3232type Availability struct {
3233	// TimeGrain - The time grain of the availability.
3234	TimeGrain *string `json:"timeGrain,omitempty"`
3235	// Retention - The retention of the availability.
3236	Retention *string `json:"retention,omitempty"`
3237	// BlobDuration - Duration of the availability blob.
3238	BlobDuration *string `json:"blobDuration,omitempty"`
3239}
3240
3241// AvailableProvidersList list of available countries with details.
3242type AvailableProvidersList struct {
3243	autorest.Response `json:"-"`
3244	// Countries - List of available countries.
3245	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3246}
3247
3248// AvailableProvidersListCity city or town details.
3249type AvailableProvidersListCity struct {
3250	// CityName - The city or town name.
3251	CityName *string `json:"cityName,omitempty"`
3252	// Providers - A list of Internet service providers.
3253	Providers *[]string `json:"providers,omitempty"`
3254}
3255
3256// AvailableProvidersListCountry country details.
3257type AvailableProvidersListCountry struct {
3258	// CountryName - The country name.
3259	CountryName *string `json:"countryName,omitempty"`
3260	// Providers - A list of Internet service providers.
3261	Providers *[]string `json:"providers,omitempty"`
3262	// States - List of available states in the country.
3263	States *[]AvailableProvidersListState `json:"states,omitempty"`
3264}
3265
3266// AvailableProvidersListParameters constraints that determine the list of available Internet service
3267// providers.
3268type AvailableProvidersListParameters struct {
3269	// AzureLocations - A list of Azure regions.
3270	AzureLocations *[]string `json:"azureLocations,omitempty"`
3271	// Country - The country for available providers list.
3272	Country *string `json:"country,omitempty"`
3273	// State - The state for available providers list.
3274	State *string `json:"state,omitempty"`
3275	// City - The city or town for available providers list.
3276	City *string `json:"city,omitempty"`
3277}
3278
3279// AvailableProvidersListState state details.
3280type AvailableProvidersListState struct {
3281	// StateName - The state name.
3282	StateName *string `json:"stateName,omitempty"`
3283	// Providers - A list of Internet service providers.
3284	Providers *[]string `json:"providers,omitempty"`
3285	// Cities - List of available cities or towns in the state.
3286	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3287}
3288
3289// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3290// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3291// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3292// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3293// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3294// and error information regarding the failure.
3295type AzureAsyncOperationResult struct {
3296	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3297	Status OperationStatus `json:"status,omitempty"`
3298	Error  *Error          `json:"error,omitempty"`
3299}
3300
3301// AzureReachabilityReport azure reachability report details.
3302type AzureReachabilityReport struct {
3303	autorest.Response `json:"-"`
3304	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3305	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3306	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3307	// ReachabilityReport - List of Azure reachability report items.
3308	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3309}
3310
3311// AzureReachabilityReportItem azure reachability report details for a given provider location.
3312type AzureReachabilityReportItem struct {
3313	// Provider - The Internet service provider.
3314	Provider *string `json:"provider,omitempty"`
3315	// AzureLocation - The Azure region.
3316	AzureLocation *string `json:"azureLocation,omitempty"`
3317	// Latencies - List of latency details for each of the time series.
3318	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3319}
3320
3321// AzureReachabilityReportLatencyInfo details on latency for a time series.
3322type AzureReachabilityReportLatencyInfo struct {
3323	// TimeStamp - The time stamp.
3324	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3325	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3326	Score *int32 `json:"score,omitempty"`
3327}
3328
3329// AzureReachabilityReportLocation parameters that define a geographic location.
3330type AzureReachabilityReportLocation struct {
3331	// Country - The name of the country.
3332	Country *string `json:"country,omitempty"`
3333	// State - The name of the state.
3334	State *string `json:"state,omitempty"`
3335	// City - The name of the city or town.
3336	City *string `json:"city,omitempty"`
3337}
3338
3339// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3340type AzureReachabilityReportParameters struct {
3341	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3342	// Providers - List of Internet service providers.
3343	Providers *[]string `json:"providers,omitempty"`
3344	// AzureLocations - Optional Azure regions to scope the query to.
3345	AzureLocations *[]string `json:"azureLocations,omitempty"`
3346	// StartTime - The start time for the Azure reachability report.
3347	StartTime *date.Time `json:"startTime,omitempty"`
3348	// EndTime - The end time for the Azure reachability report.
3349	EndTime *date.Time `json:"endTime,omitempty"`
3350}
3351
3352// BackendAddressPool pool of backend IP addresses.
3353type BackendAddressPool struct {
3354	autorest.Response `json:"-"`
3355	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3356	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3357	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3358	Name *string `json:"name,omitempty"`
3359	// Etag - A unique read-only string that changes whenever the resource is updated.
3360	Etag *string `json:"etag,omitempty"`
3361	// ID - Resource ID.
3362	ID *string `json:"id,omitempty"`
3363}
3364
3365// MarshalJSON is the custom marshaler for BackendAddressPool.
3366func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3367	objectMap := make(map[string]interface{})
3368	if bap.BackendAddressPoolPropertiesFormat != nil {
3369		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3370	}
3371	if bap.Name != nil {
3372		objectMap["name"] = bap.Name
3373	}
3374	if bap.Etag != nil {
3375		objectMap["etag"] = bap.Etag
3376	}
3377	if bap.ID != nil {
3378		objectMap["id"] = bap.ID
3379	}
3380	return json.Marshal(objectMap)
3381}
3382
3383// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3384func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3385	var m map[string]*json.RawMessage
3386	err := json.Unmarshal(body, &m)
3387	if err != nil {
3388		return err
3389	}
3390	for k, v := range m {
3391		switch k {
3392		case "properties":
3393			if v != nil {
3394				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3395				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3396				if err != nil {
3397					return err
3398				}
3399				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3400			}
3401		case "name":
3402			if v != nil {
3403				var name string
3404				err = json.Unmarshal(*v, &name)
3405				if err != nil {
3406					return err
3407				}
3408				bap.Name = &name
3409			}
3410		case "etag":
3411			if v != nil {
3412				var etag string
3413				err = json.Unmarshal(*v, &etag)
3414				if err != nil {
3415					return err
3416				}
3417				bap.Etag = &etag
3418			}
3419		case "id":
3420			if v != nil {
3421				var ID string
3422				err = json.Unmarshal(*v, &ID)
3423				if err != nil {
3424					return err
3425				}
3426				bap.ID = &ID
3427			}
3428		}
3429	}
3430
3431	return nil
3432}
3433
3434// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3435type BackendAddressPoolPropertiesFormat struct {
3436	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3437	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3438	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3439	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3440	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3441	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3442	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3443	ProvisioningState *string `json:"provisioningState,omitempty"`
3444}
3445
3446// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3447func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3448	objectMap := make(map[string]interface{})
3449	if bappf.ProvisioningState != nil {
3450		objectMap["provisioningState"] = bappf.ProvisioningState
3451	}
3452	return json.Marshal(objectMap)
3453}
3454
3455// BGPCommunity contains bgp community information offered in Service Community resources.
3456type BGPCommunity struct {
3457	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3458	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3459	// CommunityName - The name of the bgp community. e.g. Skype.
3460	CommunityName *string `json:"communityName,omitempty"`
3461	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3462	CommunityValue *string `json:"communityValue,omitempty"`
3463	// CommunityPrefixes - The prefixes that the bgp community contains.
3464	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3465	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3466	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3467	// ServiceGroup - The service group of the bgp community contains.
3468	ServiceGroup *string `json:"serviceGroup,omitempty"`
3469}
3470
3471// BgpPeerStatus BGP peer status details
3472type BgpPeerStatus struct {
3473	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3474	LocalAddress *string `json:"localAddress,omitempty"`
3475	// Neighbor - READ-ONLY; The remote BGP peer
3476	Neighbor *string `json:"neighbor,omitempty"`
3477	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3478	Asn *int32 `json:"asn,omitempty"`
3479	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3480	State BgpPeerState `json:"state,omitempty"`
3481	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3482	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3483	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3484	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3485	// MessagesSent - READ-ONLY; The number of BGP messages sent
3486	MessagesSent *int64 `json:"messagesSent,omitempty"`
3487	// MessagesReceived - READ-ONLY; The number of BGP messages received
3488	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3489}
3490
3491// MarshalJSON is the custom marshaler for BgpPeerStatus.
3492func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
3493	objectMap := make(map[string]interface{})
3494	return json.Marshal(objectMap)
3495}
3496
3497// BgpPeerStatusListResult response for list BGP peer status API service call
3498type BgpPeerStatusListResult struct {
3499	autorest.Response `json:"-"`
3500	// Value - List of BGP peers
3501	Value *[]BgpPeerStatus `json:"value,omitempty"`
3502}
3503
3504// BgpServiceCommunity service Community Properties.
3505type BgpServiceCommunity struct {
3506	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3507	// ID - Resource ID.
3508	ID *string `json:"id,omitempty"`
3509	// Name - READ-ONLY; Resource name.
3510	Name *string `json:"name,omitempty"`
3511	// Type - READ-ONLY; Resource type.
3512	Type *string `json:"type,omitempty"`
3513	// Location - Resource location.
3514	Location *string `json:"location,omitempty"`
3515	// Tags - Resource tags.
3516	Tags map[string]*string `json:"tags"`
3517}
3518
3519// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3520func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3521	objectMap := make(map[string]interface{})
3522	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3523		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3524	}
3525	if bsc.ID != nil {
3526		objectMap["id"] = bsc.ID
3527	}
3528	if bsc.Location != nil {
3529		objectMap["location"] = bsc.Location
3530	}
3531	if bsc.Tags != nil {
3532		objectMap["tags"] = bsc.Tags
3533	}
3534	return json.Marshal(objectMap)
3535}
3536
3537// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3538func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3539	var m map[string]*json.RawMessage
3540	err := json.Unmarshal(body, &m)
3541	if err != nil {
3542		return err
3543	}
3544	for k, v := range m {
3545		switch k {
3546		case "properties":
3547			if v != nil {
3548				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3549				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3550				if err != nil {
3551					return err
3552				}
3553				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3554			}
3555		case "id":
3556			if v != nil {
3557				var ID string
3558				err = json.Unmarshal(*v, &ID)
3559				if err != nil {
3560					return err
3561				}
3562				bsc.ID = &ID
3563			}
3564		case "name":
3565			if v != nil {
3566				var name string
3567				err = json.Unmarshal(*v, &name)
3568				if err != nil {
3569					return err
3570				}
3571				bsc.Name = &name
3572			}
3573		case "type":
3574			if v != nil {
3575				var typeVar string
3576				err = json.Unmarshal(*v, &typeVar)
3577				if err != nil {
3578					return err
3579				}
3580				bsc.Type = &typeVar
3581			}
3582		case "location":
3583			if v != nil {
3584				var location string
3585				err = json.Unmarshal(*v, &location)
3586				if err != nil {
3587					return err
3588				}
3589				bsc.Location = &location
3590			}
3591		case "tags":
3592			if v != nil {
3593				var tags map[string]*string
3594				err = json.Unmarshal(*v, &tags)
3595				if err != nil {
3596					return err
3597				}
3598				bsc.Tags = tags
3599			}
3600		}
3601	}
3602
3603	return nil
3604}
3605
3606// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3607type BgpServiceCommunityListResult struct {
3608	autorest.Response `json:"-"`
3609	// Value - A list of service community resources.
3610	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3611	// NextLink - The URL to get the next set of results.
3612	NextLink *string `json:"nextLink,omitempty"`
3613}
3614
3615// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3616// values.
3617type BgpServiceCommunityListResultIterator struct {
3618	i    int
3619	page BgpServiceCommunityListResultPage
3620}
3621
3622// NextWithContext advances to the next value.  If there was an error making
3623// the request the iterator does not advance and the error is returned.
3624func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3625	if tracing.IsEnabled() {
3626		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3627		defer func() {
3628			sc := -1
3629			if iter.Response().Response.Response != nil {
3630				sc = iter.Response().Response.Response.StatusCode
3631			}
3632			tracing.EndSpan(ctx, sc, err)
3633		}()
3634	}
3635	iter.i++
3636	if iter.i < len(iter.page.Values()) {
3637		return nil
3638	}
3639	err = iter.page.NextWithContext(ctx)
3640	if err != nil {
3641		iter.i--
3642		return err
3643	}
3644	iter.i = 0
3645	return nil
3646}
3647
3648// Next advances to the next value.  If there was an error making
3649// the request the iterator does not advance and the error is returned.
3650// Deprecated: Use NextWithContext() instead.
3651func (iter *BgpServiceCommunityListResultIterator) Next() error {
3652	return iter.NextWithContext(context.Background())
3653}
3654
3655// NotDone returns true if the enumeration should be started or is not yet complete.
3656func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3657	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3658}
3659
3660// Response returns the raw server response from the last page request.
3661func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3662	return iter.page.Response()
3663}
3664
3665// Value returns the current value or a zero-initialized value if the
3666// iterator has advanced beyond the end of the collection.
3667func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3668	if !iter.page.NotDone() {
3669		return BgpServiceCommunity{}
3670	}
3671	return iter.page.Values()[iter.i]
3672}
3673
3674// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3675func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3676	return BgpServiceCommunityListResultIterator{page: page}
3677}
3678
3679// IsEmpty returns true if the ListResult contains no values.
3680func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3681	return bsclr.Value == nil || len(*bsclr.Value) == 0
3682}
3683
3684// hasNextLink returns true if the NextLink is not empty.
3685func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3686	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3687}
3688
3689// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3690// It returns nil if no more results exist.
3691func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3692	if !bsclr.hasNextLink() {
3693		return nil, nil
3694	}
3695	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3696		autorest.AsJSON(),
3697		autorest.AsGet(),
3698		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3699}
3700
3701// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3702type BgpServiceCommunityListResultPage struct {
3703	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3704	bsclr BgpServiceCommunityListResult
3705}
3706
3707// NextWithContext advances to the next page of values.  If there was an error making
3708// the request the page does not advance and the error is returned.
3709func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3710	if tracing.IsEnabled() {
3711		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3712		defer func() {
3713			sc := -1
3714			if page.Response().Response.Response != nil {
3715				sc = page.Response().Response.Response.StatusCode
3716			}
3717			tracing.EndSpan(ctx, sc, err)
3718		}()
3719	}
3720	for {
3721		next, err := page.fn(ctx, page.bsclr)
3722		if err != nil {
3723			return err
3724		}
3725		page.bsclr = next
3726		if !next.hasNextLink() || !next.IsEmpty() {
3727			break
3728		}
3729	}
3730	return nil
3731}
3732
3733// Next advances to the next page of values.  If there was an error making
3734// the request the page does not advance and the error is returned.
3735// Deprecated: Use NextWithContext() instead.
3736func (page *BgpServiceCommunityListResultPage) Next() error {
3737	return page.NextWithContext(context.Background())
3738}
3739
3740// NotDone returns true if the page enumeration should be started or is not yet complete.
3741func (page BgpServiceCommunityListResultPage) NotDone() bool {
3742	return !page.bsclr.IsEmpty()
3743}
3744
3745// Response returns the raw server response from the last page request.
3746func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3747	return page.bsclr
3748}
3749
3750// Values returns the slice of values for the current page or nil if there are no values.
3751func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3752	if page.bsclr.IsEmpty() {
3753		return nil
3754	}
3755	return *page.bsclr.Value
3756}
3757
3758// Creates a new instance of the BgpServiceCommunityListResultPage type.
3759func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3760	return BgpServiceCommunityListResultPage{
3761		fn:    getNextPage,
3762		bsclr: cur,
3763	}
3764}
3765
3766// BgpServiceCommunityPropertiesFormat properties of Service Community.
3767type BgpServiceCommunityPropertiesFormat struct {
3768	// ServiceName - The name of the bgp community. e.g. Skype.
3769	ServiceName *string `json:"serviceName,omitempty"`
3770	// BgpCommunities - Get a list of bgp communities.
3771	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3772}
3773
3774// BgpSettings BGP settings details
3775type BgpSettings struct {
3776	// Asn - The BGP speaker's ASN.
3777	Asn *int64 `json:"asn,omitempty"`
3778	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3779	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3780	// PeerWeight - The weight added to routes learned from this BGP speaker.
3781	PeerWeight *int32 `json:"peerWeight,omitempty"`
3782}
3783
3784// ConnectionMonitor parameters that define the operation to create a connection monitor.
3785type ConnectionMonitor struct {
3786	// Location - Connection monitor location.
3787	Location *string `json:"location,omitempty"`
3788	// Tags - Connection monitor tags.
3789	Tags                         map[string]*string `json:"tags"`
3790	*ConnectionMonitorParameters `json:"properties,omitempty"`
3791}
3792
3793// MarshalJSON is the custom marshaler for ConnectionMonitor.
3794func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
3795	objectMap := make(map[string]interface{})
3796	if cm.Location != nil {
3797		objectMap["location"] = cm.Location
3798	}
3799	if cm.Tags != nil {
3800		objectMap["tags"] = cm.Tags
3801	}
3802	if cm.ConnectionMonitorParameters != nil {
3803		objectMap["properties"] = cm.ConnectionMonitorParameters
3804	}
3805	return json.Marshal(objectMap)
3806}
3807
3808// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
3809func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
3810	var m map[string]*json.RawMessage
3811	err := json.Unmarshal(body, &m)
3812	if err != nil {
3813		return err
3814	}
3815	for k, v := range m {
3816		switch k {
3817		case "location":
3818			if v != nil {
3819				var location string
3820				err = json.Unmarshal(*v, &location)
3821				if err != nil {
3822					return err
3823				}
3824				cm.Location = &location
3825			}
3826		case "tags":
3827			if v != nil {
3828				var tags map[string]*string
3829				err = json.Unmarshal(*v, &tags)
3830				if err != nil {
3831					return err
3832				}
3833				cm.Tags = tags
3834			}
3835		case "properties":
3836			if v != nil {
3837				var connectionMonitorParameters ConnectionMonitorParameters
3838				err = json.Unmarshal(*v, &connectionMonitorParameters)
3839				if err != nil {
3840					return err
3841				}
3842				cm.ConnectionMonitorParameters = &connectionMonitorParameters
3843			}
3844		}
3845	}
3846
3847	return nil
3848}
3849
3850// ConnectionMonitorDestination describes the destination of connection monitor.
3851type ConnectionMonitorDestination struct {
3852	// ResourceID - The ID of the resource used as the destination by connection monitor.
3853	ResourceID *string `json:"resourceId,omitempty"`
3854	// Address - Address of the connection monitor destination (IP or domain name).
3855	Address *string `json:"address,omitempty"`
3856	// Port - The destination port used by connection monitor.
3857	Port *int32 `json:"port,omitempty"`
3858}
3859
3860// ConnectionMonitorListResult list of connection monitors.
3861type ConnectionMonitorListResult struct {
3862	autorest.Response `json:"-"`
3863	// Value - Information about connection monitors.
3864	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
3865}
3866
3867// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
3868type ConnectionMonitorParameters struct {
3869	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
3870	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
3871	// AutoStart - Determines if the connection monitor will start automatically once created.
3872	AutoStart *bool `json:"autoStart,omitempty"`
3873	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3874	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3875}
3876
3877// ConnectionMonitorQueryResult list of connection states snapshots.
3878type ConnectionMonitorQueryResult struct {
3879	autorest.Response `json:"-"`
3880	// States - Information about connection states.
3881	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
3882}
3883
3884// ConnectionMonitorResult information about the connection monitor.
3885type ConnectionMonitorResult struct {
3886	autorest.Response `json:"-"`
3887	// Name - READ-ONLY; Name of the connection monitor.
3888	Name *string `json:"name,omitempty"`
3889	// ID - READ-ONLY; ID of the connection monitor.
3890	ID   *string `json:"id,omitempty"`
3891	Etag *string `json:"etag,omitempty"`
3892	// Type - READ-ONLY; Connection monitor type.
3893	Type *string `json:"type,omitempty"`
3894	// Location - Connection monitor location.
3895	Location *string `json:"location,omitempty"`
3896	// Tags - Connection monitor tags.
3897	Tags                               map[string]*string `json:"tags"`
3898	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
3899}
3900
3901// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
3902func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
3903	objectMap := make(map[string]interface{})
3904	if cmr.Etag != nil {
3905		objectMap["etag"] = cmr.Etag
3906	}
3907	if cmr.Location != nil {
3908		objectMap["location"] = cmr.Location
3909	}
3910	if cmr.Tags != nil {
3911		objectMap["tags"] = cmr.Tags
3912	}
3913	if cmr.ConnectionMonitorResultProperties != nil {
3914		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
3915	}
3916	return json.Marshal(objectMap)
3917}
3918
3919// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
3920func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
3921	var m map[string]*json.RawMessage
3922	err := json.Unmarshal(body, &m)
3923	if err != nil {
3924		return err
3925	}
3926	for k, v := range m {
3927		switch k {
3928		case "name":
3929			if v != nil {
3930				var name string
3931				err = json.Unmarshal(*v, &name)
3932				if err != nil {
3933					return err
3934				}
3935				cmr.Name = &name
3936			}
3937		case "id":
3938			if v != nil {
3939				var ID string
3940				err = json.Unmarshal(*v, &ID)
3941				if err != nil {
3942					return err
3943				}
3944				cmr.ID = &ID
3945			}
3946		case "etag":
3947			if v != nil {
3948				var etag string
3949				err = json.Unmarshal(*v, &etag)
3950				if err != nil {
3951					return err
3952				}
3953				cmr.Etag = &etag
3954			}
3955		case "type":
3956			if v != nil {
3957				var typeVar string
3958				err = json.Unmarshal(*v, &typeVar)
3959				if err != nil {
3960					return err
3961				}
3962				cmr.Type = &typeVar
3963			}
3964		case "location":
3965			if v != nil {
3966				var location string
3967				err = json.Unmarshal(*v, &location)
3968				if err != nil {
3969					return err
3970				}
3971				cmr.Location = &location
3972			}
3973		case "tags":
3974			if v != nil {
3975				var tags map[string]*string
3976				err = json.Unmarshal(*v, &tags)
3977				if err != nil {
3978					return err
3979				}
3980				cmr.Tags = tags
3981			}
3982		case "properties":
3983			if v != nil {
3984				var connectionMonitorResultProperties ConnectionMonitorResultProperties
3985				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
3986				if err != nil {
3987					return err
3988				}
3989				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
3990			}
3991		}
3992	}
3993
3994	return nil
3995}
3996
3997// ConnectionMonitorResultProperties describes the properties of a connection monitor.
3998type ConnectionMonitorResultProperties struct {
3999	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4000	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4001	// StartTime - The date and time when the connection monitor was started.
4002	StartTime *date.Time `json:"startTime,omitempty"`
4003	// MonitoringStatus - The monitoring status of the connection monitor.
4004	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4005	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4006	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4007	// AutoStart - Determines if the connection monitor will start automatically once created.
4008	AutoStart *bool `json:"autoStart,omitempty"`
4009	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4010	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4011}
4012
4013// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4014// long-running operation.
4015type ConnectionMonitorsCreateOrUpdateFuture struct {
4016	azure.FutureAPI
4017	// Result returns the result of the asynchronous operation.
4018	// If the operation has not completed it will return an error.
4019	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4020}
4021
4022// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4023func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4024	var azFuture azure.Future
4025	if err := json.Unmarshal(body, &azFuture); err != nil {
4026		return err
4027	}
4028	future.FutureAPI = &azFuture
4029	future.Result = future.result
4030	return nil
4031}
4032
4033// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
4034func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
4035	var done bool
4036	done, err = future.DoneWithContext(context.Background(), client)
4037	if err != nil {
4038		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4039		return
4040	}
4041	if !done {
4042		cmr.Response.Response = future.Response()
4043		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
4044		return
4045	}
4046	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4047	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
4048		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
4049		if err != nil {
4050			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
4051		}
4052	}
4053	return
4054}
4055
4056// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4057// long-running operation.
4058type ConnectionMonitorsDeleteFuture struct {
4059	azure.FutureAPI
4060	// Result returns the result of the asynchronous operation.
4061	// If the operation has not completed it will return an error.
4062	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4063}
4064
4065// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4066func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
4067	var azFuture azure.Future
4068	if err := json.Unmarshal(body, &azFuture); err != nil {
4069		return err
4070	}
4071	future.FutureAPI = &azFuture
4072	future.Result = future.result
4073	return nil
4074}
4075
4076// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
4077func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4078	var done bool
4079	done, err = future.DoneWithContext(context.Background(), client)
4080	if err != nil {
4081		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
4082		return
4083	}
4084	if !done {
4085		ar.Response = future.Response()
4086		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
4087		return
4088	}
4089	ar.Response = future.Response()
4090	return
4091}
4092
4093// ConnectionMonitorSource describes the source of connection monitor.
4094type ConnectionMonitorSource struct {
4095	// ResourceID - The ID of the resource used as the source by connection monitor.
4096	ResourceID *string `json:"resourceId,omitempty"`
4097	// Port - The source port used by connection monitor.
4098	Port *int32 `json:"port,omitempty"`
4099}
4100
4101// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4102// operation.
4103type ConnectionMonitorsQueryFuture struct {
4104	azure.FutureAPI
4105	// Result returns the result of the asynchronous operation.
4106	// If the operation has not completed it will return an error.
4107	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4108}
4109
4110// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4111func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
4112	var azFuture azure.Future
4113	if err := json.Unmarshal(body, &azFuture); err != nil {
4114		return err
4115	}
4116	future.FutureAPI = &azFuture
4117	future.Result = future.result
4118	return nil
4119}
4120
4121// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
4122func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
4123	var done bool
4124	done, err = future.DoneWithContext(context.Background(), client)
4125	if err != nil {
4126		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
4127		return
4128	}
4129	if !done {
4130		cmqr.Response.Response = future.Response()
4131		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
4132		return
4133	}
4134	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4135	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
4136		cmqr, err = client.QueryResponder(cmqr.Response.Response)
4137		if err != nil {
4138			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
4139		}
4140	}
4141	return
4142}
4143
4144// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4145// operation.
4146type ConnectionMonitorsStartFuture struct {
4147	azure.FutureAPI
4148	// Result returns the result of the asynchronous operation.
4149	// If the operation has not completed it will return an error.
4150	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4151}
4152
4153// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4154func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
4155	var azFuture azure.Future
4156	if err := json.Unmarshal(body, &azFuture); err != nil {
4157		return err
4158	}
4159	future.FutureAPI = &azFuture
4160	future.Result = future.result
4161	return nil
4162}
4163
4164// result is the default implementation for ConnectionMonitorsStartFuture.Result.
4165func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4166	var done bool
4167	done, err = future.DoneWithContext(context.Background(), client)
4168	if err != nil {
4169		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
4170		return
4171	}
4172	if !done {
4173		ar.Response = future.Response()
4174		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
4175		return
4176	}
4177	ar.Response = future.Response()
4178	return
4179}
4180
4181// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4182// operation.
4183type ConnectionMonitorsStopFuture struct {
4184	azure.FutureAPI
4185	// Result returns the result of the asynchronous operation.
4186	// If the operation has not completed it will return an error.
4187	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4188}
4189
4190// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4191func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
4192	var azFuture azure.Future
4193	if err := json.Unmarshal(body, &azFuture); err != nil {
4194		return err
4195	}
4196	future.FutureAPI = &azFuture
4197	future.Result = future.result
4198	return nil
4199}
4200
4201// result is the default implementation for ConnectionMonitorsStopFuture.Result.
4202func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4203	var done bool
4204	done, err = future.DoneWithContext(context.Background(), client)
4205	if err != nil {
4206		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
4207		return
4208	}
4209	if !done {
4210		ar.Response = future.Response()
4211		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
4212		return
4213	}
4214	ar.Response = future.Response()
4215	return
4216}
4217
4218// ConnectionResetSharedKey the virtual network connection reset shared key
4219type ConnectionResetSharedKey struct {
4220	autorest.Response `json:"-"`
4221	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4222	KeyLength *int32 `json:"keyLength,omitempty"`
4223}
4224
4225// ConnectionSharedKey response for GetConnectionSharedKey API service call
4226type ConnectionSharedKey struct {
4227	autorest.Response `json:"-"`
4228	// Value - The virtual network connection shared key value.
4229	Value *string `json:"value,omitempty"`
4230}
4231
4232// ConnectionStateSnapshot connection state snapshot.
4233type ConnectionStateSnapshot struct {
4234	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4235	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4236	// StartTime - The start time of the connection snapshot.
4237	StartTime *date.Time `json:"startTime,omitempty"`
4238	// EndTime - The end time of the connection snapshot.
4239	EndTime *date.Time `json:"endTime,omitempty"`
4240	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4241	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4242	// Hops - READ-ONLY; List of hops between the source and the destination.
4243	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4244}
4245
4246// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
4247func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
4248	objectMap := make(map[string]interface{})
4249	if CSS.ConnectionState != "" {
4250		objectMap["connectionState"] = CSS.ConnectionState
4251	}
4252	if CSS.StartTime != nil {
4253		objectMap["startTime"] = CSS.StartTime
4254	}
4255	if CSS.EndTime != nil {
4256		objectMap["endTime"] = CSS.EndTime
4257	}
4258	if CSS.EvaluationState != "" {
4259		objectMap["evaluationState"] = CSS.EvaluationState
4260	}
4261	return json.Marshal(objectMap)
4262}
4263
4264// ConnectivityDestination parameters that define destination of connection.
4265type ConnectivityDestination struct {
4266	// ResourceID - The ID of the resource to which a connection attempt will be made.
4267	ResourceID *string `json:"resourceId,omitempty"`
4268	// Address - The IP address or URI the resource to which a connection attempt will be made.
4269	Address *string `json:"address,omitempty"`
4270	// Port - Port on which check connectivity will be performed.
4271	Port *int32 `json:"port,omitempty"`
4272}
4273
4274// ConnectivityHop information about a hop between the source and the destination.
4275type ConnectivityHop struct {
4276	// Type - READ-ONLY; The type of the hop.
4277	Type *string `json:"type,omitempty"`
4278	// ID - READ-ONLY; The ID of the hop.
4279	ID *string `json:"id,omitempty"`
4280	// Address - READ-ONLY; The IP address of the hop.
4281	Address *string `json:"address,omitempty"`
4282	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
4283	ResourceID *string `json:"resourceId,omitempty"`
4284	// NextHopIds - READ-ONLY; List of next hop identifiers.
4285	NextHopIds *[]string `json:"nextHopIds,omitempty"`
4286	// Issues - READ-ONLY; List of issues.
4287	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
4288}
4289
4290// MarshalJSON is the custom marshaler for ConnectivityHop.
4291func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
4292	objectMap := make(map[string]interface{})
4293	return json.Marshal(objectMap)
4294}
4295
4296// ConnectivityInformation information on the connectivity status.
4297type ConnectivityInformation struct {
4298	autorest.Response `json:"-"`
4299	// Hops - READ-ONLY; List of hops between the source and the destination.
4300	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4301	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
4302	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
4303	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
4304	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4305	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
4306	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4307	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
4308	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4309	// ProbesSent - READ-ONLY; Total number of probes sent.
4310	ProbesSent *int32 `json:"probesSent,omitempty"`
4311	// ProbesFailed - READ-ONLY; Number of failed probes.
4312	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4313}
4314
4315// MarshalJSON is the custom marshaler for ConnectivityInformation.
4316func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
4317	objectMap := make(map[string]interface{})
4318	return json.Marshal(objectMap)
4319}
4320
4321// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
4322type ConnectivityIssue struct {
4323	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
4324	Origin Origin `json:"origin,omitempty"`
4325	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
4326	Severity Severity `json:"severity,omitempty"`
4327	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
4328	Type IssueType `json:"type,omitempty"`
4329	// Context - READ-ONLY; Provides additional context on the issue.
4330	Context *[]map[string]*string `json:"context,omitempty"`
4331}
4332
4333// MarshalJSON is the custom marshaler for ConnectivityIssue.
4334func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
4335	objectMap := make(map[string]interface{})
4336	return json.Marshal(objectMap)
4337}
4338
4339// ConnectivityParameters parameters that determine how the connectivity check will be performed.
4340type ConnectivityParameters struct {
4341	Source      *ConnectivitySource      `json:"source,omitempty"`
4342	Destination *ConnectivityDestination `json:"destination,omitempty"`
4343}
4344
4345// ConnectivitySource parameters that define the source of the connection.
4346type ConnectivitySource struct {
4347	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
4348	ResourceID *string `json:"resourceId,omitempty"`
4349	// Port - The source port from which a connectivity check will be performed.
4350	Port *int32 `json:"port,omitempty"`
4351}
4352
4353// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
4354// network. Standard DHCP option for a subnet overrides VNET DHCP options.
4355type DhcpOptions struct {
4356	// DNSServers - The list of DNS servers IP addresses.
4357	DNSServers *[]string `json:"dnsServers,omitempty"`
4358}
4359
4360// Dimension dimension of the metric.
4361type Dimension struct {
4362	// Name - The name of the dimension.
4363	Name *string `json:"name,omitempty"`
4364	// DisplayName - The display name of the dimension.
4365	DisplayName *string `json:"displayName,omitempty"`
4366	// InternalName - The internal name of the dimension.
4367	InternalName *string `json:"internalName,omitempty"`
4368}
4369
4370// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
4371type DNSNameAvailabilityResult struct {
4372	autorest.Response `json:"-"`
4373	// Available - Domain availability (True/False).
4374	Available *bool `json:"available,omitempty"`
4375}
4376
4377// EffectiveNetworkSecurityGroup effective network security group.
4378type EffectiveNetworkSecurityGroup struct {
4379	// NetworkSecurityGroup - The ID of network security group that is applied.
4380	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
4381	// Association - Associated resources.
4382	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
4383	// EffectiveSecurityRules - A collection of effective security rules.
4384	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
4385	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
4386	TagMap map[string][]string `json:"tagMap"`
4387}
4388
4389// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
4390func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
4391	objectMap := make(map[string]interface{})
4392	if ensg.NetworkSecurityGroup != nil {
4393		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
4394	}
4395	if ensg.Association != nil {
4396		objectMap["association"] = ensg.Association
4397	}
4398	if ensg.EffectiveSecurityRules != nil {
4399		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
4400	}
4401	if ensg.TagMap != nil {
4402		objectMap["tagMap"] = ensg.TagMap
4403	}
4404	return json.Marshal(objectMap)
4405}
4406
4407// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
4408type EffectiveNetworkSecurityGroupAssociation struct {
4409	// Subnet - The ID of the subnet if assigned.
4410	Subnet *SubResource `json:"subnet,omitempty"`
4411	// NetworkInterface - The ID of the network interface if assigned.
4412	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
4413}
4414
4415// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
4416// call.
4417type EffectiveNetworkSecurityGroupListResult struct {
4418	autorest.Response `json:"-"`
4419	// Value - A list of effective network security groups.
4420	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
4421	// NextLink - READ-ONLY; The URL to get the next set of results.
4422	NextLink *string `json:"nextLink,omitempty"`
4423}
4424
4425// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
4426func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4427	objectMap := make(map[string]interface{})
4428	if ensglr.Value != nil {
4429		objectMap["value"] = ensglr.Value
4430	}
4431	return json.Marshal(objectMap)
4432}
4433
4434// EffectiveNetworkSecurityRule effective network security rules.
4435type EffectiveNetworkSecurityRule struct {
4436	// Name - The name of the security rule specified by the user (if created by the user).
4437	Name *string `json:"name,omitempty"`
4438	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
4439	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
4440	// SourcePortRange - The source port or range.
4441	SourcePortRange *string `json:"sourcePortRange,omitempty"`
4442	// DestinationPortRange - The destination port or range.
4443	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
4444	// 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 (*)
4445	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
4446	// 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 (*)
4447	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
4448	// SourceAddressPrefix - The source address prefix.
4449	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
4450	// DestinationAddressPrefix - The destination address prefix.
4451	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
4452	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4453	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
4454	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4455	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
4456	// ExpandedSourceAddressPrefix - The expanded source address prefix.
4457	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
4458	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
4459	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
4460	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
4461	Access SecurityRuleAccess `json:"access,omitempty"`
4462	// Priority - The priority of the rule.
4463	Priority *int32 `json:"priority,omitempty"`
4464	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
4465	Direction SecurityRuleDirection `json:"direction,omitempty"`
4466}
4467
4468// EffectiveRoute effective Route
4469type EffectiveRoute struct {
4470	// Name - The name of the user defined route. This is optional.
4471	Name *string `json:"name,omitempty"`
4472	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
4473	Source EffectiveRouteSource `json:"source,omitempty"`
4474	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
4475	State EffectiveRouteState `json:"state,omitempty"`
4476	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
4477	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
4478	// NextHopIPAddress - The IP address of the next hop of the effective route.
4479	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
4480	// 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'
4481	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
4482}
4483
4484// EffectiveRouteListResult response for list effective route API service call.
4485type EffectiveRouteListResult struct {
4486	autorest.Response `json:"-"`
4487	// Value - A list of effective routes.
4488	Value *[]EffectiveRoute `json:"value,omitempty"`
4489	// NextLink - READ-ONLY; The URL to get the next set of results.
4490	NextLink *string `json:"nextLink,omitempty"`
4491}
4492
4493// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
4494func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
4495	objectMap := make(map[string]interface{})
4496	if erlr.Value != nil {
4497		objectMap["value"] = erlr.Value
4498	}
4499	return json.Marshal(objectMap)
4500}
4501
4502// EndpointServiceResult endpoint service.
4503type EndpointServiceResult struct {
4504	// Name - READ-ONLY; Name of the endpoint service.
4505	Name *string `json:"name,omitempty"`
4506	// Type - READ-ONLY; Type of the endpoint service.
4507	Type *string `json:"type,omitempty"`
4508	// ID - Resource ID.
4509	ID *string `json:"id,omitempty"`
4510}
4511
4512// MarshalJSON is the custom marshaler for EndpointServiceResult.
4513func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
4514	objectMap := make(map[string]interface{})
4515	if esr.ID != nil {
4516		objectMap["id"] = esr.ID
4517	}
4518	return json.Marshal(objectMap)
4519}
4520
4521// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
4522type EndpointServicesListResult struct {
4523	autorest.Response `json:"-"`
4524	// Value - List of available endpoint services in a region.
4525	Value *[]EndpointServiceResult `json:"value,omitempty"`
4526	// NextLink - The URL to get the next set of results.
4527	NextLink *string `json:"nextLink,omitempty"`
4528}
4529
4530// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
4531// values.
4532type EndpointServicesListResultIterator struct {
4533	i    int
4534	page EndpointServicesListResultPage
4535}
4536
4537// NextWithContext advances to the next value.  If there was an error making
4538// the request the iterator does not advance and the error is returned.
4539func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
4540	if tracing.IsEnabled() {
4541		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
4542		defer func() {
4543			sc := -1
4544			if iter.Response().Response.Response != nil {
4545				sc = iter.Response().Response.Response.StatusCode
4546			}
4547			tracing.EndSpan(ctx, sc, err)
4548		}()
4549	}
4550	iter.i++
4551	if iter.i < len(iter.page.Values()) {
4552		return nil
4553	}
4554	err = iter.page.NextWithContext(ctx)
4555	if err != nil {
4556		iter.i--
4557		return err
4558	}
4559	iter.i = 0
4560	return nil
4561}
4562
4563// Next advances to the next value.  If there was an error making
4564// the request the iterator does not advance and the error is returned.
4565// Deprecated: Use NextWithContext() instead.
4566func (iter *EndpointServicesListResultIterator) Next() error {
4567	return iter.NextWithContext(context.Background())
4568}
4569
4570// NotDone returns true if the enumeration should be started or is not yet complete.
4571func (iter EndpointServicesListResultIterator) NotDone() bool {
4572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4573}
4574
4575// Response returns the raw server response from the last page request.
4576func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
4577	return iter.page.Response()
4578}
4579
4580// Value returns the current value or a zero-initialized value if the
4581// iterator has advanced beyond the end of the collection.
4582func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
4583	if !iter.page.NotDone() {
4584		return EndpointServiceResult{}
4585	}
4586	return iter.page.Values()[iter.i]
4587}
4588
4589// Creates a new instance of the EndpointServicesListResultIterator type.
4590func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
4591	return EndpointServicesListResultIterator{page: page}
4592}
4593
4594// IsEmpty returns true if the ListResult contains no values.
4595func (eslr EndpointServicesListResult) IsEmpty() bool {
4596	return eslr.Value == nil || len(*eslr.Value) == 0
4597}
4598
4599// hasNextLink returns true if the NextLink is not empty.
4600func (eslr EndpointServicesListResult) hasNextLink() bool {
4601	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
4602}
4603
4604// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
4605// It returns nil if no more results exist.
4606func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
4607	if !eslr.hasNextLink() {
4608		return nil, nil
4609	}
4610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4611		autorest.AsJSON(),
4612		autorest.AsGet(),
4613		autorest.WithBaseURL(to.String(eslr.NextLink)))
4614}
4615
4616// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
4617type EndpointServicesListResultPage struct {
4618	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
4619	eslr EndpointServicesListResult
4620}
4621
4622// NextWithContext advances to the next page of values.  If there was an error making
4623// the request the page does not advance and the error is returned.
4624func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
4625	if tracing.IsEnabled() {
4626		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
4627		defer func() {
4628			sc := -1
4629			if page.Response().Response.Response != nil {
4630				sc = page.Response().Response.Response.StatusCode
4631			}
4632			tracing.EndSpan(ctx, sc, err)
4633		}()
4634	}
4635	for {
4636		next, err := page.fn(ctx, page.eslr)
4637		if err != nil {
4638			return err
4639		}
4640		page.eslr = next
4641		if !next.hasNextLink() || !next.IsEmpty() {
4642			break
4643		}
4644	}
4645	return nil
4646}
4647
4648// Next advances to the next page of values.  If there was an error making
4649// the request the page does not advance and the error is returned.
4650// Deprecated: Use NextWithContext() instead.
4651func (page *EndpointServicesListResultPage) Next() error {
4652	return page.NextWithContext(context.Background())
4653}
4654
4655// NotDone returns true if the page enumeration should be started or is not yet complete.
4656func (page EndpointServicesListResultPage) NotDone() bool {
4657	return !page.eslr.IsEmpty()
4658}
4659
4660// Response returns the raw server response from the last page request.
4661func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
4662	return page.eslr
4663}
4664
4665// Values returns the slice of values for the current page or nil if there are no values.
4666func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
4667	if page.eslr.IsEmpty() {
4668		return nil
4669	}
4670	return *page.eslr.Value
4671}
4672
4673// Creates a new instance of the EndpointServicesListResultPage type.
4674func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
4675	return EndpointServicesListResultPage{
4676		fn:   getNextPage,
4677		eslr: cur,
4678	}
4679}
4680
4681// Error ...
4682type Error struct {
4683	Code       *string         `json:"code,omitempty"`
4684	Message    *string         `json:"message,omitempty"`
4685	Target     *string         `json:"target,omitempty"`
4686	Details    *[]ErrorDetails `json:"details,omitempty"`
4687	InnerError *string         `json:"innerError,omitempty"`
4688}
4689
4690// ErrorDetails ...
4691type ErrorDetails struct {
4692	Code    *string `json:"code,omitempty"`
4693	Target  *string `json:"target,omitempty"`
4694	Message *string `json:"message,omitempty"`
4695}
4696
4697// ExpressRouteCircuit expressRouteCircuit resource
4698type ExpressRouteCircuit struct {
4699	autorest.Response `json:"-"`
4700	// Sku - The SKU.
4701	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
4702	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
4703	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4704	Etag *string `json:"etag,omitempty"`
4705	// ID - Resource ID.
4706	ID *string `json:"id,omitempty"`
4707	// Name - READ-ONLY; Resource name.
4708	Name *string `json:"name,omitempty"`
4709	// Type - READ-ONLY; Resource type.
4710	Type *string `json:"type,omitempty"`
4711	// Location - Resource location.
4712	Location *string `json:"location,omitempty"`
4713	// Tags - Resource tags.
4714	Tags map[string]*string `json:"tags"`
4715}
4716
4717// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
4718func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
4719	objectMap := make(map[string]interface{})
4720	if erc.Sku != nil {
4721		objectMap["sku"] = erc.Sku
4722	}
4723	if erc.ExpressRouteCircuitPropertiesFormat != nil {
4724		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
4725	}
4726	if erc.ID != nil {
4727		objectMap["id"] = erc.ID
4728	}
4729	if erc.Location != nil {
4730		objectMap["location"] = erc.Location
4731	}
4732	if erc.Tags != nil {
4733		objectMap["tags"] = erc.Tags
4734	}
4735	return json.Marshal(objectMap)
4736}
4737
4738// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
4739func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
4740	var m map[string]*json.RawMessage
4741	err := json.Unmarshal(body, &m)
4742	if err != nil {
4743		return err
4744	}
4745	for k, v := range m {
4746		switch k {
4747		case "sku":
4748			if v != nil {
4749				var sku ExpressRouteCircuitSku
4750				err = json.Unmarshal(*v, &sku)
4751				if err != nil {
4752					return err
4753				}
4754				erc.Sku = &sku
4755			}
4756		case "properties":
4757			if v != nil {
4758				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
4759				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
4760				if err != nil {
4761					return err
4762				}
4763				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
4764			}
4765		case "etag":
4766			if v != nil {
4767				var etag string
4768				err = json.Unmarshal(*v, &etag)
4769				if err != nil {
4770					return err
4771				}
4772				erc.Etag = &etag
4773			}
4774		case "id":
4775			if v != nil {
4776				var ID string
4777				err = json.Unmarshal(*v, &ID)
4778				if err != nil {
4779					return err
4780				}
4781				erc.ID = &ID
4782			}
4783		case "name":
4784			if v != nil {
4785				var name string
4786				err = json.Unmarshal(*v, &name)
4787				if err != nil {
4788					return err
4789				}
4790				erc.Name = &name
4791			}
4792		case "type":
4793			if v != nil {
4794				var typeVar string
4795				err = json.Unmarshal(*v, &typeVar)
4796				if err != nil {
4797					return err
4798				}
4799				erc.Type = &typeVar
4800			}
4801		case "location":
4802			if v != nil {
4803				var location string
4804				err = json.Unmarshal(*v, &location)
4805				if err != nil {
4806					return err
4807				}
4808				erc.Location = &location
4809			}
4810		case "tags":
4811			if v != nil {
4812				var tags map[string]*string
4813				err = json.Unmarshal(*v, &tags)
4814				if err != nil {
4815					return err
4816				}
4817				erc.Tags = tags
4818			}
4819		}
4820	}
4821
4822	return nil
4823}
4824
4825// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
4826type ExpressRouteCircuitArpTable struct {
4827	// Age - Age
4828	Age *int32 `json:"age,omitempty"`
4829	// Interface - Interface
4830	Interface *string `json:"interface,omitempty"`
4831	// IPAddress - The IP address.
4832	IPAddress *string `json:"ipAddress,omitempty"`
4833	// MacAddress - The MAC address.
4834	MacAddress *string `json:"macAddress,omitempty"`
4835}
4836
4837// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
4838type ExpressRouteCircuitAuthorization struct {
4839	autorest.Response              `json:"-"`
4840	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
4841	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4842	Name *string `json:"name,omitempty"`
4843	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4844	Etag *string `json:"etag,omitempty"`
4845	// ID - Resource ID.
4846	ID *string `json:"id,omitempty"`
4847}
4848
4849// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
4850func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
4851	objectMap := make(map[string]interface{})
4852	if erca.AuthorizationPropertiesFormat != nil {
4853		objectMap["properties"] = erca.AuthorizationPropertiesFormat
4854	}
4855	if erca.Name != nil {
4856		objectMap["name"] = erca.Name
4857	}
4858	if erca.ID != nil {
4859		objectMap["id"] = erca.ID
4860	}
4861	return json.Marshal(objectMap)
4862}
4863
4864// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
4865func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
4866	var m map[string]*json.RawMessage
4867	err := json.Unmarshal(body, &m)
4868	if err != nil {
4869		return err
4870	}
4871	for k, v := range m {
4872		switch k {
4873		case "properties":
4874			if v != nil {
4875				var authorizationPropertiesFormat AuthorizationPropertiesFormat
4876				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
4877				if err != nil {
4878					return err
4879				}
4880				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
4881			}
4882		case "name":
4883			if v != nil {
4884				var name string
4885				err = json.Unmarshal(*v, &name)
4886				if err != nil {
4887					return err
4888				}
4889				erca.Name = &name
4890			}
4891		case "etag":
4892			if v != nil {
4893				var etag string
4894				err = json.Unmarshal(*v, &etag)
4895				if err != nil {
4896					return err
4897				}
4898				erca.Etag = &etag
4899			}
4900		case "id":
4901			if v != nil {
4902				var ID string
4903				err = json.Unmarshal(*v, &ID)
4904				if err != nil {
4905					return err
4906				}
4907				erca.ID = &ID
4908			}
4909		}
4910	}
4911
4912	return nil
4913}
4914
4915// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
4916// results of a long-running operation.
4917type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
4918	azure.FutureAPI
4919	// Result returns the result of the asynchronous operation.
4920	// If the operation has not completed it will return an error.
4921	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
4922}
4923
4924// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4925func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4926	var azFuture azure.Future
4927	if err := json.Unmarshal(body, &azFuture); err != nil {
4928		return err
4929	}
4930	future.FutureAPI = &azFuture
4931	future.Result = future.result
4932	return nil
4933}
4934
4935// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
4936func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
4937	var done bool
4938	done, err = future.DoneWithContext(context.Background(), client)
4939	if err != nil {
4940		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4941		return
4942	}
4943	if !done {
4944		erca.Response.Response = future.Response()
4945		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
4946		return
4947	}
4948	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4949	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
4950		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
4951		if err != nil {
4952			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
4953		}
4954	}
4955	return
4956}
4957
4958// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
4959// of a long-running operation.
4960type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
4961	azure.FutureAPI
4962	// Result returns the result of the asynchronous operation.
4963	// If the operation has not completed it will return an error.
4964	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
4965}
4966
4967// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4968func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
4969	var azFuture azure.Future
4970	if err := json.Unmarshal(body, &azFuture); err != nil {
4971		return err
4972	}
4973	future.FutureAPI = &azFuture
4974	future.Result = future.result
4975	return nil
4976}
4977
4978// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
4979func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
4980	var done bool
4981	done, err = future.DoneWithContext(context.Background(), client)
4982	if err != nil {
4983		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
4984		return
4985	}
4986	if !done {
4987		ar.Response = future.Response()
4988		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
4989		return
4990	}
4991	ar.Response = future.Response()
4992	return
4993}
4994
4995// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
4996type ExpressRouteCircuitListResult struct {
4997	autorest.Response `json:"-"`
4998	// Value - A list of ExpressRouteCircuits in a resource group.
4999	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
5000	// NextLink - The URL to get the next set of results.
5001	NextLink *string `json:"nextLink,omitempty"`
5002}
5003
5004// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
5005// values.
5006type ExpressRouteCircuitListResultIterator struct {
5007	i    int
5008	page ExpressRouteCircuitListResultPage
5009}
5010
5011// NextWithContext advances to the next value.  If there was an error making
5012// the request the iterator does not advance and the error is returned.
5013func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
5014	if tracing.IsEnabled() {
5015		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
5016		defer func() {
5017			sc := -1
5018			if iter.Response().Response.Response != nil {
5019				sc = iter.Response().Response.Response.StatusCode
5020			}
5021			tracing.EndSpan(ctx, sc, err)
5022		}()
5023	}
5024	iter.i++
5025	if iter.i < len(iter.page.Values()) {
5026		return nil
5027	}
5028	err = iter.page.NextWithContext(ctx)
5029	if err != nil {
5030		iter.i--
5031		return err
5032	}
5033	iter.i = 0
5034	return nil
5035}
5036
5037// Next advances to the next value.  If there was an error making
5038// the request the iterator does not advance and the error is returned.
5039// Deprecated: Use NextWithContext() instead.
5040func (iter *ExpressRouteCircuitListResultIterator) Next() error {
5041	return iter.NextWithContext(context.Background())
5042}
5043
5044// NotDone returns true if the enumeration should be started or is not yet complete.
5045func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
5046	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5047}
5048
5049// Response returns the raw server response from the last page request.
5050func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
5051	return iter.page.Response()
5052}
5053
5054// Value returns the current value or a zero-initialized value if the
5055// iterator has advanced beyond the end of the collection.
5056func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
5057	if !iter.page.NotDone() {
5058		return ExpressRouteCircuit{}
5059	}
5060	return iter.page.Values()[iter.i]
5061}
5062
5063// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
5064func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
5065	return ExpressRouteCircuitListResultIterator{page: page}
5066}
5067
5068// IsEmpty returns true if the ListResult contains no values.
5069func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
5070	return erclr.Value == nil || len(*erclr.Value) == 0
5071}
5072
5073// hasNextLink returns true if the NextLink is not empty.
5074func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
5075	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
5076}
5077
5078// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
5079// It returns nil if no more results exist.
5080func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
5081	if !erclr.hasNextLink() {
5082		return nil, nil
5083	}
5084	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5085		autorest.AsJSON(),
5086		autorest.AsGet(),
5087		autorest.WithBaseURL(to.String(erclr.NextLink)))
5088}
5089
5090// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
5091type ExpressRouteCircuitListResultPage struct {
5092	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
5093	erclr ExpressRouteCircuitListResult
5094}
5095
5096// NextWithContext advances to the next page of values.  If there was an error making
5097// the request the page does not advance and the error is returned.
5098func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
5099	if tracing.IsEnabled() {
5100		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
5101		defer func() {
5102			sc := -1
5103			if page.Response().Response.Response != nil {
5104				sc = page.Response().Response.Response.StatusCode
5105			}
5106			tracing.EndSpan(ctx, sc, err)
5107		}()
5108	}
5109	for {
5110		next, err := page.fn(ctx, page.erclr)
5111		if err != nil {
5112			return err
5113		}
5114		page.erclr = next
5115		if !next.hasNextLink() || !next.IsEmpty() {
5116			break
5117		}
5118	}
5119	return nil
5120}
5121
5122// Next advances to the next page of values.  If there was an error making
5123// the request the page does not advance and the error is returned.
5124// Deprecated: Use NextWithContext() instead.
5125func (page *ExpressRouteCircuitListResultPage) Next() error {
5126	return page.NextWithContext(context.Background())
5127}
5128
5129// NotDone returns true if the page enumeration should be started or is not yet complete.
5130func (page ExpressRouteCircuitListResultPage) NotDone() bool {
5131	return !page.erclr.IsEmpty()
5132}
5133
5134// Response returns the raw server response from the last page request.
5135func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
5136	return page.erclr
5137}
5138
5139// Values returns the slice of values for the current page or nil if there are no values.
5140func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
5141	if page.erclr.IsEmpty() {
5142		return nil
5143	}
5144	return *page.erclr.Value
5145}
5146
5147// Creates a new instance of the ExpressRouteCircuitListResultPage type.
5148func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
5149	return ExpressRouteCircuitListResultPage{
5150		fn:    getNextPage,
5151		erclr: cur,
5152	}
5153}
5154
5155// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
5156type ExpressRouteCircuitPeering struct {
5157	autorest.Response                           `json:"-"`
5158	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
5159	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5160	Name *string `json:"name,omitempty"`
5161	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5162	Etag *string `json:"etag,omitempty"`
5163	// ID - Resource ID.
5164	ID *string `json:"id,omitempty"`
5165}
5166
5167// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
5168func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
5169	objectMap := make(map[string]interface{})
5170	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
5171		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
5172	}
5173	if ercp.Name != nil {
5174		objectMap["name"] = ercp.Name
5175	}
5176	if ercp.ID != nil {
5177		objectMap["id"] = ercp.ID
5178	}
5179	return json.Marshal(objectMap)
5180}
5181
5182// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
5183func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
5184	var m map[string]*json.RawMessage
5185	err := json.Unmarshal(body, &m)
5186	if err != nil {
5187		return err
5188	}
5189	for k, v := range m {
5190		switch k {
5191		case "properties":
5192			if v != nil {
5193				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
5194				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
5195				if err != nil {
5196					return err
5197				}
5198				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
5199			}
5200		case "name":
5201			if v != nil {
5202				var name string
5203				err = json.Unmarshal(*v, &name)
5204				if err != nil {
5205					return err
5206				}
5207				ercp.Name = &name
5208			}
5209		case "etag":
5210			if v != nil {
5211				var etag string
5212				err = json.Unmarshal(*v, &etag)
5213				if err != nil {
5214					return err
5215				}
5216				ercp.Etag = &etag
5217			}
5218		case "id":
5219			if v != nil {
5220				var ID string
5221				err = json.Unmarshal(*v, &ID)
5222				if err != nil {
5223					return err
5224				}
5225				ercp.ID = &ID
5226			}
5227		}
5228	}
5229
5230	return nil
5231}
5232
5233// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
5234type ExpressRouteCircuitPeeringConfig struct {
5235	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
5236	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
5237	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
5238	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
5239	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
5240	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
5241	// LegacyMode - The legacy mode of the peering.
5242	LegacyMode *int32 `json:"legacyMode,omitempty"`
5243	// CustomerASN - The CustomerASN of the peering.
5244	CustomerASN *int32 `json:"customerASN,omitempty"`
5245	// RoutingRegistryName - The RoutingRegistryName of the configuration.
5246	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
5247}
5248
5249// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
5250// that belong to an ExpressRouteCircuit.
5251type ExpressRouteCircuitPeeringListResult struct {
5252	autorest.Response `json:"-"`
5253	// Value - The peerings in an express route circuit.
5254	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
5255	// NextLink - The URL to get the next set of results.
5256	NextLink *string `json:"nextLink,omitempty"`
5257}
5258
5259// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
5260// ExpressRouteCircuitPeering values.
5261type ExpressRouteCircuitPeeringListResultIterator struct {
5262	i    int
5263	page ExpressRouteCircuitPeeringListResultPage
5264}
5265
5266// NextWithContext advances to the next value.  If there was an error making
5267// the request the iterator does not advance and the error is returned.
5268func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
5269	if tracing.IsEnabled() {
5270		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
5271		defer func() {
5272			sc := -1
5273			if iter.Response().Response.Response != nil {
5274				sc = iter.Response().Response.Response.StatusCode
5275			}
5276			tracing.EndSpan(ctx, sc, err)
5277		}()
5278	}
5279	iter.i++
5280	if iter.i < len(iter.page.Values()) {
5281		return nil
5282	}
5283	err = iter.page.NextWithContext(ctx)
5284	if err != nil {
5285		iter.i--
5286		return err
5287	}
5288	iter.i = 0
5289	return nil
5290}
5291
5292// Next advances to the next value.  If there was an error making
5293// the request the iterator does not advance and the error is returned.
5294// Deprecated: Use NextWithContext() instead.
5295func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
5296	return iter.NextWithContext(context.Background())
5297}
5298
5299// NotDone returns true if the enumeration should be started or is not yet complete.
5300func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
5301	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5302}
5303
5304// Response returns the raw server response from the last page request.
5305func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
5306	return iter.page.Response()
5307}
5308
5309// Value returns the current value or a zero-initialized value if the
5310// iterator has advanced beyond the end of the collection.
5311func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
5312	if !iter.page.NotDone() {
5313		return ExpressRouteCircuitPeering{}
5314	}
5315	return iter.page.Values()[iter.i]
5316}
5317
5318// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
5319func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
5320	return ExpressRouteCircuitPeeringListResultIterator{page: page}
5321}
5322
5323// IsEmpty returns true if the ListResult contains no values.
5324func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
5325	return ercplr.Value == nil || len(*ercplr.Value) == 0
5326}
5327
5328// hasNextLink returns true if the NextLink is not empty.
5329func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
5330	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
5331}
5332
5333// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
5334// It returns nil if no more results exist.
5335func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
5336	if !ercplr.hasNextLink() {
5337		return nil, nil
5338	}
5339	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5340		autorest.AsJSON(),
5341		autorest.AsGet(),
5342		autorest.WithBaseURL(to.String(ercplr.NextLink)))
5343}
5344
5345// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
5346type ExpressRouteCircuitPeeringListResultPage struct {
5347	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
5348	ercplr ExpressRouteCircuitPeeringListResult
5349}
5350
5351// NextWithContext advances to the next page of values.  If there was an error making
5352// the request the page does not advance and the error is returned.
5353func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
5354	if tracing.IsEnabled() {
5355		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
5356		defer func() {
5357			sc := -1
5358			if page.Response().Response.Response != nil {
5359				sc = page.Response().Response.Response.StatusCode
5360			}
5361			tracing.EndSpan(ctx, sc, err)
5362		}()
5363	}
5364	for {
5365		next, err := page.fn(ctx, page.ercplr)
5366		if err != nil {
5367			return err
5368		}
5369		page.ercplr = next
5370		if !next.hasNextLink() || !next.IsEmpty() {
5371			break
5372		}
5373	}
5374	return nil
5375}
5376
5377// Next advances to the next page of values.  If there was an error making
5378// the request the page does not advance and the error is returned.
5379// Deprecated: Use NextWithContext() instead.
5380func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
5381	return page.NextWithContext(context.Background())
5382}
5383
5384// NotDone returns true if the page enumeration should be started or is not yet complete.
5385func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
5386	return !page.ercplr.IsEmpty()
5387}
5388
5389// Response returns the raw server response from the last page request.
5390func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
5391	return page.ercplr
5392}
5393
5394// Values returns the slice of values for the current page or nil if there are no values.
5395func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
5396	if page.ercplr.IsEmpty() {
5397		return nil
5398	}
5399	return *page.ercplr.Value
5400}
5401
5402// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
5403func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
5404	return ExpressRouteCircuitPeeringListResultPage{
5405		fn:     getNextPage,
5406		ercplr: cur,
5407	}
5408}
5409
5410// ExpressRouteCircuitPeeringPropertiesFormat ...
5411type ExpressRouteCircuitPeeringPropertiesFormat struct {
5412	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
5413	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
5414	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
5415	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
5416	// AzureASN - The Azure ASN.
5417	AzureASN *int32 `json:"azureASN,omitempty"`
5418	// PeerASN - The peer ASN.
5419	PeerASN *int64 `json:"peerASN,omitempty"`
5420	// PrimaryPeerAddressPrefix - The primary address prefix.
5421	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
5422	// SecondaryPeerAddressPrefix - The secondary address prefix.
5423	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
5424	// PrimaryAzurePort - The primary port.
5425	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
5426	// SecondaryAzurePort - The secondary port.
5427	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
5428	// SharedKey - The shared key.
5429	SharedKey *string `json:"sharedKey,omitempty"`
5430	// VlanID - The VLAN ID.
5431	VlanID *int32 `json:"vlanId,omitempty"`
5432	// MicrosoftPeeringConfig - The Microsoft peering configuration.
5433	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
5434	// Stats - Gets peering stats.
5435	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
5436	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5437	ProvisioningState *string `json:"provisioningState,omitempty"`
5438	// GatewayManagerEtag - The GatewayManager Etag.
5439	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5440	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
5441	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
5442	// RouteFilter - The reference of the RouteFilter resource.
5443	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
5444	// Ipv6PeeringConfig - The IPv6 peering configuration.
5445	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
5446}
5447
5448// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
5449// of a long-running operation.
5450type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
5451	azure.FutureAPI
5452	// Result returns the result of the asynchronous operation.
5453	// If the operation has not completed it will return an error.
5454	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
5455}
5456
5457// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5458func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5459	var azFuture azure.Future
5460	if err := json.Unmarshal(body, &azFuture); err != nil {
5461		return err
5462	}
5463	future.FutureAPI = &azFuture
5464	future.Result = future.result
5465	return nil
5466}
5467
5468// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
5469func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
5470	var done bool
5471	done, err = future.DoneWithContext(context.Background(), client)
5472	if err != nil {
5473		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5474		return
5475	}
5476	if !done {
5477		ercp.Response.Response = future.Response()
5478		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
5479		return
5480	}
5481	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5482	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
5483		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
5484		if err != nil {
5485			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
5486		}
5487	}
5488	return
5489}
5490
5491// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
5492// long-running operation.
5493type ExpressRouteCircuitPeeringsDeleteFuture struct {
5494	azure.FutureAPI
5495	// Result returns the result of the asynchronous operation.
5496	// If the operation has not completed it will return an error.
5497	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
5498}
5499
5500// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5501func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
5502	var azFuture azure.Future
5503	if err := json.Unmarshal(body, &azFuture); err != nil {
5504		return err
5505	}
5506	future.FutureAPI = &azFuture
5507	future.Result = future.result
5508	return nil
5509}
5510
5511// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
5512func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
5513	var done bool
5514	done, err = future.DoneWithContext(context.Background(), client)
5515	if err != nil {
5516		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
5517		return
5518	}
5519	if !done {
5520		ar.Response = future.Response()
5521		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
5522		return
5523	}
5524	ar.Response = future.Response()
5525	return
5526}
5527
5528// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
5529type ExpressRouteCircuitPropertiesFormat struct {
5530	// AllowClassicOperations - Allow classic operations
5531	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
5532	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
5533	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
5534	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
5535	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
5536	// Authorizations - The list of authorizations.
5537	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
5538	// Peerings - The list of peerings.
5539	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
5540	// ServiceKey - The ServiceKey.
5541	ServiceKey *string `json:"serviceKey,omitempty"`
5542	// ServiceProviderNotes - The ServiceProviderNotes.
5543	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
5544	// ServiceProviderProperties - The ServiceProviderProperties.
5545	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
5546	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5547	ProvisioningState *string `json:"provisioningState,omitempty"`
5548	// GatewayManagerEtag - The GatewayManager Etag.
5549	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5550}
5551
5552// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
5553type ExpressRouteCircuitRoutesTable struct {
5554	// NetworkProperty - network
5555	NetworkProperty *string `json:"network,omitempty"`
5556	// NextHop - nextHop
5557	NextHop *string `json:"nextHop,omitempty"`
5558	// LocPrf - locPrf
5559	LocPrf *string `json:"locPrf,omitempty"`
5560	// Weight - weight.
5561	Weight *int32 `json:"weight,omitempty"`
5562	// Path - path
5563	Path *string `json:"path,omitempty"`
5564}
5565
5566// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
5567type ExpressRouteCircuitRoutesTableSummary struct {
5568	// Neighbor - Neighbor
5569	Neighbor *string `json:"neighbor,omitempty"`
5570	// V - BGP version number spoken to the neighbor.
5571	V *int32 `json:"v,omitempty"`
5572	// As - Autonomous system number.
5573	As *int32 `json:"as,omitempty"`
5574	// 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.
5575	UpDown *string `json:"upDown,omitempty"`
5576	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
5577	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
5578}
5579
5580// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
5581// Circuits API.
5582type ExpressRouteCircuitsArpTableListResult struct {
5583	autorest.Response `json:"-"`
5584	// Value - Gets list of the ARP table.
5585	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
5586	// NextLink - The URL to get the next set of results.
5587	NextLink *string `json:"nextLink,omitempty"`
5588}
5589
5590// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5591// long-running operation.
5592type ExpressRouteCircuitsCreateOrUpdateFuture struct {
5593	azure.FutureAPI
5594	// Result returns the result of the asynchronous operation.
5595	// If the operation has not completed it will return an error.
5596	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5597}
5598
5599// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5600func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5601	var azFuture azure.Future
5602	if err := json.Unmarshal(body, &azFuture); err != nil {
5603		return err
5604	}
5605	future.FutureAPI = &azFuture
5606	future.Result = future.result
5607	return nil
5608}
5609
5610// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
5611func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5612	var done bool
5613	done, err = future.DoneWithContext(context.Background(), client)
5614	if err != nil {
5615		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5616		return
5617	}
5618	if !done {
5619		erc.Response.Response = future.Response()
5620		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
5621		return
5622	}
5623	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5624	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5625		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
5626		if err != nil {
5627			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
5628		}
5629	}
5630	return
5631}
5632
5633// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
5634// long-running operation.
5635type ExpressRouteCircuitsDeleteFuture struct {
5636	azure.FutureAPI
5637	// Result returns the result of the asynchronous operation.
5638	// If the operation has not completed it will return an error.
5639	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
5640}
5641
5642// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5643func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
5644	var azFuture azure.Future
5645	if err := json.Unmarshal(body, &azFuture); err != nil {
5646		return err
5647	}
5648	future.FutureAPI = &azFuture
5649	future.Result = future.result
5650	return nil
5651}
5652
5653// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
5654func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
5655	var done bool
5656	done, err = future.DoneWithContext(context.Background(), client)
5657	if err != nil {
5658		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
5659		return
5660	}
5661	if !done {
5662		ar.Response = future.Response()
5663		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
5664		return
5665	}
5666	ar.Response = future.Response()
5667	return
5668}
5669
5670// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
5671// ExpressRouteCircuit.
5672type ExpressRouteCircuitServiceProviderProperties struct {
5673	// ServiceProviderName - The serviceProviderName.
5674	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
5675	// PeeringLocation - The peering location.
5676	PeeringLocation *string `json:"peeringLocation,omitempty"`
5677	// BandwidthInMbps - The BandwidthInMbps.
5678	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
5679}
5680
5681// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
5682type ExpressRouteCircuitSku struct {
5683	// Name - The name of the SKU.
5684	Name *string `json:"name,omitempty"`
5685	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
5686	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
5687	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
5688	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
5689}
5690
5691// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
5692// long-running operation.
5693type ExpressRouteCircuitsListArpTableFuture struct {
5694	azure.FutureAPI
5695	// Result returns the result of the asynchronous operation.
5696	// If the operation has not completed it will return an error.
5697	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
5698}
5699
5700// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5701func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
5702	var azFuture azure.Future
5703	if err := json.Unmarshal(body, &azFuture); err != nil {
5704		return err
5705	}
5706	future.FutureAPI = &azFuture
5707	future.Result = future.result
5708	return nil
5709}
5710
5711// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
5712func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
5713	var done bool
5714	done, err = future.DoneWithContext(context.Background(), client)
5715	if err != nil {
5716		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
5717		return
5718	}
5719	if !done {
5720		ercatlr.Response.Response = future.Response()
5721		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
5722		return
5723	}
5724	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5725	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
5726		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
5727		if err != nil {
5728			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
5729		}
5730	}
5731	return
5732}
5733
5734// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
5735// long-running operation.
5736type ExpressRouteCircuitsListRoutesTableFuture struct {
5737	azure.FutureAPI
5738	// Result returns the result of the asynchronous operation.
5739	// If the operation has not completed it will return an error.
5740	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
5741}
5742
5743// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5744func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
5745	var azFuture azure.Future
5746	if err := json.Unmarshal(body, &azFuture); err != nil {
5747		return err
5748	}
5749	future.FutureAPI = &azFuture
5750	future.Result = future.result
5751	return nil
5752}
5753
5754// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
5755func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
5756	var done bool
5757	done, err = future.DoneWithContext(context.Background(), client)
5758	if err != nil {
5759		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
5760		return
5761	}
5762	if !done {
5763		ercrtlr.Response.Response = future.Response()
5764		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
5765		return
5766	}
5767	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5768	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
5769		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
5770		if err != nil {
5771			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
5772		}
5773	}
5774	return
5775}
5776
5777// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
5778// results of a long-running operation.
5779type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
5780	azure.FutureAPI
5781	// Result returns the result of the asynchronous operation.
5782	// If the operation has not completed it will return an error.
5783	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
5784}
5785
5786// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5787func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
5788	var azFuture azure.Future
5789	if err := json.Unmarshal(body, &azFuture); err != nil {
5790		return err
5791	}
5792	future.FutureAPI = &azFuture
5793	future.Result = future.result
5794	return nil
5795}
5796
5797// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
5798func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
5799	var done bool
5800	done, err = future.DoneWithContext(context.Background(), client)
5801	if err != nil {
5802		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
5803		return
5804	}
5805	if !done {
5806		ercrtslr.Response.Response = future.Response()
5807		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
5808		return
5809	}
5810	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5811	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
5812		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
5813		if err != nil {
5814			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
5815		}
5816	}
5817	return
5818}
5819
5820// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
5821// Circuits API.
5822type ExpressRouteCircuitsRoutesTableListResult struct {
5823	autorest.Response `json:"-"`
5824	// Value - The list of routes table.
5825	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
5826	// NextLink - The URL to get the next set of results.
5827	NextLink *string `json:"nextLink,omitempty"`
5828}
5829
5830// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
5831// Express Route Circuits API.
5832type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
5833	autorest.Response `json:"-"`
5834	// Value - A list of the routes table.
5835	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
5836	// NextLink - The URL to get the next set of results.
5837	NextLink *string `json:"nextLink,omitempty"`
5838}
5839
5840// ExpressRouteCircuitStats contains stats associated with the peering.
5841type ExpressRouteCircuitStats struct {
5842	autorest.Response `json:"-"`
5843	// PrimarybytesIn - Gets BytesIn of the peering.
5844	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
5845	// PrimarybytesOut - Gets BytesOut of the peering.
5846	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
5847	// SecondarybytesIn - Gets BytesIn of the peering.
5848	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
5849	// SecondarybytesOut - Gets BytesOut of the peering.
5850	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
5851}
5852
5853// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5854// long-running operation.
5855type ExpressRouteCircuitsUpdateTagsFuture struct {
5856	azure.FutureAPI
5857	// Result returns the result of the asynchronous operation.
5858	// If the operation has not completed it will return an error.
5859	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5860}
5861
5862// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5863func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
5864	var azFuture azure.Future
5865	if err := json.Unmarshal(body, &azFuture); err != nil {
5866		return err
5867	}
5868	future.FutureAPI = &azFuture
5869	future.Result = future.result
5870	return nil
5871}
5872
5873// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
5874func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5875	var done bool
5876	done, err = future.DoneWithContext(context.Background(), client)
5877	if err != nil {
5878		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
5879		return
5880	}
5881	if !done {
5882		erc.Response.Response = future.Response()
5883		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
5884		return
5885	}
5886	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5887	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5888		erc, err = client.UpdateTagsResponder(erc.Response.Response)
5889		if err != nil {
5890			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
5891		}
5892	}
5893	return
5894}
5895
5896// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
5897type ExpressRouteServiceProvider struct {
5898	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
5899	// ID - Resource ID.
5900	ID *string `json:"id,omitempty"`
5901	// Name - READ-ONLY; Resource name.
5902	Name *string `json:"name,omitempty"`
5903	// Type - READ-ONLY; Resource type.
5904	Type *string `json:"type,omitempty"`
5905	// Location - Resource location.
5906	Location *string `json:"location,omitempty"`
5907	// Tags - Resource tags.
5908	Tags map[string]*string `json:"tags"`
5909}
5910
5911// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
5912func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
5913	objectMap := make(map[string]interface{})
5914	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
5915		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
5916	}
5917	if ersp.ID != nil {
5918		objectMap["id"] = ersp.ID
5919	}
5920	if ersp.Location != nil {
5921		objectMap["location"] = ersp.Location
5922	}
5923	if ersp.Tags != nil {
5924		objectMap["tags"] = ersp.Tags
5925	}
5926	return json.Marshal(objectMap)
5927}
5928
5929// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
5930func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
5931	var m map[string]*json.RawMessage
5932	err := json.Unmarshal(body, &m)
5933	if err != nil {
5934		return err
5935	}
5936	for k, v := range m {
5937		switch k {
5938		case "properties":
5939			if v != nil {
5940				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
5941				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
5942				if err != nil {
5943					return err
5944				}
5945				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
5946			}
5947		case "id":
5948			if v != nil {
5949				var ID string
5950				err = json.Unmarshal(*v, &ID)
5951				if err != nil {
5952					return err
5953				}
5954				ersp.ID = &ID
5955			}
5956		case "name":
5957			if v != nil {
5958				var name string
5959				err = json.Unmarshal(*v, &name)
5960				if err != nil {
5961					return err
5962				}
5963				ersp.Name = &name
5964			}
5965		case "type":
5966			if v != nil {
5967				var typeVar string
5968				err = json.Unmarshal(*v, &typeVar)
5969				if err != nil {
5970					return err
5971				}
5972				ersp.Type = &typeVar
5973			}
5974		case "location":
5975			if v != nil {
5976				var location string
5977				err = json.Unmarshal(*v, &location)
5978				if err != nil {
5979					return err
5980				}
5981				ersp.Location = &location
5982			}
5983		case "tags":
5984			if v != nil {
5985				var tags map[string]*string
5986				err = json.Unmarshal(*v, &tags)
5987				if err != nil {
5988					return err
5989				}
5990				ersp.Tags = tags
5991			}
5992		}
5993	}
5994
5995	return nil
5996}
5997
5998// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
5999// resources.
6000type ExpressRouteServiceProviderBandwidthsOffered struct {
6001	// OfferName - The OfferName.
6002	OfferName *string `json:"offerName,omitempty"`
6003	// ValueInMbps - The ValueInMbps.
6004	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
6005}
6006
6007// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
6008type ExpressRouteServiceProviderListResult struct {
6009	autorest.Response `json:"-"`
6010	// Value - A list of ExpressRouteResourceProvider resources.
6011	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
6012	// NextLink - The URL to get the next set of results.
6013	NextLink *string `json:"nextLink,omitempty"`
6014}
6015
6016// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
6017// ExpressRouteServiceProvider values.
6018type ExpressRouteServiceProviderListResultIterator struct {
6019	i    int
6020	page ExpressRouteServiceProviderListResultPage
6021}
6022
6023// NextWithContext advances to the next value.  If there was an error making
6024// the request the iterator does not advance and the error is returned.
6025func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
6026	if tracing.IsEnabled() {
6027		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
6028		defer func() {
6029			sc := -1
6030			if iter.Response().Response.Response != nil {
6031				sc = iter.Response().Response.Response.StatusCode
6032			}
6033			tracing.EndSpan(ctx, sc, err)
6034		}()
6035	}
6036	iter.i++
6037	if iter.i < len(iter.page.Values()) {
6038		return nil
6039	}
6040	err = iter.page.NextWithContext(ctx)
6041	if err != nil {
6042		iter.i--
6043		return err
6044	}
6045	iter.i = 0
6046	return nil
6047}
6048
6049// Next advances to the next value.  If there was an error making
6050// the request the iterator does not advance and the error is returned.
6051// Deprecated: Use NextWithContext() instead.
6052func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
6053	return iter.NextWithContext(context.Background())
6054}
6055
6056// NotDone returns true if the enumeration should be started or is not yet complete.
6057func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
6058	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6059}
6060
6061// Response returns the raw server response from the last page request.
6062func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
6063	return iter.page.Response()
6064}
6065
6066// Value returns the current value or a zero-initialized value if the
6067// iterator has advanced beyond the end of the collection.
6068func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
6069	if !iter.page.NotDone() {
6070		return ExpressRouteServiceProvider{}
6071	}
6072	return iter.page.Values()[iter.i]
6073}
6074
6075// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
6076func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
6077	return ExpressRouteServiceProviderListResultIterator{page: page}
6078}
6079
6080// IsEmpty returns true if the ListResult contains no values.
6081func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
6082	return ersplr.Value == nil || len(*ersplr.Value) == 0
6083}
6084
6085// hasNextLink returns true if the NextLink is not empty.
6086func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
6087	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
6088}
6089
6090// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
6091// It returns nil if no more results exist.
6092func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
6093	if !ersplr.hasNextLink() {
6094		return nil, nil
6095	}
6096	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6097		autorest.AsJSON(),
6098		autorest.AsGet(),
6099		autorest.WithBaseURL(to.String(ersplr.NextLink)))
6100}
6101
6102// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
6103type ExpressRouteServiceProviderListResultPage struct {
6104	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
6105	ersplr ExpressRouteServiceProviderListResult
6106}
6107
6108// NextWithContext advances to the next page of values.  If there was an error making
6109// the request the page does not advance and the error is returned.
6110func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
6111	if tracing.IsEnabled() {
6112		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
6113		defer func() {
6114			sc := -1
6115			if page.Response().Response.Response != nil {
6116				sc = page.Response().Response.Response.StatusCode
6117			}
6118			tracing.EndSpan(ctx, sc, err)
6119		}()
6120	}
6121	for {
6122		next, err := page.fn(ctx, page.ersplr)
6123		if err != nil {
6124			return err
6125		}
6126		page.ersplr = next
6127		if !next.hasNextLink() || !next.IsEmpty() {
6128			break
6129		}
6130	}
6131	return nil
6132}
6133
6134// Next advances to the next page of values.  If there was an error making
6135// the request the page does not advance and the error is returned.
6136// Deprecated: Use NextWithContext() instead.
6137func (page *ExpressRouteServiceProviderListResultPage) Next() error {
6138	return page.NextWithContext(context.Background())
6139}
6140
6141// NotDone returns true if the page enumeration should be started or is not yet complete.
6142func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
6143	return !page.ersplr.IsEmpty()
6144}
6145
6146// Response returns the raw server response from the last page request.
6147func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
6148	return page.ersplr
6149}
6150
6151// Values returns the slice of values for the current page or nil if there are no values.
6152func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
6153	if page.ersplr.IsEmpty() {
6154		return nil
6155	}
6156	return *page.ersplr.Value
6157}
6158
6159// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
6160func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
6161	return ExpressRouteServiceProviderListResultPage{
6162		fn:     getNextPage,
6163		ersplr: cur,
6164	}
6165}
6166
6167// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
6168type ExpressRouteServiceProviderPropertiesFormat struct {
6169	// PeeringLocations - Get a list of peering locations.
6170	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
6171	// BandwidthsOffered - Gets bandwidths offered.
6172	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
6173	// ProvisioningState - Gets the provisioning state of the resource.
6174	ProvisioningState *string `json:"provisioningState,omitempty"`
6175}
6176
6177// FlowLogInformation information on the configuration of flow log and traffic analytics (optional).
6178type FlowLogInformation struct {
6179	autorest.Response `json:"-"`
6180	// TargetResourceID - The ID of the resource to configure for flow logging.
6181	TargetResourceID            *string `json:"targetResourceId,omitempty"`
6182	*FlowLogProperties          `json:"properties,omitempty"`
6183	*TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
6184}
6185
6186// MarshalJSON is the custom marshaler for FlowLogInformation.
6187func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
6188	objectMap := make(map[string]interface{})
6189	if fli.TargetResourceID != nil {
6190		objectMap["targetResourceId"] = fli.TargetResourceID
6191	}
6192	if fli.FlowLogProperties != nil {
6193		objectMap["properties"] = fli.FlowLogProperties
6194	}
6195	if fli.TrafficAnalyticsProperties != nil {
6196		objectMap["flowAnalyticsConfiguration"] = fli.TrafficAnalyticsProperties
6197	}
6198	return json.Marshal(objectMap)
6199}
6200
6201// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
6202func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
6203	var m map[string]*json.RawMessage
6204	err := json.Unmarshal(body, &m)
6205	if err != nil {
6206		return err
6207	}
6208	for k, v := range m {
6209		switch k {
6210		case "targetResourceId":
6211			if v != nil {
6212				var targetResourceID string
6213				err = json.Unmarshal(*v, &targetResourceID)
6214				if err != nil {
6215					return err
6216				}
6217				fli.TargetResourceID = &targetResourceID
6218			}
6219		case "properties":
6220			if v != nil {
6221				var flowLogProperties FlowLogProperties
6222				err = json.Unmarshal(*v, &flowLogProperties)
6223				if err != nil {
6224					return err
6225				}
6226				fli.FlowLogProperties = &flowLogProperties
6227			}
6228		case "flowAnalyticsConfiguration":
6229			if v != nil {
6230				var trafficAnalyticsProperties TrafficAnalyticsProperties
6231				err = json.Unmarshal(*v, &trafficAnalyticsProperties)
6232				if err != nil {
6233					return err
6234				}
6235				fli.TrafficAnalyticsProperties = &trafficAnalyticsProperties
6236			}
6237		}
6238	}
6239
6240	return nil
6241}
6242
6243// FlowLogProperties parameters that define the configuration of flow log.
6244type FlowLogProperties struct {
6245	// StorageID - ID of the storage account which is used to store the flow log.
6246	StorageID *string `json:"storageId,omitempty"`
6247	// Enabled - Flag to enable/disable flow logging.
6248	Enabled         *bool                      `json:"enabled,omitempty"`
6249	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
6250}
6251
6252// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
6253// (optional) status.
6254type FlowLogStatusParameters struct {
6255	// TargetResourceID - The target resource where getting the flow logging and traffic analytics (optional) status.
6256	TargetResourceID *string `json:"targetResourceId,omitempty"`
6257}
6258
6259// FrontendIPConfiguration frontend IP address of the load balancer.
6260type FrontendIPConfiguration struct {
6261	autorest.Response `json:"-"`
6262	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
6263	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6264	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6265	Name *string `json:"name,omitempty"`
6266	// Etag - A unique read-only string that changes whenever the resource is updated.
6267	Etag *string `json:"etag,omitempty"`
6268	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
6269	Zones *[]string `json:"zones,omitempty"`
6270	// ID - Resource ID.
6271	ID *string `json:"id,omitempty"`
6272}
6273
6274// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
6275func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
6276	objectMap := make(map[string]interface{})
6277	if fic.FrontendIPConfigurationPropertiesFormat != nil {
6278		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
6279	}
6280	if fic.Name != nil {
6281		objectMap["name"] = fic.Name
6282	}
6283	if fic.Etag != nil {
6284		objectMap["etag"] = fic.Etag
6285	}
6286	if fic.Zones != nil {
6287		objectMap["zones"] = fic.Zones
6288	}
6289	if fic.ID != nil {
6290		objectMap["id"] = fic.ID
6291	}
6292	return json.Marshal(objectMap)
6293}
6294
6295// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
6296func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
6297	var m map[string]*json.RawMessage
6298	err := json.Unmarshal(body, &m)
6299	if err != nil {
6300		return err
6301	}
6302	for k, v := range m {
6303		switch k {
6304		case "properties":
6305			if v != nil {
6306				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
6307				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
6308				if err != nil {
6309					return err
6310				}
6311				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
6312			}
6313		case "name":
6314			if v != nil {
6315				var name string
6316				err = json.Unmarshal(*v, &name)
6317				if err != nil {
6318					return err
6319				}
6320				fic.Name = &name
6321			}
6322		case "etag":
6323			if v != nil {
6324				var etag string
6325				err = json.Unmarshal(*v, &etag)
6326				if err != nil {
6327					return err
6328				}
6329				fic.Etag = &etag
6330			}
6331		case "zones":
6332			if v != nil {
6333				var zones []string
6334				err = json.Unmarshal(*v, &zones)
6335				if err != nil {
6336					return err
6337				}
6338				fic.Zones = &zones
6339			}
6340		case "id":
6341			if v != nil {
6342				var ID string
6343				err = json.Unmarshal(*v, &ID)
6344				if err != nil {
6345					return err
6346				}
6347				fic.ID = &ID
6348			}
6349		}
6350	}
6351
6352	return nil
6353}
6354
6355// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
6356type FrontendIPConfigurationPropertiesFormat struct {
6357	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
6358	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
6359	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
6360	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
6361	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
6362	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
6363	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
6364	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
6365	// PrivateIPAddress - The private IP address of the IP configuration.
6366	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6367	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6368	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6369	// Subnet - The reference of the subnet resource.
6370	Subnet *Subnet `json:"subnet,omitempty"`
6371	// PublicIPAddress - The reference of the Public IP resource.
6372	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6373	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6374	ProvisioningState *string `json:"provisioningState,omitempty"`
6375}
6376
6377// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
6378func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6379	objectMap := make(map[string]interface{})
6380	if ficpf.PrivateIPAddress != nil {
6381		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
6382	}
6383	if ficpf.PrivateIPAllocationMethod != "" {
6384		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
6385	}
6386	if ficpf.Subnet != nil {
6387		objectMap["subnet"] = ficpf.Subnet
6388	}
6389	if ficpf.PublicIPAddress != nil {
6390		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
6391	}
6392	if ficpf.ProvisioningState != nil {
6393		objectMap["provisioningState"] = ficpf.ProvisioningState
6394	}
6395	return json.Marshal(objectMap)
6396}
6397
6398// GatewayRoute gateway routing details
6399type GatewayRoute struct {
6400	// LocalAddress - READ-ONLY; The gateway's local address
6401	LocalAddress *string `json:"localAddress,omitempty"`
6402	// NetworkProperty - READ-ONLY; The route's network prefix
6403	NetworkProperty *string `json:"network,omitempty"`
6404	// NextHop - READ-ONLY; The route's next hop
6405	NextHop *string `json:"nextHop,omitempty"`
6406	// SourcePeer - READ-ONLY; The peer this route was learned from
6407	SourcePeer *string `json:"sourcePeer,omitempty"`
6408	// Origin - READ-ONLY; The source this route was learned from
6409	Origin *string `json:"origin,omitempty"`
6410	// AsPath - READ-ONLY; The route's AS path sequence
6411	AsPath *string `json:"asPath,omitempty"`
6412	// Weight - READ-ONLY; The route's weight
6413	Weight *int32 `json:"weight,omitempty"`
6414}
6415
6416// MarshalJSON is the custom marshaler for GatewayRoute.
6417func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
6418	objectMap := make(map[string]interface{})
6419	return json.Marshal(objectMap)
6420}
6421
6422// GatewayRouteListResult list of virtual network gateway routes
6423type GatewayRouteListResult struct {
6424	autorest.Response `json:"-"`
6425	// Value - List of gateway routes
6426	Value *[]GatewayRoute `json:"value,omitempty"`
6427}
6428
6429// InboundNatPool inbound NAT pool of the load balancer.
6430type InboundNatPool struct {
6431	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
6432	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
6433	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6434	Name *string `json:"name,omitempty"`
6435	// Etag - A unique read-only string that changes whenever the resource is updated.
6436	Etag *string `json:"etag,omitempty"`
6437	// ID - Resource ID.
6438	ID *string `json:"id,omitempty"`
6439}
6440
6441// MarshalJSON is the custom marshaler for InboundNatPool.
6442func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
6443	objectMap := make(map[string]interface{})
6444	if inp.InboundNatPoolPropertiesFormat != nil {
6445		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
6446	}
6447	if inp.Name != nil {
6448		objectMap["name"] = inp.Name
6449	}
6450	if inp.Etag != nil {
6451		objectMap["etag"] = inp.Etag
6452	}
6453	if inp.ID != nil {
6454		objectMap["id"] = inp.ID
6455	}
6456	return json.Marshal(objectMap)
6457}
6458
6459// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
6460func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
6461	var m map[string]*json.RawMessage
6462	err := json.Unmarshal(body, &m)
6463	if err != nil {
6464		return err
6465	}
6466	for k, v := range m {
6467		switch k {
6468		case "properties":
6469			if v != nil {
6470				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
6471				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
6472				if err != nil {
6473					return err
6474				}
6475				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
6476			}
6477		case "name":
6478			if v != nil {
6479				var name string
6480				err = json.Unmarshal(*v, &name)
6481				if err != nil {
6482					return err
6483				}
6484				inp.Name = &name
6485			}
6486		case "etag":
6487			if v != nil {
6488				var etag string
6489				err = json.Unmarshal(*v, &etag)
6490				if err != nil {
6491					return err
6492				}
6493				inp.Etag = &etag
6494			}
6495		case "id":
6496			if v != nil {
6497				var ID string
6498				err = json.Unmarshal(*v, &ID)
6499				if err != nil {
6500					return err
6501				}
6502				inp.ID = &ID
6503			}
6504		}
6505	}
6506
6507	return nil
6508}
6509
6510// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
6511type InboundNatPoolPropertiesFormat struct {
6512	// FrontendIPConfiguration - A reference to frontend IP addresses.
6513	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6514	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6515	Protocol TransportProtocol `json:"protocol,omitempty"`
6516	// 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.
6517	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
6518	// 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.
6519	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
6520	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
6521	BackendPort *int32 `json:"backendPort,omitempty"`
6522	// 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.
6523	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6524	// 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.
6525	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6526	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6527	ProvisioningState *string `json:"provisioningState,omitempty"`
6528}
6529
6530// InboundNatRule inbound NAT rule of the load balancer.
6531type InboundNatRule struct {
6532	autorest.Response `json:"-"`
6533	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
6534	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
6535	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6536	Name *string `json:"name,omitempty"`
6537	// Etag - A unique read-only string that changes whenever the resource is updated.
6538	Etag *string `json:"etag,omitempty"`
6539	// ID - Resource ID.
6540	ID *string `json:"id,omitempty"`
6541}
6542
6543// MarshalJSON is the custom marshaler for InboundNatRule.
6544func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
6545	objectMap := make(map[string]interface{})
6546	if inr.InboundNatRulePropertiesFormat != nil {
6547		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
6548	}
6549	if inr.Name != nil {
6550		objectMap["name"] = inr.Name
6551	}
6552	if inr.Etag != nil {
6553		objectMap["etag"] = inr.Etag
6554	}
6555	if inr.ID != nil {
6556		objectMap["id"] = inr.ID
6557	}
6558	return json.Marshal(objectMap)
6559}
6560
6561// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
6562func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
6563	var m map[string]*json.RawMessage
6564	err := json.Unmarshal(body, &m)
6565	if err != nil {
6566		return err
6567	}
6568	for k, v := range m {
6569		switch k {
6570		case "properties":
6571			if v != nil {
6572				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
6573				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
6574				if err != nil {
6575					return err
6576				}
6577				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
6578			}
6579		case "name":
6580			if v != nil {
6581				var name string
6582				err = json.Unmarshal(*v, &name)
6583				if err != nil {
6584					return err
6585				}
6586				inr.Name = &name
6587			}
6588		case "etag":
6589			if v != nil {
6590				var etag string
6591				err = json.Unmarshal(*v, &etag)
6592				if err != nil {
6593					return err
6594				}
6595				inr.Etag = &etag
6596			}
6597		case "id":
6598			if v != nil {
6599				var ID string
6600				err = json.Unmarshal(*v, &ID)
6601				if err != nil {
6602					return err
6603				}
6604				inr.ID = &ID
6605			}
6606		}
6607	}
6608
6609	return nil
6610}
6611
6612// InboundNatRuleListResult response for ListInboundNatRule API service call.
6613type InboundNatRuleListResult struct {
6614	autorest.Response `json:"-"`
6615	// Value - A list of inbound nat rules in a load balancer.
6616	Value *[]InboundNatRule `json:"value,omitempty"`
6617	// NextLink - READ-ONLY; The URL to get the next set of results.
6618	NextLink *string `json:"nextLink,omitempty"`
6619}
6620
6621// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
6622func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
6623	objectMap := make(map[string]interface{})
6624	if inrlr.Value != nil {
6625		objectMap["value"] = inrlr.Value
6626	}
6627	return json.Marshal(objectMap)
6628}
6629
6630// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
6631type InboundNatRuleListResultIterator struct {
6632	i    int
6633	page InboundNatRuleListResultPage
6634}
6635
6636// NextWithContext advances to the next value.  If there was an error making
6637// the request the iterator does not advance and the error is returned.
6638func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
6639	if tracing.IsEnabled() {
6640		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
6641		defer func() {
6642			sc := -1
6643			if iter.Response().Response.Response != nil {
6644				sc = iter.Response().Response.Response.StatusCode
6645			}
6646			tracing.EndSpan(ctx, sc, err)
6647		}()
6648	}
6649	iter.i++
6650	if iter.i < len(iter.page.Values()) {
6651		return nil
6652	}
6653	err = iter.page.NextWithContext(ctx)
6654	if err != nil {
6655		iter.i--
6656		return err
6657	}
6658	iter.i = 0
6659	return nil
6660}
6661
6662// Next advances to the next value.  If there was an error making
6663// the request the iterator does not advance and the error is returned.
6664// Deprecated: Use NextWithContext() instead.
6665func (iter *InboundNatRuleListResultIterator) Next() error {
6666	return iter.NextWithContext(context.Background())
6667}
6668
6669// NotDone returns true if the enumeration should be started or is not yet complete.
6670func (iter InboundNatRuleListResultIterator) NotDone() bool {
6671	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6672}
6673
6674// Response returns the raw server response from the last page request.
6675func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
6676	return iter.page.Response()
6677}
6678
6679// Value returns the current value or a zero-initialized value if the
6680// iterator has advanced beyond the end of the collection.
6681func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
6682	if !iter.page.NotDone() {
6683		return InboundNatRule{}
6684	}
6685	return iter.page.Values()[iter.i]
6686}
6687
6688// Creates a new instance of the InboundNatRuleListResultIterator type.
6689func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
6690	return InboundNatRuleListResultIterator{page: page}
6691}
6692
6693// IsEmpty returns true if the ListResult contains no values.
6694func (inrlr InboundNatRuleListResult) IsEmpty() bool {
6695	return inrlr.Value == nil || len(*inrlr.Value) == 0
6696}
6697
6698// hasNextLink returns true if the NextLink is not empty.
6699func (inrlr InboundNatRuleListResult) hasNextLink() bool {
6700	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
6701}
6702
6703// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
6704// It returns nil if no more results exist.
6705func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
6706	if !inrlr.hasNextLink() {
6707		return nil, nil
6708	}
6709	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6710		autorest.AsJSON(),
6711		autorest.AsGet(),
6712		autorest.WithBaseURL(to.String(inrlr.NextLink)))
6713}
6714
6715// InboundNatRuleListResultPage contains a page of InboundNatRule values.
6716type InboundNatRuleListResultPage struct {
6717	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
6718	inrlr InboundNatRuleListResult
6719}
6720
6721// NextWithContext advances to the next page of values.  If there was an error making
6722// the request the page does not advance and the error is returned.
6723func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
6724	if tracing.IsEnabled() {
6725		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
6726		defer func() {
6727			sc := -1
6728			if page.Response().Response.Response != nil {
6729				sc = page.Response().Response.Response.StatusCode
6730			}
6731			tracing.EndSpan(ctx, sc, err)
6732		}()
6733	}
6734	for {
6735		next, err := page.fn(ctx, page.inrlr)
6736		if err != nil {
6737			return err
6738		}
6739		page.inrlr = next
6740		if !next.hasNextLink() || !next.IsEmpty() {
6741			break
6742		}
6743	}
6744	return nil
6745}
6746
6747// Next advances to the next page of values.  If there was an error making
6748// the request the page does not advance and the error is returned.
6749// Deprecated: Use NextWithContext() instead.
6750func (page *InboundNatRuleListResultPage) Next() error {
6751	return page.NextWithContext(context.Background())
6752}
6753
6754// NotDone returns true if the page enumeration should be started or is not yet complete.
6755func (page InboundNatRuleListResultPage) NotDone() bool {
6756	return !page.inrlr.IsEmpty()
6757}
6758
6759// Response returns the raw server response from the last page request.
6760func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
6761	return page.inrlr
6762}
6763
6764// Values returns the slice of values for the current page or nil if there are no values.
6765func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
6766	if page.inrlr.IsEmpty() {
6767		return nil
6768	}
6769	return *page.inrlr.Value
6770}
6771
6772// Creates a new instance of the InboundNatRuleListResultPage type.
6773func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
6774	return InboundNatRuleListResultPage{
6775		fn:    getNextPage,
6776		inrlr: cur,
6777	}
6778}
6779
6780// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
6781type InboundNatRulePropertiesFormat struct {
6782	// FrontendIPConfiguration - A reference to frontend IP addresses.
6783	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6784	// 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.
6785	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
6786	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6787	Protocol TransportProtocol `json:"protocol,omitempty"`
6788	// 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.
6789	FrontendPort *int32 `json:"frontendPort,omitempty"`
6790	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
6791	BackendPort *int32 `json:"backendPort,omitempty"`
6792	// 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.
6793	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6794	// 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.
6795	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6796	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6797	ProvisioningState *string `json:"provisioningState,omitempty"`
6798}
6799
6800// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
6801func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
6802	objectMap := make(map[string]interface{})
6803	if inrpf.FrontendIPConfiguration != nil {
6804		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
6805	}
6806	if inrpf.Protocol != "" {
6807		objectMap["protocol"] = inrpf.Protocol
6808	}
6809	if inrpf.FrontendPort != nil {
6810		objectMap["frontendPort"] = inrpf.FrontendPort
6811	}
6812	if inrpf.BackendPort != nil {
6813		objectMap["backendPort"] = inrpf.BackendPort
6814	}
6815	if inrpf.IdleTimeoutInMinutes != nil {
6816		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
6817	}
6818	if inrpf.EnableFloatingIP != nil {
6819		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
6820	}
6821	if inrpf.ProvisioningState != nil {
6822		objectMap["provisioningState"] = inrpf.ProvisioningState
6823	}
6824	return json.Marshal(objectMap)
6825}
6826
6827// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6828// long-running operation.
6829type InboundNatRulesCreateOrUpdateFuture struct {
6830	azure.FutureAPI
6831	// Result returns the result of the asynchronous operation.
6832	// If the operation has not completed it will return an error.
6833	Result func(InboundNatRulesClient) (InboundNatRule, error)
6834}
6835
6836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6837func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6838	var azFuture azure.Future
6839	if err := json.Unmarshal(body, &azFuture); err != nil {
6840		return err
6841	}
6842	future.FutureAPI = &azFuture
6843	future.Result = future.result
6844	return nil
6845}
6846
6847// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
6848func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
6849	var done bool
6850	done, err = future.DoneWithContext(context.Background(), client)
6851	if err != nil {
6852		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6853		return
6854	}
6855	if !done {
6856		inr.Response.Response = future.Response()
6857		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
6858		return
6859	}
6860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6861	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
6862		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
6863		if err != nil {
6864			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
6865		}
6866	}
6867	return
6868}
6869
6870// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6871// operation.
6872type InboundNatRulesDeleteFuture struct {
6873	azure.FutureAPI
6874	// Result returns the result of the asynchronous operation.
6875	// If the operation has not completed it will return an error.
6876	Result func(InboundNatRulesClient) (autorest.Response, error)
6877}
6878
6879// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6880func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
6881	var azFuture azure.Future
6882	if err := json.Unmarshal(body, &azFuture); err != nil {
6883		return err
6884	}
6885	future.FutureAPI = &azFuture
6886	future.Result = future.result
6887	return nil
6888}
6889
6890// result is the default implementation for InboundNatRulesDeleteFuture.Result.
6891func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
6892	var done bool
6893	done, err = future.DoneWithContext(context.Background(), client)
6894	if err != nil {
6895		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
6896		return
6897	}
6898	if !done {
6899		ar.Response = future.Response()
6900		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
6901		return
6902	}
6903	ar.Response = future.Response()
6904	return
6905}
6906
6907// Interface a network interface in a resource group.
6908type Interface struct {
6909	autorest.Response `json:"-"`
6910	// InterfacePropertiesFormat - Properties of the network interface.
6911	*InterfacePropertiesFormat `json:"properties,omitempty"`
6912	// Etag - A unique read-only string that changes whenever the resource is updated.
6913	Etag *string `json:"etag,omitempty"`
6914	// ID - Resource ID.
6915	ID *string `json:"id,omitempty"`
6916	// Name - READ-ONLY; Resource name.
6917	Name *string `json:"name,omitempty"`
6918	// Type - READ-ONLY; Resource type.
6919	Type *string `json:"type,omitempty"`
6920	// Location - Resource location.
6921	Location *string `json:"location,omitempty"`
6922	// Tags - Resource tags.
6923	Tags map[string]*string `json:"tags"`
6924}
6925
6926// MarshalJSON is the custom marshaler for Interface.
6927func (i Interface) MarshalJSON() ([]byte, error) {
6928	objectMap := make(map[string]interface{})
6929	if i.InterfacePropertiesFormat != nil {
6930		objectMap["properties"] = i.InterfacePropertiesFormat
6931	}
6932	if i.Etag != nil {
6933		objectMap["etag"] = i.Etag
6934	}
6935	if i.ID != nil {
6936		objectMap["id"] = i.ID
6937	}
6938	if i.Location != nil {
6939		objectMap["location"] = i.Location
6940	}
6941	if i.Tags != nil {
6942		objectMap["tags"] = i.Tags
6943	}
6944	return json.Marshal(objectMap)
6945}
6946
6947// UnmarshalJSON is the custom unmarshaler for Interface struct.
6948func (i *Interface) UnmarshalJSON(body []byte) error {
6949	var m map[string]*json.RawMessage
6950	err := json.Unmarshal(body, &m)
6951	if err != nil {
6952		return err
6953	}
6954	for k, v := range m {
6955		switch k {
6956		case "properties":
6957			if v != nil {
6958				var interfacePropertiesFormat InterfacePropertiesFormat
6959				err = json.Unmarshal(*v, &interfacePropertiesFormat)
6960				if err != nil {
6961					return err
6962				}
6963				i.InterfacePropertiesFormat = &interfacePropertiesFormat
6964			}
6965		case "etag":
6966			if v != nil {
6967				var etag string
6968				err = json.Unmarshal(*v, &etag)
6969				if err != nil {
6970					return err
6971				}
6972				i.Etag = &etag
6973			}
6974		case "id":
6975			if v != nil {
6976				var ID string
6977				err = json.Unmarshal(*v, &ID)
6978				if err != nil {
6979					return err
6980				}
6981				i.ID = &ID
6982			}
6983		case "name":
6984			if v != nil {
6985				var name string
6986				err = json.Unmarshal(*v, &name)
6987				if err != nil {
6988					return err
6989				}
6990				i.Name = &name
6991			}
6992		case "type":
6993			if v != nil {
6994				var typeVar string
6995				err = json.Unmarshal(*v, &typeVar)
6996				if err != nil {
6997					return err
6998				}
6999				i.Type = &typeVar
7000			}
7001		case "location":
7002			if v != nil {
7003				var location string
7004				err = json.Unmarshal(*v, &location)
7005				if err != nil {
7006					return err
7007				}
7008				i.Location = &location
7009			}
7010		case "tags":
7011			if v != nil {
7012				var tags map[string]*string
7013				err = json.Unmarshal(*v, &tags)
7014				if err != nil {
7015					return err
7016				}
7017				i.Tags = tags
7018			}
7019		}
7020	}
7021
7022	return nil
7023}
7024
7025// InterfaceAssociation network interface and its custom security rules.
7026type InterfaceAssociation struct {
7027	// ID - READ-ONLY; Network interface ID.
7028	ID *string `json:"id,omitempty"`
7029	// SecurityRules - Collection of custom security rules.
7030	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
7031}
7032
7033// MarshalJSON is the custom marshaler for InterfaceAssociation.
7034func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
7035	objectMap := make(map[string]interface{})
7036	if ia.SecurityRules != nil {
7037		objectMap["securityRules"] = ia.SecurityRules
7038	}
7039	return json.Marshal(objectMap)
7040}
7041
7042// InterfaceDNSSettings DNS settings of a network interface.
7043type InterfaceDNSSettings struct {
7044	// 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.
7045	DNSServers *[]string `json:"dnsServers,omitempty"`
7046	// 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.
7047	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
7048	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
7049	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
7050	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
7051	InternalFqdn *string `json:"internalFqdn,omitempty"`
7052	// 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.
7053	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
7054}
7055
7056// InterfaceIPConfiguration iPConfiguration in a network interface.
7057type InterfaceIPConfiguration struct {
7058	autorest.Response `json:"-"`
7059	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
7060	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7061	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7062	Name *string `json:"name,omitempty"`
7063	// Etag - A unique read-only string that changes whenever the resource is updated.
7064	Etag *string `json:"etag,omitempty"`
7065	// ID - Resource ID.
7066	ID *string `json:"id,omitempty"`
7067}
7068
7069// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
7070func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7071	objectMap := make(map[string]interface{})
7072	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
7073		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
7074	}
7075	if iic.Name != nil {
7076		objectMap["name"] = iic.Name
7077	}
7078	if iic.Etag != nil {
7079		objectMap["etag"] = iic.Etag
7080	}
7081	if iic.ID != nil {
7082		objectMap["id"] = iic.ID
7083	}
7084	return json.Marshal(objectMap)
7085}
7086
7087// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
7088func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7089	var m map[string]*json.RawMessage
7090	err := json.Unmarshal(body, &m)
7091	if err != nil {
7092		return err
7093	}
7094	for k, v := range m {
7095		switch k {
7096		case "properties":
7097			if v != nil {
7098				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
7099				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
7100				if err != nil {
7101					return err
7102				}
7103				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
7104			}
7105		case "name":
7106			if v != nil {
7107				var name string
7108				err = json.Unmarshal(*v, &name)
7109				if err != nil {
7110					return err
7111				}
7112				iic.Name = &name
7113			}
7114		case "etag":
7115			if v != nil {
7116				var etag string
7117				err = json.Unmarshal(*v, &etag)
7118				if err != nil {
7119					return err
7120				}
7121				iic.Etag = &etag
7122			}
7123		case "id":
7124			if v != nil {
7125				var ID string
7126				err = json.Unmarshal(*v, &ID)
7127				if err != nil {
7128					return err
7129				}
7130				iic.ID = &ID
7131			}
7132		}
7133	}
7134
7135	return nil
7136}
7137
7138// InterfaceIPConfigurationListResult response for list ip configurations API service call.
7139type InterfaceIPConfigurationListResult struct {
7140	autorest.Response `json:"-"`
7141	// Value - A list of ip configurations.
7142	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
7143	// NextLink - READ-ONLY; The URL to get the next set of results.
7144	NextLink *string `json:"nextLink,omitempty"`
7145}
7146
7147// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
7148func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
7149	objectMap := make(map[string]interface{})
7150	if iiclr.Value != nil {
7151		objectMap["value"] = iiclr.Value
7152	}
7153	return json.Marshal(objectMap)
7154}
7155
7156// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
7157// InterfaceIPConfiguration values.
7158type InterfaceIPConfigurationListResultIterator struct {
7159	i    int
7160	page InterfaceIPConfigurationListResultPage
7161}
7162
7163// NextWithContext advances to the next value.  If there was an error making
7164// the request the iterator does not advance and the error is returned.
7165func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
7166	if tracing.IsEnabled() {
7167		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
7168		defer func() {
7169			sc := -1
7170			if iter.Response().Response.Response != nil {
7171				sc = iter.Response().Response.Response.StatusCode
7172			}
7173			tracing.EndSpan(ctx, sc, err)
7174		}()
7175	}
7176	iter.i++
7177	if iter.i < len(iter.page.Values()) {
7178		return nil
7179	}
7180	err = iter.page.NextWithContext(ctx)
7181	if err != nil {
7182		iter.i--
7183		return err
7184	}
7185	iter.i = 0
7186	return nil
7187}
7188
7189// Next advances to the next value.  If there was an error making
7190// the request the iterator does not advance and the error is returned.
7191// Deprecated: Use NextWithContext() instead.
7192func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
7193	return iter.NextWithContext(context.Background())
7194}
7195
7196// NotDone returns true if the enumeration should be started or is not yet complete.
7197func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
7198	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7199}
7200
7201// Response returns the raw server response from the last page request.
7202func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
7203	return iter.page.Response()
7204}
7205
7206// Value returns the current value or a zero-initialized value if the
7207// iterator has advanced beyond the end of the collection.
7208func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
7209	if !iter.page.NotDone() {
7210		return InterfaceIPConfiguration{}
7211	}
7212	return iter.page.Values()[iter.i]
7213}
7214
7215// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
7216func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
7217	return InterfaceIPConfigurationListResultIterator{page: page}
7218}
7219
7220// IsEmpty returns true if the ListResult contains no values.
7221func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
7222	return iiclr.Value == nil || len(*iiclr.Value) == 0
7223}
7224
7225// hasNextLink returns true if the NextLink is not empty.
7226func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
7227	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
7228}
7229
7230// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
7231// It returns nil if no more results exist.
7232func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
7233	if !iiclr.hasNextLink() {
7234		return nil, nil
7235	}
7236	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7237		autorest.AsJSON(),
7238		autorest.AsGet(),
7239		autorest.WithBaseURL(to.String(iiclr.NextLink)))
7240}
7241
7242// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
7243type InterfaceIPConfigurationListResultPage struct {
7244	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
7245	iiclr InterfaceIPConfigurationListResult
7246}
7247
7248// NextWithContext advances to the next page of values.  If there was an error making
7249// the request the page does not advance and the error is returned.
7250func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
7251	if tracing.IsEnabled() {
7252		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
7253		defer func() {
7254			sc := -1
7255			if page.Response().Response.Response != nil {
7256				sc = page.Response().Response.Response.StatusCode
7257			}
7258			tracing.EndSpan(ctx, sc, err)
7259		}()
7260	}
7261	for {
7262		next, err := page.fn(ctx, page.iiclr)
7263		if err != nil {
7264			return err
7265		}
7266		page.iiclr = next
7267		if !next.hasNextLink() || !next.IsEmpty() {
7268			break
7269		}
7270	}
7271	return nil
7272}
7273
7274// Next advances to the next page of values.  If there was an error making
7275// the request the page does not advance and the error is returned.
7276// Deprecated: Use NextWithContext() instead.
7277func (page *InterfaceIPConfigurationListResultPage) Next() error {
7278	return page.NextWithContext(context.Background())
7279}
7280
7281// NotDone returns true if the page enumeration should be started or is not yet complete.
7282func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
7283	return !page.iiclr.IsEmpty()
7284}
7285
7286// Response returns the raw server response from the last page request.
7287func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
7288	return page.iiclr
7289}
7290
7291// Values returns the slice of values for the current page or nil if there are no values.
7292func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
7293	if page.iiclr.IsEmpty() {
7294		return nil
7295	}
7296	return *page.iiclr.Value
7297}
7298
7299// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
7300func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
7301	return InterfaceIPConfigurationListResultPage{
7302		fn:    getNextPage,
7303		iiclr: cur,
7304	}
7305}
7306
7307// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
7308type InterfaceIPConfigurationPropertiesFormat struct {
7309	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
7310	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
7311	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
7312	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
7313	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
7314	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
7315	// PrivateIPAddress - Private IP address of the IP configuration.
7316	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7317	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7318	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7319	// 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'
7320	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
7321	// Subnet - Subnet bound to the IP configuration.
7322	Subnet *Subnet `json:"subnet,omitempty"`
7323	// Primary - Gets whether this is a primary customer address on the network interface.
7324	Primary *bool `json:"primary,omitempty"`
7325	// PublicIPAddress - Public IP address bound to the IP configuration.
7326	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7327	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
7328	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
7329	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7330	ProvisioningState *string `json:"provisioningState,omitempty"`
7331}
7332
7333// InterfaceListResult response for the ListNetworkInterface API service call.
7334type InterfaceListResult struct {
7335	autorest.Response `json:"-"`
7336	// Value - A list of network interfaces in a resource group.
7337	Value *[]Interface `json:"value,omitempty"`
7338	// NextLink - READ-ONLY; The URL to get the next set of results.
7339	NextLink *string `json:"nextLink,omitempty"`
7340}
7341
7342// MarshalJSON is the custom marshaler for InterfaceListResult.
7343func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
7344	objectMap := make(map[string]interface{})
7345	if ilr.Value != nil {
7346		objectMap["value"] = ilr.Value
7347	}
7348	return json.Marshal(objectMap)
7349}
7350
7351// InterfaceListResultIterator provides access to a complete listing of Interface values.
7352type InterfaceListResultIterator struct {
7353	i    int
7354	page InterfaceListResultPage
7355}
7356
7357// NextWithContext advances to the next value.  If there was an error making
7358// the request the iterator does not advance and the error is returned.
7359func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
7360	if tracing.IsEnabled() {
7361		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
7362		defer func() {
7363			sc := -1
7364			if iter.Response().Response.Response != nil {
7365				sc = iter.Response().Response.Response.StatusCode
7366			}
7367			tracing.EndSpan(ctx, sc, err)
7368		}()
7369	}
7370	iter.i++
7371	if iter.i < len(iter.page.Values()) {
7372		return nil
7373	}
7374	err = iter.page.NextWithContext(ctx)
7375	if err != nil {
7376		iter.i--
7377		return err
7378	}
7379	iter.i = 0
7380	return nil
7381}
7382
7383// Next advances to the next value.  If there was an error making
7384// the request the iterator does not advance and the error is returned.
7385// Deprecated: Use NextWithContext() instead.
7386func (iter *InterfaceListResultIterator) Next() error {
7387	return iter.NextWithContext(context.Background())
7388}
7389
7390// NotDone returns true if the enumeration should be started or is not yet complete.
7391func (iter InterfaceListResultIterator) NotDone() bool {
7392	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7393}
7394
7395// Response returns the raw server response from the last page request.
7396func (iter InterfaceListResultIterator) Response() InterfaceListResult {
7397	return iter.page.Response()
7398}
7399
7400// Value returns the current value or a zero-initialized value if the
7401// iterator has advanced beyond the end of the collection.
7402func (iter InterfaceListResultIterator) Value() Interface {
7403	if !iter.page.NotDone() {
7404		return Interface{}
7405	}
7406	return iter.page.Values()[iter.i]
7407}
7408
7409// Creates a new instance of the InterfaceListResultIterator type.
7410func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
7411	return InterfaceListResultIterator{page: page}
7412}
7413
7414// IsEmpty returns true if the ListResult contains no values.
7415func (ilr InterfaceListResult) IsEmpty() bool {
7416	return ilr.Value == nil || len(*ilr.Value) == 0
7417}
7418
7419// hasNextLink returns true if the NextLink is not empty.
7420func (ilr InterfaceListResult) hasNextLink() bool {
7421	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
7422}
7423
7424// interfaceListResultPreparer prepares a request to retrieve the next set of results.
7425// It returns nil if no more results exist.
7426func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
7427	if !ilr.hasNextLink() {
7428		return nil, nil
7429	}
7430	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7431		autorest.AsJSON(),
7432		autorest.AsGet(),
7433		autorest.WithBaseURL(to.String(ilr.NextLink)))
7434}
7435
7436// InterfaceListResultPage contains a page of Interface values.
7437type InterfaceListResultPage struct {
7438	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
7439	ilr InterfaceListResult
7440}
7441
7442// NextWithContext advances to the next page of values.  If there was an error making
7443// the request the page does not advance and the error is returned.
7444func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
7445	if tracing.IsEnabled() {
7446		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
7447		defer func() {
7448			sc := -1
7449			if page.Response().Response.Response != nil {
7450				sc = page.Response().Response.Response.StatusCode
7451			}
7452			tracing.EndSpan(ctx, sc, err)
7453		}()
7454	}
7455	for {
7456		next, err := page.fn(ctx, page.ilr)
7457		if err != nil {
7458			return err
7459		}
7460		page.ilr = next
7461		if !next.hasNextLink() || !next.IsEmpty() {
7462			break
7463		}
7464	}
7465	return nil
7466}
7467
7468// Next advances to the next page of values.  If there was an error making
7469// the request the page does not advance and the error is returned.
7470// Deprecated: Use NextWithContext() instead.
7471func (page *InterfaceListResultPage) Next() error {
7472	return page.NextWithContext(context.Background())
7473}
7474
7475// NotDone returns true if the page enumeration should be started or is not yet complete.
7476func (page InterfaceListResultPage) NotDone() bool {
7477	return !page.ilr.IsEmpty()
7478}
7479
7480// Response returns the raw server response from the last page request.
7481func (page InterfaceListResultPage) Response() InterfaceListResult {
7482	return page.ilr
7483}
7484
7485// Values returns the slice of values for the current page or nil if there are no values.
7486func (page InterfaceListResultPage) Values() []Interface {
7487	if page.ilr.IsEmpty() {
7488		return nil
7489	}
7490	return *page.ilr.Value
7491}
7492
7493// Creates a new instance of the InterfaceListResultPage type.
7494func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
7495	return InterfaceListResultPage{
7496		fn:  getNextPage,
7497		ilr: cur,
7498	}
7499}
7500
7501// InterfaceLoadBalancerListResult response for list ip configurations API service call.
7502type InterfaceLoadBalancerListResult struct {
7503	autorest.Response `json:"-"`
7504	// Value - A list of load balancers.
7505	Value *[]LoadBalancer `json:"value,omitempty"`
7506	// NextLink - READ-ONLY; The URL to get the next set of results.
7507	NextLink *string `json:"nextLink,omitempty"`
7508}
7509
7510// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
7511func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
7512	objectMap := make(map[string]interface{})
7513	if ilblr.Value != nil {
7514		objectMap["value"] = ilblr.Value
7515	}
7516	return json.Marshal(objectMap)
7517}
7518
7519// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
7520type InterfaceLoadBalancerListResultIterator struct {
7521	i    int
7522	page InterfaceLoadBalancerListResultPage
7523}
7524
7525// NextWithContext advances to the next value.  If there was an error making
7526// the request the iterator does not advance and the error is returned.
7527func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
7528	if tracing.IsEnabled() {
7529		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
7530		defer func() {
7531			sc := -1
7532			if iter.Response().Response.Response != nil {
7533				sc = iter.Response().Response.Response.StatusCode
7534			}
7535			tracing.EndSpan(ctx, sc, err)
7536		}()
7537	}
7538	iter.i++
7539	if iter.i < len(iter.page.Values()) {
7540		return nil
7541	}
7542	err = iter.page.NextWithContext(ctx)
7543	if err != nil {
7544		iter.i--
7545		return err
7546	}
7547	iter.i = 0
7548	return nil
7549}
7550
7551// Next advances to the next value.  If there was an error making
7552// the request the iterator does not advance and the error is returned.
7553// Deprecated: Use NextWithContext() instead.
7554func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
7555	return iter.NextWithContext(context.Background())
7556}
7557
7558// NotDone returns true if the enumeration should be started or is not yet complete.
7559func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
7560	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7561}
7562
7563// Response returns the raw server response from the last page request.
7564func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
7565	return iter.page.Response()
7566}
7567
7568// Value returns the current value or a zero-initialized value if the
7569// iterator has advanced beyond the end of the collection.
7570func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
7571	if !iter.page.NotDone() {
7572		return LoadBalancer{}
7573	}
7574	return iter.page.Values()[iter.i]
7575}
7576
7577// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
7578func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
7579	return InterfaceLoadBalancerListResultIterator{page: page}
7580}
7581
7582// IsEmpty returns true if the ListResult contains no values.
7583func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
7584	return ilblr.Value == nil || len(*ilblr.Value) == 0
7585}
7586
7587// hasNextLink returns true if the NextLink is not empty.
7588func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
7589	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
7590}
7591
7592// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
7593// It returns nil if no more results exist.
7594func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
7595	if !ilblr.hasNextLink() {
7596		return nil, nil
7597	}
7598	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7599		autorest.AsJSON(),
7600		autorest.AsGet(),
7601		autorest.WithBaseURL(to.String(ilblr.NextLink)))
7602}
7603
7604// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
7605type InterfaceLoadBalancerListResultPage struct {
7606	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
7607	ilblr InterfaceLoadBalancerListResult
7608}
7609
7610// NextWithContext advances to the next page of values.  If there was an error making
7611// the request the page does not advance and the error is returned.
7612func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
7613	if tracing.IsEnabled() {
7614		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
7615		defer func() {
7616			sc := -1
7617			if page.Response().Response.Response != nil {
7618				sc = page.Response().Response.Response.StatusCode
7619			}
7620			tracing.EndSpan(ctx, sc, err)
7621		}()
7622	}
7623	for {
7624		next, err := page.fn(ctx, page.ilblr)
7625		if err != nil {
7626			return err
7627		}
7628		page.ilblr = next
7629		if !next.hasNextLink() || !next.IsEmpty() {
7630			break
7631		}
7632	}
7633	return nil
7634}
7635
7636// Next advances to the next page of values.  If there was an error making
7637// the request the page does not advance and the error is returned.
7638// Deprecated: Use NextWithContext() instead.
7639func (page *InterfaceLoadBalancerListResultPage) Next() error {
7640	return page.NextWithContext(context.Background())
7641}
7642
7643// NotDone returns true if the page enumeration should be started or is not yet complete.
7644func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
7645	return !page.ilblr.IsEmpty()
7646}
7647
7648// Response returns the raw server response from the last page request.
7649func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
7650	return page.ilblr
7651}
7652
7653// Values returns the slice of values for the current page or nil if there are no values.
7654func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
7655	if page.ilblr.IsEmpty() {
7656		return nil
7657	}
7658	return *page.ilblr.Value
7659}
7660
7661// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
7662func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
7663	return InterfaceLoadBalancerListResultPage{
7664		fn:    getNextPage,
7665		ilblr: cur,
7666	}
7667}
7668
7669// InterfacePropertiesFormat networkInterface properties.
7670type InterfacePropertiesFormat struct {
7671	// VirtualMachine - The reference of a virtual machine.
7672	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
7673	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
7674	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
7675	// IPConfigurations - A list of IPConfigurations of the network interface.
7676	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7677	// DNSSettings - The DNS settings in network interface.
7678	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
7679	// MacAddress - The MAC address of the network interface.
7680	MacAddress *string `json:"macAddress,omitempty"`
7681	// Primary - Gets whether this is a primary network interface on a virtual machine.
7682	Primary *bool `json:"primary,omitempty"`
7683	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
7684	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
7685	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
7686	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
7687	// ResourceGUID - The resource GUID property of the network interface resource.
7688	ResourceGUID *string `json:"resourceGuid,omitempty"`
7689	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7690	ProvisioningState *string `json:"provisioningState,omitempty"`
7691}
7692
7693// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7694// long-running operation.
7695type InterfacesCreateOrUpdateFuture struct {
7696	azure.FutureAPI
7697	// Result returns the result of the asynchronous operation.
7698	// If the operation has not completed it will return an error.
7699	Result func(InterfacesClient) (Interface, error)
7700}
7701
7702// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7703func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7704	var azFuture azure.Future
7705	if err := json.Unmarshal(body, &azFuture); err != nil {
7706		return err
7707	}
7708	future.FutureAPI = &azFuture
7709	future.Result = future.result
7710	return nil
7711}
7712
7713// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
7714func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
7715	var done bool
7716	done, err = future.DoneWithContext(context.Background(), client)
7717	if err != nil {
7718		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7719		return
7720	}
7721	if !done {
7722		i.Response.Response = future.Response()
7723		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
7724		return
7725	}
7726	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7727	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7728		i, err = client.CreateOrUpdateResponder(i.Response.Response)
7729		if err != nil {
7730			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7731		}
7732	}
7733	return
7734}
7735
7736// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7737// operation.
7738type InterfacesDeleteFuture struct {
7739	azure.FutureAPI
7740	// Result returns the result of the asynchronous operation.
7741	// If the operation has not completed it will return an error.
7742	Result func(InterfacesClient) (autorest.Response, error)
7743}
7744
7745// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7746func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
7747	var azFuture azure.Future
7748	if err := json.Unmarshal(body, &azFuture); err != nil {
7749		return err
7750	}
7751	future.FutureAPI = &azFuture
7752	future.Result = future.result
7753	return nil
7754}
7755
7756// result is the default implementation for InterfacesDeleteFuture.Result.
7757func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
7758	var done bool
7759	done, err = future.DoneWithContext(context.Background(), client)
7760	if err != nil {
7761		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
7762		return
7763	}
7764	if !done {
7765		ar.Response = future.Response()
7766		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
7767		return
7768	}
7769	ar.Response = future.Response()
7770	return
7771}
7772
7773// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
7774// long-running operation.
7775type InterfacesGetEffectiveRouteTableFuture struct {
7776	azure.FutureAPI
7777	// Result returns the result of the asynchronous operation.
7778	// If the operation has not completed it will return an error.
7779	Result func(InterfacesClient) (EffectiveRouteListResult, error)
7780}
7781
7782// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7783func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
7784	var azFuture azure.Future
7785	if err := json.Unmarshal(body, &azFuture); err != nil {
7786		return err
7787	}
7788	future.FutureAPI = &azFuture
7789	future.Result = future.result
7790	return nil
7791}
7792
7793// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
7794func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
7795	var done bool
7796	done, err = future.DoneWithContext(context.Background(), client)
7797	if err != nil {
7798		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
7799		return
7800	}
7801	if !done {
7802		erlr.Response.Response = future.Response()
7803		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
7804		return
7805	}
7806	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7807	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
7808		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
7809		if err != nil {
7810			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
7811		}
7812	}
7813	return
7814}
7815
7816// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
7817// results of a long-running operation.
7818type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
7819	azure.FutureAPI
7820	// Result returns the result of the asynchronous operation.
7821	// If the operation has not completed it will return an error.
7822	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
7823}
7824
7825// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7826func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
7827	var azFuture azure.Future
7828	if err := json.Unmarshal(body, &azFuture); err != nil {
7829		return err
7830	}
7831	future.FutureAPI = &azFuture
7832	future.Result = future.result
7833	return nil
7834}
7835
7836// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
7837func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
7838	var done bool
7839	done, err = future.DoneWithContext(context.Background(), client)
7840	if err != nil {
7841		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
7842		return
7843	}
7844	if !done {
7845		ensglr.Response.Response = future.Response()
7846		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
7847		return
7848	}
7849	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7850	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
7851		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
7852		if err != nil {
7853			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
7854		}
7855	}
7856	return
7857}
7858
7859// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
7860// operation.
7861type InterfacesUpdateTagsFuture struct {
7862	azure.FutureAPI
7863	// Result returns the result of the asynchronous operation.
7864	// If the operation has not completed it will return an error.
7865	Result func(InterfacesClient) (Interface, error)
7866}
7867
7868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7869func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7870	var azFuture azure.Future
7871	if err := json.Unmarshal(body, &azFuture); err != nil {
7872		return err
7873	}
7874	future.FutureAPI = &azFuture
7875	future.Result = future.result
7876	return nil
7877}
7878
7879// result is the default implementation for InterfacesUpdateTagsFuture.Result.
7880func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
7881	var done bool
7882	done, err = future.DoneWithContext(context.Background(), client)
7883	if err != nil {
7884		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7885		return
7886	}
7887	if !done {
7888		i.Response.Response = future.Response()
7889		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
7890		return
7891	}
7892	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7893	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7894		i, err = client.UpdateTagsResponder(i.Response.Response)
7895		if err != nil {
7896			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
7897		}
7898	}
7899	return
7900}
7901
7902// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
7903type IPAddressAvailabilityResult struct {
7904	autorest.Response `json:"-"`
7905	// Available - Private IP address availability.
7906	Available *bool `json:"available,omitempty"`
7907	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
7908	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
7909}
7910
7911// IPConfiguration IP configuration
7912type IPConfiguration struct {
7913	// IPConfigurationPropertiesFormat - Properties of the IP configuration
7914	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
7915	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7916	Name *string `json:"name,omitempty"`
7917	// Etag - A unique read-only string that changes whenever the resource is updated.
7918	Etag *string `json:"etag,omitempty"`
7919	// ID - Resource ID.
7920	ID *string `json:"id,omitempty"`
7921}
7922
7923// MarshalJSON is the custom marshaler for IPConfiguration.
7924func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
7925	objectMap := make(map[string]interface{})
7926	if ic.IPConfigurationPropertiesFormat != nil {
7927		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
7928	}
7929	if ic.Name != nil {
7930		objectMap["name"] = ic.Name
7931	}
7932	if ic.Etag != nil {
7933		objectMap["etag"] = ic.Etag
7934	}
7935	if ic.ID != nil {
7936		objectMap["id"] = ic.ID
7937	}
7938	return json.Marshal(objectMap)
7939}
7940
7941// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
7942func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
7943	var m map[string]*json.RawMessage
7944	err := json.Unmarshal(body, &m)
7945	if err != nil {
7946		return err
7947	}
7948	for k, v := range m {
7949		switch k {
7950		case "properties":
7951			if v != nil {
7952				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
7953				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
7954				if err != nil {
7955					return err
7956				}
7957				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
7958			}
7959		case "name":
7960			if v != nil {
7961				var name string
7962				err = json.Unmarshal(*v, &name)
7963				if err != nil {
7964					return err
7965				}
7966				ic.Name = &name
7967			}
7968		case "etag":
7969			if v != nil {
7970				var etag string
7971				err = json.Unmarshal(*v, &etag)
7972				if err != nil {
7973					return err
7974				}
7975				ic.Etag = &etag
7976			}
7977		case "id":
7978			if v != nil {
7979				var ID string
7980				err = json.Unmarshal(*v, &ID)
7981				if err != nil {
7982					return err
7983				}
7984				ic.ID = &ID
7985			}
7986		}
7987	}
7988
7989	return nil
7990}
7991
7992// IPConfigurationPropertiesFormat properties of IP configuration.
7993type IPConfigurationPropertiesFormat struct {
7994	// PrivateIPAddress - The private IP address of the IP configuration.
7995	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7996	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7997	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7998	// Subnet - The reference of the subnet resource.
7999	Subnet *Subnet `json:"subnet,omitempty"`
8000	// PublicIPAddress - The reference of the public IP resource.
8001	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
8002	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8003	ProvisioningState *string `json:"provisioningState,omitempty"`
8004}
8005
8006// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
8007type IpsecPolicy struct {
8008	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
8009	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
8010	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
8011	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
8012	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
8013	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
8014	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
8015	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
8016	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
8017	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
8018	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
8019	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
8020	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
8021	DhGroup DhGroup `json:"dhGroup,omitempty"`
8022	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
8023	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
8024}
8025
8026// IPTag contains the IpTag associated with the public IP address
8027type IPTag struct {
8028	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
8029	IPTagType *string `json:"ipTagType,omitempty"`
8030	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
8031	Tag *string `json:"tag,omitempty"`
8032}
8033
8034// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
8035type Ipv6ExpressRouteCircuitPeeringConfig struct {
8036	// PrimaryPeerAddressPrefix - The primary address prefix.
8037	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8038	// SecondaryPeerAddressPrefix - The secondary address prefix.
8039	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8040	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8041	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8042	// RouteFilter - The reference of the RouteFilter resource.
8043	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8044	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
8045	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
8046}
8047
8048// LoadBalancer loadBalancer resource
8049type LoadBalancer struct {
8050	autorest.Response `json:"-"`
8051	// Sku - The load balancer SKU.
8052	Sku *LoadBalancerSku `json:"sku,omitempty"`
8053	// LoadBalancerPropertiesFormat - Properties of load balancer.
8054	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
8055	// Etag - A unique read-only string that changes whenever the resource is updated.
8056	Etag *string `json:"etag,omitempty"`
8057	// ID - Resource ID.
8058	ID *string `json:"id,omitempty"`
8059	// Name - READ-ONLY; Resource name.
8060	Name *string `json:"name,omitempty"`
8061	// Type - READ-ONLY; Resource type.
8062	Type *string `json:"type,omitempty"`
8063	// Location - Resource location.
8064	Location *string `json:"location,omitempty"`
8065	// Tags - Resource tags.
8066	Tags map[string]*string `json:"tags"`
8067}
8068
8069// MarshalJSON is the custom marshaler for LoadBalancer.
8070func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
8071	objectMap := make(map[string]interface{})
8072	if lb.Sku != nil {
8073		objectMap["sku"] = lb.Sku
8074	}
8075	if lb.LoadBalancerPropertiesFormat != nil {
8076		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
8077	}
8078	if lb.Etag != nil {
8079		objectMap["etag"] = lb.Etag
8080	}
8081	if lb.ID != nil {
8082		objectMap["id"] = lb.ID
8083	}
8084	if lb.Location != nil {
8085		objectMap["location"] = lb.Location
8086	}
8087	if lb.Tags != nil {
8088		objectMap["tags"] = lb.Tags
8089	}
8090	return json.Marshal(objectMap)
8091}
8092
8093// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
8094func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
8095	var m map[string]*json.RawMessage
8096	err := json.Unmarshal(body, &m)
8097	if err != nil {
8098		return err
8099	}
8100	for k, v := range m {
8101		switch k {
8102		case "sku":
8103			if v != nil {
8104				var sku LoadBalancerSku
8105				err = json.Unmarshal(*v, &sku)
8106				if err != nil {
8107					return err
8108				}
8109				lb.Sku = &sku
8110			}
8111		case "properties":
8112			if v != nil {
8113				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
8114				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
8115				if err != nil {
8116					return err
8117				}
8118				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
8119			}
8120		case "etag":
8121			if v != nil {
8122				var etag string
8123				err = json.Unmarshal(*v, &etag)
8124				if err != nil {
8125					return err
8126				}
8127				lb.Etag = &etag
8128			}
8129		case "id":
8130			if v != nil {
8131				var ID string
8132				err = json.Unmarshal(*v, &ID)
8133				if err != nil {
8134					return err
8135				}
8136				lb.ID = &ID
8137			}
8138		case "name":
8139			if v != nil {
8140				var name string
8141				err = json.Unmarshal(*v, &name)
8142				if err != nil {
8143					return err
8144				}
8145				lb.Name = &name
8146			}
8147		case "type":
8148			if v != nil {
8149				var typeVar string
8150				err = json.Unmarshal(*v, &typeVar)
8151				if err != nil {
8152					return err
8153				}
8154				lb.Type = &typeVar
8155			}
8156		case "location":
8157			if v != nil {
8158				var location string
8159				err = json.Unmarshal(*v, &location)
8160				if err != nil {
8161					return err
8162				}
8163				lb.Location = &location
8164			}
8165		case "tags":
8166			if v != nil {
8167				var tags map[string]*string
8168				err = json.Unmarshal(*v, &tags)
8169				if err != nil {
8170					return err
8171				}
8172				lb.Tags = tags
8173			}
8174		}
8175	}
8176
8177	return nil
8178}
8179
8180// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
8181type LoadBalancerBackendAddressPoolListResult struct {
8182	autorest.Response `json:"-"`
8183	// Value - A list of backend address pools in a load balancer.
8184	Value *[]BackendAddressPool `json:"value,omitempty"`
8185	// NextLink - READ-ONLY; The URL to get the next set of results.
8186	NextLink *string `json:"nextLink,omitempty"`
8187}
8188
8189// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
8190func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
8191	objectMap := make(map[string]interface{})
8192	if lbbaplr.Value != nil {
8193		objectMap["value"] = lbbaplr.Value
8194	}
8195	return json.Marshal(objectMap)
8196}
8197
8198// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
8199// BackendAddressPool values.
8200type LoadBalancerBackendAddressPoolListResultIterator struct {
8201	i    int
8202	page LoadBalancerBackendAddressPoolListResultPage
8203}
8204
8205// NextWithContext advances to the next value.  If there was an error making
8206// the request the iterator does not advance and the error is returned.
8207func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
8208	if tracing.IsEnabled() {
8209		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
8210		defer func() {
8211			sc := -1
8212			if iter.Response().Response.Response != nil {
8213				sc = iter.Response().Response.Response.StatusCode
8214			}
8215			tracing.EndSpan(ctx, sc, err)
8216		}()
8217	}
8218	iter.i++
8219	if iter.i < len(iter.page.Values()) {
8220		return nil
8221	}
8222	err = iter.page.NextWithContext(ctx)
8223	if err != nil {
8224		iter.i--
8225		return err
8226	}
8227	iter.i = 0
8228	return nil
8229}
8230
8231// Next advances to the next value.  If there was an error making
8232// the request the iterator does not advance and the error is returned.
8233// Deprecated: Use NextWithContext() instead.
8234func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
8235	return iter.NextWithContext(context.Background())
8236}
8237
8238// NotDone returns true if the enumeration should be started or is not yet complete.
8239func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
8240	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8241}
8242
8243// Response returns the raw server response from the last page request.
8244func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
8245	return iter.page.Response()
8246}
8247
8248// Value returns the current value or a zero-initialized value if the
8249// iterator has advanced beyond the end of the collection.
8250func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
8251	if !iter.page.NotDone() {
8252		return BackendAddressPool{}
8253	}
8254	return iter.page.Values()[iter.i]
8255}
8256
8257// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
8258func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
8259	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
8260}
8261
8262// IsEmpty returns true if the ListResult contains no values.
8263func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
8264	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
8265}
8266
8267// hasNextLink returns true if the NextLink is not empty.
8268func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
8269	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
8270}
8271
8272// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
8273// It returns nil if no more results exist.
8274func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
8275	if !lbbaplr.hasNextLink() {
8276		return nil, nil
8277	}
8278	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8279		autorest.AsJSON(),
8280		autorest.AsGet(),
8281		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
8282}
8283
8284// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
8285type LoadBalancerBackendAddressPoolListResultPage struct {
8286	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
8287	lbbaplr LoadBalancerBackendAddressPoolListResult
8288}
8289
8290// NextWithContext advances to the next page of values.  If there was an error making
8291// the request the page does not advance and the error is returned.
8292func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
8293	if tracing.IsEnabled() {
8294		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
8295		defer func() {
8296			sc := -1
8297			if page.Response().Response.Response != nil {
8298				sc = page.Response().Response.Response.StatusCode
8299			}
8300			tracing.EndSpan(ctx, sc, err)
8301		}()
8302	}
8303	for {
8304		next, err := page.fn(ctx, page.lbbaplr)
8305		if err != nil {
8306			return err
8307		}
8308		page.lbbaplr = next
8309		if !next.hasNextLink() || !next.IsEmpty() {
8310			break
8311		}
8312	}
8313	return nil
8314}
8315
8316// Next advances to the next page of values.  If there was an error making
8317// the request the page does not advance and the error is returned.
8318// Deprecated: Use NextWithContext() instead.
8319func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
8320	return page.NextWithContext(context.Background())
8321}
8322
8323// NotDone returns true if the page enumeration should be started or is not yet complete.
8324func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
8325	return !page.lbbaplr.IsEmpty()
8326}
8327
8328// Response returns the raw server response from the last page request.
8329func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
8330	return page.lbbaplr
8331}
8332
8333// Values returns the slice of values for the current page or nil if there are no values.
8334func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
8335	if page.lbbaplr.IsEmpty() {
8336		return nil
8337	}
8338	return *page.lbbaplr.Value
8339}
8340
8341// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
8342func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
8343	return LoadBalancerBackendAddressPoolListResultPage{
8344		fn:      getNextPage,
8345		lbbaplr: cur,
8346	}
8347}
8348
8349// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
8350type LoadBalancerFrontendIPConfigurationListResult struct {
8351	autorest.Response `json:"-"`
8352	// Value - A list of frontend IP configurations in a load balancer.
8353	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
8354	// NextLink - READ-ONLY; The URL to get the next set of results.
8355	NextLink *string `json:"nextLink,omitempty"`
8356}
8357
8358// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
8359func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
8360	objectMap := make(map[string]interface{})
8361	if lbficlr.Value != nil {
8362		objectMap["value"] = lbficlr.Value
8363	}
8364	return json.Marshal(objectMap)
8365}
8366
8367// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
8368// FrontendIPConfiguration values.
8369type LoadBalancerFrontendIPConfigurationListResultIterator struct {
8370	i    int
8371	page LoadBalancerFrontendIPConfigurationListResultPage
8372}
8373
8374// NextWithContext advances to the next value.  If there was an error making
8375// the request the iterator does not advance and the error is returned.
8376func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8377	if tracing.IsEnabled() {
8378		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
8379		defer func() {
8380			sc := -1
8381			if iter.Response().Response.Response != nil {
8382				sc = iter.Response().Response.Response.StatusCode
8383			}
8384			tracing.EndSpan(ctx, sc, err)
8385		}()
8386	}
8387	iter.i++
8388	if iter.i < len(iter.page.Values()) {
8389		return nil
8390	}
8391	err = iter.page.NextWithContext(ctx)
8392	if err != nil {
8393		iter.i--
8394		return err
8395	}
8396	iter.i = 0
8397	return nil
8398}
8399
8400// Next advances to the next value.  If there was an error making
8401// the request the iterator does not advance and the error is returned.
8402// Deprecated: Use NextWithContext() instead.
8403func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
8404	return iter.NextWithContext(context.Background())
8405}
8406
8407// NotDone returns true if the enumeration should be started or is not yet complete.
8408func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
8409	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8410}
8411
8412// Response returns the raw server response from the last page request.
8413func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
8414	return iter.page.Response()
8415}
8416
8417// Value returns the current value or a zero-initialized value if the
8418// iterator has advanced beyond the end of the collection.
8419func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
8420	if !iter.page.NotDone() {
8421		return FrontendIPConfiguration{}
8422	}
8423	return iter.page.Values()[iter.i]
8424}
8425
8426// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
8427func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
8428	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
8429}
8430
8431// IsEmpty returns true if the ListResult contains no values.
8432func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
8433	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
8434}
8435
8436// hasNextLink returns true if the NextLink is not empty.
8437func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
8438	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
8439}
8440
8441// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
8442// It returns nil if no more results exist.
8443func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
8444	if !lbficlr.hasNextLink() {
8445		return nil, nil
8446	}
8447	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8448		autorest.AsJSON(),
8449		autorest.AsGet(),
8450		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
8451}
8452
8453// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
8454type LoadBalancerFrontendIPConfigurationListResultPage struct {
8455	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
8456	lbficlr LoadBalancerFrontendIPConfigurationListResult
8457}
8458
8459// NextWithContext advances to the next page of values.  If there was an error making
8460// the request the page does not advance and the error is returned.
8461func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
8462	if tracing.IsEnabled() {
8463		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
8464		defer func() {
8465			sc := -1
8466			if page.Response().Response.Response != nil {
8467				sc = page.Response().Response.Response.StatusCode
8468			}
8469			tracing.EndSpan(ctx, sc, err)
8470		}()
8471	}
8472	for {
8473		next, err := page.fn(ctx, page.lbficlr)
8474		if err != nil {
8475			return err
8476		}
8477		page.lbficlr = next
8478		if !next.hasNextLink() || !next.IsEmpty() {
8479			break
8480		}
8481	}
8482	return nil
8483}
8484
8485// Next advances to the next page of values.  If there was an error making
8486// the request the page does not advance and the error is returned.
8487// Deprecated: Use NextWithContext() instead.
8488func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
8489	return page.NextWithContext(context.Background())
8490}
8491
8492// NotDone returns true if the page enumeration should be started or is not yet complete.
8493func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
8494	return !page.lbficlr.IsEmpty()
8495}
8496
8497// Response returns the raw server response from the last page request.
8498func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
8499	return page.lbficlr
8500}
8501
8502// Values returns the slice of values for the current page or nil if there are no values.
8503func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
8504	if page.lbficlr.IsEmpty() {
8505		return nil
8506	}
8507	return *page.lbficlr.Value
8508}
8509
8510// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
8511func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
8512	return LoadBalancerFrontendIPConfigurationListResultPage{
8513		fn:      getNextPage,
8514		lbficlr: cur,
8515	}
8516}
8517
8518// LoadBalancerListResult response for ListLoadBalancers API service call.
8519type LoadBalancerListResult struct {
8520	autorest.Response `json:"-"`
8521	// Value - A list of load balancers in a resource group.
8522	Value *[]LoadBalancer `json:"value,omitempty"`
8523	// NextLink - READ-ONLY; The URL to get the next set of results.
8524	NextLink *string `json:"nextLink,omitempty"`
8525}
8526
8527// MarshalJSON is the custom marshaler for LoadBalancerListResult.
8528func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
8529	objectMap := make(map[string]interface{})
8530	if lblr.Value != nil {
8531		objectMap["value"] = lblr.Value
8532	}
8533	return json.Marshal(objectMap)
8534}
8535
8536// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
8537type LoadBalancerListResultIterator struct {
8538	i    int
8539	page LoadBalancerListResultPage
8540}
8541
8542// NextWithContext advances to the next value.  If there was an error making
8543// the request the iterator does not advance and the error is returned.
8544func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
8545	if tracing.IsEnabled() {
8546		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
8547		defer func() {
8548			sc := -1
8549			if iter.Response().Response.Response != nil {
8550				sc = iter.Response().Response.Response.StatusCode
8551			}
8552			tracing.EndSpan(ctx, sc, err)
8553		}()
8554	}
8555	iter.i++
8556	if iter.i < len(iter.page.Values()) {
8557		return nil
8558	}
8559	err = iter.page.NextWithContext(ctx)
8560	if err != nil {
8561		iter.i--
8562		return err
8563	}
8564	iter.i = 0
8565	return nil
8566}
8567
8568// Next advances to the next value.  If there was an error making
8569// the request the iterator does not advance and the error is returned.
8570// Deprecated: Use NextWithContext() instead.
8571func (iter *LoadBalancerListResultIterator) Next() error {
8572	return iter.NextWithContext(context.Background())
8573}
8574
8575// NotDone returns true if the enumeration should be started or is not yet complete.
8576func (iter LoadBalancerListResultIterator) NotDone() bool {
8577	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8578}
8579
8580// Response returns the raw server response from the last page request.
8581func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
8582	return iter.page.Response()
8583}
8584
8585// Value returns the current value or a zero-initialized value if the
8586// iterator has advanced beyond the end of the collection.
8587func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
8588	if !iter.page.NotDone() {
8589		return LoadBalancer{}
8590	}
8591	return iter.page.Values()[iter.i]
8592}
8593
8594// Creates a new instance of the LoadBalancerListResultIterator type.
8595func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
8596	return LoadBalancerListResultIterator{page: page}
8597}
8598
8599// IsEmpty returns true if the ListResult contains no values.
8600func (lblr LoadBalancerListResult) IsEmpty() bool {
8601	return lblr.Value == nil || len(*lblr.Value) == 0
8602}
8603
8604// hasNextLink returns true if the NextLink is not empty.
8605func (lblr LoadBalancerListResult) hasNextLink() bool {
8606	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
8607}
8608
8609// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
8610// It returns nil if no more results exist.
8611func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
8612	if !lblr.hasNextLink() {
8613		return nil, nil
8614	}
8615	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8616		autorest.AsJSON(),
8617		autorest.AsGet(),
8618		autorest.WithBaseURL(to.String(lblr.NextLink)))
8619}
8620
8621// LoadBalancerListResultPage contains a page of LoadBalancer values.
8622type LoadBalancerListResultPage struct {
8623	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
8624	lblr LoadBalancerListResult
8625}
8626
8627// NextWithContext advances to the next page of values.  If there was an error making
8628// the request the page does not advance and the error is returned.
8629func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
8630	if tracing.IsEnabled() {
8631		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
8632		defer func() {
8633			sc := -1
8634			if page.Response().Response.Response != nil {
8635				sc = page.Response().Response.Response.StatusCode
8636			}
8637			tracing.EndSpan(ctx, sc, err)
8638		}()
8639	}
8640	for {
8641		next, err := page.fn(ctx, page.lblr)
8642		if err != nil {
8643			return err
8644		}
8645		page.lblr = next
8646		if !next.hasNextLink() || !next.IsEmpty() {
8647			break
8648		}
8649	}
8650	return nil
8651}
8652
8653// Next advances to the next page of values.  If there was an error making
8654// the request the page does not advance and the error is returned.
8655// Deprecated: Use NextWithContext() instead.
8656func (page *LoadBalancerListResultPage) Next() error {
8657	return page.NextWithContext(context.Background())
8658}
8659
8660// NotDone returns true if the page enumeration should be started or is not yet complete.
8661func (page LoadBalancerListResultPage) NotDone() bool {
8662	return !page.lblr.IsEmpty()
8663}
8664
8665// Response returns the raw server response from the last page request.
8666func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
8667	return page.lblr
8668}
8669
8670// Values returns the slice of values for the current page or nil if there are no values.
8671func (page LoadBalancerListResultPage) Values() []LoadBalancer {
8672	if page.lblr.IsEmpty() {
8673		return nil
8674	}
8675	return *page.lblr.Value
8676}
8677
8678// Creates a new instance of the LoadBalancerListResultPage type.
8679func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
8680	return LoadBalancerListResultPage{
8681		fn:   getNextPage,
8682		lblr: cur,
8683	}
8684}
8685
8686// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
8687type LoadBalancerLoadBalancingRuleListResult struct {
8688	autorest.Response `json:"-"`
8689	// Value - A list of load balancing rules in a load balancer.
8690	Value *[]LoadBalancingRule `json:"value,omitempty"`
8691	// NextLink - READ-ONLY; The URL to get the next set of results.
8692	NextLink *string `json:"nextLink,omitempty"`
8693}
8694
8695// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
8696func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
8697	objectMap := make(map[string]interface{})
8698	if lblbrlr.Value != nil {
8699		objectMap["value"] = lblbrlr.Value
8700	}
8701	return json.Marshal(objectMap)
8702}
8703
8704// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
8705// LoadBalancingRule values.
8706type LoadBalancerLoadBalancingRuleListResultIterator struct {
8707	i    int
8708	page LoadBalancerLoadBalancingRuleListResultPage
8709}
8710
8711// NextWithContext advances to the next value.  If there was an error making
8712// the request the iterator does not advance and the error is returned.
8713func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
8714	if tracing.IsEnabled() {
8715		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
8716		defer func() {
8717			sc := -1
8718			if iter.Response().Response.Response != nil {
8719				sc = iter.Response().Response.Response.StatusCode
8720			}
8721			tracing.EndSpan(ctx, sc, err)
8722		}()
8723	}
8724	iter.i++
8725	if iter.i < len(iter.page.Values()) {
8726		return nil
8727	}
8728	err = iter.page.NextWithContext(ctx)
8729	if err != nil {
8730		iter.i--
8731		return err
8732	}
8733	iter.i = 0
8734	return nil
8735}
8736
8737// Next advances to the next value.  If there was an error making
8738// the request the iterator does not advance and the error is returned.
8739// Deprecated: Use NextWithContext() instead.
8740func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
8741	return iter.NextWithContext(context.Background())
8742}
8743
8744// NotDone returns true if the enumeration should be started or is not yet complete.
8745func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
8746	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8747}
8748
8749// Response returns the raw server response from the last page request.
8750func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
8751	return iter.page.Response()
8752}
8753
8754// Value returns the current value or a zero-initialized value if the
8755// iterator has advanced beyond the end of the collection.
8756func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
8757	if !iter.page.NotDone() {
8758		return LoadBalancingRule{}
8759	}
8760	return iter.page.Values()[iter.i]
8761}
8762
8763// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
8764func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
8765	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
8766}
8767
8768// IsEmpty returns true if the ListResult contains no values.
8769func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
8770	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
8771}
8772
8773// hasNextLink returns true if the NextLink is not empty.
8774func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
8775	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
8776}
8777
8778// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
8779// It returns nil if no more results exist.
8780func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
8781	if !lblbrlr.hasNextLink() {
8782		return nil, nil
8783	}
8784	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8785		autorest.AsJSON(),
8786		autorest.AsGet(),
8787		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
8788}
8789
8790// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
8791type LoadBalancerLoadBalancingRuleListResultPage struct {
8792	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
8793	lblbrlr LoadBalancerLoadBalancingRuleListResult
8794}
8795
8796// NextWithContext advances to the next page of values.  If there was an error making
8797// the request the page does not advance and the error is returned.
8798func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
8799	if tracing.IsEnabled() {
8800		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
8801		defer func() {
8802			sc := -1
8803			if page.Response().Response.Response != nil {
8804				sc = page.Response().Response.Response.StatusCode
8805			}
8806			tracing.EndSpan(ctx, sc, err)
8807		}()
8808	}
8809	for {
8810		next, err := page.fn(ctx, page.lblbrlr)
8811		if err != nil {
8812			return err
8813		}
8814		page.lblbrlr = next
8815		if !next.hasNextLink() || !next.IsEmpty() {
8816			break
8817		}
8818	}
8819	return nil
8820}
8821
8822// Next advances to the next page of values.  If there was an error making
8823// the request the page does not advance and the error is returned.
8824// Deprecated: Use NextWithContext() instead.
8825func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
8826	return page.NextWithContext(context.Background())
8827}
8828
8829// NotDone returns true if the page enumeration should be started or is not yet complete.
8830func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
8831	return !page.lblbrlr.IsEmpty()
8832}
8833
8834// Response returns the raw server response from the last page request.
8835func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
8836	return page.lblbrlr
8837}
8838
8839// Values returns the slice of values for the current page or nil if there are no values.
8840func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
8841	if page.lblbrlr.IsEmpty() {
8842		return nil
8843	}
8844	return *page.lblbrlr.Value
8845}
8846
8847// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
8848func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
8849	return LoadBalancerLoadBalancingRuleListResultPage{
8850		fn:      getNextPage,
8851		lblbrlr: cur,
8852	}
8853}
8854
8855// LoadBalancerProbeListResult response for ListProbe API service call.
8856type LoadBalancerProbeListResult struct {
8857	autorest.Response `json:"-"`
8858	// Value - A list of probes in a load balancer.
8859	Value *[]Probe `json:"value,omitempty"`
8860	// NextLink - READ-ONLY; The URL to get the next set of results.
8861	NextLink *string `json:"nextLink,omitempty"`
8862}
8863
8864// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
8865func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
8866	objectMap := make(map[string]interface{})
8867	if lbplr.Value != nil {
8868		objectMap["value"] = lbplr.Value
8869	}
8870	return json.Marshal(objectMap)
8871}
8872
8873// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
8874type LoadBalancerProbeListResultIterator struct {
8875	i    int
8876	page LoadBalancerProbeListResultPage
8877}
8878
8879// NextWithContext advances to the next value.  If there was an error making
8880// the request the iterator does not advance and the error is returned.
8881func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
8882	if tracing.IsEnabled() {
8883		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
8884		defer func() {
8885			sc := -1
8886			if iter.Response().Response.Response != nil {
8887				sc = iter.Response().Response.Response.StatusCode
8888			}
8889			tracing.EndSpan(ctx, sc, err)
8890		}()
8891	}
8892	iter.i++
8893	if iter.i < len(iter.page.Values()) {
8894		return nil
8895	}
8896	err = iter.page.NextWithContext(ctx)
8897	if err != nil {
8898		iter.i--
8899		return err
8900	}
8901	iter.i = 0
8902	return nil
8903}
8904
8905// Next advances to the next value.  If there was an error making
8906// the request the iterator does not advance and the error is returned.
8907// Deprecated: Use NextWithContext() instead.
8908func (iter *LoadBalancerProbeListResultIterator) Next() error {
8909	return iter.NextWithContext(context.Background())
8910}
8911
8912// NotDone returns true if the enumeration should be started or is not yet complete.
8913func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
8914	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8915}
8916
8917// Response returns the raw server response from the last page request.
8918func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
8919	return iter.page.Response()
8920}
8921
8922// Value returns the current value or a zero-initialized value if the
8923// iterator has advanced beyond the end of the collection.
8924func (iter LoadBalancerProbeListResultIterator) Value() Probe {
8925	if !iter.page.NotDone() {
8926		return Probe{}
8927	}
8928	return iter.page.Values()[iter.i]
8929}
8930
8931// Creates a new instance of the LoadBalancerProbeListResultIterator type.
8932func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
8933	return LoadBalancerProbeListResultIterator{page: page}
8934}
8935
8936// IsEmpty returns true if the ListResult contains no values.
8937func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
8938	return lbplr.Value == nil || len(*lbplr.Value) == 0
8939}
8940
8941// hasNextLink returns true if the NextLink is not empty.
8942func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
8943	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
8944}
8945
8946// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
8947// It returns nil if no more results exist.
8948func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
8949	if !lbplr.hasNextLink() {
8950		return nil, nil
8951	}
8952	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8953		autorest.AsJSON(),
8954		autorest.AsGet(),
8955		autorest.WithBaseURL(to.String(lbplr.NextLink)))
8956}
8957
8958// LoadBalancerProbeListResultPage contains a page of Probe values.
8959type LoadBalancerProbeListResultPage struct {
8960	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
8961	lbplr LoadBalancerProbeListResult
8962}
8963
8964// NextWithContext advances to the next page of values.  If there was an error making
8965// the request the page does not advance and the error is returned.
8966func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
8967	if tracing.IsEnabled() {
8968		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
8969		defer func() {
8970			sc := -1
8971			if page.Response().Response.Response != nil {
8972				sc = page.Response().Response.Response.StatusCode
8973			}
8974			tracing.EndSpan(ctx, sc, err)
8975		}()
8976	}
8977	for {
8978		next, err := page.fn(ctx, page.lbplr)
8979		if err != nil {
8980			return err
8981		}
8982		page.lbplr = next
8983		if !next.hasNextLink() || !next.IsEmpty() {
8984			break
8985		}
8986	}
8987	return nil
8988}
8989
8990// Next advances to the next page of values.  If there was an error making
8991// the request the page does not advance and the error is returned.
8992// Deprecated: Use NextWithContext() instead.
8993func (page *LoadBalancerProbeListResultPage) Next() error {
8994	return page.NextWithContext(context.Background())
8995}
8996
8997// NotDone returns true if the page enumeration should be started or is not yet complete.
8998func (page LoadBalancerProbeListResultPage) NotDone() bool {
8999	return !page.lbplr.IsEmpty()
9000}
9001
9002// Response returns the raw server response from the last page request.
9003func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
9004	return page.lbplr
9005}
9006
9007// Values returns the slice of values for the current page or nil if there are no values.
9008func (page LoadBalancerProbeListResultPage) Values() []Probe {
9009	if page.lbplr.IsEmpty() {
9010		return nil
9011	}
9012	return *page.lbplr.Value
9013}
9014
9015// Creates a new instance of the LoadBalancerProbeListResultPage type.
9016func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
9017	return LoadBalancerProbeListResultPage{
9018		fn:    getNextPage,
9019		lbplr: cur,
9020	}
9021}
9022
9023// LoadBalancerPropertiesFormat properties of the load balancer.
9024type LoadBalancerPropertiesFormat struct {
9025	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
9026	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
9027	// BackendAddressPools - Collection of backend address pools used by a load balancer
9028	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
9029	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
9030	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
9031	// Probes - Collection of probe objects used in the load balancer
9032	Probes *[]Probe `json:"probes,omitempty"`
9033	// 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.
9034	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
9035	// 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.
9036	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
9037	// OutboundNatRules - The outbound NAT rules.
9038	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
9039	// ResourceGUID - The resource GUID property of the load balancer resource.
9040	ResourceGUID *string `json:"resourceGuid,omitempty"`
9041	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9042	ProvisioningState *string `json:"provisioningState,omitempty"`
9043}
9044
9045// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9046// long-running operation.
9047type LoadBalancersCreateOrUpdateFuture struct {
9048	azure.FutureAPI
9049	// Result returns the result of the asynchronous operation.
9050	// If the operation has not completed it will return an error.
9051	Result func(LoadBalancersClient) (LoadBalancer, error)
9052}
9053
9054// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9055func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9056	var azFuture azure.Future
9057	if err := json.Unmarshal(body, &azFuture); err != nil {
9058		return err
9059	}
9060	future.FutureAPI = &azFuture
9061	future.Result = future.result
9062	return nil
9063}
9064
9065// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
9066func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9067	var done bool
9068	done, err = future.DoneWithContext(context.Background(), client)
9069	if err != nil {
9070		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9071		return
9072	}
9073	if !done {
9074		lb.Response.Response = future.Response()
9075		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
9076		return
9077	}
9078	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9079	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9080		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
9081		if err != nil {
9082			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
9083		}
9084	}
9085	return
9086}
9087
9088// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9089// operation.
9090type LoadBalancersDeleteFuture struct {
9091	azure.FutureAPI
9092	// Result returns the result of the asynchronous operation.
9093	// If the operation has not completed it will return an error.
9094	Result func(LoadBalancersClient) (autorest.Response, error)
9095}
9096
9097// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9098func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
9099	var azFuture azure.Future
9100	if err := json.Unmarshal(body, &azFuture); err != nil {
9101		return err
9102	}
9103	future.FutureAPI = &azFuture
9104	future.Result = future.result
9105	return nil
9106}
9107
9108// result is the default implementation for LoadBalancersDeleteFuture.Result.
9109func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
9110	var done bool
9111	done, err = future.DoneWithContext(context.Background(), client)
9112	if err != nil {
9113		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
9114		return
9115	}
9116	if !done {
9117		ar.Response = future.Response()
9118		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
9119		return
9120	}
9121	ar.Response = future.Response()
9122	return
9123}
9124
9125// LoadBalancerSku SKU of a load balancer
9126type LoadBalancerSku struct {
9127	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
9128	Name LoadBalancerSkuName `json:"name,omitempty"`
9129}
9130
9131// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
9132// operation.
9133type LoadBalancersUpdateTagsFuture struct {
9134	azure.FutureAPI
9135	// Result returns the result of the asynchronous operation.
9136	// If the operation has not completed it will return an error.
9137	Result func(LoadBalancersClient) (LoadBalancer, error)
9138}
9139
9140// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9141func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9142	var azFuture azure.Future
9143	if err := json.Unmarshal(body, &azFuture); err != nil {
9144		return err
9145	}
9146	future.FutureAPI = &azFuture
9147	future.Result = future.result
9148	return nil
9149}
9150
9151// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
9152func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9153	var done bool
9154	done, err = future.DoneWithContext(context.Background(), client)
9155	if err != nil {
9156		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9157		return
9158	}
9159	if !done {
9160		lb.Response.Response = future.Response()
9161		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
9162		return
9163	}
9164	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9165	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9166		lb, err = client.UpdateTagsResponder(lb.Response.Response)
9167		if err != nil {
9168			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
9169		}
9170	}
9171	return
9172}
9173
9174// LoadBalancingRule a load balancing rule for a load balancer.
9175type LoadBalancingRule struct {
9176	autorest.Response `json:"-"`
9177	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
9178	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
9179	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9180	Name *string `json:"name,omitempty"`
9181	// Etag - A unique read-only string that changes whenever the resource is updated.
9182	Etag *string `json:"etag,omitempty"`
9183	// ID - Resource ID.
9184	ID *string `json:"id,omitempty"`
9185}
9186
9187// MarshalJSON is the custom marshaler for LoadBalancingRule.
9188func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
9189	objectMap := make(map[string]interface{})
9190	if lbr.LoadBalancingRulePropertiesFormat != nil {
9191		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
9192	}
9193	if lbr.Name != nil {
9194		objectMap["name"] = lbr.Name
9195	}
9196	if lbr.Etag != nil {
9197		objectMap["etag"] = lbr.Etag
9198	}
9199	if lbr.ID != nil {
9200		objectMap["id"] = lbr.ID
9201	}
9202	return json.Marshal(objectMap)
9203}
9204
9205// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
9206func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
9207	var m map[string]*json.RawMessage
9208	err := json.Unmarshal(body, &m)
9209	if err != nil {
9210		return err
9211	}
9212	for k, v := range m {
9213		switch k {
9214		case "properties":
9215			if v != nil {
9216				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
9217				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
9218				if err != nil {
9219					return err
9220				}
9221				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
9222			}
9223		case "name":
9224			if v != nil {
9225				var name string
9226				err = json.Unmarshal(*v, &name)
9227				if err != nil {
9228					return err
9229				}
9230				lbr.Name = &name
9231			}
9232		case "etag":
9233			if v != nil {
9234				var etag string
9235				err = json.Unmarshal(*v, &etag)
9236				if err != nil {
9237					return err
9238				}
9239				lbr.Etag = &etag
9240			}
9241		case "id":
9242			if v != nil {
9243				var ID string
9244				err = json.Unmarshal(*v, &ID)
9245				if err != nil {
9246					return err
9247				}
9248				lbr.ID = &ID
9249			}
9250		}
9251	}
9252
9253	return nil
9254}
9255
9256// LoadBalancingRulePropertiesFormat properties of the load balancer.
9257type LoadBalancingRulePropertiesFormat struct {
9258	// FrontendIPConfiguration - A reference to frontend IP addresses.
9259	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9260	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
9261	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
9262	// Probe - The reference of the load balancer probe used by the load balancing rule.
9263	Probe *SubResource `json:"probe,omitempty"`
9264	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9265	Protocol TransportProtocol `json:"protocol,omitempty"`
9266	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
9267	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
9268	// 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"
9269	FrontendPort *int32 `json:"frontendPort,omitempty"`
9270	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
9271	BackendPort *int32 `json:"backendPort,omitempty"`
9272	// 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.
9273	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9274	// 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.
9275	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9276	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
9277	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
9278	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9279	ProvisioningState *string `json:"provisioningState,omitempty"`
9280}
9281
9282// LocalNetworkGateway a common class for general resource information
9283type LocalNetworkGateway struct {
9284	autorest.Response `json:"-"`
9285	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
9286	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
9287	// Etag - A unique read-only string that changes whenever the resource is updated.
9288	Etag *string `json:"etag,omitempty"`
9289	// ID - Resource ID.
9290	ID *string `json:"id,omitempty"`
9291	// Name - READ-ONLY; Resource name.
9292	Name *string `json:"name,omitempty"`
9293	// Type - READ-ONLY; Resource type.
9294	Type *string `json:"type,omitempty"`
9295	// Location - Resource location.
9296	Location *string `json:"location,omitempty"`
9297	// Tags - Resource tags.
9298	Tags map[string]*string `json:"tags"`
9299}
9300
9301// MarshalJSON is the custom marshaler for LocalNetworkGateway.
9302func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
9303	objectMap := make(map[string]interface{})
9304	if lng.LocalNetworkGatewayPropertiesFormat != nil {
9305		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
9306	}
9307	if lng.Etag != nil {
9308		objectMap["etag"] = lng.Etag
9309	}
9310	if lng.ID != nil {
9311		objectMap["id"] = lng.ID
9312	}
9313	if lng.Location != nil {
9314		objectMap["location"] = lng.Location
9315	}
9316	if lng.Tags != nil {
9317		objectMap["tags"] = lng.Tags
9318	}
9319	return json.Marshal(objectMap)
9320}
9321
9322// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
9323func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
9324	var m map[string]*json.RawMessage
9325	err := json.Unmarshal(body, &m)
9326	if err != nil {
9327		return err
9328	}
9329	for k, v := range m {
9330		switch k {
9331		case "properties":
9332			if v != nil {
9333				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
9334				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
9335				if err != nil {
9336					return err
9337				}
9338				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
9339			}
9340		case "etag":
9341			if v != nil {
9342				var etag string
9343				err = json.Unmarshal(*v, &etag)
9344				if err != nil {
9345					return err
9346				}
9347				lng.Etag = &etag
9348			}
9349		case "id":
9350			if v != nil {
9351				var ID string
9352				err = json.Unmarshal(*v, &ID)
9353				if err != nil {
9354					return err
9355				}
9356				lng.ID = &ID
9357			}
9358		case "name":
9359			if v != nil {
9360				var name string
9361				err = json.Unmarshal(*v, &name)
9362				if err != nil {
9363					return err
9364				}
9365				lng.Name = &name
9366			}
9367		case "type":
9368			if v != nil {
9369				var typeVar string
9370				err = json.Unmarshal(*v, &typeVar)
9371				if err != nil {
9372					return err
9373				}
9374				lng.Type = &typeVar
9375			}
9376		case "location":
9377			if v != nil {
9378				var location string
9379				err = json.Unmarshal(*v, &location)
9380				if err != nil {
9381					return err
9382				}
9383				lng.Location = &location
9384			}
9385		case "tags":
9386			if v != nil {
9387				var tags map[string]*string
9388				err = json.Unmarshal(*v, &tags)
9389				if err != nil {
9390					return err
9391				}
9392				lng.Tags = tags
9393			}
9394		}
9395	}
9396
9397	return nil
9398}
9399
9400// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
9401type LocalNetworkGatewayListResult struct {
9402	autorest.Response `json:"-"`
9403	// Value - A list of local network gateways that exists in a resource group.
9404	Value *[]LocalNetworkGateway `json:"value,omitempty"`
9405	// NextLink - READ-ONLY; The URL to get the next set of results.
9406	NextLink *string `json:"nextLink,omitempty"`
9407}
9408
9409// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
9410func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
9411	objectMap := make(map[string]interface{})
9412	if lnglr.Value != nil {
9413		objectMap["value"] = lnglr.Value
9414	}
9415	return json.Marshal(objectMap)
9416}
9417
9418// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
9419// values.
9420type LocalNetworkGatewayListResultIterator struct {
9421	i    int
9422	page LocalNetworkGatewayListResultPage
9423}
9424
9425// NextWithContext advances to the next value.  If there was an error making
9426// the request the iterator does not advance and the error is returned.
9427func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
9428	if tracing.IsEnabled() {
9429		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
9430		defer func() {
9431			sc := -1
9432			if iter.Response().Response.Response != nil {
9433				sc = iter.Response().Response.Response.StatusCode
9434			}
9435			tracing.EndSpan(ctx, sc, err)
9436		}()
9437	}
9438	iter.i++
9439	if iter.i < len(iter.page.Values()) {
9440		return nil
9441	}
9442	err = iter.page.NextWithContext(ctx)
9443	if err != nil {
9444		iter.i--
9445		return err
9446	}
9447	iter.i = 0
9448	return nil
9449}
9450
9451// Next advances to the next value.  If there was an error making
9452// the request the iterator does not advance and the error is returned.
9453// Deprecated: Use NextWithContext() instead.
9454func (iter *LocalNetworkGatewayListResultIterator) Next() error {
9455	return iter.NextWithContext(context.Background())
9456}
9457
9458// NotDone returns true if the enumeration should be started or is not yet complete.
9459func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
9460	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9461}
9462
9463// Response returns the raw server response from the last page request.
9464func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
9465	return iter.page.Response()
9466}
9467
9468// Value returns the current value or a zero-initialized value if the
9469// iterator has advanced beyond the end of the collection.
9470func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
9471	if !iter.page.NotDone() {
9472		return LocalNetworkGateway{}
9473	}
9474	return iter.page.Values()[iter.i]
9475}
9476
9477// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
9478func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
9479	return LocalNetworkGatewayListResultIterator{page: page}
9480}
9481
9482// IsEmpty returns true if the ListResult contains no values.
9483func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
9484	return lnglr.Value == nil || len(*lnglr.Value) == 0
9485}
9486
9487// hasNextLink returns true if the NextLink is not empty.
9488func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
9489	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
9490}
9491
9492// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
9493// It returns nil if no more results exist.
9494func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
9495	if !lnglr.hasNextLink() {
9496		return nil, nil
9497	}
9498	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9499		autorest.AsJSON(),
9500		autorest.AsGet(),
9501		autorest.WithBaseURL(to.String(lnglr.NextLink)))
9502}
9503
9504// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
9505type LocalNetworkGatewayListResultPage struct {
9506	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
9507	lnglr LocalNetworkGatewayListResult
9508}
9509
9510// NextWithContext advances to the next page of values.  If there was an error making
9511// the request the page does not advance and the error is returned.
9512func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
9513	if tracing.IsEnabled() {
9514		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
9515		defer func() {
9516			sc := -1
9517			if page.Response().Response.Response != nil {
9518				sc = page.Response().Response.Response.StatusCode
9519			}
9520			tracing.EndSpan(ctx, sc, err)
9521		}()
9522	}
9523	for {
9524		next, err := page.fn(ctx, page.lnglr)
9525		if err != nil {
9526			return err
9527		}
9528		page.lnglr = next
9529		if !next.hasNextLink() || !next.IsEmpty() {
9530			break
9531		}
9532	}
9533	return nil
9534}
9535
9536// Next advances to the next page of values.  If there was an error making
9537// the request the page does not advance and the error is returned.
9538// Deprecated: Use NextWithContext() instead.
9539func (page *LocalNetworkGatewayListResultPage) Next() error {
9540	return page.NextWithContext(context.Background())
9541}
9542
9543// NotDone returns true if the page enumeration should be started or is not yet complete.
9544func (page LocalNetworkGatewayListResultPage) NotDone() bool {
9545	return !page.lnglr.IsEmpty()
9546}
9547
9548// Response returns the raw server response from the last page request.
9549func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
9550	return page.lnglr
9551}
9552
9553// Values returns the slice of values for the current page or nil if there are no values.
9554func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
9555	if page.lnglr.IsEmpty() {
9556		return nil
9557	}
9558	return *page.lnglr.Value
9559}
9560
9561// Creates a new instance of the LocalNetworkGatewayListResultPage type.
9562func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
9563	return LocalNetworkGatewayListResultPage{
9564		fn:    getNextPage,
9565		lnglr: cur,
9566	}
9567}
9568
9569// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
9570type LocalNetworkGatewayPropertiesFormat struct {
9571	// LocalNetworkAddressSpace - Local network site address space.
9572	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
9573	// GatewayIPAddress - IP address of local network gateway.
9574	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
9575	// BgpSettings - Local network gateway's BGP speaker settings.
9576	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
9577	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
9578	ResourceGUID *string `json:"resourceGuid,omitempty"`
9579	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9580	ProvisioningState *string `json:"provisioningState,omitempty"`
9581}
9582
9583// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
9584func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
9585	objectMap := make(map[string]interface{})
9586	if lngpf.LocalNetworkAddressSpace != nil {
9587		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
9588	}
9589	if lngpf.GatewayIPAddress != nil {
9590		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
9591	}
9592	if lngpf.BgpSettings != nil {
9593		objectMap["bgpSettings"] = lngpf.BgpSettings
9594	}
9595	if lngpf.ResourceGUID != nil {
9596		objectMap["resourceGuid"] = lngpf.ResourceGUID
9597	}
9598	return json.Marshal(objectMap)
9599}
9600
9601// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9602// long-running operation.
9603type LocalNetworkGatewaysCreateOrUpdateFuture struct {
9604	azure.FutureAPI
9605	// Result returns the result of the asynchronous operation.
9606	// If the operation has not completed it will return an error.
9607	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9608}
9609
9610// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9611func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9612	var azFuture azure.Future
9613	if err := json.Unmarshal(body, &azFuture); err != nil {
9614		return err
9615	}
9616	future.FutureAPI = &azFuture
9617	future.Result = future.result
9618	return nil
9619}
9620
9621// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
9622func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9623	var done bool
9624	done, err = future.DoneWithContext(context.Background(), client)
9625	if err != nil {
9626		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9627		return
9628	}
9629	if !done {
9630		lng.Response.Response = future.Response()
9631		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
9632		return
9633	}
9634	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9635	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9636		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
9637		if err != nil {
9638			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
9639		}
9640	}
9641	return
9642}
9643
9644// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9645// long-running operation.
9646type LocalNetworkGatewaysDeleteFuture struct {
9647	azure.FutureAPI
9648	// Result returns the result of the asynchronous operation.
9649	// If the operation has not completed it will return an error.
9650	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
9651}
9652
9653// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9654func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
9655	var azFuture azure.Future
9656	if err := json.Unmarshal(body, &azFuture); err != nil {
9657		return err
9658	}
9659	future.FutureAPI = &azFuture
9660	future.Result = future.result
9661	return nil
9662}
9663
9664// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
9665func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
9666	var done bool
9667	done, err = future.DoneWithContext(context.Background(), client)
9668	if err != nil {
9669		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
9670		return
9671	}
9672	if !done {
9673		ar.Response = future.Response()
9674		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
9675		return
9676	}
9677	ar.Response = future.Response()
9678	return
9679}
9680
9681// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9682// long-running operation.
9683type LocalNetworkGatewaysUpdateTagsFuture struct {
9684	azure.FutureAPI
9685	// Result returns the result of the asynchronous operation.
9686	// If the operation has not completed it will return an error.
9687	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9688}
9689
9690// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9691func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9692	var azFuture azure.Future
9693	if err := json.Unmarshal(body, &azFuture); err != nil {
9694		return err
9695	}
9696	future.FutureAPI = &azFuture
9697	future.Result = future.result
9698	return nil
9699}
9700
9701// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
9702func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9703	var done bool
9704	done, err = future.DoneWithContext(context.Background(), client)
9705	if err != nil {
9706		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9707		return
9708	}
9709	if !done {
9710		lng.Response.Response = future.Response()
9711		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
9712		return
9713	}
9714	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9715	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9716		lng, err = client.UpdateTagsResponder(lng.Response.Response)
9717		if err != nil {
9718			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
9719		}
9720	}
9721	return
9722}
9723
9724// LogSpecification description of logging specification.
9725type LogSpecification struct {
9726	// Name - The name of the specification.
9727	Name *string `json:"name,omitempty"`
9728	// DisplayName - The display name of the specification.
9729	DisplayName *string `json:"displayName,omitempty"`
9730	// BlobDuration - Duration of the blob.
9731	BlobDuration *string `json:"blobDuration,omitempty"`
9732}
9733
9734// MetricSpecification description of metrics specification.
9735type MetricSpecification struct {
9736	// Name - The name of the metric.
9737	Name *string `json:"name,omitempty"`
9738	// DisplayName - The display name of the metric.
9739	DisplayName *string `json:"displayName,omitempty"`
9740	// DisplayDescription - The description of the metric.
9741	DisplayDescription *string `json:"displayDescription,omitempty"`
9742	// Unit - Units the metric to be displayed in.
9743	Unit *string `json:"unit,omitempty"`
9744	// AggregationType - The aggregation type.
9745	AggregationType *string `json:"aggregationType,omitempty"`
9746	// Availabilities - List of availability.
9747	Availabilities *[]Availability `json:"availabilities,omitempty"`
9748	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
9749	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
9750	// FillGapWithZero - Whether gaps would be filled with zeros.
9751	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
9752	// MetricFilterPattern - Pattern for the filter of the metric.
9753	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
9754	// Dimensions - List of dimensions.
9755	Dimensions *[]Dimension `json:"dimensions,omitempty"`
9756	// IsInternal - Whether the metric is internal.
9757	IsInternal *bool `json:"isInternal,omitempty"`
9758	// SourceMdmAccount - The source MDM account.
9759	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
9760	// SourceMdmNamespace - The source MDM namespace.
9761	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
9762	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
9763	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
9764}
9765
9766// NextHopParameters parameters that define the source and destination endpoint.
9767type NextHopParameters struct {
9768	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
9769	TargetResourceID *string `json:"targetResourceId,omitempty"`
9770	// SourceIPAddress - The source IP address.
9771	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
9772	// DestinationIPAddress - The destination IP address.
9773	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
9774	// 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).
9775	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
9776}
9777
9778// NextHopResult the information about next hop from the specified VM.
9779type NextHopResult struct {
9780	autorest.Response `json:"-"`
9781	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
9782	NextHopType NextHopType `json:"nextHopType,omitempty"`
9783	// NextHopIPAddress - Next hop IP Address
9784	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
9785	// 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'.
9786	RouteTableID *string `json:"routeTableId,omitempty"`
9787}
9788
9789// Operation network REST API operation definition.
9790type Operation struct {
9791	// Name - Operation name: {provider}/{resource}/{operation}
9792	Name *string `json:"name,omitempty"`
9793	// Display - Display metadata associated with the operation.
9794	Display *OperationDisplay `json:"display,omitempty"`
9795	// Origin - Origin of the operation.
9796	Origin *string `json:"origin,omitempty"`
9797	// OperationPropertiesFormat - Operation properties format.
9798	*OperationPropertiesFormat `json:"properties,omitempty"`
9799}
9800
9801// MarshalJSON is the custom marshaler for Operation.
9802func (o Operation) MarshalJSON() ([]byte, error) {
9803	objectMap := make(map[string]interface{})
9804	if o.Name != nil {
9805		objectMap["name"] = o.Name
9806	}
9807	if o.Display != nil {
9808		objectMap["display"] = o.Display
9809	}
9810	if o.Origin != nil {
9811		objectMap["origin"] = o.Origin
9812	}
9813	if o.OperationPropertiesFormat != nil {
9814		objectMap["properties"] = o.OperationPropertiesFormat
9815	}
9816	return json.Marshal(objectMap)
9817}
9818
9819// UnmarshalJSON is the custom unmarshaler for Operation struct.
9820func (o *Operation) UnmarshalJSON(body []byte) error {
9821	var m map[string]*json.RawMessage
9822	err := json.Unmarshal(body, &m)
9823	if err != nil {
9824		return err
9825	}
9826	for k, v := range m {
9827		switch k {
9828		case "name":
9829			if v != nil {
9830				var name string
9831				err = json.Unmarshal(*v, &name)
9832				if err != nil {
9833					return err
9834				}
9835				o.Name = &name
9836			}
9837		case "display":
9838			if v != nil {
9839				var display OperationDisplay
9840				err = json.Unmarshal(*v, &display)
9841				if err != nil {
9842					return err
9843				}
9844				o.Display = &display
9845			}
9846		case "origin":
9847			if v != nil {
9848				var origin string
9849				err = json.Unmarshal(*v, &origin)
9850				if err != nil {
9851					return err
9852				}
9853				o.Origin = &origin
9854			}
9855		case "properties":
9856			if v != nil {
9857				var operationPropertiesFormat OperationPropertiesFormat
9858				err = json.Unmarshal(*v, &operationPropertiesFormat)
9859				if err != nil {
9860					return err
9861				}
9862				o.OperationPropertiesFormat = &operationPropertiesFormat
9863			}
9864		}
9865	}
9866
9867	return nil
9868}
9869
9870// OperationDisplay display metadata associated with the operation.
9871type OperationDisplay struct {
9872	// Provider - Service provider: Microsoft Network.
9873	Provider *string `json:"provider,omitempty"`
9874	// Resource - Resource on which the operation is performed.
9875	Resource *string `json:"resource,omitempty"`
9876	// Operation - Type of the operation: get, read, delete, etc.
9877	Operation *string `json:"operation,omitempty"`
9878	// Description - Description of the operation.
9879	Description *string `json:"description,omitempty"`
9880}
9881
9882// OperationListResult result of the request to list Network operations. It contains a list of operations
9883// and a URL link to get the next set of results.
9884type OperationListResult struct {
9885	autorest.Response `json:"-"`
9886	// Value - List of Network operations supported by the Network resource provider.
9887	Value *[]Operation `json:"value,omitempty"`
9888	// NextLink - URL to get the next set of operation list results if there are any.
9889	NextLink *string `json:"nextLink,omitempty"`
9890}
9891
9892// OperationListResultIterator provides access to a complete listing of Operation values.
9893type OperationListResultIterator struct {
9894	i    int
9895	page OperationListResultPage
9896}
9897
9898// NextWithContext advances to the next value.  If there was an error making
9899// the request the iterator does not advance and the error is returned.
9900func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9901	if tracing.IsEnabled() {
9902		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
9903		defer func() {
9904			sc := -1
9905			if iter.Response().Response.Response != nil {
9906				sc = iter.Response().Response.Response.StatusCode
9907			}
9908			tracing.EndSpan(ctx, sc, err)
9909		}()
9910	}
9911	iter.i++
9912	if iter.i < len(iter.page.Values()) {
9913		return nil
9914	}
9915	err = iter.page.NextWithContext(ctx)
9916	if err != nil {
9917		iter.i--
9918		return err
9919	}
9920	iter.i = 0
9921	return nil
9922}
9923
9924// Next advances to the next value.  If there was an error making
9925// the request the iterator does not advance and the error is returned.
9926// Deprecated: Use NextWithContext() instead.
9927func (iter *OperationListResultIterator) Next() error {
9928	return iter.NextWithContext(context.Background())
9929}
9930
9931// NotDone returns true if the enumeration should be started or is not yet complete.
9932func (iter OperationListResultIterator) NotDone() bool {
9933	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9934}
9935
9936// Response returns the raw server response from the last page request.
9937func (iter OperationListResultIterator) Response() OperationListResult {
9938	return iter.page.Response()
9939}
9940
9941// Value returns the current value or a zero-initialized value if the
9942// iterator has advanced beyond the end of the collection.
9943func (iter OperationListResultIterator) Value() Operation {
9944	if !iter.page.NotDone() {
9945		return Operation{}
9946	}
9947	return iter.page.Values()[iter.i]
9948}
9949
9950// Creates a new instance of the OperationListResultIterator type.
9951func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
9952	return OperationListResultIterator{page: page}
9953}
9954
9955// IsEmpty returns true if the ListResult contains no values.
9956func (olr OperationListResult) IsEmpty() bool {
9957	return olr.Value == nil || len(*olr.Value) == 0
9958}
9959
9960// hasNextLink returns true if the NextLink is not empty.
9961func (olr OperationListResult) hasNextLink() bool {
9962	return olr.NextLink != nil && len(*olr.NextLink) != 0
9963}
9964
9965// operationListResultPreparer prepares a request to retrieve the next set of results.
9966// It returns nil if no more results exist.
9967func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
9968	if !olr.hasNextLink() {
9969		return nil, nil
9970	}
9971	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9972		autorest.AsJSON(),
9973		autorest.AsGet(),
9974		autorest.WithBaseURL(to.String(olr.NextLink)))
9975}
9976
9977// OperationListResultPage contains a page of Operation values.
9978type OperationListResultPage struct {
9979	fn  func(context.Context, OperationListResult) (OperationListResult, error)
9980	olr OperationListResult
9981}
9982
9983// NextWithContext advances to the next page of values.  If there was an error making
9984// the request the page does not advance and the error is returned.
9985func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
9986	if tracing.IsEnabled() {
9987		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
9988		defer func() {
9989			sc := -1
9990			if page.Response().Response.Response != nil {
9991				sc = page.Response().Response.Response.StatusCode
9992			}
9993			tracing.EndSpan(ctx, sc, err)
9994		}()
9995	}
9996	for {
9997		next, err := page.fn(ctx, page.olr)
9998		if err != nil {
9999			return err
10000		}
10001		page.olr = next
10002		if !next.hasNextLink() || !next.IsEmpty() {
10003			break
10004		}
10005	}
10006	return nil
10007}
10008
10009// Next advances to the next page of values.  If there was an error making
10010// the request the page does not advance and the error is returned.
10011// Deprecated: Use NextWithContext() instead.
10012func (page *OperationListResultPage) Next() error {
10013	return page.NextWithContext(context.Background())
10014}
10015
10016// NotDone returns true if the page enumeration should be started or is not yet complete.
10017func (page OperationListResultPage) NotDone() bool {
10018	return !page.olr.IsEmpty()
10019}
10020
10021// Response returns the raw server response from the last page request.
10022func (page OperationListResultPage) Response() OperationListResult {
10023	return page.olr
10024}
10025
10026// Values returns the slice of values for the current page or nil if there are no values.
10027func (page OperationListResultPage) Values() []Operation {
10028	if page.olr.IsEmpty() {
10029		return nil
10030	}
10031	return *page.olr.Value
10032}
10033
10034// Creates a new instance of the OperationListResultPage type.
10035func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
10036	return OperationListResultPage{
10037		fn:  getNextPage,
10038		olr: cur,
10039	}
10040}
10041
10042// OperationPropertiesFormat description of operation properties format.
10043type OperationPropertiesFormat struct {
10044	// ServiceSpecification - Specification of the service.
10045	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
10046}
10047
10048// OperationPropertiesFormatServiceSpecification specification of the service.
10049type OperationPropertiesFormatServiceSpecification struct {
10050	// MetricSpecifications - Operation service specification.
10051	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
10052	// LogSpecifications - Operation log specification.
10053	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
10054}
10055
10056// OutboundNatRule outbound NAT pool of the load balancer.
10057type OutboundNatRule struct {
10058	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
10059	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
10060	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10061	Name *string `json:"name,omitempty"`
10062	// Etag - A unique read-only string that changes whenever the resource is updated.
10063	Etag *string `json:"etag,omitempty"`
10064	// ID - Resource ID.
10065	ID *string `json:"id,omitempty"`
10066}
10067
10068// MarshalJSON is the custom marshaler for OutboundNatRule.
10069func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
10070	objectMap := make(map[string]interface{})
10071	if onr.OutboundNatRulePropertiesFormat != nil {
10072		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
10073	}
10074	if onr.Name != nil {
10075		objectMap["name"] = onr.Name
10076	}
10077	if onr.Etag != nil {
10078		objectMap["etag"] = onr.Etag
10079	}
10080	if onr.ID != nil {
10081		objectMap["id"] = onr.ID
10082	}
10083	return json.Marshal(objectMap)
10084}
10085
10086// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
10087func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
10088	var m map[string]*json.RawMessage
10089	err := json.Unmarshal(body, &m)
10090	if err != nil {
10091		return err
10092	}
10093	for k, v := range m {
10094		switch k {
10095		case "properties":
10096			if v != nil {
10097				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
10098				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
10099				if err != nil {
10100					return err
10101				}
10102				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
10103			}
10104		case "name":
10105			if v != nil {
10106				var name string
10107				err = json.Unmarshal(*v, &name)
10108				if err != nil {
10109					return err
10110				}
10111				onr.Name = &name
10112			}
10113		case "etag":
10114			if v != nil {
10115				var etag string
10116				err = json.Unmarshal(*v, &etag)
10117				if err != nil {
10118					return err
10119				}
10120				onr.Etag = &etag
10121			}
10122		case "id":
10123			if v != nil {
10124				var ID string
10125				err = json.Unmarshal(*v, &ID)
10126				if err != nil {
10127					return err
10128				}
10129				onr.ID = &ID
10130			}
10131		}
10132	}
10133
10134	return nil
10135}
10136
10137// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
10138type OutboundNatRulePropertiesFormat struct {
10139	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
10140	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
10141	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
10142	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
10143	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
10144	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
10145	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10146	ProvisioningState *string `json:"provisioningState,omitempty"`
10147}
10148
10149// PacketCapture parameters that define the create packet capture operation.
10150type PacketCapture struct {
10151	// Name - READ-ONLY; Name of the packet capture.
10152	Name *string `json:"name,omitempty"`
10153	// ID - READ-ONLY; ID of the packet capture.
10154	ID *string `json:"id,omitempty"`
10155	// Type - READ-ONLY; Packet capture type.
10156	Type                     *string `json:"type,omitempty"`
10157	*PacketCaptureParameters `json:"properties,omitempty"`
10158}
10159
10160// MarshalJSON is the custom marshaler for PacketCapture.
10161func (pc PacketCapture) MarshalJSON() ([]byte, error) {
10162	objectMap := make(map[string]interface{})
10163	if pc.PacketCaptureParameters != nil {
10164		objectMap["properties"] = pc.PacketCaptureParameters
10165	}
10166	return json.Marshal(objectMap)
10167}
10168
10169// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
10170func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
10171	var m map[string]*json.RawMessage
10172	err := json.Unmarshal(body, &m)
10173	if err != nil {
10174		return err
10175	}
10176	for k, v := range m {
10177		switch k {
10178		case "name":
10179			if v != nil {
10180				var name string
10181				err = json.Unmarshal(*v, &name)
10182				if err != nil {
10183					return err
10184				}
10185				pc.Name = &name
10186			}
10187		case "id":
10188			if v != nil {
10189				var ID string
10190				err = json.Unmarshal(*v, &ID)
10191				if err != nil {
10192					return err
10193				}
10194				pc.ID = &ID
10195			}
10196		case "type":
10197			if v != nil {
10198				var typeVar string
10199				err = json.Unmarshal(*v, &typeVar)
10200				if err != nil {
10201					return err
10202				}
10203				pc.Type = &typeVar
10204			}
10205		case "properties":
10206			if v != nil {
10207				var packetCaptureParameters PacketCaptureParameters
10208				err = json.Unmarshal(*v, &packetCaptureParameters)
10209				if err != nil {
10210					return err
10211				}
10212				pc.PacketCaptureParameters = &packetCaptureParameters
10213			}
10214		}
10215	}
10216
10217	return nil
10218}
10219
10220// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
10221type PacketCaptureFilter struct {
10222	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
10223	Protocol PcProtocol `json:"protocol,omitempty"`
10224	// 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.
10225	LocalIPAddress *string `json:"localIPAddress,omitempty"`
10226	// 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.
10227	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
10228	// 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.
10229	LocalPort *string `json:"localPort,omitempty"`
10230	// 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.
10231	RemotePort *string `json:"remotePort,omitempty"`
10232}
10233
10234// PacketCaptureListResult list of packet capture sessions.
10235type PacketCaptureListResult struct {
10236	autorest.Response `json:"-"`
10237	// Value - Information about packet capture sessions.
10238	Value *[]PacketCaptureResult `json:"value,omitempty"`
10239}
10240
10241// PacketCaptureParameters parameters that define the create packet capture operation.
10242type PacketCaptureParameters struct {
10243	// Target - The ID of the targeted resource, only VM is currently supported.
10244	Target *string `json:"target,omitempty"`
10245	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10246	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10247	// TotalBytesPerSession - Maximum size of the capture output.
10248	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10249	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10250	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10251	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10252	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10253}
10254
10255// PacketCaptureQueryStatusResult status of packet capture session.
10256type PacketCaptureQueryStatusResult struct {
10257	autorest.Response `json:"-"`
10258	// Name - The name of the packet capture resource.
10259	Name *string `json:"name,omitempty"`
10260	// ID - The ID of the packet capture resource.
10261	ID *string `json:"id,omitempty"`
10262	// CaptureStartTime - The start time of the packet capture session.
10263	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
10264	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
10265	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
10266	// StopReason - The reason the current packet capture session was stopped.
10267	StopReason *string `json:"stopReason,omitempty"`
10268	// PacketCaptureError - List of errors of packet capture session.
10269	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
10270}
10271
10272// PacketCaptureResult information about packet capture session.
10273type PacketCaptureResult struct {
10274	autorest.Response `json:"-"`
10275	// Name - READ-ONLY; Name of the packet capture.
10276	Name *string `json:"name,omitempty"`
10277	// ID - READ-ONLY; ID of the packet capture.
10278	ID *string `json:"id,omitempty"`
10279	// Type - READ-ONLY; Packet capture type.
10280	Type                           *string `json:"type,omitempty"`
10281	Etag                           *string `json:"etag,omitempty"`
10282	*PacketCaptureResultProperties `json:"properties,omitempty"`
10283}
10284
10285// MarshalJSON is the custom marshaler for PacketCaptureResult.
10286func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
10287	objectMap := make(map[string]interface{})
10288	if pcr.Etag != nil {
10289		objectMap["etag"] = pcr.Etag
10290	}
10291	if pcr.PacketCaptureResultProperties != nil {
10292		objectMap["properties"] = pcr.PacketCaptureResultProperties
10293	}
10294	return json.Marshal(objectMap)
10295}
10296
10297// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
10298func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
10299	var m map[string]*json.RawMessage
10300	err := json.Unmarshal(body, &m)
10301	if err != nil {
10302		return err
10303	}
10304	for k, v := range m {
10305		switch k {
10306		case "name":
10307			if v != nil {
10308				var name string
10309				err = json.Unmarshal(*v, &name)
10310				if err != nil {
10311					return err
10312				}
10313				pcr.Name = &name
10314			}
10315		case "id":
10316			if v != nil {
10317				var ID string
10318				err = json.Unmarshal(*v, &ID)
10319				if err != nil {
10320					return err
10321				}
10322				pcr.ID = &ID
10323			}
10324		case "type":
10325			if v != nil {
10326				var typeVar string
10327				err = json.Unmarshal(*v, &typeVar)
10328				if err != nil {
10329					return err
10330				}
10331				pcr.Type = &typeVar
10332			}
10333		case "etag":
10334			if v != nil {
10335				var etag string
10336				err = json.Unmarshal(*v, &etag)
10337				if err != nil {
10338					return err
10339				}
10340				pcr.Etag = &etag
10341			}
10342		case "properties":
10343			if v != nil {
10344				var packetCaptureResultProperties PacketCaptureResultProperties
10345				err = json.Unmarshal(*v, &packetCaptureResultProperties)
10346				if err != nil {
10347					return err
10348				}
10349				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
10350			}
10351		}
10352	}
10353
10354	return nil
10355}
10356
10357// PacketCaptureResultProperties describes the properties of a packet capture session.
10358type PacketCaptureResultProperties struct {
10359	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10360	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10361	// Target - The ID of the targeted resource, only VM is currently supported.
10362	Target *string `json:"target,omitempty"`
10363	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10364	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10365	// TotalBytesPerSession - Maximum size of the capture output.
10366	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10367	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10368	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10369	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10370	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10371}
10372
10373// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
10374// operation.
10375type PacketCapturesCreateFuture struct {
10376	azure.FutureAPI
10377	// Result returns the result of the asynchronous operation.
10378	// If the operation has not completed it will return an error.
10379	Result func(PacketCapturesClient) (PacketCaptureResult, error)
10380}
10381
10382// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10383func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
10384	var azFuture azure.Future
10385	if err := json.Unmarshal(body, &azFuture); err != nil {
10386		return err
10387	}
10388	future.FutureAPI = &azFuture
10389	future.Result = future.result
10390	return nil
10391}
10392
10393// result is the default implementation for PacketCapturesCreateFuture.Result.
10394func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
10395	var done bool
10396	done, err = future.DoneWithContext(context.Background(), client)
10397	if err != nil {
10398		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
10399		return
10400	}
10401	if !done {
10402		pcr.Response.Response = future.Response()
10403		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
10404		return
10405	}
10406	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10407	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
10408		pcr, err = client.CreateResponder(pcr.Response.Response)
10409		if err != nil {
10410			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
10411		}
10412	}
10413	return
10414}
10415
10416// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10417// operation.
10418type PacketCapturesDeleteFuture struct {
10419	azure.FutureAPI
10420	// Result returns the result of the asynchronous operation.
10421	// If the operation has not completed it will return an error.
10422	Result func(PacketCapturesClient) (autorest.Response, error)
10423}
10424
10425// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10426func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
10427	var azFuture azure.Future
10428	if err := json.Unmarshal(body, &azFuture); err != nil {
10429		return err
10430	}
10431	future.FutureAPI = &azFuture
10432	future.Result = future.result
10433	return nil
10434}
10435
10436// result is the default implementation for PacketCapturesDeleteFuture.Result.
10437func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10438	var done bool
10439	done, err = future.DoneWithContext(context.Background(), client)
10440	if err != nil {
10441		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
10442		return
10443	}
10444	if !done {
10445		ar.Response = future.Response()
10446		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
10447		return
10448	}
10449	ar.Response = future.Response()
10450	return
10451}
10452
10453// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
10454// operation.
10455type PacketCapturesGetStatusFuture struct {
10456	azure.FutureAPI
10457	// Result returns the result of the asynchronous operation.
10458	// If the operation has not completed it will return an error.
10459	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
10460}
10461
10462// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10463func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
10464	var azFuture azure.Future
10465	if err := json.Unmarshal(body, &azFuture); err != nil {
10466		return err
10467	}
10468	future.FutureAPI = &azFuture
10469	future.Result = future.result
10470	return nil
10471}
10472
10473// result is the default implementation for PacketCapturesGetStatusFuture.Result.
10474func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
10475	var done bool
10476	done, err = future.DoneWithContext(context.Background(), client)
10477	if err != nil {
10478		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
10479		return
10480	}
10481	if !done {
10482		pcqsr.Response.Response = future.Response()
10483		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
10484		return
10485	}
10486	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10487	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
10488		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
10489		if err != nil {
10490			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
10491		}
10492	}
10493	return
10494}
10495
10496// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
10497// operation.
10498type PacketCapturesStopFuture struct {
10499	azure.FutureAPI
10500	// Result returns the result of the asynchronous operation.
10501	// If the operation has not completed it will return an error.
10502	Result func(PacketCapturesClient) (autorest.Response, error)
10503}
10504
10505// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10506func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
10507	var azFuture azure.Future
10508	if err := json.Unmarshal(body, &azFuture); err != nil {
10509		return err
10510	}
10511	future.FutureAPI = &azFuture
10512	future.Result = future.result
10513	return nil
10514}
10515
10516// result is the default implementation for PacketCapturesStopFuture.Result.
10517func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10518	var done bool
10519	done, err = future.DoneWithContext(context.Background(), client)
10520	if err != nil {
10521		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
10522		return
10523	}
10524	if !done {
10525		ar.Response = future.Response()
10526		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
10527		return
10528	}
10529	ar.Response = future.Response()
10530	return
10531}
10532
10533// PacketCaptureStorageLocation describes the storage location for a packet capture session.
10534type PacketCaptureStorageLocation struct {
10535	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
10536	StorageID *string `json:"storageId,omitempty"`
10537	// 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.
10538	StoragePath *string `json:"storagePath,omitempty"`
10539	// 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.
10540	FilePath *string `json:"filePath,omitempty"`
10541}
10542
10543// PatchRouteFilter route Filter Resource.
10544type PatchRouteFilter struct {
10545	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
10546	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10547	Name *string `json:"name,omitempty"`
10548	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10549	Etag *string `json:"etag,omitempty"`
10550	// Type - READ-ONLY; Resource type.
10551	Type *string `json:"type,omitempty"`
10552	// Tags - Resource tags.
10553	Tags map[string]*string `json:"tags"`
10554	// ID - Resource ID.
10555	ID *string `json:"id,omitempty"`
10556}
10557
10558// MarshalJSON is the custom marshaler for PatchRouteFilter.
10559func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
10560	objectMap := make(map[string]interface{})
10561	if prf.RouteFilterPropertiesFormat != nil {
10562		objectMap["properties"] = prf.RouteFilterPropertiesFormat
10563	}
10564	if prf.Tags != nil {
10565		objectMap["tags"] = prf.Tags
10566	}
10567	if prf.ID != nil {
10568		objectMap["id"] = prf.ID
10569	}
10570	return json.Marshal(objectMap)
10571}
10572
10573// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
10574func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
10575	var m map[string]*json.RawMessage
10576	err := json.Unmarshal(body, &m)
10577	if err != nil {
10578		return err
10579	}
10580	for k, v := range m {
10581		switch k {
10582		case "properties":
10583			if v != nil {
10584				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
10585				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
10586				if err != nil {
10587					return err
10588				}
10589				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
10590			}
10591		case "name":
10592			if v != nil {
10593				var name string
10594				err = json.Unmarshal(*v, &name)
10595				if err != nil {
10596					return err
10597				}
10598				prf.Name = &name
10599			}
10600		case "etag":
10601			if v != nil {
10602				var etag string
10603				err = json.Unmarshal(*v, &etag)
10604				if err != nil {
10605					return err
10606				}
10607				prf.Etag = &etag
10608			}
10609		case "type":
10610			if v != nil {
10611				var typeVar string
10612				err = json.Unmarshal(*v, &typeVar)
10613				if err != nil {
10614					return err
10615				}
10616				prf.Type = &typeVar
10617			}
10618		case "tags":
10619			if v != nil {
10620				var tags map[string]*string
10621				err = json.Unmarshal(*v, &tags)
10622				if err != nil {
10623					return err
10624				}
10625				prf.Tags = tags
10626			}
10627		case "id":
10628			if v != nil {
10629				var ID string
10630				err = json.Unmarshal(*v, &ID)
10631				if err != nil {
10632					return err
10633				}
10634				prf.ID = &ID
10635			}
10636		}
10637	}
10638
10639	return nil
10640}
10641
10642// PatchRouteFilterRule route Filter Rule Resource
10643type PatchRouteFilterRule struct {
10644	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
10645	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10646	Name *string `json:"name,omitempty"`
10647	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10648	Etag *string `json:"etag,omitempty"`
10649	// ID - Resource ID.
10650	ID *string `json:"id,omitempty"`
10651}
10652
10653// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
10654func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
10655	objectMap := make(map[string]interface{})
10656	if prfr.RouteFilterRulePropertiesFormat != nil {
10657		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
10658	}
10659	if prfr.ID != nil {
10660		objectMap["id"] = prfr.ID
10661	}
10662	return json.Marshal(objectMap)
10663}
10664
10665// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
10666func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
10667	var m map[string]*json.RawMessage
10668	err := json.Unmarshal(body, &m)
10669	if err != nil {
10670		return err
10671	}
10672	for k, v := range m {
10673		switch k {
10674		case "properties":
10675			if v != nil {
10676				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
10677				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
10678				if err != nil {
10679					return err
10680				}
10681				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
10682			}
10683		case "name":
10684			if v != nil {
10685				var name string
10686				err = json.Unmarshal(*v, &name)
10687				if err != nil {
10688					return err
10689				}
10690				prfr.Name = &name
10691			}
10692		case "etag":
10693			if v != nil {
10694				var etag string
10695				err = json.Unmarshal(*v, &etag)
10696				if err != nil {
10697					return err
10698				}
10699				prfr.Etag = &etag
10700			}
10701		case "id":
10702			if v != nil {
10703				var ID string
10704				err = json.Unmarshal(*v, &ID)
10705				if err != nil {
10706					return err
10707				}
10708				prfr.ID = &ID
10709			}
10710		}
10711	}
10712
10713	return nil
10714}
10715
10716// Probe a load balancer probe.
10717type Probe struct {
10718	autorest.Response `json:"-"`
10719	// ProbePropertiesFormat - Properties of load balancer probe.
10720	*ProbePropertiesFormat `json:"properties,omitempty"`
10721	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10722	Name *string `json:"name,omitempty"`
10723	// Etag - A unique read-only string that changes whenever the resource is updated.
10724	Etag *string `json:"etag,omitempty"`
10725	// ID - Resource ID.
10726	ID *string `json:"id,omitempty"`
10727}
10728
10729// MarshalJSON is the custom marshaler for Probe.
10730func (p Probe) MarshalJSON() ([]byte, error) {
10731	objectMap := make(map[string]interface{})
10732	if p.ProbePropertiesFormat != nil {
10733		objectMap["properties"] = p.ProbePropertiesFormat
10734	}
10735	if p.Name != nil {
10736		objectMap["name"] = p.Name
10737	}
10738	if p.Etag != nil {
10739		objectMap["etag"] = p.Etag
10740	}
10741	if p.ID != nil {
10742		objectMap["id"] = p.ID
10743	}
10744	return json.Marshal(objectMap)
10745}
10746
10747// UnmarshalJSON is the custom unmarshaler for Probe struct.
10748func (p *Probe) UnmarshalJSON(body []byte) error {
10749	var m map[string]*json.RawMessage
10750	err := json.Unmarshal(body, &m)
10751	if err != nil {
10752		return err
10753	}
10754	for k, v := range m {
10755		switch k {
10756		case "properties":
10757			if v != nil {
10758				var probePropertiesFormat ProbePropertiesFormat
10759				err = json.Unmarshal(*v, &probePropertiesFormat)
10760				if err != nil {
10761					return err
10762				}
10763				p.ProbePropertiesFormat = &probePropertiesFormat
10764			}
10765		case "name":
10766			if v != nil {
10767				var name string
10768				err = json.Unmarshal(*v, &name)
10769				if err != nil {
10770					return err
10771				}
10772				p.Name = &name
10773			}
10774		case "etag":
10775			if v != nil {
10776				var etag string
10777				err = json.Unmarshal(*v, &etag)
10778				if err != nil {
10779					return err
10780				}
10781				p.Etag = &etag
10782			}
10783		case "id":
10784			if v != nil {
10785				var ID string
10786				err = json.Unmarshal(*v, &ID)
10787				if err != nil {
10788					return err
10789				}
10790				p.ID = &ID
10791			}
10792		}
10793	}
10794
10795	return nil
10796}
10797
10798// ProbePropertiesFormat load balancer probe resource.
10799type ProbePropertiesFormat struct {
10800	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
10801	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
10802	// 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'
10803	Protocol ProbeProtocol `json:"protocol,omitempty"`
10804	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
10805	Port *int32 `json:"port,omitempty"`
10806	// 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.
10807	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
10808	// 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.
10809	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
10810	// 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.
10811	RequestPath *string `json:"requestPath,omitempty"`
10812	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10813	ProvisioningState *string `json:"provisioningState,omitempty"`
10814}
10815
10816// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
10817func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
10818	objectMap := make(map[string]interface{})
10819	if ppf.Protocol != "" {
10820		objectMap["protocol"] = ppf.Protocol
10821	}
10822	if ppf.Port != nil {
10823		objectMap["port"] = ppf.Port
10824	}
10825	if ppf.IntervalInSeconds != nil {
10826		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
10827	}
10828	if ppf.NumberOfProbes != nil {
10829		objectMap["numberOfProbes"] = ppf.NumberOfProbes
10830	}
10831	if ppf.RequestPath != nil {
10832		objectMap["requestPath"] = ppf.RequestPath
10833	}
10834	if ppf.ProvisioningState != nil {
10835		objectMap["provisioningState"] = ppf.ProvisioningState
10836	}
10837	return json.Marshal(objectMap)
10838}
10839
10840// PublicIPAddress public IP address resource.
10841type PublicIPAddress struct {
10842	autorest.Response `json:"-"`
10843	// Sku - The public IP address SKU.
10844	Sku *PublicIPAddressSku `json:"sku,omitempty"`
10845	// PublicIPAddressPropertiesFormat - Public IP address properties.
10846	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
10847	// Etag - A unique read-only string that changes whenever the resource is updated.
10848	Etag *string `json:"etag,omitempty"`
10849	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10850	Zones *[]string `json:"zones,omitempty"`
10851	// ID - Resource ID.
10852	ID *string `json:"id,omitempty"`
10853	// Name - READ-ONLY; Resource name.
10854	Name *string `json:"name,omitempty"`
10855	// Type - READ-ONLY; Resource type.
10856	Type *string `json:"type,omitempty"`
10857	// Location - Resource location.
10858	Location *string `json:"location,omitempty"`
10859	// Tags - Resource tags.
10860	Tags map[string]*string `json:"tags"`
10861}
10862
10863// MarshalJSON is the custom marshaler for PublicIPAddress.
10864func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
10865	objectMap := make(map[string]interface{})
10866	if pia.Sku != nil {
10867		objectMap["sku"] = pia.Sku
10868	}
10869	if pia.PublicIPAddressPropertiesFormat != nil {
10870		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
10871	}
10872	if pia.Etag != nil {
10873		objectMap["etag"] = pia.Etag
10874	}
10875	if pia.Zones != nil {
10876		objectMap["zones"] = pia.Zones
10877	}
10878	if pia.ID != nil {
10879		objectMap["id"] = pia.ID
10880	}
10881	if pia.Location != nil {
10882		objectMap["location"] = pia.Location
10883	}
10884	if pia.Tags != nil {
10885		objectMap["tags"] = pia.Tags
10886	}
10887	return json.Marshal(objectMap)
10888}
10889
10890// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
10891func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
10892	var m map[string]*json.RawMessage
10893	err := json.Unmarshal(body, &m)
10894	if err != nil {
10895		return err
10896	}
10897	for k, v := range m {
10898		switch k {
10899		case "sku":
10900			if v != nil {
10901				var sku PublicIPAddressSku
10902				err = json.Unmarshal(*v, &sku)
10903				if err != nil {
10904					return err
10905				}
10906				pia.Sku = &sku
10907			}
10908		case "properties":
10909			if v != nil {
10910				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
10911				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
10912				if err != nil {
10913					return err
10914				}
10915				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
10916			}
10917		case "etag":
10918			if v != nil {
10919				var etag string
10920				err = json.Unmarshal(*v, &etag)
10921				if err != nil {
10922					return err
10923				}
10924				pia.Etag = &etag
10925			}
10926		case "zones":
10927			if v != nil {
10928				var zones []string
10929				err = json.Unmarshal(*v, &zones)
10930				if err != nil {
10931					return err
10932				}
10933				pia.Zones = &zones
10934			}
10935		case "id":
10936			if v != nil {
10937				var ID string
10938				err = json.Unmarshal(*v, &ID)
10939				if err != nil {
10940					return err
10941				}
10942				pia.ID = &ID
10943			}
10944		case "name":
10945			if v != nil {
10946				var name string
10947				err = json.Unmarshal(*v, &name)
10948				if err != nil {
10949					return err
10950				}
10951				pia.Name = &name
10952			}
10953		case "type":
10954			if v != nil {
10955				var typeVar string
10956				err = json.Unmarshal(*v, &typeVar)
10957				if err != nil {
10958					return err
10959				}
10960				pia.Type = &typeVar
10961			}
10962		case "location":
10963			if v != nil {
10964				var location string
10965				err = json.Unmarshal(*v, &location)
10966				if err != nil {
10967					return err
10968				}
10969				pia.Location = &location
10970			}
10971		case "tags":
10972			if v != nil {
10973				var tags map[string]*string
10974				err = json.Unmarshal(*v, &tags)
10975				if err != nil {
10976					return err
10977				}
10978				pia.Tags = tags
10979			}
10980		}
10981	}
10982
10983	return nil
10984}
10985
10986// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
10987type PublicIPAddressDNSSettings struct {
10988	// 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.
10989	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
10990	// 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.
10991	Fqdn *string `json:"fqdn,omitempty"`
10992	// 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.
10993	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
10994}
10995
10996// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10997// long-running operation.
10998type PublicIPAddressesCreateOrUpdateFuture struct {
10999	azure.FutureAPI
11000	// Result returns the result of the asynchronous operation.
11001	// If the operation has not completed it will return an error.
11002	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
11003}
11004
11005// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11006func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11007	var azFuture azure.Future
11008	if err := json.Unmarshal(body, &azFuture); err != nil {
11009		return err
11010	}
11011	future.FutureAPI = &azFuture
11012	future.Result = future.result
11013	return nil
11014}
11015
11016// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
11017func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
11018	var done bool
11019	done, err = future.DoneWithContext(context.Background(), client)
11020	if err != nil {
11021		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11022		return
11023	}
11024	if !done {
11025		pia.Response.Response = future.Response()
11026		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
11027		return
11028	}
11029	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11030	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
11031		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
11032		if err != nil {
11033			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
11034		}
11035	}
11036	return
11037}
11038
11039// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11040// operation.
11041type PublicIPAddressesDeleteFuture struct {
11042	azure.FutureAPI
11043	// Result returns the result of the asynchronous operation.
11044	// If the operation has not completed it will return an error.
11045	Result func(PublicIPAddressesClient) (autorest.Response, error)
11046}
11047
11048// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11049func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
11050	var azFuture azure.Future
11051	if err := json.Unmarshal(body, &azFuture); err != nil {
11052		return err
11053	}
11054	future.FutureAPI = &azFuture
11055	future.Result = future.result
11056	return nil
11057}
11058
11059// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
11060func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
11061	var done bool
11062	done, err = future.DoneWithContext(context.Background(), client)
11063	if err != nil {
11064		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
11065		return
11066	}
11067	if !done {
11068		ar.Response = future.Response()
11069		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
11070		return
11071	}
11072	ar.Response = future.Response()
11073	return
11074}
11075
11076// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11077// long-running operation.
11078type PublicIPAddressesUpdateTagsFuture struct {
11079	azure.FutureAPI
11080	// Result returns the result of the asynchronous operation.
11081	// If the operation has not completed it will return an error.
11082	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
11083}
11084
11085// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11086func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11087	var azFuture azure.Future
11088	if err := json.Unmarshal(body, &azFuture); err != nil {
11089		return err
11090	}
11091	future.FutureAPI = &azFuture
11092	future.Result = future.result
11093	return nil
11094}
11095
11096// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
11097func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
11098	var done bool
11099	done, err = future.DoneWithContext(context.Background(), client)
11100	if err != nil {
11101		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11102		return
11103	}
11104	if !done {
11105		pia.Response.Response = future.Response()
11106		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
11107		return
11108	}
11109	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11110	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
11111		pia, err = client.UpdateTagsResponder(pia.Response.Response)
11112		if err != nil {
11113			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
11114		}
11115	}
11116	return
11117}
11118
11119// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
11120type PublicIPAddressListResult struct {
11121	autorest.Response `json:"-"`
11122	// Value - A list of public IP addresses that exists in a resource group.
11123	Value *[]PublicIPAddress `json:"value,omitempty"`
11124	// NextLink - The URL to get the next set of results.
11125	NextLink *string `json:"nextLink,omitempty"`
11126}
11127
11128// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
11129type PublicIPAddressListResultIterator struct {
11130	i    int
11131	page PublicIPAddressListResultPage
11132}
11133
11134// NextWithContext advances to the next value.  If there was an error making
11135// the request the iterator does not advance and the error is returned.
11136func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
11137	if tracing.IsEnabled() {
11138		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
11139		defer func() {
11140			sc := -1
11141			if iter.Response().Response.Response != nil {
11142				sc = iter.Response().Response.Response.StatusCode
11143			}
11144			tracing.EndSpan(ctx, sc, err)
11145		}()
11146	}
11147	iter.i++
11148	if iter.i < len(iter.page.Values()) {
11149		return nil
11150	}
11151	err = iter.page.NextWithContext(ctx)
11152	if err != nil {
11153		iter.i--
11154		return err
11155	}
11156	iter.i = 0
11157	return nil
11158}
11159
11160// Next advances to the next value.  If there was an error making
11161// the request the iterator does not advance and the error is returned.
11162// Deprecated: Use NextWithContext() instead.
11163func (iter *PublicIPAddressListResultIterator) Next() error {
11164	return iter.NextWithContext(context.Background())
11165}
11166
11167// NotDone returns true if the enumeration should be started or is not yet complete.
11168func (iter PublicIPAddressListResultIterator) NotDone() bool {
11169	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11170}
11171
11172// Response returns the raw server response from the last page request.
11173func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
11174	return iter.page.Response()
11175}
11176
11177// Value returns the current value or a zero-initialized value if the
11178// iterator has advanced beyond the end of the collection.
11179func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
11180	if !iter.page.NotDone() {
11181		return PublicIPAddress{}
11182	}
11183	return iter.page.Values()[iter.i]
11184}
11185
11186// Creates a new instance of the PublicIPAddressListResultIterator type.
11187func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
11188	return PublicIPAddressListResultIterator{page: page}
11189}
11190
11191// IsEmpty returns true if the ListResult contains no values.
11192func (pialr PublicIPAddressListResult) IsEmpty() bool {
11193	return pialr.Value == nil || len(*pialr.Value) == 0
11194}
11195
11196// hasNextLink returns true if the NextLink is not empty.
11197func (pialr PublicIPAddressListResult) hasNextLink() bool {
11198	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
11199}
11200
11201// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
11202// It returns nil if no more results exist.
11203func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
11204	if !pialr.hasNextLink() {
11205		return nil, nil
11206	}
11207	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11208		autorest.AsJSON(),
11209		autorest.AsGet(),
11210		autorest.WithBaseURL(to.String(pialr.NextLink)))
11211}
11212
11213// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
11214type PublicIPAddressListResultPage struct {
11215	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
11216	pialr PublicIPAddressListResult
11217}
11218
11219// NextWithContext advances to the next page of values.  If there was an error making
11220// the request the page does not advance and the error is returned.
11221func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
11222	if tracing.IsEnabled() {
11223		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
11224		defer func() {
11225			sc := -1
11226			if page.Response().Response.Response != nil {
11227				sc = page.Response().Response.Response.StatusCode
11228			}
11229			tracing.EndSpan(ctx, sc, err)
11230		}()
11231	}
11232	for {
11233		next, err := page.fn(ctx, page.pialr)
11234		if err != nil {
11235			return err
11236		}
11237		page.pialr = next
11238		if !next.hasNextLink() || !next.IsEmpty() {
11239			break
11240		}
11241	}
11242	return nil
11243}
11244
11245// Next advances to the next page of values.  If there was an error making
11246// the request the page does not advance and the error is returned.
11247// Deprecated: Use NextWithContext() instead.
11248func (page *PublicIPAddressListResultPage) Next() error {
11249	return page.NextWithContext(context.Background())
11250}
11251
11252// NotDone returns true if the page enumeration should be started or is not yet complete.
11253func (page PublicIPAddressListResultPage) NotDone() bool {
11254	return !page.pialr.IsEmpty()
11255}
11256
11257// Response returns the raw server response from the last page request.
11258func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
11259	return page.pialr
11260}
11261
11262// Values returns the slice of values for the current page or nil if there are no values.
11263func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
11264	if page.pialr.IsEmpty() {
11265		return nil
11266	}
11267	return *page.pialr.Value
11268}
11269
11270// Creates a new instance of the PublicIPAddressListResultPage type.
11271func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
11272	return PublicIPAddressListResultPage{
11273		fn:    getNextPage,
11274		pialr: cur,
11275	}
11276}
11277
11278// PublicIPAddressPropertiesFormat public IP address properties.
11279type PublicIPAddressPropertiesFormat struct {
11280	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11281	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
11282	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
11283	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
11284	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
11285	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
11286	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
11287	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
11288	// IPTags - The list of tags associated with the public IP address.
11289	IPTags *[]IPTag `json:"ipTags,omitempty"`
11290	// IPAddress - The IP address associated with the public IP address resource.
11291	IPAddress *string `json:"ipAddress,omitempty"`
11292	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
11293	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11294	// ResourceGUID - The resource GUID property of the public IP resource.
11295	ResourceGUID *string `json:"resourceGuid,omitempty"`
11296	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11297	ProvisioningState *string `json:"provisioningState,omitempty"`
11298}
11299
11300// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
11301func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
11302	objectMap := make(map[string]interface{})
11303	if piapf.PublicIPAllocationMethod != "" {
11304		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
11305	}
11306	if piapf.PublicIPAddressVersion != "" {
11307		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
11308	}
11309	if piapf.DNSSettings != nil {
11310		objectMap["dnsSettings"] = piapf.DNSSettings
11311	}
11312	if piapf.IPTags != nil {
11313		objectMap["ipTags"] = piapf.IPTags
11314	}
11315	if piapf.IPAddress != nil {
11316		objectMap["ipAddress"] = piapf.IPAddress
11317	}
11318	if piapf.IdleTimeoutInMinutes != nil {
11319		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
11320	}
11321	if piapf.ResourceGUID != nil {
11322		objectMap["resourceGuid"] = piapf.ResourceGUID
11323	}
11324	if piapf.ProvisioningState != nil {
11325		objectMap["provisioningState"] = piapf.ProvisioningState
11326	}
11327	return json.Marshal(objectMap)
11328}
11329
11330// PublicIPAddressSku SKU of a public IP address
11331type PublicIPAddressSku struct {
11332	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
11333	Name PublicIPAddressSkuName `json:"name,omitempty"`
11334}
11335
11336// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
11337type QueryTroubleshootingParameters struct {
11338	// TargetResourceID - The target resource ID to query the troubleshooting result.
11339	TargetResourceID *string `json:"targetResourceId,omitempty"`
11340}
11341
11342// Resource common resource representation.
11343type Resource struct {
11344	// ID - Resource ID.
11345	ID *string `json:"id,omitempty"`
11346	// Name - READ-ONLY; Resource name.
11347	Name *string `json:"name,omitempty"`
11348	// Type - READ-ONLY; Resource type.
11349	Type *string `json:"type,omitempty"`
11350	// Location - Resource location.
11351	Location *string `json:"location,omitempty"`
11352	// Tags - Resource tags.
11353	Tags map[string]*string `json:"tags"`
11354}
11355
11356// MarshalJSON is the custom marshaler for Resource.
11357func (r Resource) MarshalJSON() ([]byte, error) {
11358	objectMap := make(map[string]interface{})
11359	if r.ID != nil {
11360		objectMap["id"] = r.ID
11361	}
11362	if r.Location != nil {
11363		objectMap["location"] = r.Location
11364	}
11365	if r.Tags != nil {
11366		objectMap["tags"] = r.Tags
11367	}
11368	return json.Marshal(objectMap)
11369}
11370
11371// ResourceNavigationLink resourceNavigationLink resource.
11372type ResourceNavigationLink struct {
11373	// ResourceNavigationLinkFormat - Resource navigation link properties format.
11374	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
11375	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
11376	Name *string `json:"name,omitempty"`
11377	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11378	Etag *string `json:"etag,omitempty"`
11379	// ID - Resource ID.
11380	ID *string `json:"id,omitempty"`
11381}
11382
11383// MarshalJSON is the custom marshaler for ResourceNavigationLink.
11384func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
11385	objectMap := make(map[string]interface{})
11386	if rnl.ResourceNavigationLinkFormat != nil {
11387		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
11388	}
11389	if rnl.Name != nil {
11390		objectMap["name"] = rnl.Name
11391	}
11392	if rnl.ID != nil {
11393		objectMap["id"] = rnl.ID
11394	}
11395	return json.Marshal(objectMap)
11396}
11397
11398// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
11399func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
11400	var m map[string]*json.RawMessage
11401	err := json.Unmarshal(body, &m)
11402	if err != nil {
11403		return err
11404	}
11405	for k, v := range m {
11406		switch k {
11407		case "properties":
11408			if v != nil {
11409				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
11410				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
11411				if err != nil {
11412					return err
11413				}
11414				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
11415			}
11416		case "name":
11417			if v != nil {
11418				var name string
11419				err = json.Unmarshal(*v, &name)
11420				if err != nil {
11421					return err
11422				}
11423				rnl.Name = &name
11424			}
11425		case "etag":
11426			if v != nil {
11427				var etag string
11428				err = json.Unmarshal(*v, &etag)
11429				if err != nil {
11430					return err
11431				}
11432				rnl.Etag = &etag
11433			}
11434		case "id":
11435			if v != nil {
11436				var ID string
11437				err = json.Unmarshal(*v, &ID)
11438				if err != nil {
11439					return err
11440				}
11441				rnl.ID = &ID
11442			}
11443		}
11444	}
11445
11446	return nil
11447}
11448
11449// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
11450type ResourceNavigationLinkFormat struct {
11451	// LinkedResourceType - Resource type of the linked resource.
11452	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
11453	// Link - Link to the external resource
11454	Link *string `json:"link,omitempty"`
11455	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
11456	ProvisioningState *string `json:"provisioningState,omitempty"`
11457}
11458
11459// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
11460func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
11461	objectMap := make(map[string]interface{})
11462	if rnlf.LinkedResourceType != nil {
11463		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
11464	}
11465	if rnlf.Link != nil {
11466		objectMap["link"] = rnlf.Link
11467	}
11468	return json.Marshal(objectMap)
11469}
11470
11471// RetentionPolicyParameters parameters that define the retention policy for flow log.
11472type RetentionPolicyParameters struct {
11473	// Days - Number of days to retain flow log records.
11474	Days *int32 `json:"days,omitempty"`
11475	// Enabled - Flag to enable/disable retention.
11476	Enabled *bool `json:"enabled,omitempty"`
11477}
11478
11479// Route route resource
11480type Route struct {
11481	autorest.Response `json:"-"`
11482	// RoutePropertiesFormat - Properties of the route.
11483	*RoutePropertiesFormat `json:"properties,omitempty"`
11484	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11485	Name *string `json:"name,omitempty"`
11486	// Etag - A unique read-only string that changes whenever the resource is updated.
11487	Etag *string `json:"etag,omitempty"`
11488	// ID - Resource ID.
11489	ID *string `json:"id,omitempty"`
11490}
11491
11492// MarshalJSON is the custom marshaler for Route.
11493func (r Route) MarshalJSON() ([]byte, error) {
11494	objectMap := make(map[string]interface{})
11495	if r.RoutePropertiesFormat != nil {
11496		objectMap["properties"] = r.RoutePropertiesFormat
11497	}
11498	if r.Name != nil {
11499		objectMap["name"] = r.Name
11500	}
11501	if r.Etag != nil {
11502		objectMap["etag"] = r.Etag
11503	}
11504	if r.ID != nil {
11505		objectMap["id"] = r.ID
11506	}
11507	return json.Marshal(objectMap)
11508}
11509
11510// UnmarshalJSON is the custom unmarshaler for Route struct.
11511func (r *Route) UnmarshalJSON(body []byte) error {
11512	var m map[string]*json.RawMessage
11513	err := json.Unmarshal(body, &m)
11514	if err != nil {
11515		return err
11516	}
11517	for k, v := range m {
11518		switch k {
11519		case "properties":
11520			if v != nil {
11521				var routePropertiesFormat RoutePropertiesFormat
11522				err = json.Unmarshal(*v, &routePropertiesFormat)
11523				if err != nil {
11524					return err
11525				}
11526				r.RoutePropertiesFormat = &routePropertiesFormat
11527			}
11528		case "name":
11529			if v != nil {
11530				var name string
11531				err = json.Unmarshal(*v, &name)
11532				if err != nil {
11533					return err
11534				}
11535				r.Name = &name
11536			}
11537		case "etag":
11538			if v != nil {
11539				var etag string
11540				err = json.Unmarshal(*v, &etag)
11541				if err != nil {
11542					return err
11543				}
11544				r.Etag = &etag
11545			}
11546		case "id":
11547			if v != nil {
11548				var ID string
11549				err = json.Unmarshal(*v, &ID)
11550				if err != nil {
11551					return err
11552				}
11553				r.ID = &ID
11554			}
11555		}
11556	}
11557
11558	return nil
11559}
11560
11561// RouteFilter route Filter Resource.
11562type RouteFilter struct {
11563	autorest.Response            `json:"-"`
11564	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
11565	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11566	Etag *string `json:"etag,omitempty"`
11567	// ID - Resource ID.
11568	ID *string `json:"id,omitempty"`
11569	// Name - READ-ONLY; Resource name.
11570	Name *string `json:"name,omitempty"`
11571	// Type - READ-ONLY; Resource type.
11572	Type *string `json:"type,omitempty"`
11573	// Location - Resource location.
11574	Location *string `json:"location,omitempty"`
11575	// Tags - Resource tags.
11576	Tags map[string]*string `json:"tags"`
11577}
11578
11579// MarshalJSON is the custom marshaler for RouteFilter.
11580func (rf RouteFilter) MarshalJSON() ([]byte, error) {
11581	objectMap := make(map[string]interface{})
11582	if rf.RouteFilterPropertiesFormat != nil {
11583		objectMap["properties"] = rf.RouteFilterPropertiesFormat
11584	}
11585	if rf.ID != nil {
11586		objectMap["id"] = rf.ID
11587	}
11588	if rf.Location != nil {
11589		objectMap["location"] = rf.Location
11590	}
11591	if rf.Tags != nil {
11592		objectMap["tags"] = rf.Tags
11593	}
11594	return json.Marshal(objectMap)
11595}
11596
11597// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
11598func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
11599	var m map[string]*json.RawMessage
11600	err := json.Unmarshal(body, &m)
11601	if err != nil {
11602		return err
11603	}
11604	for k, v := range m {
11605		switch k {
11606		case "properties":
11607			if v != nil {
11608				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
11609				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
11610				if err != nil {
11611					return err
11612				}
11613				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
11614			}
11615		case "etag":
11616			if v != nil {
11617				var etag string
11618				err = json.Unmarshal(*v, &etag)
11619				if err != nil {
11620					return err
11621				}
11622				rf.Etag = &etag
11623			}
11624		case "id":
11625			if v != nil {
11626				var ID string
11627				err = json.Unmarshal(*v, &ID)
11628				if err != nil {
11629					return err
11630				}
11631				rf.ID = &ID
11632			}
11633		case "name":
11634			if v != nil {
11635				var name string
11636				err = json.Unmarshal(*v, &name)
11637				if err != nil {
11638					return err
11639				}
11640				rf.Name = &name
11641			}
11642		case "type":
11643			if v != nil {
11644				var typeVar string
11645				err = json.Unmarshal(*v, &typeVar)
11646				if err != nil {
11647					return err
11648				}
11649				rf.Type = &typeVar
11650			}
11651		case "location":
11652			if v != nil {
11653				var location string
11654				err = json.Unmarshal(*v, &location)
11655				if err != nil {
11656					return err
11657				}
11658				rf.Location = &location
11659			}
11660		case "tags":
11661			if v != nil {
11662				var tags map[string]*string
11663				err = json.Unmarshal(*v, &tags)
11664				if err != nil {
11665					return err
11666				}
11667				rf.Tags = tags
11668			}
11669		}
11670	}
11671
11672	return nil
11673}
11674
11675// RouteFilterListResult response for the ListRouteFilters API service call.
11676type RouteFilterListResult struct {
11677	autorest.Response `json:"-"`
11678	// Value - Gets a list of route filters in a resource group.
11679	Value *[]RouteFilter `json:"value,omitempty"`
11680	// NextLink - The URL to get the next set of results.
11681	NextLink *string `json:"nextLink,omitempty"`
11682}
11683
11684// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
11685type RouteFilterListResultIterator struct {
11686	i    int
11687	page RouteFilterListResultPage
11688}
11689
11690// NextWithContext advances to the next value.  If there was an error making
11691// the request the iterator does not advance and the error is returned.
11692func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
11693	if tracing.IsEnabled() {
11694		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
11695		defer func() {
11696			sc := -1
11697			if iter.Response().Response.Response != nil {
11698				sc = iter.Response().Response.Response.StatusCode
11699			}
11700			tracing.EndSpan(ctx, sc, err)
11701		}()
11702	}
11703	iter.i++
11704	if iter.i < len(iter.page.Values()) {
11705		return nil
11706	}
11707	err = iter.page.NextWithContext(ctx)
11708	if err != nil {
11709		iter.i--
11710		return err
11711	}
11712	iter.i = 0
11713	return nil
11714}
11715
11716// Next advances to the next value.  If there was an error making
11717// the request the iterator does not advance and the error is returned.
11718// Deprecated: Use NextWithContext() instead.
11719func (iter *RouteFilterListResultIterator) Next() error {
11720	return iter.NextWithContext(context.Background())
11721}
11722
11723// NotDone returns true if the enumeration should be started or is not yet complete.
11724func (iter RouteFilterListResultIterator) NotDone() bool {
11725	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11726}
11727
11728// Response returns the raw server response from the last page request.
11729func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
11730	return iter.page.Response()
11731}
11732
11733// Value returns the current value or a zero-initialized value if the
11734// iterator has advanced beyond the end of the collection.
11735func (iter RouteFilterListResultIterator) Value() RouteFilter {
11736	if !iter.page.NotDone() {
11737		return RouteFilter{}
11738	}
11739	return iter.page.Values()[iter.i]
11740}
11741
11742// Creates a new instance of the RouteFilterListResultIterator type.
11743func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
11744	return RouteFilterListResultIterator{page: page}
11745}
11746
11747// IsEmpty returns true if the ListResult contains no values.
11748func (rflr RouteFilterListResult) IsEmpty() bool {
11749	return rflr.Value == nil || len(*rflr.Value) == 0
11750}
11751
11752// hasNextLink returns true if the NextLink is not empty.
11753func (rflr RouteFilterListResult) hasNextLink() bool {
11754	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
11755}
11756
11757// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
11758// It returns nil if no more results exist.
11759func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
11760	if !rflr.hasNextLink() {
11761		return nil, nil
11762	}
11763	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11764		autorest.AsJSON(),
11765		autorest.AsGet(),
11766		autorest.WithBaseURL(to.String(rflr.NextLink)))
11767}
11768
11769// RouteFilterListResultPage contains a page of RouteFilter values.
11770type RouteFilterListResultPage struct {
11771	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
11772	rflr RouteFilterListResult
11773}
11774
11775// NextWithContext advances to the next page of values.  If there was an error making
11776// the request the page does not advance and the error is returned.
11777func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
11778	if tracing.IsEnabled() {
11779		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
11780		defer func() {
11781			sc := -1
11782			if page.Response().Response.Response != nil {
11783				sc = page.Response().Response.Response.StatusCode
11784			}
11785			tracing.EndSpan(ctx, sc, err)
11786		}()
11787	}
11788	for {
11789		next, err := page.fn(ctx, page.rflr)
11790		if err != nil {
11791			return err
11792		}
11793		page.rflr = next
11794		if !next.hasNextLink() || !next.IsEmpty() {
11795			break
11796		}
11797	}
11798	return nil
11799}
11800
11801// Next advances to the next page of values.  If there was an error making
11802// the request the page does not advance and the error is returned.
11803// Deprecated: Use NextWithContext() instead.
11804func (page *RouteFilterListResultPage) Next() error {
11805	return page.NextWithContext(context.Background())
11806}
11807
11808// NotDone returns true if the page enumeration should be started or is not yet complete.
11809func (page RouteFilterListResultPage) NotDone() bool {
11810	return !page.rflr.IsEmpty()
11811}
11812
11813// Response returns the raw server response from the last page request.
11814func (page RouteFilterListResultPage) Response() RouteFilterListResult {
11815	return page.rflr
11816}
11817
11818// Values returns the slice of values for the current page or nil if there are no values.
11819func (page RouteFilterListResultPage) Values() []RouteFilter {
11820	if page.rflr.IsEmpty() {
11821		return nil
11822	}
11823	return *page.rflr.Value
11824}
11825
11826// Creates a new instance of the RouteFilterListResultPage type.
11827func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
11828	return RouteFilterListResultPage{
11829		fn:   getNextPage,
11830		rflr: cur,
11831	}
11832}
11833
11834// RouteFilterPropertiesFormat route Filter Resource
11835type RouteFilterPropertiesFormat struct {
11836	// Rules - Collection of RouteFilterRules contained within a route filter.
11837	Rules *[]RouteFilterRule `json:"rules,omitempty"`
11838	// Peerings - A collection of references to express route circuit peerings.
11839	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
11840	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
11841	ProvisioningState *string `json:"provisioningState,omitempty"`
11842}
11843
11844// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
11845func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
11846	objectMap := make(map[string]interface{})
11847	if rfpf.Rules != nil {
11848		objectMap["rules"] = rfpf.Rules
11849	}
11850	if rfpf.Peerings != nil {
11851		objectMap["peerings"] = rfpf.Peerings
11852	}
11853	return json.Marshal(objectMap)
11854}
11855
11856// RouteFilterRule route Filter Rule Resource
11857type RouteFilterRule struct {
11858	autorest.Response                `json:"-"`
11859	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
11860	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11861	Name *string `json:"name,omitempty"`
11862	// Location - Resource location.
11863	Location *string `json:"location,omitempty"`
11864	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11865	Etag *string `json:"etag,omitempty"`
11866	// ID - Resource ID.
11867	ID *string `json:"id,omitempty"`
11868}
11869
11870// MarshalJSON is the custom marshaler for RouteFilterRule.
11871func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
11872	objectMap := make(map[string]interface{})
11873	if rfr.RouteFilterRulePropertiesFormat != nil {
11874		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
11875	}
11876	if rfr.Name != nil {
11877		objectMap["name"] = rfr.Name
11878	}
11879	if rfr.Location != nil {
11880		objectMap["location"] = rfr.Location
11881	}
11882	if rfr.ID != nil {
11883		objectMap["id"] = rfr.ID
11884	}
11885	return json.Marshal(objectMap)
11886}
11887
11888// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
11889func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
11890	var m map[string]*json.RawMessage
11891	err := json.Unmarshal(body, &m)
11892	if err != nil {
11893		return err
11894	}
11895	for k, v := range m {
11896		switch k {
11897		case "properties":
11898			if v != nil {
11899				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
11900				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
11901				if err != nil {
11902					return err
11903				}
11904				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
11905			}
11906		case "name":
11907			if v != nil {
11908				var name string
11909				err = json.Unmarshal(*v, &name)
11910				if err != nil {
11911					return err
11912				}
11913				rfr.Name = &name
11914			}
11915		case "location":
11916			if v != nil {
11917				var location string
11918				err = json.Unmarshal(*v, &location)
11919				if err != nil {
11920					return err
11921				}
11922				rfr.Location = &location
11923			}
11924		case "etag":
11925			if v != nil {
11926				var etag string
11927				err = json.Unmarshal(*v, &etag)
11928				if err != nil {
11929					return err
11930				}
11931				rfr.Etag = &etag
11932			}
11933		case "id":
11934			if v != nil {
11935				var ID string
11936				err = json.Unmarshal(*v, &ID)
11937				if err != nil {
11938					return err
11939				}
11940				rfr.ID = &ID
11941			}
11942		}
11943	}
11944
11945	return nil
11946}
11947
11948// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
11949type RouteFilterRuleListResult struct {
11950	autorest.Response `json:"-"`
11951	// Value - Gets a list of RouteFilterRules in a resource group.
11952	Value *[]RouteFilterRule `json:"value,omitempty"`
11953	// NextLink - The URL to get the next set of results.
11954	NextLink *string `json:"nextLink,omitempty"`
11955}
11956
11957// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
11958type RouteFilterRuleListResultIterator struct {
11959	i    int
11960	page RouteFilterRuleListResultPage
11961}
11962
11963// NextWithContext advances to the next value.  If there was an error making
11964// the request the iterator does not advance and the error is returned.
11965func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11966	if tracing.IsEnabled() {
11967		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
11968		defer func() {
11969			sc := -1
11970			if iter.Response().Response.Response != nil {
11971				sc = iter.Response().Response.Response.StatusCode
11972			}
11973			tracing.EndSpan(ctx, sc, err)
11974		}()
11975	}
11976	iter.i++
11977	if iter.i < len(iter.page.Values()) {
11978		return nil
11979	}
11980	err = iter.page.NextWithContext(ctx)
11981	if err != nil {
11982		iter.i--
11983		return err
11984	}
11985	iter.i = 0
11986	return nil
11987}
11988
11989// Next advances to the next value.  If there was an error making
11990// the request the iterator does not advance and the error is returned.
11991// Deprecated: Use NextWithContext() instead.
11992func (iter *RouteFilterRuleListResultIterator) Next() error {
11993	return iter.NextWithContext(context.Background())
11994}
11995
11996// NotDone returns true if the enumeration should be started or is not yet complete.
11997func (iter RouteFilterRuleListResultIterator) NotDone() bool {
11998	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11999}
12000
12001// Response returns the raw server response from the last page request.
12002func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
12003	return iter.page.Response()
12004}
12005
12006// Value returns the current value or a zero-initialized value if the
12007// iterator has advanced beyond the end of the collection.
12008func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
12009	if !iter.page.NotDone() {
12010		return RouteFilterRule{}
12011	}
12012	return iter.page.Values()[iter.i]
12013}
12014
12015// Creates a new instance of the RouteFilterRuleListResultIterator type.
12016func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
12017	return RouteFilterRuleListResultIterator{page: page}
12018}
12019
12020// IsEmpty returns true if the ListResult contains no values.
12021func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
12022	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
12023}
12024
12025// hasNextLink returns true if the NextLink is not empty.
12026func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
12027	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
12028}
12029
12030// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
12031// It returns nil if no more results exist.
12032func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12033	if !rfrlr.hasNextLink() {
12034		return nil, nil
12035	}
12036	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12037		autorest.AsJSON(),
12038		autorest.AsGet(),
12039		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
12040}
12041
12042// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
12043type RouteFilterRuleListResultPage struct {
12044	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
12045	rfrlr RouteFilterRuleListResult
12046}
12047
12048// NextWithContext advances to the next page of values.  If there was an error making
12049// the request the page does not advance and the error is returned.
12050func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12051	if tracing.IsEnabled() {
12052		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
12053		defer func() {
12054			sc := -1
12055			if page.Response().Response.Response != nil {
12056				sc = page.Response().Response.Response.StatusCode
12057			}
12058			tracing.EndSpan(ctx, sc, err)
12059		}()
12060	}
12061	for {
12062		next, err := page.fn(ctx, page.rfrlr)
12063		if err != nil {
12064			return err
12065		}
12066		page.rfrlr = next
12067		if !next.hasNextLink() || !next.IsEmpty() {
12068			break
12069		}
12070	}
12071	return nil
12072}
12073
12074// Next advances to the next page of values.  If there was an error making
12075// the request the page does not advance and the error is returned.
12076// Deprecated: Use NextWithContext() instead.
12077func (page *RouteFilterRuleListResultPage) Next() error {
12078	return page.NextWithContext(context.Background())
12079}
12080
12081// NotDone returns true if the page enumeration should be started or is not yet complete.
12082func (page RouteFilterRuleListResultPage) NotDone() bool {
12083	return !page.rfrlr.IsEmpty()
12084}
12085
12086// Response returns the raw server response from the last page request.
12087func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
12088	return page.rfrlr
12089}
12090
12091// Values returns the slice of values for the current page or nil if there are no values.
12092func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
12093	if page.rfrlr.IsEmpty() {
12094		return nil
12095	}
12096	return *page.rfrlr.Value
12097}
12098
12099// Creates a new instance of the RouteFilterRuleListResultPage type.
12100func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
12101	return RouteFilterRuleListResultPage{
12102		fn:    getNextPage,
12103		rfrlr: cur,
12104	}
12105}
12106
12107// RouteFilterRulePropertiesFormat route Filter Rule Resource
12108type RouteFilterRulePropertiesFormat struct {
12109	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
12110	Access Access `json:"access,omitempty"`
12111	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
12112	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
12113	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
12114	Communities *[]string `json:"communities,omitempty"`
12115	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
12116	ProvisioningState *string `json:"provisioningState,omitempty"`
12117}
12118
12119// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
12120func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12121	objectMap := make(map[string]interface{})
12122	if rfrpf.Access != "" {
12123		objectMap["access"] = rfrpf.Access
12124	}
12125	if rfrpf.RouteFilterRuleType != nil {
12126		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
12127	}
12128	if rfrpf.Communities != nil {
12129		objectMap["communities"] = rfrpf.Communities
12130	}
12131	return json.Marshal(objectMap)
12132}
12133
12134// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12135// long-running operation.
12136type RouteFilterRulesCreateOrUpdateFuture struct {
12137	azure.FutureAPI
12138	// Result returns the result of the asynchronous operation.
12139	// If the operation has not completed it will return an error.
12140	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12141}
12142
12143// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12144func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12145	var azFuture azure.Future
12146	if err := json.Unmarshal(body, &azFuture); err != nil {
12147		return err
12148	}
12149	future.FutureAPI = &azFuture
12150	future.Result = future.result
12151	return nil
12152}
12153
12154// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
12155func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12156	var done bool
12157	done, err = future.DoneWithContext(context.Background(), client)
12158	if err != nil {
12159		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12160		return
12161	}
12162	if !done {
12163		rfr.Response.Response = future.Response()
12164		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
12165		return
12166	}
12167	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12168	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12169		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
12170		if err != nil {
12171			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12172		}
12173	}
12174	return
12175}
12176
12177// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12178// operation.
12179type RouteFilterRulesDeleteFuture struct {
12180	azure.FutureAPI
12181	// Result returns the result of the asynchronous operation.
12182	// If the operation has not completed it will return an error.
12183	Result func(RouteFilterRulesClient) (autorest.Response, error)
12184}
12185
12186// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12187func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12188	var azFuture azure.Future
12189	if err := json.Unmarshal(body, &azFuture); err != nil {
12190		return err
12191	}
12192	future.FutureAPI = &azFuture
12193	future.Result = future.result
12194	return nil
12195}
12196
12197// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
12198func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
12199	var done bool
12200	done, err = future.DoneWithContext(context.Background(), client)
12201	if err != nil {
12202		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12203		return
12204	}
12205	if !done {
12206		ar.Response = future.Response()
12207		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
12208		return
12209	}
12210	ar.Response = future.Response()
12211	return
12212}
12213
12214// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12215// operation.
12216type RouteFilterRulesUpdateFuture struct {
12217	azure.FutureAPI
12218	// Result returns the result of the asynchronous operation.
12219	// If the operation has not completed it will return an error.
12220	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12221}
12222
12223// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12224func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
12225	var azFuture azure.Future
12226	if err := json.Unmarshal(body, &azFuture); err != nil {
12227		return err
12228	}
12229	future.FutureAPI = &azFuture
12230	future.Result = future.result
12231	return nil
12232}
12233
12234// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
12235func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12236	var done bool
12237	done, err = future.DoneWithContext(context.Background(), client)
12238	if err != nil {
12239		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
12240		return
12241	}
12242	if !done {
12243		rfr.Response.Response = future.Response()
12244		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
12245		return
12246	}
12247	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12248	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12249		rfr, err = client.UpdateResponder(rfr.Response.Response)
12250		if err != nil {
12251			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12252		}
12253	}
12254	return
12255}
12256
12257// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12258// long-running operation.
12259type RouteFiltersCreateOrUpdateFuture struct {
12260	azure.FutureAPI
12261	// Result returns the result of the asynchronous operation.
12262	// If the operation has not completed it will return an error.
12263	Result func(RouteFiltersClient) (RouteFilter, error)
12264}
12265
12266// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12267func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12268	var azFuture azure.Future
12269	if err := json.Unmarshal(body, &azFuture); err != nil {
12270		return err
12271	}
12272	future.FutureAPI = &azFuture
12273	future.Result = future.result
12274	return nil
12275}
12276
12277// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
12278func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12279	var done bool
12280	done, err = future.DoneWithContext(context.Background(), client)
12281	if err != nil {
12282		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12283		return
12284	}
12285	if !done {
12286		rf.Response.Response = future.Response()
12287		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
12288		return
12289	}
12290	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12291	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12292		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
12293		if err != nil {
12294			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12295		}
12296	}
12297	return
12298}
12299
12300// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12301// operation.
12302type RouteFiltersDeleteFuture struct {
12303	azure.FutureAPI
12304	// Result returns the result of the asynchronous operation.
12305	// If the operation has not completed it will return an error.
12306	Result func(RouteFiltersClient) (autorest.Response, error)
12307}
12308
12309// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12310func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
12311	var azFuture azure.Future
12312	if err := json.Unmarshal(body, &azFuture); err != nil {
12313		return err
12314	}
12315	future.FutureAPI = &azFuture
12316	future.Result = future.result
12317	return nil
12318}
12319
12320// result is the default implementation for RouteFiltersDeleteFuture.Result.
12321func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
12322	var done bool
12323	done, err = future.DoneWithContext(context.Background(), client)
12324	if err != nil {
12325		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
12326		return
12327	}
12328	if !done {
12329		ar.Response = future.Response()
12330		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
12331		return
12332	}
12333	ar.Response = future.Response()
12334	return
12335}
12336
12337// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12338// operation.
12339type RouteFiltersUpdateFuture struct {
12340	azure.FutureAPI
12341	// Result returns the result of the asynchronous operation.
12342	// If the operation has not completed it will return an error.
12343	Result func(RouteFiltersClient) (RouteFilter, error)
12344}
12345
12346// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12347func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
12348	var azFuture azure.Future
12349	if err := json.Unmarshal(body, &azFuture); err != nil {
12350		return err
12351	}
12352	future.FutureAPI = &azFuture
12353	future.Result = future.result
12354	return nil
12355}
12356
12357// result is the default implementation for RouteFiltersUpdateFuture.Result.
12358func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12359	var done bool
12360	done, err = future.DoneWithContext(context.Background(), client)
12361	if err != nil {
12362		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
12363		return
12364	}
12365	if !done {
12366		rf.Response.Response = future.Response()
12367		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
12368		return
12369	}
12370	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12371	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12372		rf, err = client.UpdateResponder(rf.Response.Response)
12373		if err != nil {
12374			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12375		}
12376	}
12377	return
12378}
12379
12380// RouteListResult response for the ListRoute API service call
12381type RouteListResult struct {
12382	autorest.Response `json:"-"`
12383	// Value - Gets a list of routes in a resource group.
12384	Value *[]Route `json:"value,omitempty"`
12385	// NextLink - The URL to get the next set of results.
12386	NextLink *string `json:"nextLink,omitempty"`
12387}
12388
12389// RouteListResultIterator provides access to a complete listing of Route values.
12390type RouteListResultIterator struct {
12391	i    int
12392	page RouteListResultPage
12393}
12394
12395// NextWithContext advances to the next value.  If there was an error making
12396// the request the iterator does not advance and the error is returned.
12397func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
12398	if tracing.IsEnabled() {
12399		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
12400		defer func() {
12401			sc := -1
12402			if iter.Response().Response.Response != nil {
12403				sc = iter.Response().Response.Response.StatusCode
12404			}
12405			tracing.EndSpan(ctx, sc, err)
12406		}()
12407	}
12408	iter.i++
12409	if iter.i < len(iter.page.Values()) {
12410		return nil
12411	}
12412	err = iter.page.NextWithContext(ctx)
12413	if err != nil {
12414		iter.i--
12415		return err
12416	}
12417	iter.i = 0
12418	return nil
12419}
12420
12421// Next advances to the next value.  If there was an error making
12422// the request the iterator does not advance and the error is returned.
12423// Deprecated: Use NextWithContext() instead.
12424func (iter *RouteListResultIterator) Next() error {
12425	return iter.NextWithContext(context.Background())
12426}
12427
12428// NotDone returns true if the enumeration should be started or is not yet complete.
12429func (iter RouteListResultIterator) NotDone() bool {
12430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12431}
12432
12433// Response returns the raw server response from the last page request.
12434func (iter RouteListResultIterator) Response() RouteListResult {
12435	return iter.page.Response()
12436}
12437
12438// Value returns the current value or a zero-initialized value if the
12439// iterator has advanced beyond the end of the collection.
12440func (iter RouteListResultIterator) Value() Route {
12441	if !iter.page.NotDone() {
12442		return Route{}
12443	}
12444	return iter.page.Values()[iter.i]
12445}
12446
12447// Creates a new instance of the RouteListResultIterator type.
12448func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
12449	return RouteListResultIterator{page: page}
12450}
12451
12452// IsEmpty returns true if the ListResult contains no values.
12453func (rlr RouteListResult) IsEmpty() bool {
12454	return rlr.Value == nil || len(*rlr.Value) == 0
12455}
12456
12457// hasNextLink returns true if the NextLink is not empty.
12458func (rlr RouteListResult) hasNextLink() bool {
12459	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
12460}
12461
12462// routeListResultPreparer prepares a request to retrieve the next set of results.
12463// It returns nil if no more results exist.
12464func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
12465	if !rlr.hasNextLink() {
12466		return nil, nil
12467	}
12468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12469		autorest.AsJSON(),
12470		autorest.AsGet(),
12471		autorest.WithBaseURL(to.String(rlr.NextLink)))
12472}
12473
12474// RouteListResultPage contains a page of Route values.
12475type RouteListResultPage struct {
12476	fn  func(context.Context, RouteListResult) (RouteListResult, error)
12477	rlr RouteListResult
12478}
12479
12480// NextWithContext advances to the next page of values.  If there was an error making
12481// the request the page does not advance and the error is returned.
12482func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
12483	if tracing.IsEnabled() {
12484		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
12485		defer func() {
12486			sc := -1
12487			if page.Response().Response.Response != nil {
12488				sc = page.Response().Response.Response.StatusCode
12489			}
12490			tracing.EndSpan(ctx, sc, err)
12491		}()
12492	}
12493	for {
12494		next, err := page.fn(ctx, page.rlr)
12495		if err != nil {
12496			return err
12497		}
12498		page.rlr = next
12499		if !next.hasNextLink() || !next.IsEmpty() {
12500			break
12501		}
12502	}
12503	return nil
12504}
12505
12506// Next advances to the next page of values.  If there was an error making
12507// the request the page does not advance and the error is returned.
12508// Deprecated: Use NextWithContext() instead.
12509func (page *RouteListResultPage) Next() error {
12510	return page.NextWithContext(context.Background())
12511}
12512
12513// NotDone returns true if the page enumeration should be started or is not yet complete.
12514func (page RouteListResultPage) NotDone() bool {
12515	return !page.rlr.IsEmpty()
12516}
12517
12518// Response returns the raw server response from the last page request.
12519func (page RouteListResultPage) Response() RouteListResult {
12520	return page.rlr
12521}
12522
12523// Values returns the slice of values for the current page or nil if there are no values.
12524func (page RouteListResultPage) Values() []Route {
12525	if page.rlr.IsEmpty() {
12526		return nil
12527	}
12528	return *page.rlr.Value
12529}
12530
12531// Creates a new instance of the RouteListResultPage type.
12532func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
12533	return RouteListResultPage{
12534		fn:  getNextPage,
12535		rlr: cur,
12536	}
12537}
12538
12539// RoutePropertiesFormat route resource
12540type RoutePropertiesFormat struct {
12541	// AddressPrefix - The destination CIDR to which the route applies.
12542	AddressPrefix *string `json:"addressPrefix,omitempty"`
12543	// 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'
12544	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
12545	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
12546	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
12547	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12548	ProvisioningState *string `json:"provisioningState,omitempty"`
12549}
12550
12551// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12552// operation.
12553type RoutesCreateOrUpdateFuture struct {
12554	azure.FutureAPI
12555	// Result returns the result of the asynchronous operation.
12556	// If the operation has not completed it will return an error.
12557	Result func(RoutesClient) (Route, error)
12558}
12559
12560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12561func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12562	var azFuture azure.Future
12563	if err := json.Unmarshal(body, &azFuture); err != nil {
12564		return err
12565	}
12566	future.FutureAPI = &azFuture
12567	future.Result = future.result
12568	return nil
12569}
12570
12571// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
12572func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
12573	var done bool
12574	done, err = future.DoneWithContext(context.Background(), client)
12575	if err != nil {
12576		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12577		return
12578	}
12579	if !done {
12580		r.Response.Response = future.Response()
12581		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
12582		return
12583	}
12584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12585	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
12586		r, err = client.CreateOrUpdateResponder(r.Response.Response)
12587		if err != nil {
12588			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
12589		}
12590	}
12591	return
12592}
12593
12594// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
12595type RoutesDeleteFuture struct {
12596	azure.FutureAPI
12597	// Result returns the result of the asynchronous operation.
12598	// If the operation has not completed it will return an error.
12599	Result func(RoutesClient) (autorest.Response, error)
12600}
12601
12602// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12603func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
12604	var azFuture azure.Future
12605	if err := json.Unmarshal(body, &azFuture); err != nil {
12606		return err
12607	}
12608	future.FutureAPI = &azFuture
12609	future.Result = future.result
12610	return nil
12611}
12612
12613// result is the default implementation for RoutesDeleteFuture.Result.
12614func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
12615	var done bool
12616	done, err = future.DoneWithContext(context.Background(), client)
12617	if err != nil {
12618		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
12619		return
12620	}
12621	if !done {
12622		ar.Response = future.Response()
12623		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
12624		return
12625	}
12626	ar.Response = future.Response()
12627	return
12628}
12629
12630// RouteTable route table resource.
12631type RouteTable struct {
12632	autorest.Response `json:"-"`
12633	// RouteTablePropertiesFormat - Properties of the route table.
12634	*RouteTablePropertiesFormat `json:"properties,omitempty"`
12635	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12636	Etag *string `json:"etag,omitempty"`
12637	// ID - Resource ID.
12638	ID *string `json:"id,omitempty"`
12639	// Name - READ-ONLY; Resource name.
12640	Name *string `json:"name,omitempty"`
12641	// Type - READ-ONLY; Resource type.
12642	Type *string `json:"type,omitempty"`
12643	// Location - Resource location.
12644	Location *string `json:"location,omitempty"`
12645	// Tags - Resource tags.
12646	Tags map[string]*string `json:"tags"`
12647}
12648
12649// MarshalJSON is the custom marshaler for RouteTable.
12650func (rt RouteTable) MarshalJSON() ([]byte, error) {
12651	objectMap := make(map[string]interface{})
12652	if rt.RouteTablePropertiesFormat != nil {
12653		objectMap["properties"] = rt.RouteTablePropertiesFormat
12654	}
12655	if rt.Etag != nil {
12656		objectMap["etag"] = rt.Etag
12657	}
12658	if rt.ID != nil {
12659		objectMap["id"] = rt.ID
12660	}
12661	if rt.Location != nil {
12662		objectMap["location"] = rt.Location
12663	}
12664	if rt.Tags != nil {
12665		objectMap["tags"] = rt.Tags
12666	}
12667	return json.Marshal(objectMap)
12668}
12669
12670// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
12671func (rt *RouteTable) UnmarshalJSON(body []byte) error {
12672	var m map[string]*json.RawMessage
12673	err := json.Unmarshal(body, &m)
12674	if err != nil {
12675		return err
12676	}
12677	for k, v := range m {
12678		switch k {
12679		case "properties":
12680			if v != nil {
12681				var routeTablePropertiesFormat RouteTablePropertiesFormat
12682				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
12683				if err != nil {
12684					return err
12685				}
12686				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
12687			}
12688		case "etag":
12689			if v != nil {
12690				var etag string
12691				err = json.Unmarshal(*v, &etag)
12692				if err != nil {
12693					return err
12694				}
12695				rt.Etag = &etag
12696			}
12697		case "id":
12698			if v != nil {
12699				var ID string
12700				err = json.Unmarshal(*v, &ID)
12701				if err != nil {
12702					return err
12703				}
12704				rt.ID = &ID
12705			}
12706		case "name":
12707			if v != nil {
12708				var name string
12709				err = json.Unmarshal(*v, &name)
12710				if err != nil {
12711					return err
12712				}
12713				rt.Name = &name
12714			}
12715		case "type":
12716			if v != nil {
12717				var typeVar string
12718				err = json.Unmarshal(*v, &typeVar)
12719				if err != nil {
12720					return err
12721				}
12722				rt.Type = &typeVar
12723			}
12724		case "location":
12725			if v != nil {
12726				var location string
12727				err = json.Unmarshal(*v, &location)
12728				if err != nil {
12729					return err
12730				}
12731				rt.Location = &location
12732			}
12733		case "tags":
12734			if v != nil {
12735				var tags map[string]*string
12736				err = json.Unmarshal(*v, &tags)
12737				if err != nil {
12738					return err
12739				}
12740				rt.Tags = tags
12741			}
12742		}
12743	}
12744
12745	return nil
12746}
12747
12748// RouteTableListResult response for the ListRouteTable API service call.
12749type RouteTableListResult struct {
12750	autorest.Response `json:"-"`
12751	// Value - Gets a list of route tables in a resource group.
12752	Value *[]RouteTable `json:"value,omitempty"`
12753	// NextLink - The URL to get the next set of results.
12754	NextLink *string `json:"nextLink,omitempty"`
12755}
12756
12757// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
12758type RouteTableListResultIterator struct {
12759	i    int
12760	page RouteTableListResultPage
12761}
12762
12763// NextWithContext advances to the next value.  If there was an error making
12764// the request the iterator does not advance and the error is returned.
12765func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
12766	if tracing.IsEnabled() {
12767		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
12768		defer func() {
12769			sc := -1
12770			if iter.Response().Response.Response != nil {
12771				sc = iter.Response().Response.Response.StatusCode
12772			}
12773			tracing.EndSpan(ctx, sc, err)
12774		}()
12775	}
12776	iter.i++
12777	if iter.i < len(iter.page.Values()) {
12778		return nil
12779	}
12780	err = iter.page.NextWithContext(ctx)
12781	if err != nil {
12782		iter.i--
12783		return err
12784	}
12785	iter.i = 0
12786	return nil
12787}
12788
12789// Next advances to the next value.  If there was an error making
12790// the request the iterator does not advance and the error is returned.
12791// Deprecated: Use NextWithContext() instead.
12792func (iter *RouteTableListResultIterator) Next() error {
12793	return iter.NextWithContext(context.Background())
12794}
12795
12796// NotDone returns true if the enumeration should be started or is not yet complete.
12797func (iter RouteTableListResultIterator) NotDone() bool {
12798	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12799}
12800
12801// Response returns the raw server response from the last page request.
12802func (iter RouteTableListResultIterator) Response() RouteTableListResult {
12803	return iter.page.Response()
12804}
12805
12806// Value returns the current value or a zero-initialized value if the
12807// iterator has advanced beyond the end of the collection.
12808func (iter RouteTableListResultIterator) Value() RouteTable {
12809	if !iter.page.NotDone() {
12810		return RouteTable{}
12811	}
12812	return iter.page.Values()[iter.i]
12813}
12814
12815// Creates a new instance of the RouteTableListResultIterator type.
12816func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
12817	return RouteTableListResultIterator{page: page}
12818}
12819
12820// IsEmpty returns true if the ListResult contains no values.
12821func (rtlr RouteTableListResult) IsEmpty() bool {
12822	return rtlr.Value == nil || len(*rtlr.Value) == 0
12823}
12824
12825// hasNextLink returns true if the NextLink is not empty.
12826func (rtlr RouteTableListResult) hasNextLink() bool {
12827	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
12828}
12829
12830// routeTableListResultPreparer prepares a request to retrieve the next set of results.
12831// It returns nil if no more results exist.
12832func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
12833	if !rtlr.hasNextLink() {
12834		return nil, nil
12835	}
12836	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12837		autorest.AsJSON(),
12838		autorest.AsGet(),
12839		autorest.WithBaseURL(to.String(rtlr.NextLink)))
12840}
12841
12842// RouteTableListResultPage contains a page of RouteTable values.
12843type RouteTableListResultPage struct {
12844	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
12845	rtlr RouteTableListResult
12846}
12847
12848// NextWithContext advances to the next page of values.  If there was an error making
12849// the request the page does not advance and the error is returned.
12850func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
12851	if tracing.IsEnabled() {
12852		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
12853		defer func() {
12854			sc := -1
12855			if page.Response().Response.Response != nil {
12856				sc = page.Response().Response.Response.StatusCode
12857			}
12858			tracing.EndSpan(ctx, sc, err)
12859		}()
12860	}
12861	for {
12862		next, err := page.fn(ctx, page.rtlr)
12863		if err != nil {
12864			return err
12865		}
12866		page.rtlr = next
12867		if !next.hasNextLink() || !next.IsEmpty() {
12868			break
12869		}
12870	}
12871	return nil
12872}
12873
12874// Next advances to the next page of values.  If there was an error making
12875// the request the page does not advance and the error is returned.
12876// Deprecated: Use NextWithContext() instead.
12877func (page *RouteTableListResultPage) Next() error {
12878	return page.NextWithContext(context.Background())
12879}
12880
12881// NotDone returns true if the page enumeration should be started or is not yet complete.
12882func (page RouteTableListResultPage) NotDone() bool {
12883	return !page.rtlr.IsEmpty()
12884}
12885
12886// Response returns the raw server response from the last page request.
12887func (page RouteTableListResultPage) Response() RouteTableListResult {
12888	return page.rtlr
12889}
12890
12891// Values returns the slice of values for the current page or nil if there are no values.
12892func (page RouteTableListResultPage) Values() []RouteTable {
12893	if page.rtlr.IsEmpty() {
12894		return nil
12895	}
12896	return *page.rtlr.Value
12897}
12898
12899// Creates a new instance of the RouteTableListResultPage type.
12900func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
12901	return RouteTableListResultPage{
12902		fn:   getNextPage,
12903		rtlr: cur,
12904	}
12905}
12906
12907// RouteTablePropertiesFormat route Table resource
12908type RouteTablePropertiesFormat struct {
12909	// Routes - Collection of routes contained within a route table.
12910	Routes *[]Route `json:"routes,omitempty"`
12911	// Subnets - READ-ONLY; A collection of references to subnets.
12912	Subnets *[]Subnet `json:"subnets,omitempty"`
12913	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
12914	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
12915	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12916	ProvisioningState *string `json:"provisioningState,omitempty"`
12917}
12918
12919// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
12920func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
12921	objectMap := make(map[string]interface{})
12922	if rtpf.Routes != nil {
12923		objectMap["routes"] = rtpf.Routes
12924	}
12925	if rtpf.DisableBgpRoutePropagation != nil {
12926		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
12927	}
12928	if rtpf.ProvisioningState != nil {
12929		objectMap["provisioningState"] = rtpf.ProvisioningState
12930	}
12931	return json.Marshal(objectMap)
12932}
12933
12934// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12935// long-running operation.
12936type RouteTablesCreateOrUpdateFuture struct {
12937	azure.FutureAPI
12938	// Result returns the result of the asynchronous operation.
12939	// If the operation has not completed it will return an error.
12940	Result func(RouteTablesClient) (RouteTable, error)
12941}
12942
12943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12944func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12945	var azFuture azure.Future
12946	if err := json.Unmarshal(body, &azFuture); err != nil {
12947		return err
12948	}
12949	future.FutureAPI = &azFuture
12950	future.Result = future.result
12951	return nil
12952}
12953
12954// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
12955func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
12956	var done bool
12957	done, err = future.DoneWithContext(context.Background(), client)
12958	if err != nil {
12959		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12960		return
12961	}
12962	if !done {
12963		rt.Response.Response = future.Response()
12964		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
12965		return
12966	}
12967	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12968	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
12969		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
12970		if err != nil {
12971			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
12972		}
12973	}
12974	return
12975}
12976
12977// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12978// operation.
12979type RouteTablesDeleteFuture struct {
12980	azure.FutureAPI
12981	// Result returns the result of the asynchronous operation.
12982	// If the operation has not completed it will return an error.
12983	Result func(RouteTablesClient) (autorest.Response, error)
12984}
12985
12986// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12987func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
12988	var azFuture azure.Future
12989	if err := json.Unmarshal(body, &azFuture); err != nil {
12990		return err
12991	}
12992	future.FutureAPI = &azFuture
12993	future.Result = future.result
12994	return nil
12995}
12996
12997// result is the default implementation for RouteTablesDeleteFuture.Result.
12998func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
12999	var done bool
13000	done, err = future.DoneWithContext(context.Background(), client)
13001	if err != nil {
13002		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
13003		return
13004	}
13005	if !done {
13006		ar.Response = future.Response()
13007		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
13008		return
13009	}
13010	ar.Response = future.Response()
13011	return
13012}
13013
13014// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
13015// operation.
13016type RouteTablesUpdateTagsFuture struct {
13017	azure.FutureAPI
13018	// Result returns the result of the asynchronous operation.
13019	// If the operation has not completed it will return an error.
13020	Result func(RouteTablesClient) (RouteTable, error)
13021}
13022
13023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13024func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13025	var azFuture azure.Future
13026	if err := json.Unmarshal(body, &azFuture); err != nil {
13027		return err
13028	}
13029	future.FutureAPI = &azFuture
13030	future.Result = future.result
13031	return nil
13032}
13033
13034// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
13035func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
13036	var done bool
13037	done, err = future.DoneWithContext(context.Background(), client)
13038	if err != nil {
13039		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13040		return
13041	}
13042	if !done {
13043		rt.Response.Response = future.Response()
13044		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
13045		return
13046	}
13047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13048	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
13049		rt, err = client.UpdateTagsResponder(rt.Response.Response)
13050		if err != nil {
13051			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
13052		}
13053	}
13054	return
13055}
13056
13057// SecurityGroup networkSecurityGroup resource.
13058type SecurityGroup struct {
13059	autorest.Response `json:"-"`
13060	// SecurityGroupPropertiesFormat - Properties of the network security group
13061	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
13062	// Etag - A unique read-only string that changes whenever the resource is updated.
13063	Etag *string `json:"etag,omitempty"`
13064	// ID - Resource ID.
13065	ID *string `json:"id,omitempty"`
13066	// Name - READ-ONLY; Resource name.
13067	Name *string `json:"name,omitempty"`
13068	// Type - READ-ONLY; Resource type.
13069	Type *string `json:"type,omitempty"`
13070	// Location - Resource location.
13071	Location *string `json:"location,omitempty"`
13072	// Tags - Resource tags.
13073	Tags map[string]*string `json:"tags"`
13074}
13075
13076// MarshalJSON is the custom marshaler for SecurityGroup.
13077func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
13078	objectMap := make(map[string]interface{})
13079	if sg.SecurityGroupPropertiesFormat != nil {
13080		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
13081	}
13082	if sg.Etag != nil {
13083		objectMap["etag"] = sg.Etag
13084	}
13085	if sg.ID != nil {
13086		objectMap["id"] = sg.ID
13087	}
13088	if sg.Location != nil {
13089		objectMap["location"] = sg.Location
13090	}
13091	if sg.Tags != nil {
13092		objectMap["tags"] = sg.Tags
13093	}
13094	return json.Marshal(objectMap)
13095}
13096
13097// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
13098func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
13099	var m map[string]*json.RawMessage
13100	err := json.Unmarshal(body, &m)
13101	if err != nil {
13102		return err
13103	}
13104	for k, v := range m {
13105		switch k {
13106		case "properties":
13107			if v != nil {
13108				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
13109				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
13110				if err != nil {
13111					return err
13112				}
13113				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
13114			}
13115		case "etag":
13116			if v != nil {
13117				var etag string
13118				err = json.Unmarshal(*v, &etag)
13119				if err != nil {
13120					return err
13121				}
13122				sg.Etag = &etag
13123			}
13124		case "id":
13125			if v != nil {
13126				var ID string
13127				err = json.Unmarshal(*v, &ID)
13128				if err != nil {
13129					return err
13130				}
13131				sg.ID = &ID
13132			}
13133		case "name":
13134			if v != nil {
13135				var name string
13136				err = json.Unmarshal(*v, &name)
13137				if err != nil {
13138					return err
13139				}
13140				sg.Name = &name
13141			}
13142		case "type":
13143			if v != nil {
13144				var typeVar string
13145				err = json.Unmarshal(*v, &typeVar)
13146				if err != nil {
13147					return err
13148				}
13149				sg.Type = &typeVar
13150			}
13151		case "location":
13152			if v != nil {
13153				var location string
13154				err = json.Unmarshal(*v, &location)
13155				if err != nil {
13156					return err
13157				}
13158				sg.Location = &location
13159			}
13160		case "tags":
13161			if v != nil {
13162				var tags map[string]*string
13163				err = json.Unmarshal(*v, &tags)
13164				if err != nil {
13165					return err
13166				}
13167				sg.Tags = tags
13168			}
13169		}
13170	}
13171
13172	return nil
13173}
13174
13175// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
13176type SecurityGroupListResult struct {
13177	autorest.Response `json:"-"`
13178	// Value - A list of NetworkSecurityGroup resources.
13179	Value *[]SecurityGroup `json:"value,omitempty"`
13180	// NextLink - The URL to get the next set of results.
13181	NextLink *string `json:"nextLink,omitempty"`
13182}
13183
13184// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
13185type SecurityGroupListResultIterator struct {
13186	i    int
13187	page SecurityGroupListResultPage
13188}
13189
13190// NextWithContext advances to the next value.  If there was an error making
13191// the request the iterator does not advance and the error is returned.
13192func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
13193	if tracing.IsEnabled() {
13194		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
13195		defer func() {
13196			sc := -1
13197			if iter.Response().Response.Response != nil {
13198				sc = iter.Response().Response.Response.StatusCode
13199			}
13200			tracing.EndSpan(ctx, sc, err)
13201		}()
13202	}
13203	iter.i++
13204	if iter.i < len(iter.page.Values()) {
13205		return nil
13206	}
13207	err = iter.page.NextWithContext(ctx)
13208	if err != nil {
13209		iter.i--
13210		return err
13211	}
13212	iter.i = 0
13213	return nil
13214}
13215
13216// Next advances to the next value.  If there was an error making
13217// the request the iterator does not advance and the error is returned.
13218// Deprecated: Use NextWithContext() instead.
13219func (iter *SecurityGroupListResultIterator) Next() error {
13220	return iter.NextWithContext(context.Background())
13221}
13222
13223// NotDone returns true if the enumeration should be started or is not yet complete.
13224func (iter SecurityGroupListResultIterator) NotDone() bool {
13225	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13226}
13227
13228// Response returns the raw server response from the last page request.
13229func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
13230	return iter.page.Response()
13231}
13232
13233// Value returns the current value or a zero-initialized value if the
13234// iterator has advanced beyond the end of the collection.
13235func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
13236	if !iter.page.NotDone() {
13237		return SecurityGroup{}
13238	}
13239	return iter.page.Values()[iter.i]
13240}
13241
13242// Creates a new instance of the SecurityGroupListResultIterator type.
13243func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
13244	return SecurityGroupListResultIterator{page: page}
13245}
13246
13247// IsEmpty returns true if the ListResult contains no values.
13248func (sglr SecurityGroupListResult) IsEmpty() bool {
13249	return sglr.Value == nil || len(*sglr.Value) == 0
13250}
13251
13252// hasNextLink returns true if the NextLink is not empty.
13253func (sglr SecurityGroupListResult) hasNextLink() bool {
13254	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
13255}
13256
13257// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
13258// It returns nil if no more results exist.
13259func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
13260	if !sglr.hasNextLink() {
13261		return nil, nil
13262	}
13263	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13264		autorest.AsJSON(),
13265		autorest.AsGet(),
13266		autorest.WithBaseURL(to.String(sglr.NextLink)))
13267}
13268
13269// SecurityGroupListResultPage contains a page of SecurityGroup values.
13270type SecurityGroupListResultPage struct {
13271	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
13272	sglr SecurityGroupListResult
13273}
13274
13275// NextWithContext advances to the next page of values.  If there was an error making
13276// the request the page does not advance and the error is returned.
13277func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
13278	if tracing.IsEnabled() {
13279		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
13280		defer func() {
13281			sc := -1
13282			if page.Response().Response.Response != nil {
13283				sc = page.Response().Response.Response.StatusCode
13284			}
13285			tracing.EndSpan(ctx, sc, err)
13286		}()
13287	}
13288	for {
13289		next, err := page.fn(ctx, page.sglr)
13290		if err != nil {
13291			return err
13292		}
13293		page.sglr = next
13294		if !next.hasNextLink() || !next.IsEmpty() {
13295			break
13296		}
13297	}
13298	return nil
13299}
13300
13301// Next advances to the next page of values.  If there was an error making
13302// the request the page does not advance and the error is returned.
13303// Deprecated: Use NextWithContext() instead.
13304func (page *SecurityGroupListResultPage) Next() error {
13305	return page.NextWithContext(context.Background())
13306}
13307
13308// NotDone returns true if the page enumeration should be started or is not yet complete.
13309func (page SecurityGroupListResultPage) NotDone() bool {
13310	return !page.sglr.IsEmpty()
13311}
13312
13313// Response returns the raw server response from the last page request.
13314func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
13315	return page.sglr
13316}
13317
13318// Values returns the slice of values for the current page or nil if there are no values.
13319func (page SecurityGroupListResultPage) Values() []SecurityGroup {
13320	if page.sglr.IsEmpty() {
13321		return nil
13322	}
13323	return *page.sglr.Value
13324}
13325
13326// Creates a new instance of the SecurityGroupListResultPage type.
13327func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
13328	return SecurityGroupListResultPage{
13329		fn:   getNextPage,
13330		sglr: cur,
13331	}
13332}
13333
13334// SecurityGroupNetworkInterface network interface and all its associated security rules.
13335type SecurityGroupNetworkInterface struct {
13336	// ID - ID of the network interface.
13337	ID                       *string                   `json:"id,omitempty"`
13338	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
13339}
13340
13341// SecurityGroupPropertiesFormat network Security Group resource.
13342type SecurityGroupPropertiesFormat struct {
13343	// SecurityRules - A collection of security rules of the network security group.
13344	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13345	// DefaultSecurityRules - The default security rules of network security group.
13346	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13347	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
13348	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13349	// Subnets - READ-ONLY; A collection of references to subnets.
13350	Subnets *[]Subnet `json:"subnets,omitempty"`
13351	// ResourceGUID - The resource GUID property of the network security group resource.
13352	ResourceGUID *string `json:"resourceGuid,omitempty"`
13353	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13354	ProvisioningState *string `json:"provisioningState,omitempty"`
13355}
13356
13357// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
13358func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
13359	objectMap := make(map[string]interface{})
13360	if sgpf.SecurityRules != nil {
13361		objectMap["securityRules"] = sgpf.SecurityRules
13362	}
13363	if sgpf.DefaultSecurityRules != nil {
13364		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
13365	}
13366	if sgpf.ResourceGUID != nil {
13367		objectMap["resourceGuid"] = sgpf.ResourceGUID
13368	}
13369	if sgpf.ProvisioningState != nil {
13370		objectMap["provisioningState"] = sgpf.ProvisioningState
13371	}
13372	return json.Marshal(objectMap)
13373}
13374
13375// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13376// long-running operation.
13377type SecurityGroupsCreateOrUpdateFuture struct {
13378	azure.FutureAPI
13379	// Result returns the result of the asynchronous operation.
13380	// If the operation has not completed it will return an error.
13381	Result func(SecurityGroupsClient) (SecurityGroup, error)
13382}
13383
13384// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13385func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13386	var azFuture azure.Future
13387	if err := json.Unmarshal(body, &azFuture); err != nil {
13388		return err
13389	}
13390	future.FutureAPI = &azFuture
13391	future.Result = future.result
13392	return nil
13393}
13394
13395// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
13396func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13397	var done bool
13398	done, err = future.DoneWithContext(context.Background(), client)
13399	if err != nil {
13400		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13401		return
13402	}
13403	if !done {
13404		sg.Response.Response = future.Response()
13405		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
13406		return
13407	}
13408	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13409	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13410		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
13411		if err != nil {
13412			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
13413		}
13414	}
13415	return
13416}
13417
13418// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13419// operation.
13420type SecurityGroupsDeleteFuture struct {
13421	azure.FutureAPI
13422	// Result returns the result of the asynchronous operation.
13423	// If the operation has not completed it will return an error.
13424	Result func(SecurityGroupsClient) (autorest.Response, error)
13425}
13426
13427// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13428func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
13429	var azFuture azure.Future
13430	if err := json.Unmarshal(body, &azFuture); err != nil {
13431		return err
13432	}
13433	future.FutureAPI = &azFuture
13434	future.Result = future.result
13435	return nil
13436}
13437
13438// result is the default implementation for SecurityGroupsDeleteFuture.Result.
13439func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
13440	var done bool
13441	done, err = future.DoneWithContext(context.Background(), client)
13442	if err != nil {
13443		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
13444		return
13445	}
13446	if !done {
13447		ar.Response = future.Response()
13448		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
13449		return
13450	}
13451	ar.Response = future.Response()
13452	return
13453}
13454
13455// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13456// long-running operation.
13457type SecurityGroupsUpdateTagsFuture struct {
13458	azure.FutureAPI
13459	// Result returns the result of the asynchronous operation.
13460	// If the operation has not completed it will return an error.
13461	Result func(SecurityGroupsClient) (SecurityGroup, error)
13462}
13463
13464// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13465func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13466	var azFuture azure.Future
13467	if err := json.Unmarshal(body, &azFuture); err != nil {
13468		return err
13469	}
13470	future.FutureAPI = &azFuture
13471	future.Result = future.result
13472	return nil
13473}
13474
13475// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
13476func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13477	var done bool
13478	done, err = future.DoneWithContext(context.Background(), client)
13479	if err != nil {
13480		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13481		return
13482	}
13483	if !done {
13484		sg.Response.Response = future.Response()
13485		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
13486		return
13487	}
13488	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13489	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13490		sg, err = client.UpdateTagsResponder(sg.Response.Response)
13491		if err != nil {
13492			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
13493		}
13494	}
13495	return
13496}
13497
13498// SecurityGroupViewParameters parameters that define the VM to check security groups for.
13499type SecurityGroupViewParameters struct {
13500	// TargetResourceID - ID of the target VM.
13501	TargetResourceID *string `json:"targetResourceId,omitempty"`
13502}
13503
13504// SecurityGroupViewResult the information about security rules applied to the specified VM.
13505type SecurityGroupViewResult struct {
13506	autorest.Response `json:"-"`
13507	// NetworkInterfaces - List of network interfaces on the specified VM.
13508	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
13509}
13510
13511// SecurityRule network security rule.
13512type SecurityRule struct {
13513	autorest.Response `json:"-"`
13514	// SecurityRulePropertiesFormat - Properties of the security rule
13515	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
13516	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13517	Name *string `json:"name,omitempty"`
13518	// Etag - A unique read-only string that changes whenever the resource is updated.
13519	Etag *string `json:"etag,omitempty"`
13520	// ID - Resource ID.
13521	ID *string `json:"id,omitempty"`
13522}
13523
13524// MarshalJSON is the custom marshaler for SecurityRule.
13525func (sr SecurityRule) MarshalJSON() ([]byte, error) {
13526	objectMap := make(map[string]interface{})
13527	if sr.SecurityRulePropertiesFormat != nil {
13528		objectMap["properties"] = sr.SecurityRulePropertiesFormat
13529	}
13530	if sr.Name != nil {
13531		objectMap["name"] = sr.Name
13532	}
13533	if sr.Etag != nil {
13534		objectMap["etag"] = sr.Etag
13535	}
13536	if sr.ID != nil {
13537		objectMap["id"] = sr.ID
13538	}
13539	return json.Marshal(objectMap)
13540}
13541
13542// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
13543func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
13544	var m map[string]*json.RawMessage
13545	err := json.Unmarshal(body, &m)
13546	if err != nil {
13547		return err
13548	}
13549	for k, v := range m {
13550		switch k {
13551		case "properties":
13552			if v != nil {
13553				var securityRulePropertiesFormat SecurityRulePropertiesFormat
13554				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
13555				if err != nil {
13556					return err
13557				}
13558				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
13559			}
13560		case "name":
13561			if v != nil {
13562				var name string
13563				err = json.Unmarshal(*v, &name)
13564				if err != nil {
13565					return err
13566				}
13567				sr.Name = &name
13568			}
13569		case "etag":
13570			if v != nil {
13571				var etag string
13572				err = json.Unmarshal(*v, &etag)
13573				if err != nil {
13574					return err
13575				}
13576				sr.Etag = &etag
13577			}
13578		case "id":
13579			if v != nil {
13580				var ID string
13581				err = json.Unmarshal(*v, &ID)
13582				if err != nil {
13583					return err
13584				}
13585				sr.ID = &ID
13586			}
13587		}
13588	}
13589
13590	return nil
13591}
13592
13593// SecurityRuleAssociations all security rules associated with the network interface.
13594type SecurityRuleAssociations struct {
13595	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
13596	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
13597	// DefaultSecurityRules - Collection of default security rules of the network security group.
13598	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13599	// EffectiveSecurityRules - Collection of effective security rules.
13600	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
13601}
13602
13603// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
13604// belongs to a network security group.
13605type SecurityRuleListResult struct {
13606	autorest.Response `json:"-"`
13607	// Value - The security rules in a network security group.
13608	Value *[]SecurityRule `json:"value,omitempty"`
13609	// NextLink - The URL to get the next set of results.
13610	NextLink *string `json:"nextLink,omitempty"`
13611}
13612
13613// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
13614type SecurityRuleListResultIterator struct {
13615	i    int
13616	page SecurityRuleListResultPage
13617}
13618
13619// NextWithContext advances to the next value.  If there was an error making
13620// the request the iterator does not advance and the error is returned.
13621func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13622	if tracing.IsEnabled() {
13623		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
13624		defer func() {
13625			sc := -1
13626			if iter.Response().Response.Response != nil {
13627				sc = iter.Response().Response.Response.StatusCode
13628			}
13629			tracing.EndSpan(ctx, sc, err)
13630		}()
13631	}
13632	iter.i++
13633	if iter.i < len(iter.page.Values()) {
13634		return nil
13635	}
13636	err = iter.page.NextWithContext(ctx)
13637	if err != nil {
13638		iter.i--
13639		return err
13640	}
13641	iter.i = 0
13642	return nil
13643}
13644
13645// Next advances to the next value.  If there was an error making
13646// the request the iterator does not advance and the error is returned.
13647// Deprecated: Use NextWithContext() instead.
13648func (iter *SecurityRuleListResultIterator) Next() error {
13649	return iter.NextWithContext(context.Background())
13650}
13651
13652// NotDone returns true if the enumeration should be started or is not yet complete.
13653func (iter SecurityRuleListResultIterator) NotDone() bool {
13654	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13655}
13656
13657// Response returns the raw server response from the last page request.
13658func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
13659	return iter.page.Response()
13660}
13661
13662// Value returns the current value or a zero-initialized value if the
13663// iterator has advanced beyond the end of the collection.
13664func (iter SecurityRuleListResultIterator) Value() SecurityRule {
13665	if !iter.page.NotDone() {
13666		return SecurityRule{}
13667	}
13668	return iter.page.Values()[iter.i]
13669}
13670
13671// Creates a new instance of the SecurityRuleListResultIterator type.
13672func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
13673	return SecurityRuleListResultIterator{page: page}
13674}
13675
13676// IsEmpty returns true if the ListResult contains no values.
13677func (srlr SecurityRuleListResult) IsEmpty() bool {
13678	return srlr.Value == nil || len(*srlr.Value) == 0
13679}
13680
13681// hasNextLink returns true if the NextLink is not empty.
13682func (srlr SecurityRuleListResult) hasNextLink() bool {
13683	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
13684}
13685
13686// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
13687// It returns nil if no more results exist.
13688func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13689	if !srlr.hasNextLink() {
13690		return nil, nil
13691	}
13692	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13693		autorest.AsJSON(),
13694		autorest.AsGet(),
13695		autorest.WithBaseURL(to.String(srlr.NextLink)))
13696}
13697
13698// SecurityRuleListResultPage contains a page of SecurityRule values.
13699type SecurityRuleListResultPage struct {
13700	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
13701	srlr SecurityRuleListResult
13702}
13703
13704// NextWithContext advances to the next page of values.  If there was an error making
13705// the request the page does not advance and the error is returned.
13706func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13707	if tracing.IsEnabled() {
13708		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
13709		defer func() {
13710			sc := -1
13711			if page.Response().Response.Response != nil {
13712				sc = page.Response().Response.Response.StatusCode
13713			}
13714			tracing.EndSpan(ctx, sc, err)
13715		}()
13716	}
13717	for {
13718		next, err := page.fn(ctx, page.srlr)
13719		if err != nil {
13720			return err
13721		}
13722		page.srlr = next
13723		if !next.hasNextLink() || !next.IsEmpty() {
13724			break
13725		}
13726	}
13727	return nil
13728}
13729
13730// Next advances to the next page of values.  If there was an error making
13731// the request the page does not advance and the error is returned.
13732// Deprecated: Use NextWithContext() instead.
13733func (page *SecurityRuleListResultPage) Next() error {
13734	return page.NextWithContext(context.Background())
13735}
13736
13737// NotDone returns true if the page enumeration should be started or is not yet complete.
13738func (page SecurityRuleListResultPage) NotDone() bool {
13739	return !page.srlr.IsEmpty()
13740}
13741
13742// Response returns the raw server response from the last page request.
13743func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
13744	return page.srlr
13745}
13746
13747// Values returns the slice of values for the current page or nil if there are no values.
13748func (page SecurityRuleListResultPage) Values() []SecurityRule {
13749	if page.srlr.IsEmpty() {
13750		return nil
13751	}
13752	return *page.srlr.Value
13753}
13754
13755// Creates a new instance of the SecurityRuleListResultPage type.
13756func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
13757	return SecurityRuleListResultPage{
13758		fn:   getNextPage,
13759		srlr: cur,
13760	}
13761}
13762
13763// SecurityRulePropertiesFormat security rule resource.
13764type SecurityRulePropertiesFormat struct {
13765	// Description - A description for this rule. Restricted to 140 chars.
13766	Description *string `json:"description,omitempty"`
13767	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
13768	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
13769	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13770	SourcePortRange *string `json:"sourcePortRange,omitempty"`
13771	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13772	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
13773	// 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.
13774	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
13775	// SourceAddressPrefixes - The CIDR or source IP ranges.
13776	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
13777	// SourceApplicationSecurityGroups - The application security group specified as source.
13778	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
13779	// 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.
13780	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
13781	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
13782	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
13783	// DestinationApplicationSecurityGroups - The application security group specified as destination.
13784	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
13785	// SourcePortRanges - The source port ranges.
13786	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
13787	// DestinationPortRanges - The destination port ranges.
13788	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
13789	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
13790	Access SecurityRuleAccess `json:"access,omitempty"`
13791	// 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.
13792	Priority *int32 `json:"priority,omitempty"`
13793	// 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'
13794	Direction SecurityRuleDirection `json:"direction,omitempty"`
13795	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13796	ProvisioningState *string `json:"provisioningState,omitempty"`
13797}
13798
13799// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13800// long-running operation.
13801type SecurityRulesCreateOrUpdateFuture struct {
13802	azure.FutureAPI
13803	// Result returns the result of the asynchronous operation.
13804	// If the operation has not completed it will return an error.
13805	Result func(SecurityRulesClient) (SecurityRule, error)
13806}
13807
13808// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13809func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13810	var azFuture azure.Future
13811	if err := json.Unmarshal(body, &azFuture); err != nil {
13812		return err
13813	}
13814	future.FutureAPI = &azFuture
13815	future.Result = future.result
13816	return nil
13817}
13818
13819// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
13820func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
13821	var done bool
13822	done, err = future.DoneWithContext(context.Background(), client)
13823	if err != nil {
13824		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13825		return
13826	}
13827	if !done {
13828		sr.Response.Response = future.Response()
13829		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
13830		return
13831	}
13832	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13833	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
13834		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
13835		if err != nil {
13836			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
13837		}
13838	}
13839	return
13840}
13841
13842// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13843// operation.
13844type SecurityRulesDeleteFuture struct {
13845	azure.FutureAPI
13846	// Result returns the result of the asynchronous operation.
13847	// If the operation has not completed it will return an error.
13848	Result func(SecurityRulesClient) (autorest.Response, error)
13849}
13850
13851// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13852func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
13853	var azFuture azure.Future
13854	if err := json.Unmarshal(body, &azFuture); err != nil {
13855		return err
13856	}
13857	future.FutureAPI = &azFuture
13858	future.Result = future.result
13859	return nil
13860}
13861
13862// result is the default implementation for SecurityRulesDeleteFuture.Result.
13863func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
13864	var done bool
13865	done, err = future.DoneWithContext(context.Background(), client)
13866	if err != nil {
13867		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
13868		return
13869	}
13870	if !done {
13871		ar.Response = future.Response()
13872		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
13873		return
13874	}
13875	ar.Response = future.Response()
13876	return
13877}
13878
13879// ServiceEndpointPropertiesFormat the service endpoint properties.
13880type ServiceEndpointPropertiesFormat struct {
13881	// Service - The type of the endpoint service.
13882	Service *string `json:"service,omitempty"`
13883	// Locations - A list of locations.
13884	Locations *[]string `json:"locations,omitempty"`
13885	// ProvisioningState - The provisioning state of the resource.
13886	ProvisioningState *string `json:"provisioningState,omitempty"`
13887}
13888
13889// String ...
13890type String struct {
13891	autorest.Response `json:"-"`
13892	Value             *string `json:"value,omitempty"`
13893}
13894
13895// Subnet subnet in a virtual network resource.
13896type Subnet struct {
13897	autorest.Response `json:"-"`
13898	// SubnetPropertiesFormat - Properties of the subnet.
13899	*SubnetPropertiesFormat `json:"properties,omitempty"`
13900	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13901	Name *string `json:"name,omitempty"`
13902	// Etag - A unique read-only string that changes whenever the resource is updated.
13903	Etag *string `json:"etag,omitempty"`
13904	// ID - Resource ID.
13905	ID *string `json:"id,omitempty"`
13906}
13907
13908// MarshalJSON is the custom marshaler for Subnet.
13909func (s Subnet) MarshalJSON() ([]byte, error) {
13910	objectMap := make(map[string]interface{})
13911	if s.SubnetPropertiesFormat != nil {
13912		objectMap["properties"] = s.SubnetPropertiesFormat
13913	}
13914	if s.Name != nil {
13915		objectMap["name"] = s.Name
13916	}
13917	if s.Etag != nil {
13918		objectMap["etag"] = s.Etag
13919	}
13920	if s.ID != nil {
13921		objectMap["id"] = s.ID
13922	}
13923	return json.Marshal(objectMap)
13924}
13925
13926// UnmarshalJSON is the custom unmarshaler for Subnet struct.
13927func (s *Subnet) UnmarshalJSON(body []byte) error {
13928	var m map[string]*json.RawMessage
13929	err := json.Unmarshal(body, &m)
13930	if err != nil {
13931		return err
13932	}
13933	for k, v := range m {
13934		switch k {
13935		case "properties":
13936			if v != nil {
13937				var subnetPropertiesFormat SubnetPropertiesFormat
13938				err = json.Unmarshal(*v, &subnetPropertiesFormat)
13939				if err != nil {
13940					return err
13941				}
13942				s.SubnetPropertiesFormat = &subnetPropertiesFormat
13943			}
13944		case "name":
13945			if v != nil {
13946				var name string
13947				err = json.Unmarshal(*v, &name)
13948				if err != nil {
13949					return err
13950				}
13951				s.Name = &name
13952			}
13953		case "etag":
13954			if v != nil {
13955				var etag string
13956				err = json.Unmarshal(*v, &etag)
13957				if err != nil {
13958					return err
13959				}
13960				s.Etag = &etag
13961			}
13962		case "id":
13963			if v != nil {
13964				var ID string
13965				err = json.Unmarshal(*v, &ID)
13966				if err != nil {
13967					return err
13968				}
13969				s.ID = &ID
13970			}
13971		}
13972	}
13973
13974	return nil
13975}
13976
13977// SubnetAssociation network interface and its custom security rules.
13978type SubnetAssociation struct {
13979	// ID - READ-ONLY; Subnet ID.
13980	ID *string `json:"id,omitempty"`
13981	// SecurityRules - Collection of custom security rules.
13982	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13983}
13984
13985// MarshalJSON is the custom marshaler for SubnetAssociation.
13986func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
13987	objectMap := make(map[string]interface{})
13988	if sa.SecurityRules != nil {
13989		objectMap["securityRules"] = sa.SecurityRules
13990	}
13991	return json.Marshal(objectMap)
13992}
13993
13994// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
13995// network
13996type SubnetListResult struct {
13997	autorest.Response `json:"-"`
13998	// Value - The subnets in a virtual network.
13999	Value *[]Subnet `json:"value,omitempty"`
14000	// NextLink - The URL to get the next set of results.
14001	NextLink *string `json:"nextLink,omitempty"`
14002}
14003
14004// SubnetListResultIterator provides access to a complete listing of Subnet values.
14005type SubnetListResultIterator struct {
14006	i    int
14007	page SubnetListResultPage
14008}
14009
14010// NextWithContext advances to the next value.  If there was an error making
14011// the request the iterator does not advance and the error is returned.
14012func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
14013	if tracing.IsEnabled() {
14014		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
14015		defer func() {
14016			sc := -1
14017			if iter.Response().Response.Response != nil {
14018				sc = iter.Response().Response.Response.StatusCode
14019			}
14020			tracing.EndSpan(ctx, sc, err)
14021		}()
14022	}
14023	iter.i++
14024	if iter.i < len(iter.page.Values()) {
14025		return nil
14026	}
14027	err = iter.page.NextWithContext(ctx)
14028	if err != nil {
14029		iter.i--
14030		return err
14031	}
14032	iter.i = 0
14033	return nil
14034}
14035
14036// Next advances to the next value.  If there was an error making
14037// the request the iterator does not advance and the error is returned.
14038// Deprecated: Use NextWithContext() instead.
14039func (iter *SubnetListResultIterator) Next() error {
14040	return iter.NextWithContext(context.Background())
14041}
14042
14043// NotDone returns true if the enumeration should be started or is not yet complete.
14044func (iter SubnetListResultIterator) NotDone() bool {
14045	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14046}
14047
14048// Response returns the raw server response from the last page request.
14049func (iter SubnetListResultIterator) Response() SubnetListResult {
14050	return iter.page.Response()
14051}
14052
14053// Value returns the current value or a zero-initialized value if the
14054// iterator has advanced beyond the end of the collection.
14055func (iter SubnetListResultIterator) Value() Subnet {
14056	if !iter.page.NotDone() {
14057		return Subnet{}
14058	}
14059	return iter.page.Values()[iter.i]
14060}
14061
14062// Creates a new instance of the SubnetListResultIterator type.
14063func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
14064	return SubnetListResultIterator{page: page}
14065}
14066
14067// IsEmpty returns true if the ListResult contains no values.
14068func (slr SubnetListResult) IsEmpty() bool {
14069	return slr.Value == nil || len(*slr.Value) == 0
14070}
14071
14072// hasNextLink returns true if the NextLink is not empty.
14073func (slr SubnetListResult) hasNextLink() bool {
14074	return slr.NextLink != nil && len(*slr.NextLink) != 0
14075}
14076
14077// subnetListResultPreparer prepares a request to retrieve the next set of results.
14078// It returns nil if no more results exist.
14079func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
14080	if !slr.hasNextLink() {
14081		return nil, nil
14082	}
14083	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14084		autorest.AsJSON(),
14085		autorest.AsGet(),
14086		autorest.WithBaseURL(to.String(slr.NextLink)))
14087}
14088
14089// SubnetListResultPage contains a page of Subnet values.
14090type SubnetListResultPage struct {
14091	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
14092	slr SubnetListResult
14093}
14094
14095// NextWithContext advances to the next page of values.  If there was an error making
14096// the request the page does not advance and the error is returned.
14097func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
14098	if tracing.IsEnabled() {
14099		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
14100		defer func() {
14101			sc := -1
14102			if page.Response().Response.Response != nil {
14103				sc = page.Response().Response.Response.StatusCode
14104			}
14105			tracing.EndSpan(ctx, sc, err)
14106		}()
14107	}
14108	for {
14109		next, err := page.fn(ctx, page.slr)
14110		if err != nil {
14111			return err
14112		}
14113		page.slr = next
14114		if !next.hasNextLink() || !next.IsEmpty() {
14115			break
14116		}
14117	}
14118	return nil
14119}
14120
14121// Next advances to the next page of values.  If there was an error making
14122// the request the page does not advance and the error is returned.
14123// Deprecated: Use NextWithContext() instead.
14124func (page *SubnetListResultPage) Next() error {
14125	return page.NextWithContext(context.Background())
14126}
14127
14128// NotDone returns true if the page enumeration should be started or is not yet complete.
14129func (page SubnetListResultPage) NotDone() bool {
14130	return !page.slr.IsEmpty()
14131}
14132
14133// Response returns the raw server response from the last page request.
14134func (page SubnetListResultPage) Response() SubnetListResult {
14135	return page.slr
14136}
14137
14138// Values returns the slice of values for the current page or nil if there are no values.
14139func (page SubnetListResultPage) Values() []Subnet {
14140	if page.slr.IsEmpty() {
14141		return nil
14142	}
14143	return *page.slr.Value
14144}
14145
14146// Creates a new instance of the SubnetListResultPage type.
14147func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
14148	return SubnetListResultPage{
14149		fn:  getNextPage,
14150		slr: cur,
14151	}
14152}
14153
14154// SubnetPropertiesFormat properties of the subnet.
14155type SubnetPropertiesFormat struct {
14156	// AddressPrefix - The address prefix for the subnet.
14157	AddressPrefix *string `json:"addressPrefix,omitempty"`
14158	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14159	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14160	// RouteTable - The reference of the RouteTable resource.
14161	RouteTable *RouteTable `json:"routeTable,omitempty"`
14162	// ServiceEndpoints - An array of service endpoints.
14163	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
14164	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
14165	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
14166	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
14167	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
14168	// ProvisioningState - The provisioning state of the resource.
14169	ProvisioningState *string `json:"provisioningState,omitempty"`
14170}
14171
14172// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
14173func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
14174	objectMap := make(map[string]interface{})
14175	if spf.AddressPrefix != nil {
14176		objectMap["addressPrefix"] = spf.AddressPrefix
14177	}
14178	if spf.NetworkSecurityGroup != nil {
14179		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
14180	}
14181	if spf.RouteTable != nil {
14182		objectMap["routeTable"] = spf.RouteTable
14183	}
14184	if spf.ServiceEndpoints != nil {
14185		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
14186	}
14187	if spf.ResourceNavigationLinks != nil {
14188		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
14189	}
14190	if spf.ProvisioningState != nil {
14191		objectMap["provisioningState"] = spf.ProvisioningState
14192	}
14193	return json.Marshal(objectMap)
14194}
14195
14196// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14197// operation.
14198type SubnetsCreateOrUpdateFuture struct {
14199	azure.FutureAPI
14200	// Result returns the result of the asynchronous operation.
14201	// If the operation has not completed it will return an error.
14202	Result func(SubnetsClient) (Subnet, error)
14203}
14204
14205// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14206func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14207	var azFuture azure.Future
14208	if err := json.Unmarshal(body, &azFuture); err != nil {
14209		return err
14210	}
14211	future.FutureAPI = &azFuture
14212	future.Result = future.result
14213	return nil
14214}
14215
14216// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
14217func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
14218	var done bool
14219	done, err = future.DoneWithContext(context.Background(), client)
14220	if err != nil {
14221		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14222		return
14223	}
14224	if !done {
14225		s.Response.Response = future.Response()
14226		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
14227		return
14228	}
14229	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14230	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14231		s, err = client.CreateOrUpdateResponder(s.Response.Response)
14232		if err != nil {
14233			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
14234		}
14235	}
14236	return
14237}
14238
14239// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14240// operation.
14241type SubnetsDeleteFuture struct {
14242	azure.FutureAPI
14243	// Result returns the result of the asynchronous operation.
14244	// If the operation has not completed it will return an error.
14245	Result func(SubnetsClient) (autorest.Response, error)
14246}
14247
14248// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14249func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
14250	var azFuture azure.Future
14251	if err := json.Unmarshal(body, &azFuture); err != nil {
14252		return err
14253	}
14254	future.FutureAPI = &azFuture
14255	future.Result = future.result
14256	return nil
14257}
14258
14259// result is the default implementation for SubnetsDeleteFuture.Result.
14260func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
14261	var done bool
14262	done, err = future.DoneWithContext(context.Background(), client)
14263	if err != nil {
14264		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
14265		return
14266	}
14267	if !done {
14268		ar.Response = future.Response()
14269		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
14270		return
14271	}
14272	ar.Response = future.Response()
14273	return
14274}
14275
14276// SubResource reference to another subresource.
14277type SubResource struct {
14278	// ID - Resource ID.
14279	ID *string `json:"id,omitempty"`
14280}
14281
14282// TagsObject tags object for patch operations.
14283type TagsObject struct {
14284	// Tags - Resource tags.
14285	Tags map[string]*string `json:"tags"`
14286}
14287
14288// MarshalJSON is the custom marshaler for TagsObject.
14289func (toVar TagsObject) MarshalJSON() ([]byte, error) {
14290	objectMap := make(map[string]interface{})
14291	if toVar.Tags != nil {
14292		objectMap["tags"] = toVar.Tags
14293	}
14294	return json.Marshal(objectMap)
14295}
14296
14297// Topology topology of the specified resource group.
14298type Topology struct {
14299	autorest.Response `json:"-"`
14300	// ID - READ-ONLY; GUID representing the operation id.
14301	ID *string `json:"id,omitempty"`
14302	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
14303	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
14304	// LastModified - READ-ONLY; The datetime when the topology was last modified.
14305	LastModified *date.Time          `json:"lastModified,omitempty"`
14306	Resources    *[]TopologyResource `json:"resources,omitempty"`
14307}
14308
14309// MarshalJSON is the custom marshaler for Topology.
14310func (t Topology) MarshalJSON() ([]byte, error) {
14311	objectMap := make(map[string]interface{})
14312	if t.Resources != nil {
14313		objectMap["resources"] = t.Resources
14314	}
14315	return json.Marshal(objectMap)
14316}
14317
14318// TopologyAssociation resources that have an association with the parent resource.
14319type TopologyAssociation struct {
14320	// Name - The name of the resource that is associated with the parent resource.
14321	Name *string `json:"name,omitempty"`
14322	// ResourceID - The ID of the resource that is associated with the parent resource.
14323	ResourceID *string `json:"resourceId,omitempty"`
14324	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
14325	AssociationType AssociationType `json:"associationType,omitempty"`
14326}
14327
14328// TopologyParameters parameters that define the representation of topology.
14329type TopologyParameters struct {
14330	// TargetResourceGroupName - The name of the target resource group to perform topology on.
14331	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
14332	// TargetVirtualNetwork - The reference of the Virtual Network resource.
14333	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
14334	// TargetSubnet - The reference of the Subnet resource.
14335	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
14336}
14337
14338// TopologyResource the network resource topology information for the given resource group.
14339type TopologyResource struct {
14340	// Name - Name of the resource.
14341	Name *string `json:"name,omitempty"`
14342	// ID - ID of the resource.
14343	ID *string `json:"id,omitempty"`
14344	// Location - Resource location.
14345	Location *string `json:"location,omitempty"`
14346	// Associations - Holds the associations the resource has with other resources in the resource group.
14347	Associations *[]TopologyAssociation `json:"associations,omitempty"`
14348}
14349
14350// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
14351type TrafficAnalyticsConfigurationProperties struct {
14352	// Enabled - Flag to enable/disable traffic analytics.
14353	Enabled *bool `json:"enabled,omitempty"`
14354	// WorkspaceID - The resource guid of the attached workspace
14355	WorkspaceID *string `json:"workspaceId,omitempty"`
14356	// WorkspaceRegion - The location of the attached workspace
14357	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
14358	// WorkspaceResourceID - Resource Id of the attached workspace
14359	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
14360}
14361
14362// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
14363type TrafficAnalyticsProperties struct {
14364	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
14365}
14366
14367// TroubleshootingDetails information gained from troubleshooting of specified resource.
14368type TroubleshootingDetails struct {
14369	// ID - The id of the get troubleshoot operation.
14370	ID *string `json:"id,omitempty"`
14371	// ReasonType - Reason type of failure.
14372	ReasonType *string `json:"reasonType,omitempty"`
14373	// Summary - A summary of troubleshooting.
14374	Summary *string `json:"summary,omitempty"`
14375	// Detail - Details on troubleshooting results.
14376	Detail *string `json:"detail,omitempty"`
14377	// RecommendedActions - List of recommended actions.
14378	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
14379}
14380
14381// TroubleshootingParameters parameters that define the resource to troubleshoot.
14382type TroubleshootingParameters struct {
14383	// TargetResourceID - The target resource to troubleshoot.
14384	TargetResourceID           *string `json:"targetResourceId,omitempty"`
14385	*TroubleshootingProperties `json:"properties,omitempty"`
14386}
14387
14388// MarshalJSON is the custom marshaler for TroubleshootingParameters.
14389func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
14390	objectMap := make(map[string]interface{})
14391	if tp.TargetResourceID != nil {
14392		objectMap["targetResourceId"] = tp.TargetResourceID
14393	}
14394	if tp.TroubleshootingProperties != nil {
14395		objectMap["properties"] = tp.TroubleshootingProperties
14396	}
14397	return json.Marshal(objectMap)
14398}
14399
14400// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
14401func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
14402	var m map[string]*json.RawMessage
14403	err := json.Unmarshal(body, &m)
14404	if err != nil {
14405		return err
14406	}
14407	for k, v := range m {
14408		switch k {
14409		case "targetResourceId":
14410			if v != nil {
14411				var targetResourceID string
14412				err = json.Unmarshal(*v, &targetResourceID)
14413				if err != nil {
14414					return err
14415				}
14416				tp.TargetResourceID = &targetResourceID
14417			}
14418		case "properties":
14419			if v != nil {
14420				var troubleshootingProperties TroubleshootingProperties
14421				err = json.Unmarshal(*v, &troubleshootingProperties)
14422				if err != nil {
14423					return err
14424				}
14425				tp.TroubleshootingProperties = &troubleshootingProperties
14426			}
14427		}
14428	}
14429
14430	return nil
14431}
14432
14433// TroubleshootingProperties storage location provided for troubleshoot.
14434type TroubleshootingProperties struct {
14435	// StorageID - The ID for the storage account to save the troubleshoot result.
14436	StorageID *string `json:"storageId,omitempty"`
14437	// StoragePath - The path to the blob to save the troubleshoot result in.
14438	StoragePath *string `json:"storagePath,omitempty"`
14439}
14440
14441// TroubleshootingRecommendedActions recommended actions based on discovered issues.
14442type TroubleshootingRecommendedActions struct {
14443	// ActionID - ID of the recommended action.
14444	ActionID *string `json:"actionId,omitempty"`
14445	// ActionText - Description of recommended actions.
14446	ActionText *string `json:"actionText,omitempty"`
14447	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
14448	ActionURI *string `json:"actionUri,omitempty"`
14449	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
14450	ActionURIText *string `json:"actionUriText,omitempty"`
14451}
14452
14453// TroubleshootingResult troubleshooting information gained from specified resource.
14454type TroubleshootingResult struct {
14455	autorest.Response `json:"-"`
14456	// StartTime - The start time of the troubleshooting.
14457	StartTime *date.Time `json:"startTime,omitempty"`
14458	// EndTime - The end time of the troubleshooting.
14459	EndTime *date.Time `json:"endTime,omitempty"`
14460	// Code - The result code of the troubleshooting.
14461	Code *string `json:"code,omitempty"`
14462	// Results - Information from troubleshooting.
14463	Results *[]TroubleshootingDetails `json:"results,omitempty"`
14464}
14465
14466// TunnelConnectionHealth virtualNetworkGatewayConnection properties
14467type TunnelConnectionHealth struct {
14468	// Tunnel - READ-ONLY; Tunnel name.
14469	Tunnel *string `json:"tunnel,omitempty"`
14470	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
14471	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
14472	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
14473	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
14474	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
14475	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
14476	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
14477	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
14478}
14479
14480// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
14481func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
14482	objectMap := make(map[string]interface{})
14483	return json.Marshal(objectMap)
14484}
14485
14486// Usage describes network resource usage.
14487type Usage struct {
14488	// ID - READ-ONLY; Resource identifier.
14489	ID *string `json:"id,omitempty"`
14490	// Unit - An enum describing the unit of measurement.
14491	Unit *string `json:"unit,omitempty"`
14492	// CurrentValue - The current value of the usage.
14493	CurrentValue *int64 `json:"currentValue,omitempty"`
14494	// Limit - The limit of usage.
14495	Limit *int64 `json:"limit,omitempty"`
14496	// Name - The name of the type of usage.
14497	Name *UsageName `json:"name,omitempty"`
14498}
14499
14500// MarshalJSON is the custom marshaler for Usage.
14501func (u Usage) MarshalJSON() ([]byte, error) {
14502	objectMap := make(map[string]interface{})
14503	if u.Unit != nil {
14504		objectMap["unit"] = u.Unit
14505	}
14506	if u.CurrentValue != nil {
14507		objectMap["currentValue"] = u.CurrentValue
14508	}
14509	if u.Limit != nil {
14510		objectMap["limit"] = u.Limit
14511	}
14512	if u.Name != nil {
14513		objectMap["name"] = u.Name
14514	}
14515	return json.Marshal(objectMap)
14516}
14517
14518// UsageName the usage names.
14519type UsageName struct {
14520	// Value - A string describing the resource name.
14521	Value *string `json:"value,omitempty"`
14522	// LocalizedValue - A localized string describing the resource name.
14523	LocalizedValue *string `json:"localizedValue,omitempty"`
14524}
14525
14526// UsagesListResult the list usages operation response.
14527type UsagesListResult struct {
14528	autorest.Response `json:"-"`
14529	// Value - The list network resource usages.
14530	Value *[]Usage `json:"value,omitempty"`
14531	// NextLink - URL to get the next set of results.
14532	NextLink *string `json:"nextLink,omitempty"`
14533}
14534
14535// UsagesListResultIterator provides access to a complete listing of Usage values.
14536type UsagesListResultIterator struct {
14537	i    int
14538	page UsagesListResultPage
14539}
14540
14541// NextWithContext advances to the next value.  If there was an error making
14542// the request the iterator does not advance and the error is returned.
14543func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
14544	if tracing.IsEnabled() {
14545		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
14546		defer func() {
14547			sc := -1
14548			if iter.Response().Response.Response != nil {
14549				sc = iter.Response().Response.Response.StatusCode
14550			}
14551			tracing.EndSpan(ctx, sc, err)
14552		}()
14553	}
14554	iter.i++
14555	if iter.i < len(iter.page.Values()) {
14556		return nil
14557	}
14558	err = iter.page.NextWithContext(ctx)
14559	if err != nil {
14560		iter.i--
14561		return err
14562	}
14563	iter.i = 0
14564	return nil
14565}
14566
14567// Next advances to the next value.  If there was an error making
14568// the request the iterator does not advance and the error is returned.
14569// Deprecated: Use NextWithContext() instead.
14570func (iter *UsagesListResultIterator) Next() error {
14571	return iter.NextWithContext(context.Background())
14572}
14573
14574// NotDone returns true if the enumeration should be started or is not yet complete.
14575func (iter UsagesListResultIterator) NotDone() bool {
14576	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14577}
14578
14579// Response returns the raw server response from the last page request.
14580func (iter UsagesListResultIterator) Response() UsagesListResult {
14581	return iter.page.Response()
14582}
14583
14584// Value returns the current value or a zero-initialized value if the
14585// iterator has advanced beyond the end of the collection.
14586func (iter UsagesListResultIterator) Value() Usage {
14587	if !iter.page.NotDone() {
14588		return Usage{}
14589	}
14590	return iter.page.Values()[iter.i]
14591}
14592
14593// Creates a new instance of the UsagesListResultIterator type.
14594func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
14595	return UsagesListResultIterator{page: page}
14596}
14597
14598// IsEmpty returns true if the ListResult contains no values.
14599func (ulr UsagesListResult) IsEmpty() bool {
14600	return ulr.Value == nil || len(*ulr.Value) == 0
14601}
14602
14603// hasNextLink returns true if the NextLink is not empty.
14604func (ulr UsagesListResult) hasNextLink() bool {
14605	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
14606}
14607
14608// usagesListResultPreparer prepares a request to retrieve the next set of results.
14609// It returns nil if no more results exist.
14610func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
14611	if !ulr.hasNextLink() {
14612		return nil, nil
14613	}
14614	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14615		autorest.AsJSON(),
14616		autorest.AsGet(),
14617		autorest.WithBaseURL(to.String(ulr.NextLink)))
14618}
14619
14620// UsagesListResultPage contains a page of Usage values.
14621type UsagesListResultPage struct {
14622	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
14623	ulr UsagesListResult
14624}
14625
14626// NextWithContext advances to the next page of values.  If there was an error making
14627// the request the page does not advance and the error is returned.
14628func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
14629	if tracing.IsEnabled() {
14630		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
14631		defer func() {
14632			sc := -1
14633			if page.Response().Response.Response != nil {
14634				sc = page.Response().Response.Response.StatusCode
14635			}
14636			tracing.EndSpan(ctx, sc, err)
14637		}()
14638	}
14639	for {
14640		next, err := page.fn(ctx, page.ulr)
14641		if err != nil {
14642			return err
14643		}
14644		page.ulr = next
14645		if !next.hasNextLink() || !next.IsEmpty() {
14646			break
14647		}
14648	}
14649	return nil
14650}
14651
14652// Next advances to the next page of values.  If there was an error making
14653// the request the page does not advance and the error is returned.
14654// Deprecated: Use NextWithContext() instead.
14655func (page *UsagesListResultPage) Next() error {
14656	return page.NextWithContext(context.Background())
14657}
14658
14659// NotDone returns true if the page enumeration should be started or is not yet complete.
14660func (page UsagesListResultPage) NotDone() bool {
14661	return !page.ulr.IsEmpty()
14662}
14663
14664// Response returns the raw server response from the last page request.
14665func (page UsagesListResultPage) Response() UsagesListResult {
14666	return page.ulr
14667}
14668
14669// Values returns the slice of values for the current page or nil if there are no values.
14670func (page UsagesListResultPage) Values() []Usage {
14671	if page.ulr.IsEmpty() {
14672		return nil
14673	}
14674	return *page.ulr.Value
14675}
14676
14677// Creates a new instance of the UsagesListResultPage type.
14678func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
14679	return UsagesListResultPage{
14680		fn:  getNextPage,
14681		ulr: cur,
14682	}
14683}
14684
14685// VerificationIPFlowParameters parameters that define the IP flow to be verified.
14686type VerificationIPFlowParameters struct {
14687	// TargetResourceID - The ID of the target resource to perform next-hop on.
14688	TargetResourceID *string `json:"targetResourceId,omitempty"`
14689	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
14690	Direction Direction `json:"direction,omitempty"`
14691	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
14692	Protocol Protocol `json:"protocol,omitempty"`
14693	// 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.
14694	LocalPort *string `json:"localPort,omitempty"`
14695	// 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.
14696	RemotePort *string `json:"remotePort,omitempty"`
14697	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
14698	LocalIPAddress *string `json:"localIPAddress,omitempty"`
14699	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
14700	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
14701	// 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).
14702	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
14703}
14704
14705// VerificationIPFlowResult results of IP flow verification on the target resource.
14706type VerificationIPFlowResult struct {
14707	autorest.Response `json:"-"`
14708	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
14709	Access Access `json:"access,omitempty"`
14710	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
14711	RuleName *string `json:"ruleName,omitempty"`
14712}
14713
14714// VirtualNetwork virtual Network resource.
14715type VirtualNetwork struct {
14716	autorest.Response `json:"-"`
14717	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
14718	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
14719	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14720	Etag *string `json:"etag,omitempty"`
14721	// ID - Resource ID.
14722	ID *string `json:"id,omitempty"`
14723	// Name - READ-ONLY; Resource name.
14724	Name *string `json:"name,omitempty"`
14725	// Type - READ-ONLY; Resource type.
14726	Type *string `json:"type,omitempty"`
14727	// Location - Resource location.
14728	Location *string `json:"location,omitempty"`
14729	// Tags - Resource tags.
14730	Tags map[string]*string `json:"tags"`
14731}
14732
14733// MarshalJSON is the custom marshaler for VirtualNetwork.
14734func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
14735	objectMap := make(map[string]interface{})
14736	if vn.VirtualNetworkPropertiesFormat != nil {
14737		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
14738	}
14739	if vn.Etag != nil {
14740		objectMap["etag"] = vn.Etag
14741	}
14742	if vn.ID != nil {
14743		objectMap["id"] = vn.ID
14744	}
14745	if vn.Location != nil {
14746		objectMap["location"] = vn.Location
14747	}
14748	if vn.Tags != nil {
14749		objectMap["tags"] = vn.Tags
14750	}
14751	return json.Marshal(objectMap)
14752}
14753
14754// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
14755func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
14756	var m map[string]*json.RawMessage
14757	err := json.Unmarshal(body, &m)
14758	if err != nil {
14759		return err
14760	}
14761	for k, v := range m {
14762		switch k {
14763		case "properties":
14764			if v != nil {
14765				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
14766				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
14767				if err != nil {
14768					return err
14769				}
14770				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
14771			}
14772		case "etag":
14773			if v != nil {
14774				var etag string
14775				err = json.Unmarshal(*v, &etag)
14776				if err != nil {
14777					return err
14778				}
14779				vn.Etag = &etag
14780			}
14781		case "id":
14782			if v != nil {
14783				var ID string
14784				err = json.Unmarshal(*v, &ID)
14785				if err != nil {
14786					return err
14787				}
14788				vn.ID = &ID
14789			}
14790		case "name":
14791			if v != nil {
14792				var name string
14793				err = json.Unmarshal(*v, &name)
14794				if err != nil {
14795					return err
14796				}
14797				vn.Name = &name
14798			}
14799		case "type":
14800			if v != nil {
14801				var typeVar string
14802				err = json.Unmarshal(*v, &typeVar)
14803				if err != nil {
14804					return err
14805				}
14806				vn.Type = &typeVar
14807			}
14808		case "location":
14809			if v != nil {
14810				var location string
14811				err = json.Unmarshal(*v, &location)
14812				if err != nil {
14813					return err
14814				}
14815				vn.Location = &location
14816			}
14817		case "tags":
14818			if v != nil {
14819				var tags map[string]*string
14820				err = json.Unmarshal(*v, &tags)
14821				if err != nil {
14822					return err
14823				}
14824				vn.Tags = tags
14825			}
14826		}
14827	}
14828
14829	return nil
14830}
14831
14832// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
14833// resource.
14834type VirtualNetworkConnectionGatewayReference struct {
14835	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
14836	ID *string `json:"id,omitempty"`
14837}
14838
14839// VirtualNetworkGateway a common class for general resource information
14840type VirtualNetworkGateway struct {
14841	autorest.Response `json:"-"`
14842	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
14843	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
14844	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14845	Etag *string `json:"etag,omitempty"`
14846	// ID - Resource ID.
14847	ID *string `json:"id,omitempty"`
14848	// Name - READ-ONLY; Resource name.
14849	Name *string `json:"name,omitempty"`
14850	// Type - READ-ONLY; Resource type.
14851	Type *string `json:"type,omitempty"`
14852	// Location - Resource location.
14853	Location *string `json:"location,omitempty"`
14854	// Tags - Resource tags.
14855	Tags map[string]*string `json:"tags"`
14856}
14857
14858// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
14859func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
14860	objectMap := make(map[string]interface{})
14861	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
14862		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
14863	}
14864	if vng.Etag != nil {
14865		objectMap["etag"] = vng.Etag
14866	}
14867	if vng.ID != nil {
14868		objectMap["id"] = vng.ID
14869	}
14870	if vng.Location != nil {
14871		objectMap["location"] = vng.Location
14872	}
14873	if vng.Tags != nil {
14874		objectMap["tags"] = vng.Tags
14875	}
14876	return json.Marshal(objectMap)
14877}
14878
14879// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
14880func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
14881	var m map[string]*json.RawMessage
14882	err := json.Unmarshal(body, &m)
14883	if err != nil {
14884		return err
14885	}
14886	for k, v := range m {
14887		switch k {
14888		case "properties":
14889			if v != nil {
14890				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
14891				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
14892				if err != nil {
14893					return err
14894				}
14895				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
14896			}
14897		case "etag":
14898			if v != nil {
14899				var etag string
14900				err = json.Unmarshal(*v, &etag)
14901				if err != nil {
14902					return err
14903				}
14904				vng.Etag = &etag
14905			}
14906		case "id":
14907			if v != nil {
14908				var ID string
14909				err = json.Unmarshal(*v, &ID)
14910				if err != nil {
14911					return err
14912				}
14913				vng.ID = &ID
14914			}
14915		case "name":
14916			if v != nil {
14917				var name string
14918				err = json.Unmarshal(*v, &name)
14919				if err != nil {
14920					return err
14921				}
14922				vng.Name = &name
14923			}
14924		case "type":
14925			if v != nil {
14926				var typeVar string
14927				err = json.Unmarshal(*v, &typeVar)
14928				if err != nil {
14929					return err
14930				}
14931				vng.Type = &typeVar
14932			}
14933		case "location":
14934			if v != nil {
14935				var location string
14936				err = json.Unmarshal(*v, &location)
14937				if err != nil {
14938					return err
14939				}
14940				vng.Location = &location
14941			}
14942		case "tags":
14943			if v != nil {
14944				var tags map[string]*string
14945				err = json.Unmarshal(*v, &tags)
14946				if err != nil {
14947					return err
14948				}
14949				vng.Tags = tags
14950			}
14951		}
14952	}
14953
14954	return nil
14955}
14956
14957// VirtualNetworkGatewayConnection a common class for general resource information
14958type VirtualNetworkGatewayConnection struct {
14959	autorest.Response `json:"-"`
14960	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
14961	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
14962	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14963	Etag *string `json:"etag,omitempty"`
14964	// ID - Resource ID.
14965	ID *string `json:"id,omitempty"`
14966	// Name - READ-ONLY; Resource name.
14967	Name *string `json:"name,omitempty"`
14968	// Type - READ-ONLY; Resource type.
14969	Type *string `json:"type,omitempty"`
14970	// Location - Resource location.
14971	Location *string `json:"location,omitempty"`
14972	// Tags - Resource tags.
14973	Tags map[string]*string `json:"tags"`
14974}
14975
14976// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
14977func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
14978	objectMap := make(map[string]interface{})
14979	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
14980		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
14981	}
14982	if vngc.Etag != nil {
14983		objectMap["etag"] = vngc.Etag
14984	}
14985	if vngc.ID != nil {
14986		objectMap["id"] = vngc.ID
14987	}
14988	if vngc.Location != nil {
14989		objectMap["location"] = vngc.Location
14990	}
14991	if vngc.Tags != nil {
14992		objectMap["tags"] = vngc.Tags
14993	}
14994	return json.Marshal(objectMap)
14995}
14996
14997// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
14998func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
14999	var m map[string]*json.RawMessage
15000	err := json.Unmarshal(body, &m)
15001	if err != nil {
15002		return err
15003	}
15004	for k, v := range m {
15005		switch k {
15006		case "properties":
15007			if v != nil {
15008				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
15009				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
15010				if err != nil {
15011					return err
15012				}
15013				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
15014			}
15015		case "etag":
15016			if v != nil {
15017				var etag string
15018				err = json.Unmarshal(*v, &etag)
15019				if err != nil {
15020					return err
15021				}
15022				vngc.Etag = &etag
15023			}
15024		case "id":
15025			if v != nil {
15026				var ID string
15027				err = json.Unmarshal(*v, &ID)
15028				if err != nil {
15029					return err
15030				}
15031				vngc.ID = &ID
15032			}
15033		case "name":
15034			if v != nil {
15035				var name string
15036				err = json.Unmarshal(*v, &name)
15037				if err != nil {
15038					return err
15039				}
15040				vngc.Name = &name
15041			}
15042		case "type":
15043			if v != nil {
15044				var typeVar string
15045				err = json.Unmarshal(*v, &typeVar)
15046				if err != nil {
15047					return err
15048				}
15049				vngc.Type = &typeVar
15050			}
15051		case "location":
15052			if v != nil {
15053				var location string
15054				err = json.Unmarshal(*v, &location)
15055				if err != nil {
15056					return err
15057				}
15058				vngc.Location = &location
15059			}
15060		case "tags":
15061			if v != nil {
15062				var tags map[string]*string
15063				err = json.Unmarshal(*v, &tags)
15064				if err != nil {
15065					return err
15066				}
15067				vngc.Tags = tags
15068			}
15069		}
15070	}
15071
15072	return nil
15073}
15074
15075// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
15076type VirtualNetworkGatewayConnectionListEntity struct {
15077	autorest.Response `json:"-"`
15078	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
15079	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
15080	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15081	Etag *string `json:"etag,omitempty"`
15082	// ID - Resource ID.
15083	ID *string `json:"id,omitempty"`
15084	// Name - READ-ONLY; Resource name.
15085	Name *string `json:"name,omitempty"`
15086	// Type - READ-ONLY; Resource type.
15087	Type *string `json:"type,omitempty"`
15088	// Location - Resource location.
15089	Location *string `json:"location,omitempty"`
15090	// Tags - Resource tags.
15091	Tags map[string]*string `json:"tags"`
15092}
15093
15094// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
15095func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
15096	objectMap := make(map[string]interface{})
15097	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
15098		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15099	}
15100	if vngcle.Etag != nil {
15101		objectMap["etag"] = vngcle.Etag
15102	}
15103	if vngcle.ID != nil {
15104		objectMap["id"] = vngcle.ID
15105	}
15106	if vngcle.Location != nil {
15107		objectMap["location"] = vngcle.Location
15108	}
15109	if vngcle.Tags != nil {
15110		objectMap["tags"] = vngcle.Tags
15111	}
15112	return json.Marshal(objectMap)
15113}
15114
15115// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
15116func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
15117	var m map[string]*json.RawMessage
15118	err := json.Unmarshal(body, &m)
15119	if err != nil {
15120		return err
15121	}
15122	for k, v := range m {
15123		switch k {
15124		case "properties":
15125			if v != nil {
15126				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15127				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
15128				if err != nil {
15129					return err
15130				}
15131				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
15132			}
15133		case "etag":
15134			if v != nil {
15135				var etag string
15136				err = json.Unmarshal(*v, &etag)
15137				if err != nil {
15138					return err
15139				}
15140				vngcle.Etag = &etag
15141			}
15142		case "id":
15143			if v != nil {
15144				var ID string
15145				err = json.Unmarshal(*v, &ID)
15146				if err != nil {
15147					return err
15148				}
15149				vngcle.ID = &ID
15150			}
15151		case "name":
15152			if v != nil {
15153				var name string
15154				err = json.Unmarshal(*v, &name)
15155				if err != nil {
15156					return err
15157				}
15158				vngcle.Name = &name
15159			}
15160		case "type":
15161			if v != nil {
15162				var typeVar string
15163				err = json.Unmarshal(*v, &typeVar)
15164				if err != nil {
15165					return err
15166				}
15167				vngcle.Type = &typeVar
15168			}
15169		case "location":
15170			if v != nil {
15171				var location string
15172				err = json.Unmarshal(*v, &location)
15173				if err != nil {
15174					return err
15175				}
15176				vngcle.Location = &location
15177			}
15178		case "tags":
15179			if v != nil {
15180				var tags map[string]*string
15181				err = json.Unmarshal(*v, &tags)
15182				if err != nil {
15183					return err
15184				}
15185				vngcle.Tags = tags
15186			}
15187		}
15188	}
15189
15190	return nil
15191}
15192
15193// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
15194type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
15195	// AuthorizationKey - The authorizationKey.
15196	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15197	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15198	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
15199	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15200	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
15201	// LocalNetworkGateway2 - The reference to local network gateway resource.
15202	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
15203	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15204	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15205	// RoutingWeight - The routing weight.
15206	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15207	// SharedKey - The IPSec shared key.
15208	SharedKey *string `json:"sharedKey,omitempty"`
15209	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15210	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15211	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15212	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15213	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15214	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15215	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15216	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15217	// Peer - The reference to peerings resource.
15218	Peer *SubResource `json:"peer,omitempty"`
15219	// EnableBgp - EnableBgp flag
15220	EnableBgp *bool `json:"enableBgp,omitempty"`
15221	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15222	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15223	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15224	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15225	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15226	ResourceGUID *string `json:"resourceGuid,omitempty"`
15227	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15228	ProvisioningState *string `json:"provisioningState,omitempty"`
15229}
15230
15231// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
15232func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
15233	objectMap := make(map[string]interface{})
15234	if vngclepf.AuthorizationKey != nil {
15235		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
15236	}
15237	if vngclepf.VirtualNetworkGateway1 != nil {
15238		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
15239	}
15240	if vngclepf.VirtualNetworkGateway2 != nil {
15241		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
15242	}
15243	if vngclepf.LocalNetworkGateway2 != nil {
15244		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
15245	}
15246	if vngclepf.ConnectionType != "" {
15247		objectMap["connectionType"] = vngclepf.ConnectionType
15248	}
15249	if vngclepf.RoutingWeight != nil {
15250		objectMap["routingWeight"] = vngclepf.RoutingWeight
15251	}
15252	if vngclepf.SharedKey != nil {
15253		objectMap["sharedKey"] = vngclepf.SharedKey
15254	}
15255	if vngclepf.Peer != nil {
15256		objectMap["peer"] = vngclepf.Peer
15257	}
15258	if vngclepf.EnableBgp != nil {
15259		objectMap["enableBgp"] = vngclepf.EnableBgp
15260	}
15261	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
15262		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
15263	}
15264	if vngclepf.IpsecPolicies != nil {
15265		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
15266	}
15267	if vngclepf.ResourceGUID != nil {
15268		objectMap["resourceGuid"] = vngclepf.ResourceGUID
15269	}
15270	return json.Marshal(objectMap)
15271}
15272
15273// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
15274// service call
15275type VirtualNetworkGatewayConnectionListResult struct {
15276	autorest.Response `json:"-"`
15277	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15278	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
15279	// NextLink - READ-ONLY; The URL to get the next set of results.
15280	NextLink *string `json:"nextLink,omitempty"`
15281}
15282
15283// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
15284func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
15285	objectMap := make(map[string]interface{})
15286	if vngclr.Value != nil {
15287		objectMap["value"] = vngclr.Value
15288	}
15289	return json.Marshal(objectMap)
15290}
15291
15292// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
15293// VirtualNetworkGatewayConnection values.
15294type VirtualNetworkGatewayConnectionListResultIterator struct {
15295	i    int
15296	page VirtualNetworkGatewayConnectionListResultPage
15297}
15298
15299// NextWithContext advances to the next value.  If there was an error making
15300// the request the iterator does not advance and the error is returned.
15301func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
15302	if tracing.IsEnabled() {
15303		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
15304		defer func() {
15305			sc := -1
15306			if iter.Response().Response.Response != nil {
15307				sc = iter.Response().Response.Response.StatusCode
15308			}
15309			tracing.EndSpan(ctx, sc, err)
15310		}()
15311	}
15312	iter.i++
15313	if iter.i < len(iter.page.Values()) {
15314		return nil
15315	}
15316	err = iter.page.NextWithContext(ctx)
15317	if err != nil {
15318		iter.i--
15319		return err
15320	}
15321	iter.i = 0
15322	return nil
15323}
15324
15325// Next advances to the next value.  If there was an error making
15326// the request the iterator does not advance and the error is returned.
15327// Deprecated: Use NextWithContext() instead.
15328func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
15329	return iter.NextWithContext(context.Background())
15330}
15331
15332// NotDone returns true if the enumeration should be started or is not yet complete.
15333func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
15334	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15335}
15336
15337// Response returns the raw server response from the last page request.
15338func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
15339	return iter.page.Response()
15340}
15341
15342// Value returns the current value or a zero-initialized value if the
15343// iterator has advanced beyond the end of the collection.
15344func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
15345	if !iter.page.NotDone() {
15346		return VirtualNetworkGatewayConnection{}
15347	}
15348	return iter.page.Values()[iter.i]
15349}
15350
15351// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
15352func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
15353	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
15354}
15355
15356// IsEmpty returns true if the ListResult contains no values.
15357func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
15358	return vngclr.Value == nil || len(*vngclr.Value) == 0
15359}
15360
15361// hasNextLink returns true if the NextLink is not empty.
15362func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
15363	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
15364}
15365
15366// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
15367// It returns nil if no more results exist.
15368func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
15369	if !vngclr.hasNextLink() {
15370		return nil, nil
15371	}
15372	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15373		autorest.AsJSON(),
15374		autorest.AsGet(),
15375		autorest.WithBaseURL(to.String(vngclr.NextLink)))
15376}
15377
15378// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
15379type VirtualNetworkGatewayConnectionListResultPage struct {
15380	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
15381	vngclr VirtualNetworkGatewayConnectionListResult
15382}
15383
15384// NextWithContext advances to the next page of values.  If there was an error making
15385// the request the page does not advance and the error is returned.
15386func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
15387	if tracing.IsEnabled() {
15388		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
15389		defer func() {
15390			sc := -1
15391			if page.Response().Response.Response != nil {
15392				sc = page.Response().Response.Response.StatusCode
15393			}
15394			tracing.EndSpan(ctx, sc, err)
15395		}()
15396	}
15397	for {
15398		next, err := page.fn(ctx, page.vngclr)
15399		if err != nil {
15400			return err
15401		}
15402		page.vngclr = next
15403		if !next.hasNextLink() || !next.IsEmpty() {
15404			break
15405		}
15406	}
15407	return nil
15408}
15409
15410// Next advances to the next page of values.  If there was an error making
15411// the request the page does not advance and the error is returned.
15412// Deprecated: Use NextWithContext() instead.
15413func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
15414	return page.NextWithContext(context.Background())
15415}
15416
15417// NotDone returns true if the page enumeration should be started or is not yet complete.
15418func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
15419	return !page.vngclr.IsEmpty()
15420}
15421
15422// Response returns the raw server response from the last page request.
15423func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
15424	return page.vngclr
15425}
15426
15427// Values returns the slice of values for the current page or nil if there are no values.
15428func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
15429	if page.vngclr.IsEmpty() {
15430		return nil
15431	}
15432	return *page.vngclr.Value
15433}
15434
15435// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
15436func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
15437	return VirtualNetworkGatewayConnectionListResultPage{
15438		fn:     getNextPage,
15439		vngclr: cur,
15440	}
15441}
15442
15443// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
15444type VirtualNetworkGatewayConnectionPropertiesFormat struct {
15445	// AuthorizationKey - The authorizationKey.
15446	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15447	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15448	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
15449	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15450	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
15451	// LocalNetworkGateway2 - The reference to local network gateway resource.
15452	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
15453	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15454	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15455	// RoutingWeight - The routing weight.
15456	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15457	// SharedKey - The IPSec shared key.
15458	SharedKey *string `json:"sharedKey,omitempty"`
15459	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15460	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15461	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15462	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15463	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15464	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15465	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15466	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15467	// Peer - The reference to peerings resource.
15468	Peer *SubResource `json:"peer,omitempty"`
15469	// EnableBgp - EnableBgp flag
15470	EnableBgp *bool `json:"enableBgp,omitempty"`
15471	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15472	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15473	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15474	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15475	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15476	ResourceGUID *string `json:"resourceGuid,omitempty"`
15477	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15478	ProvisioningState *string `json:"provisioningState,omitempty"`
15479}
15480
15481// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
15482func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
15483	objectMap := make(map[string]interface{})
15484	if vngcpf.AuthorizationKey != nil {
15485		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
15486	}
15487	if vngcpf.VirtualNetworkGateway1 != nil {
15488		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
15489	}
15490	if vngcpf.VirtualNetworkGateway2 != nil {
15491		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
15492	}
15493	if vngcpf.LocalNetworkGateway2 != nil {
15494		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
15495	}
15496	if vngcpf.ConnectionType != "" {
15497		objectMap["connectionType"] = vngcpf.ConnectionType
15498	}
15499	if vngcpf.RoutingWeight != nil {
15500		objectMap["routingWeight"] = vngcpf.RoutingWeight
15501	}
15502	if vngcpf.SharedKey != nil {
15503		objectMap["sharedKey"] = vngcpf.SharedKey
15504	}
15505	if vngcpf.Peer != nil {
15506		objectMap["peer"] = vngcpf.Peer
15507	}
15508	if vngcpf.EnableBgp != nil {
15509		objectMap["enableBgp"] = vngcpf.EnableBgp
15510	}
15511	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
15512		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
15513	}
15514	if vngcpf.IpsecPolicies != nil {
15515		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
15516	}
15517	if vngcpf.ResourceGUID != nil {
15518		objectMap["resourceGuid"] = vngcpf.ResourceGUID
15519	}
15520	return json.Marshal(objectMap)
15521}
15522
15523// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15524// results of a long-running operation.
15525type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
15526	azure.FutureAPI
15527	// Result returns the result of the asynchronous operation.
15528	// If the operation has not completed it will return an error.
15529	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
15530}
15531
15532// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15533func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15534	var azFuture azure.Future
15535	if err := json.Unmarshal(body, &azFuture); err != nil {
15536		return err
15537	}
15538	future.FutureAPI = &azFuture
15539	future.Result = future.result
15540	return nil
15541}
15542
15543// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
15544func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
15545	var done bool
15546	done, err = future.DoneWithContext(context.Background(), client)
15547	if err != nil {
15548		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15549		return
15550	}
15551	if !done {
15552		vngc.Response.Response = future.Response()
15553		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
15554		return
15555	}
15556	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15557	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
15558		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
15559		if err != nil {
15560			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
15561		}
15562	}
15563	return
15564}
15565
15566// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
15567// a long-running operation.
15568type VirtualNetworkGatewayConnectionsDeleteFuture struct {
15569	azure.FutureAPI
15570	// Result returns the result of the asynchronous operation.
15571	// If the operation has not completed it will return an error.
15572	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
15573}
15574
15575// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15576func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
15577	var azFuture azure.Future
15578	if err := json.Unmarshal(body, &azFuture); err != nil {
15579		return err
15580	}
15581	future.FutureAPI = &azFuture
15582	future.Result = future.result
15583	return nil
15584}
15585
15586// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
15587func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
15588	var done bool
15589	done, err = future.DoneWithContext(context.Background(), client)
15590	if err != nil {
15591		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
15592		return
15593	}
15594	if !done {
15595		ar.Response = future.Response()
15596		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
15597		return
15598	}
15599	ar.Response = future.Response()
15600	return
15601}
15602
15603// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
15604// results of a long-running operation.
15605type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
15606	azure.FutureAPI
15607	// Result returns the result of the asynchronous operation.
15608	// If the operation has not completed it will return an error.
15609	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
15610}
15611
15612// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15613func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15614	var azFuture azure.Future
15615	if err := json.Unmarshal(body, &azFuture); err != nil {
15616		return err
15617	}
15618	future.FutureAPI = &azFuture
15619	future.Result = future.result
15620	return nil
15621}
15622
15623// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
15624func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
15625	var done bool
15626	done, err = future.DoneWithContext(context.Background(), client)
15627	if err != nil {
15628		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15629		return
15630	}
15631	if !done {
15632		crsk.Response.Response = future.Response()
15633		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
15634		return
15635	}
15636	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15637	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
15638		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
15639		if err != nil {
15640			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
15641		}
15642	}
15643	return
15644}
15645
15646// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
15647// results of a long-running operation.
15648type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
15649	azure.FutureAPI
15650	// Result returns the result of the asynchronous operation.
15651	// If the operation has not completed it will return an error.
15652	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
15653}
15654
15655// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15656func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15657	var azFuture azure.Future
15658	if err := json.Unmarshal(body, &azFuture); err != nil {
15659		return err
15660	}
15661	future.FutureAPI = &azFuture
15662	future.Result = future.result
15663	return nil
15664}
15665
15666// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
15667func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
15668	var done bool
15669	done, err = future.DoneWithContext(context.Background(), client)
15670	if err != nil {
15671		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15672		return
15673	}
15674	if !done {
15675		csk.Response.Response = future.Response()
15676		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
15677		return
15678	}
15679	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15680	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
15681		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
15682		if err != nil {
15683			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
15684		}
15685	}
15686	return
15687}
15688
15689// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
15690// results of a long-running operation.
15691type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
15692	azure.FutureAPI
15693	// Result returns the result of the asynchronous operation.
15694	// If the operation has not completed it will return an error.
15695	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
15696}
15697
15698// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15699func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
15700	var azFuture azure.Future
15701	if err := json.Unmarshal(body, &azFuture); err != nil {
15702		return err
15703	}
15704	future.FutureAPI = &azFuture
15705	future.Result = future.result
15706	return nil
15707}
15708
15709// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
15710func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
15711	var done bool
15712	done, err = future.DoneWithContext(context.Background(), client)
15713	if err != nil {
15714		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15715		return
15716	}
15717	if !done {
15718		vngcle.Response.Response = future.Response()
15719		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
15720		return
15721	}
15722	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15723	if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
15724		vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
15725		if err != nil {
15726			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
15727		}
15728	}
15729	return
15730}
15731
15732// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
15733type VirtualNetworkGatewayIPConfiguration struct {
15734	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
15735	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15736	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15737	Name *string `json:"name,omitempty"`
15738	// Etag - A unique read-only string that changes whenever the resource is updated.
15739	Etag *string `json:"etag,omitempty"`
15740	// ID - Resource ID.
15741	ID *string `json:"id,omitempty"`
15742}
15743
15744// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
15745func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
15746	objectMap := make(map[string]interface{})
15747	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
15748		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
15749	}
15750	if vngic.Name != nil {
15751		objectMap["name"] = vngic.Name
15752	}
15753	if vngic.Etag != nil {
15754		objectMap["etag"] = vngic.Etag
15755	}
15756	if vngic.ID != nil {
15757		objectMap["id"] = vngic.ID
15758	}
15759	return json.Marshal(objectMap)
15760}
15761
15762// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
15763func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
15764	var m map[string]*json.RawMessage
15765	err := json.Unmarshal(body, &m)
15766	if err != nil {
15767		return err
15768	}
15769	for k, v := range m {
15770		switch k {
15771		case "properties":
15772			if v != nil {
15773				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
15774				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
15775				if err != nil {
15776					return err
15777				}
15778				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
15779			}
15780		case "name":
15781			if v != nil {
15782				var name string
15783				err = json.Unmarshal(*v, &name)
15784				if err != nil {
15785					return err
15786				}
15787				vngic.Name = &name
15788			}
15789		case "etag":
15790			if v != nil {
15791				var etag string
15792				err = json.Unmarshal(*v, &etag)
15793				if err != nil {
15794					return err
15795				}
15796				vngic.Etag = &etag
15797			}
15798		case "id":
15799			if v != nil {
15800				var ID string
15801				err = json.Unmarshal(*v, &ID)
15802				if err != nil {
15803					return err
15804				}
15805				vngic.ID = &ID
15806			}
15807		}
15808	}
15809
15810	return nil
15811}
15812
15813// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
15814type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
15815	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
15816	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15817	// Subnet - The reference of the subnet resource.
15818	Subnet *SubResource `json:"subnet,omitempty"`
15819	// PublicIPAddress - The reference of the public IP resource.
15820	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
15821	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15822	ProvisioningState *string `json:"provisioningState,omitempty"`
15823}
15824
15825// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
15826func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15827	objectMap := make(map[string]interface{})
15828	if vngicpf.PrivateIPAllocationMethod != "" {
15829		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
15830	}
15831	if vngicpf.Subnet != nil {
15832		objectMap["subnet"] = vngicpf.Subnet
15833	}
15834	if vngicpf.PublicIPAddress != nil {
15835		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
15836	}
15837	return json.Marshal(objectMap)
15838}
15839
15840// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
15841// service call
15842type VirtualNetworkGatewayListConnectionsResult struct {
15843	autorest.Response `json:"-"`
15844	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15845	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
15846	// NextLink - READ-ONLY; The URL to get the next set of results.
15847	NextLink *string `json:"nextLink,omitempty"`
15848}
15849
15850// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
15851func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
15852	objectMap := make(map[string]interface{})
15853	if vnglcr.Value != nil {
15854		objectMap["value"] = vnglcr.Value
15855	}
15856	return json.Marshal(objectMap)
15857}
15858
15859// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
15860// VirtualNetworkGatewayConnectionListEntity values.
15861type VirtualNetworkGatewayListConnectionsResultIterator struct {
15862	i    int
15863	page VirtualNetworkGatewayListConnectionsResultPage
15864}
15865
15866// NextWithContext advances to the next value.  If there was an error making
15867// the request the iterator does not advance and the error is returned.
15868func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15869	if tracing.IsEnabled() {
15870		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
15871		defer func() {
15872			sc := -1
15873			if iter.Response().Response.Response != nil {
15874				sc = iter.Response().Response.Response.StatusCode
15875			}
15876			tracing.EndSpan(ctx, sc, err)
15877		}()
15878	}
15879	iter.i++
15880	if iter.i < len(iter.page.Values()) {
15881		return nil
15882	}
15883	err = iter.page.NextWithContext(ctx)
15884	if err != nil {
15885		iter.i--
15886		return err
15887	}
15888	iter.i = 0
15889	return nil
15890}
15891
15892// Next advances to the next value.  If there was an error making
15893// the request the iterator does not advance and the error is returned.
15894// Deprecated: Use NextWithContext() instead.
15895func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
15896	return iter.NextWithContext(context.Background())
15897}
15898
15899// NotDone returns true if the enumeration should be started or is not yet complete.
15900func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
15901	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15902}
15903
15904// Response returns the raw server response from the last page request.
15905func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
15906	return iter.page.Response()
15907}
15908
15909// Value returns the current value or a zero-initialized value if the
15910// iterator has advanced beyond the end of the collection.
15911func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
15912	if !iter.page.NotDone() {
15913		return VirtualNetworkGatewayConnectionListEntity{}
15914	}
15915	return iter.page.Values()[iter.i]
15916}
15917
15918// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
15919func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
15920	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
15921}
15922
15923// IsEmpty returns true if the ListResult contains no values.
15924func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
15925	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
15926}
15927
15928// hasNextLink returns true if the NextLink is not empty.
15929func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
15930	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
15931}
15932
15933// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
15934// It returns nil if no more results exist.
15935func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15936	if !vnglcr.hasNextLink() {
15937		return nil, nil
15938	}
15939	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15940		autorest.AsJSON(),
15941		autorest.AsGet(),
15942		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
15943}
15944
15945// VirtualNetworkGatewayListConnectionsResultPage contains a page of
15946// VirtualNetworkGatewayConnectionListEntity values.
15947type VirtualNetworkGatewayListConnectionsResultPage struct {
15948	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
15949	vnglcr VirtualNetworkGatewayListConnectionsResult
15950}
15951
15952// NextWithContext advances to the next page of values.  If there was an error making
15953// the request the page does not advance and the error is returned.
15954func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15955	if tracing.IsEnabled() {
15956		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
15957		defer func() {
15958			sc := -1
15959			if page.Response().Response.Response != nil {
15960				sc = page.Response().Response.Response.StatusCode
15961			}
15962			tracing.EndSpan(ctx, sc, err)
15963		}()
15964	}
15965	for {
15966		next, err := page.fn(ctx, page.vnglcr)
15967		if err != nil {
15968			return err
15969		}
15970		page.vnglcr = next
15971		if !next.hasNextLink() || !next.IsEmpty() {
15972			break
15973		}
15974	}
15975	return nil
15976}
15977
15978// Next advances to the next page of values.  If there was an error making
15979// the request the page does not advance and the error is returned.
15980// Deprecated: Use NextWithContext() instead.
15981func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
15982	return page.NextWithContext(context.Background())
15983}
15984
15985// NotDone returns true if the page enumeration should be started or is not yet complete.
15986func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
15987	return !page.vnglcr.IsEmpty()
15988}
15989
15990// Response returns the raw server response from the last page request.
15991func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
15992	return page.vnglcr
15993}
15994
15995// Values returns the slice of values for the current page or nil if there are no values.
15996func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
15997	if page.vnglcr.IsEmpty() {
15998		return nil
15999	}
16000	return *page.vnglcr.Value
16001}
16002
16003// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
16004func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
16005	return VirtualNetworkGatewayListConnectionsResultPage{
16006		fn:     getNextPage,
16007		vnglcr: cur,
16008	}
16009}
16010
16011// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
16012type VirtualNetworkGatewayListResult struct {
16013	autorest.Response `json:"-"`
16014	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
16015	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
16016	// NextLink - READ-ONLY; The URL to get the next set of results.
16017	NextLink *string `json:"nextLink,omitempty"`
16018}
16019
16020// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
16021func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
16022	objectMap := make(map[string]interface{})
16023	if vnglr.Value != nil {
16024		objectMap["value"] = vnglr.Value
16025	}
16026	return json.Marshal(objectMap)
16027}
16028
16029// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
16030// values.
16031type VirtualNetworkGatewayListResultIterator struct {
16032	i    int
16033	page VirtualNetworkGatewayListResultPage
16034}
16035
16036// NextWithContext advances to the next value.  If there was an error making
16037// the request the iterator does not advance and the error is returned.
16038func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
16039	if tracing.IsEnabled() {
16040		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
16041		defer func() {
16042			sc := -1
16043			if iter.Response().Response.Response != nil {
16044				sc = iter.Response().Response.Response.StatusCode
16045			}
16046			tracing.EndSpan(ctx, sc, err)
16047		}()
16048	}
16049	iter.i++
16050	if iter.i < len(iter.page.Values()) {
16051		return nil
16052	}
16053	err = iter.page.NextWithContext(ctx)
16054	if err != nil {
16055		iter.i--
16056		return err
16057	}
16058	iter.i = 0
16059	return nil
16060}
16061
16062// Next advances to the next value.  If there was an error making
16063// the request the iterator does not advance and the error is returned.
16064// Deprecated: Use NextWithContext() instead.
16065func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
16066	return iter.NextWithContext(context.Background())
16067}
16068
16069// NotDone returns true if the enumeration should be started or is not yet complete.
16070func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
16071	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16072}
16073
16074// Response returns the raw server response from the last page request.
16075func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
16076	return iter.page.Response()
16077}
16078
16079// Value returns the current value or a zero-initialized value if the
16080// iterator has advanced beyond the end of the collection.
16081func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
16082	if !iter.page.NotDone() {
16083		return VirtualNetworkGateway{}
16084	}
16085	return iter.page.Values()[iter.i]
16086}
16087
16088// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
16089func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
16090	return VirtualNetworkGatewayListResultIterator{page: page}
16091}
16092
16093// IsEmpty returns true if the ListResult contains no values.
16094func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
16095	return vnglr.Value == nil || len(*vnglr.Value) == 0
16096}
16097
16098// hasNextLink returns true if the NextLink is not empty.
16099func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
16100	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
16101}
16102
16103// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
16104// It returns nil if no more results exist.
16105func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
16106	if !vnglr.hasNextLink() {
16107		return nil, nil
16108	}
16109	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16110		autorest.AsJSON(),
16111		autorest.AsGet(),
16112		autorest.WithBaseURL(to.String(vnglr.NextLink)))
16113}
16114
16115// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
16116type VirtualNetworkGatewayListResultPage struct {
16117	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
16118	vnglr VirtualNetworkGatewayListResult
16119}
16120
16121// NextWithContext advances to the next page of values.  If there was an error making
16122// the request the page does not advance and the error is returned.
16123func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
16124	if tracing.IsEnabled() {
16125		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
16126		defer func() {
16127			sc := -1
16128			if page.Response().Response.Response != nil {
16129				sc = page.Response().Response.Response.StatusCode
16130			}
16131			tracing.EndSpan(ctx, sc, err)
16132		}()
16133	}
16134	for {
16135		next, err := page.fn(ctx, page.vnglr)
16136		if err != nil {
16137			return err
16138		}
16139		page.vnglr = next
16140		if !next.hasNextLink() || !next.IsEmpty() {
16141			break
16142		}
16143	}
16144	return nil
16145}
16146
16147// Next advances to the next page of values.  If there was an error making
16148// the request the page does not advance and the error is returned.
16149// Deprecated: Use NextWithContext() instead.
16150func (page *VirtualNetworkGatewayListResultPage) Next() error {
16151	return page.NextWithContext(context.Background())
16152}
16153
16154// NotDone returns true if the page enumeration should be started or is not yet complete.
16155func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
16156	return !page.vnglr.IsEmpty()
16157}
16158
16159// Response returns the raw server response from the last page request.
16160func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
16161	return page.vnglr
16162}
16163
16164// Values returns the slice of values for the current page or nil if there are no values.
16165func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
16166	if page.vnglr.IsEmpty() {
16167		return nil
16168	}
16169	return *page.vnglr.Value
16170}
16171
16172// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
16173func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
16174	return VirtualNetworkGatewayListResultPage{
16175		fn:    getNextPage,
16176		vnglr: cur,
16177	}
16178}
16179
16180// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
16181type VirtualNetworkGatewayPropertiesFormat struct {
16182	// IPConfigurations - IP configurations for virtual network gateway.
16183	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
16184	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
16185	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
16186	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
16187	VpnType VpnType `json:"vpnType,omitempty"`
16188	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
16189	EnableBgp *bool `json:"enableBgp,omitempty"`
16190	// ActiveActive - ActiveActive flag
16191	ActiveActive *bool `json:"activeActive,omitempty"`
16192	// 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.
16193	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
16194	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
16195	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
16196	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
16197	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
16198	// BgpSettings - Virtual network gateway's BGP speaker settings.
16199	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
16200	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
16201	ResourceGUID *string `json:"resourceGuid,omitempty"`
16202	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16203	ProvisioningState *string `json:"provisioningState,omitempty"`
16204}
16205
16206// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
16207func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
16208	objectMap := make(map[string]interface{})
16209	if vngpf.IPConfigurations != nil {
16210		objectMap["ipConfigurations"] = vngpf.IPConfigurations
16211	}
16212	if vngpf.GatewayType != "" {
16213		objectMap["gatewayType"] = vngpf.GatewayType
16214	}
16215	if vngpf.VpnType != "" {
16216		objectMap["vpnType"] = vngpf.VpnType
16217	}
16218	if vngpf.EnableBgp != nil {
16219		objectMap["enableBgp"] = vngpf.EnableBgp
16220	}
16221	if vngpf.ActiveActive != nil {
16222		objectMap["activeActive"] = vngpf.ActiveActive
16223	}
16224	if vngpf.GatewayDefaultSite != nil {
16225		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
16226	}
16227	if vngpf.Sku != nil {
16228		objectMap["sku"] = vngpf.Sku
16229	}
16230	if vngpf.VpnClientConfiguration != nil {
16231		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
16232	}
16233	if vngpf.BgpSettings != nil {
16234		objectMap["bgpSettings"] = vngpf.BgpSettings
16235	}
16236	if vngpf.ResourceGUID != nil {
16237		objectMap["resourceGuid"] = vngpf.ResourceGUID
16238	}
16239	return json.Marshal(objectMap)
16240}
16241
16242// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16243// long-running operation.
16244type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
16245	azure.FutureAPI
16246	// Result returns the result of the asynchronous operation.
16247	// If the operation has not completed it will return an error.
16248	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16249}
16250
16251// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16252func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16253	var azFuture azure.Future
16254	if err := json.Unmarshal(body, &azFuture); err != nil {
16255		return err
16256	}
16257	future.FutureAPI = &azFuture
16258	future.Result = future.result
16259	return nil
16260}
16261
16262// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
16263func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16264	var done bool
16265	done, err = future.DoneWithContext(context.Background(), client)
16266	if err != nil {
16267		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16268		return
16269	}
16270	if !done {
16271		vng.Response.Response = future.Response()
16272		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
16273		return
16274	}
16275	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16276	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16277		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
16278		if err != nil {
16279			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
16280		}
16281	}
16282	return
16283}
16284
16285// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
16286// long-running operation.
16287type VirtualNetworkGatewaysDeleteFuture struct {
16288	azure.FutureAPI
16289	// Result returns the result of the asynchronous operation.
16290	// If the operation has not completed it will return an error.
16291	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
16292}
16293
16294// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16295func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
16296	var azFuture azure.Future
16297	if err := json.Unmarshal(body, &azFuture); err != nil {
16298		return err
16299	}
16300	future.FutureAPI = &azFuture
16301	future.Result = future.result
16302	return nil
16303}
16304
16305// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
16306func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
16307	var done bool
16308	done, err = future.DoneWithContext(context.Background(), client)
16309	if err != nil {
16310		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
16311		return
16312	}
16313	if !done {
16314		ar.Response = future.Response()
16315		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
16316		return
16317	}
16318	ar.Response = future.Response()
16319	return
16320}
16321
16322// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
16323// results of a long-running operation.
16324type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
16325	azure.FutureAPI
16326	// Result returns the result of the asynchronous operation.
16327	// If the operation has not completed it will return an error.
16328	Result func(VirtualNetworkGatewaysClient) (String, error)
16329}
16330
16331// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16332func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
16333	var azFuture azure.Future
16334	if err := json.Unmarshal(body, &azFuture); err != nil {
16335		return err
16336	}
16337	future.FutureAPI = &azFuture
16338	future.Result = future.result
16339	return nil
16340}
16341
16342// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
16343func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16344	var done bool
16345	done, err = future.DoneWithContext(context.Background(), client)
16346	if err != nil {
16347		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
16348		return
16349	}
16350	if !done {
16351		s.Response.Response = future.Response()
16352		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
16353		return
16354	}
16355	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16356	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16357		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
16358		if err != nil {
16359			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
16360		}
16361	}
16362	return
16363}
16364
16365// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
16366// of a long-running operation.
16367type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
16368	azure.FutureAPI
16369	// Result returns the result of the asynchronous operation.
16370	// If the operation has not completed it will return an error.
16371	Result func(VirtualNetworkGatewaysClient) (String, error)
16372}
16373
16374// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16375func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
16376	var azFuture azure.Future
16377	if err := json.Unmarshal(body, &azFuture); err != nil {
16378		return err
16379	}
16380	future.FutureAPI = &azFuture
16381	future.Result = future.result
16382	return nil
16383}
16384
16385// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
16386func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16387	var done bool
16388	done, err = future.DoneWithContext(context.Background(), client)
16389	if err != nil {
16390		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
16391		return
16392	}
16393	if !done {
16394		s.Response.Response = future.Response()
16395		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
16396		return
16397	}
16398	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16399	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16400		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
16401		if err != nil {
16402			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
16403		}
16404	}
16405	return
16406}
16407
16408// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
16409// of a long-running operation.
16410type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
16411	azure.FutureAPI
16412	// Result returns the result of the asynchronous operation.
16413	// If the operation has not completed it will return an error.
16414	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16415}
16416
16417// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16418func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
16419	var azFuture azure.Future
16420	if err := json.Unmarshal(body, &azFuture); err != nil {
16421		return err
16422	}
16423	future.FutureAPI = &azFuture
16424	future.Result = future.result
16425	return nil
16426}
16427
16428// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
16429func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16430	var done bool
16431	done, err = future.DoneWithContext(context.Background(), client)
16432	if err != nil {
16433		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
16434		return
16435	}
16436	if !done {
16437		grlr.Response.Response = future.Response()
16438		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
16439		return
16440	}
16441	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16442	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16443		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
16444		if err != nil {
16445			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16446		}
16447	}
16448	return
16449}
16450
16451// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
16452// a long-running operation.
16453type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
16454	azure.FutureAPI
16455	// Result returns the result of the asynchronous operation.
16456	// If the operation has not completed it will return an error.
16457	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
16458}
16459
16460// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16461func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
16462	var azFuture azure.Future
16463	if err := json.Unmarshal(body, &azFuture); err != nil {
16464		return err
16465	}
16466	future.FutureAPI = &azFuture
16467	future.Result = future.result
16468	return nil
16469}
16470
16471// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
16472func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
16473	var done bool
16474	done, err = future.DoneWithContext(context.Background(), client)
16475	if err != nil {
16476		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
16477		return
16478	}
16479	if !done {
16480		bpslr.Response.Response = future.Response()
16481		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
16482		return
16483	}
16484	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16485	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
16486		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
16487		if err != nil {
16488			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
16489		}
16490	}
16491	return
16492}
16493
16494// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
16495// a long-running operation.
16496type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
16497	azure.FutureAPI
16498	// Result returns the result of the asynchronous operation.
16499	// If the operation has not completed it will return an error.
16500	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16501}
16502
16503// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16504func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
16505	var azFuture azure.Future
16506	if err := json.Unmarshal(body, &azFuture); err != nil {
16507		return err
16508	}
16509	future.FutureAPI = &azFuture
16510	future.Result = future.result
16511	return nil
16512}
16513
16514// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
16515func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16516	var done bool
16517	done, err = future.DoneWithContext(context.Background(), client)
16518	if err != nil {
16519		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
16520		return
16521	}
16522	if !done {
16523		grlr.Response.Response = future.Response()
16524		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
16525		return
16526	}
16527	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16528	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16529		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
16530		if err != nil {
16531			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16532		}
16533	}
16534	return
16535}
16536
16537// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
16538// results of a long-running operation.
16539type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
16540	azure.FutureAPI
16541	// Result returns the result of the asynchronous operation.
16542	// If the operation has not completed it will return an error.
16543	Result func(VirtualNetworkGatewaysClient) (String, error)
16544}
16545
16546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16547func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
16548	var azFuture azure.Future
16549	if err := json.Unmarshal(body, &azFuture); err != nil {
16550		return err
16551	}
16552	future.FutureAPI = &azFuture
16553	future.Result = future.result
16554	return nil
16555}
16556
16557// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
16558func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16559	var done bool
16560	done, err = future.DoneWithContext(context.Background(), client)
16561	if err != nil {
16562		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
16563		return
16564	}
16565	if !done {
16566		s.Response.Response = future.Response()
16567		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
16568		return
16569	}
16570	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16571	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16572		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
16573		if err != nil {
16574			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
16575		}
16576	}
16577	return
16578}
16579
16580// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
16581type VirtualNetworkGatewaySku struct {
16582	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
16583	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
16584	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
16585	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
16586	// Capacity - The capacity.
16587	Capacity *int32 `json:"capacity,omitempty"`
16588}
16589
16590// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
16591// long-running operation.
16592type VirtualNetworkGatewaysResetFuture struct {
16593	azure.FutureAPI
16594	// Result returns the result of the asynchronous operation.
16595	// If the operation has not completed it will return an error.
16596	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16597}
16598
16599// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16600func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
16601	var azFuture azure.Future
16602	if err := json.Unmarshal(body, &azFuture); err != nil {
16603		return err
16604	}
16605	future.FutureAPI = &azFuture
16606	future.Result = future.result
16607	return nil
16608}
16609
16610// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
16611func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16612	var done bool
16613	done, err = future.DoneWithContext(context.Background(), client)
16614	if err != nil {
16615		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
16616		return
16617	}
16618	if !done {
16619		vng.Response.Response = future.Response()
16620		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
16621		return
16622	}
16623	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16624	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16625		vng, err = client.ResetResponder(vng.Response.Response)
16626		if err != nil {
16627			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
16628		}
16629	}
16630	return
16631}
16632
16633// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16634// long-running operation.
16635type VirtualNetworkGatewaysUpdateTagsFuture struct {
16636	azure.FutureAPI
16637	// Result returns the result of the asynchronous operation.
16638	// If the operation has not completed it will return an error.
16639	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16640}
16641
16642// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16643func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16644	var azFuture azure.Future
16645	if err := json.Unmarshal(body, &azFuture); err != nil {
16646		return err
16647	}
16648	future.FutureAPI = &azFuture
16649	future.Result = future.result
16650	return nil
16651}
16652
16653// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
16654func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16655	var done bool
16656	done, err = future.DoneWithContext(context.Background(), client)
16657	if err != nil {
16658		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16659		return
16660	}
16661	if !done {
16662		vng.Response.Response = future.Response()
16663		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
16664		return
16665	}
16666	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16667	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16668		vng, err = client.UpdateTagsResponder(vng.Response.Response)
16669		if err != nil {
16670			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
16671		}
16672	}
16673	return
16674}
16675
16676// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
16677type VirtualNetworkListResult struct {
16678	autorest.Response `json:"-"`
16679	// Value - Gets a list of VirtualNetwork resources in a resource group.
16680	Value *[]VirtualNetwork `json:"value,omitempty"`
16681	// NextLink - The URL to get the next set of results.
16682	NextLink *string `json:"nextLink,omitempty"`
16683}
16684
16685// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
16686type VirtualNetworkListResultIterator struct {
16687	i    int
16688	page VirtualNetworkListResultPage
16689}
16690
16691// NextWithContext advances to the next value.  If there was an error making
16692// the request the iterator does not advance and the error is returned.
16693func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
16694	if tracing.IsEnabled() {
16695		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
16696		defer func() {
16697			sc := -1
16698			if iter.Response().Response.Response != nil {
16699				sc = iter.Response().Response.Response.StatusCode
16700			}
16701			tracing.EndSpan(ctx, sc, err)
16702		}()
16703	}
16704	iter.i++
16705	if iter.i < len(iter.page.Values()) {
16706		return nil
16707	}
16708	err = iter.page.NextWithContext(ctx)
16709	if err != nil {
16710		iter.i--
16711		return err
16712	}
16713	iter.i = 0
16714	return nil
16715}
16716
16717// Next advances to the next value.  If there was an error making
16718// the request the iterator does not advance and the error is returned.
16719// Deprecated: Use NextWithContext() instead.
16720func (iter *VirtualNetworkListResultIterator) Next() error {
16721	return iter.NextWithContext(context.Background())
16722}
16723
16724// NotDone returns true if the enumeration should be started or is not yet complete.
16725func (iter VirtualNetworkListResultIterator) NotDone() bool {
16726	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16727}
16728
16729// Response returns the raw server response from the last page request.
16730func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
16731	return iter.page.Response()
16732}
16733
16734// Value returns the current value or a zero-initialized value if the
16735// iterator has advanced beyond the end of the collection.
16736func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
16737	if !iter.page.NotDone() {
16738		return VirtualNetwork{}
16739	}
16740	return iter.page.Values()[iter.i]
16741}
16742
16743// Creates a new instance of the VirtualNetworkListResultIterator type.
16744func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
16745	return VirtualNetworkListResultIterator{page: page}
16746}
16747
16748// IsEmpty returns true if the ListResult contains no values.
16749func (vnlr VirtualNetworkListResult) IsEmpty() bool {
16750	return vnlr.Value == nil || len(*vnlr.Value) == 0
16751}
16752
16753// hasNextLink returns true if the NextLink is not empty.
16754func (vnlr VirtualNetworkListResult) hasNextLink() bool {
16755	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
16756}
16757
16758// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
16759// It returns nil if no more results exist.
16760func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
16761	if !vnlr.hasNextLink() {
16762		return nil, nil
16763	}
16764	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16765		autorest.AsJSON(),
16766		autorest.AsGet(),
16767		autorest.WithBaseURL(to.String(vnlr.NextLink)))
16768}
16769
16770// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
16771type VirtualNetworkListResultPage struct {
16772	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
16773	vnlr VirtualNetworkListResult
16774}
16775
16776// NextWithContext advances to the next page of values.  If there was an error making
16777// the request the page does not advance and the error is returned.
16778func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
16779	if tracing.IsEnabled() {
16780		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
16781		defer func() {
16782			sc := -1
16783			if page.Response().Response.Response != nil {
16784				sc = page.Response().Response.Response.StatusCode
16785			}
16786			tracing.EndSpan(ctx, sc, err)
16787		}()
16788	}
16789	for {
16790		next, err := page.fn(ctx, page.vnlr)
16791		if err != nil {
16792			return err
16793		}
16794		page.vnlr = next
16795		if !next.hasNextLink() || !next.IsEmpty() {
16796			break
16797		}
16798	}
16799	return nil
16800}
16801
16802// Next advances to the next page of values.  If there was an error making
16803// the request the page does not advance and the error is returned.
16804// Deprecated: Use NextWithContext() instead.
16805func (page *VirtualNetworkListResultPage) Next() error {
16806	return page.NextWithContext(context.Background())
16807}
16808
16809// NotDone returns true if the page enumeration should be started or is not yet complete.
16810func (page VirtualNetworkListResultPage) NotDone() bool {
16811	return !page.vnlr.IsEmpty()
16812}
16813
16814// Response returns the raw server response from the last page request.
16815func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
16816	return page.vnlr
16817}
16818
16819// Values returns the slice of values for the current page or nil if there are no values.
16820func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
16821	if page.vnlr.IsEmpty() {
16822		return nil
16823	}
16824	return *page.vnlr.Value
16825}
16826
16827// Creates a new instance of the VirtualNetworkListResultPage type.
16828func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
16829	return VirtualNetworkListResultPage{
16830		fn:   getNextPage,
16831		vnlr: cur,
16832	}
16833}
16834
16835// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
16836type VirtualNetworkListUsageResult struct {
16837	autorest.Response `json:"-"`
16838	// Value - READ-ONLY; VirtualNetwork usage stats.
16839	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
16840	// NextLink - The URL to get the next set of results.
16841	NextLink *string `json:"nextLink,omitempty"`
16842}
16843
16844// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
16845func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
16846	objectMap := make(map[string]interface{})
16847	if vnlur.NextLink != nil {
16848		objectMap["nextLink"] = vnlur.NextLink
16849	}
16850	return json.Marshal(objectMap)
16851}
16852
16853// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
16854// values.
16855type VirtualNetworkListUsageResultIterator struct {
16856	i    int
16857	page VirtualNetworkListUsageResultPage
16858}
16859
16860// NextWithContext advances to the next value.  If there was an error making
16861// the request the iterator does not advance and the error is returned.
16862func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
16863	if tracing.IsEnabled() {
16864		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
16865		defer func() {
16866			sc := -1
16867			if iter.Response().Response.Response != nil {
16868				sc = iter.Response().Response.Response.StatusCode
16869			}
16870			tracing.EndSpan(ctx, sc, err)
16871		}()
16872	}
16873	iter.i++
16874	if iter.i < len(iter.page.Values()) {
16875		return nil
16876	}
16877	err = iter.page.NextWithContext(ctx)
16878	if err != nil {
16879		iter.i--
16880		return err
16881	}
16882	iter.i = 0
16883	return nil
16884}
16885
16886// Next advances to the next value.  If there was an error making
16887// the request the iterator does not advance and the error is returned.
16888// Deprecated: Use NextWithContext() instead.
16889func (iter *VirtualNetworkListUsageResultIterator) Next() error {
16890	return iter.NextWithContext(context.Background())
16891}
16892
16893// NotDone returns true if the enumeration should be started or is not yet complete.
16894func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
16895	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16896}
16897
16898// Response returns the raw server response from the last page request.
16899func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
16900	return iter.page.Response()
16901}
16902
16903// Value returns the current value or a zero-initialized value if the
16904// iterator has advanced beyond the end of the collection.
16905func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
16906	if !iter.page.NotDone() {
16907		return VirtualNetworkUsage{}
16908	}
16909	return iter.page.Values()[iter.i]
16910}
16911
16912// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
16913func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
16914	return VirtualNetworkListUsageResultIterator{page: page}
16915}
16916
16917// IsEmpty returns true if the ListResult contains no values.
16918func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
16919	return vnlur.Value == nil || len(*vnlur.Value) == 0
16920}
16921
16922// hasNextLink returns true if the NextLink is not empty.
16923func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
16924	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
16925}
16926
16927// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
16928// It returns nil if no more results exist.
16929func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
16930	if !vnlur.hasNextLink() {
16931		return nil, nil
16932	}
16933	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16934		autorest.AsJSON(),
16935		autorest.AsGet(),
16936		autorest.WithBaseURL(to.String(vnlur.NextLink)))
16937}
16938
16939// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
16940type VirtualNetworkListUsageResultPage struct {
16941	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
16942	vnlur VirtualNetworkListUsageResult
16943}
16944
16945// NextWithContext advances to the next page of values.  If there was an error making
16946// the request the page does not advance and the error is returned.
16947func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
16948	if tracing.IsEnabled() {
16949		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
16950		defer func() {
16951			sc := -1
16952			if page.Response().Response.Response != nil {
16953				sc = page.Response().Response.Response.StatusCode
16954			}
16955			tracing.EndSpan(ctx, sc, err)
16956		}()
16957	}
16958	for {
16959		next, err := page.fn(ctx, page.vnlur)
16960		if err != nil {
16961			return err
16962		}
16963		page.vnlur = next
16964		if !next.hasNextLink() || !next.IsEmpty() {
16965			break
16966		}
16967	}
16968	return nil
16969}
16970
16971// Next advances to the next page of values.  If there was an error making
16972// the request the page does not advance and the error is returned.
16973// Deprecated: Use NextWithContext() instead.
16974func (page *VirtualNetworkListUsageResultPage) Next() error {
16975	return page.NextWithContext(context.Background())
16976}
16977
16978// NotDone returns true if the page enumeration should be started or is not yet complete.
16979func (page VirtualNetworkListUsageResultPage) NotDone() bool {
16980	return !page.vnlur.IsEmpty()
16981}
16982
16983// Response returns the raw server response from the last page request.
16984func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
16985	return page.vnlur
16986}
16987
16988// Values returns the slice of values for the current page or nil if there are no values.
16989func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
16990	if page.vnlur.IsEmpty() {
16991		return nil
16992	}
16993	return *page.vnlur.Value
16994}
16995
16996// Creates a new instance of the VirtualNetworkListUsageResultPage type.
16997func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
16998	return VirtualNetworkListUsageResultPage{
16999		fn:    getNextPage,
17000		vnlur: cur,
17001	}
17002}
17003
17004// VirtualNetworkPeering peerings in a virtual network resource.
17005type VirtualNetworkPeering struct {
17006	autorest.Response `json:"-"`
17007	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
17008	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
17009	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17010	Name *string `json:"name,omitempty"`
17011	// Etag - A unique read-only string that changes whenever the resource is updated.
17012	Etag *string `json:"etag,omitempty"`
17013	// ID - Resource ID.
17014	ID *string `json:"id,omitempty"`
17015}
17016
17017// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
17018func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
17019	objectMap := make(map[string]interface{})
17020	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
17021		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
17022	}
17023	if vnp.Name != nil {
17024		objectMap["name"] = vnp.Name
17025	}
17026	if vnp.Etag != nil {
17027		objectMap["etag"] = vnp.Etag
17028	}
17029	if vnp.ID != nil {
17030		objectMap["id"] = vnp.ID
17031	}
17032	return json.Marshal(objectMap)
17033}
17034
17035// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
17036func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
17037	var m map[string]*json.RawMessage
17038	err := json.Unmarshal(body, &m)
17039	if err != nil {
17040		return err
17041	}
17042	for k, v := range m {
17043		switch k {
17044		case "properties":
17045			if v != nil {
17046				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
17047				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
17048				if err != nil {
17049					return err
17050				}
17051				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
17052			}
17053		case "name":
17054			if v != nil {
17055				var name string
17056				err = json.Unmarshal(*v, &name)
17057				if err != nil {
17058					return err
17059				}
17060				vnp.Name = &name
17061			}
17062		case "etag":
17063			if v != nil {
17064				var etag string
17065				err = json.Unmarshal(*v, &etag)
17066				if err != nil {
17067					return err
17068				}
17069				vnp.Etag = &etag
17070			}
17071		case "id":
17072			if v != nil {
17073				var ID string
17074				err = json.Unmarshal(*v, &ID)
17075				if err != nil {
17076					return err
17077				}
17078				vnp.ID = &ID
17079			}
17080		}
17081	}
17082
17083	return nil
17084}
17085
17086// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
17087// belong to a virtual network.
17088type VirtualNetworkPeeringListResult struct {
17089	autorest.Response `json:"-"`
17090	// Value - The peerings in a virtual network.
17091	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
17092	// NextLink - The URL to get the next set of results.
17093	NextLink *string `json:"nextLink,omitempty"`
17094}
17095
17096// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
17097// values.
17098type VirtualNetworkPeeringListResultIterator struct {
17099	i    int
17100	page VirtualNetworkPeeringListResultPage
17101}
17102
17103// NextWithContext advances to the next value.  If there was an error making
17104// the request the iterator does not advance and the error is returned.
17105func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
17106	if tracing.IsEnabled() {
17107		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
17108		defer func() {
17109			sc := -1
17110			if iter.Response().Response.Response != nil {
17111				sc = iter.Response().Response.Response.StatusCode
17112			}
17113			tracing.EndSpan(ctx, sc, err)
17114		}()
17115	}
17116	iter.i++
17117	if iter.i < len(iter.page.Values()) {
17118		return nil
17119	}
17120	err = iter.page.NextWithContext(ctx)
17121	if err != nil {
17122		iter.i--
17123		return err
17124	}
17125	iter.i = 0
17126	return nil
17127}
17128
17129// Next advances to the next value.  If there was an error making
17130// the request the iterator does not advance and the error is returned.
17131// Deprecated: Use NextWithContext() instead.
17132func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
17133	return iter.NextWithContext(context.Background())
17134}
17135
17136// NotDone returns true if the enumeration should be started or is not yet complete.
17137func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
17138	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17139}
17140
17141// Response returns the raw server response from the last page request.
17142func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
17143	return iter.page.Response()
17144}
17145
17146// Value returns the current value or a zero-initialized value if the
17147// iterator has advanced beyond the end of the collection.
17148func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
17149	if !iter.page.NotDone() {
17150		return VirtualNetworkPeering{}
17151	}
17152	return iter.page.Values()[iter.i]
17153}
17154
17155// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
17156func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
17157	return VirtualNetworkPeeringListResultIterator{page: page}
17158}
17159
17160// IsEmpty returns true if the ListResult contains no values.
17161func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
17162	return vnplr.Value == nil || len(*vnplr.Value) == 0
17163}
17164
17165// hasNextLink returns true if the NextLink is not empty.
17166func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
17167	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
17168}
17169
17170// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
17171// It returns nil if no more results exist.
17172func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
17173	if !vnplr.hasNextLink() {
17174		return nil, nil
17175	}
17176	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17177		autorest.AsJSON(),
17178		autorest.AsGet(),
17179		autorest.WithBaseURL(to.String(vnplr.NextLink)))
17180}
17181
17182// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
17183type VirtualNetworkPeeringListResultPage struct {
17184	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
17185	vnplr VirtualNetworkPeeringListResult
17186}
17187
17188// NextWithContext advances to the next page of values.  If there was an error making
17189// the request the page does not advance and the error is returned.
17190func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
17191	if tracing.IsEnabled() {
17192		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
17193		defer func() {
17194			sc := -1
17195			if page.Response().Response.Response != nil {
17196				sc = page.Response().Response.Response.StatusCode
17197			}
17198			tracing.EndSpan(ctx, sc, err)
17199		}()
17200	}
17201	for {
17202		next, err := page.fn(ctx, page.vnplr)
17203		if err != nil {
17204			return err
17205		}
17206		page.vnplr = next
17207		if !next.hasNextLink() || !next.IsEmpty() {
17208			break
17209		}
17210	}
17211	return nil
17212}
17213
17214// Next advances to the next page of values.  If there was an error making
17215// the request the page does not advance and the error is returned.
17216// Deprecated: Use NextWithContext() instead.
17217func (page *VirtualNetworkPeeringListResultPage) Next() error {
17218	return page.NextWithContext(context.Background())
17219}
17220
17221// NotDone returns true if the page enumeration should be started or is not yet complete.
17222func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
17223	return !page.vnplr.IsEmpty()
17224}
17225
17226// Response returns the raw server response from the last page request.
17227func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
17228	return page.vnplr
17229}
17230
17231// Values returns the slice of values for the current page or nil if there are no values.
17232func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
17233	if page.vnplr.IsEmpty() {
17234		return nil
17235	}
17236	return *page.vnplr.Value
17237}
17238
17239// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
17240func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
17241	return VirtualNetworkPeeringListResultPage{
17242		fn:    getNextPage,
17243		vnplr: cur,
17244	}
17245}
17246
17247// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
17248type VirtualNetworkPeeringPropertiesFormat struct {
17249	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
17250	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
17251	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
17252	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
17253	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
17254	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
17255	// 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.
17256	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
17257	// 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).
17258	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
17259	// RemoteAddressSpace - The reference of the remote virtual network address space.
17260	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
17261	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
17262	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
17263	// ProvisioningState - The provisioning state of the resource.
17264	ProvisioningState *string `json:"provisioningState,omitempty"`
17265}
17266
17267// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17268// long-running operation.
17269type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
17270	azure.FutureAPI
17271	// Result returns the result of the asynchronous operation.
17272	// If the operation has not completed it will return an error.
17273	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
17274}
17275
17276// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17277func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17278	var azFuture azure.Future
17279	if err := json.Unmarshal(body, &azFuture); err != nil {
17280		return err
17281	}
17282	future.FutureAPI = &azFuture
17283	future.Result = future.result
17284	return nil
17285}
17286
17287// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
17288func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
17289	var done bool
17290	done, err = future.DoneWithContext(context.Background(), client)
17291	if err != nil {
17292		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17293		return
17294	}
17295	if !done {
17296		vnp.Response.Response = future.Response()
17297		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
17298		return
17299	}
17300	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17301	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
17302		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
17303		if err != nil {
17304			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
17305		}
17306	}
17307	return
17308}
17309
17310// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
17311// long-running operation.
17312type VirtualNetworkPeeringsDeleteFuture struct {
17313	azure.FutureAPI
17314	// Result returns the result of the asynchronous operation.
17315	// If the operation has not completed it will return an error.
17316	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
17317}
17318
17319// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17320func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
17321	var azFuture azure.Future
17322	if err := json.Unmarshal(body, &azFuture); err != nil {
17323		return err
17324	}
17325	future.FutureAPI = &azFuture
17326	future.Result = future.result
17327	return nil
17328}
17329
17330// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
17331func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
17332	var done bool
17333	done, err = future.DoneWithContext(context.Background(), client)
17334	if err != nil {
17335		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
17336		return
17337	}
17338	if !done {
17339		ar.Response = future.Response()
17340		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
17341		return
17342	}
17343	ar.Response = future.Response()
17344	return
17345}
17346
17347// VirtualNetworkPropertiesFormat properties of the virtual network.
17348type VirtualNetworkPropertiesFormat struct {
17349	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
17350	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
17351	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
17352	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
17353	// Subnets - A list of subnets in a Virtual Network.
17354	Subnets *[]Subnet `json:"subnets,omitempty"`
17355	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
17356	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
17357	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
17358	ResourceGUID *string `json:"resourceGuid,omitempty"`
17359	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17360	ProvisioningState *string `json:"provisioningState,omitempty"`
17361	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network.
17362	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
17363	// EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network.
17364	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
17365}
17366
17367// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17368// long-running operation.
17369type VirtualNetworksCreateOrUpdateFuture struct {
17370	azure.FutureAPI
17371	// Result returns the result of the asynchronous operation.
17372	// If the operation has not completed it will return an error.
17373	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17374}
17375
17376// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17377func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17378	var azFuture azure.Future
17379	if err := json.Unmarshal(body, &azFuture); err != nil {
17380		return err
17381	}
17382	future.FutureAPI = &azFuture
17383	future.Result = future.result
17384	return nil
17385}
17386
17387// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
17388func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17389	var done bool
17390	done, err = future.DoneWithContext(context.Background(), client)
17391	if err != nil {
17392		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17393		return
17394	}
17395	if !done {
17396		vn.Response.Response = future.Response()
17397		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
17398		return
17399	}
17400	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17401	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17402		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
17403		if err != nil {
17404			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
17405		}
17406	}
17407	return
17408}
17409
17410// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17411// operation.
17412type VirtualNetworksDeleteFuture struct {
17413	azure.FutureAPI
17414	// Result returns the result of the asynchronous operation.
17415	// If the operation has not completed it will return an error.
17416	Result func(VirtualNetworksClient) (autorest.Response, error)
17417}
17418
17419// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17420func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
17421	var azFuture azure.Future
17422	if err := json.Unmarshal(body, &azFuture); err != nil {
17423		return err
17424	}
17425	future.FutureAPI = &azFuture
17426	future.Result = future.result
17427	return nil
17428}
17429
17430// result is the default implementation for VirtualNetworksDeleteFuture.Result.
17431func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
17432	var done bool
17433	done, err = future.DoneWithContext(context.Background(), client)
17434	if err != nil {
17435		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
17436		return
17437	}
17438	if !done {
17439		ar.Response = future.Response()
17440		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
17441		return
17442	}
17443	ar.Response = future.Response()
17444	return
17445}
17446
17447// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17448// long-running operation.
17449type VirtualNetworksUpdateTagsFuture struct {
17450	azure.FutureAPI
17451	// Result returns the result of the asynchronous operation.
17452	// If the operation has not completed it will return an error.
17453	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17454}
17455
17456// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17457func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17458	var azFuture azure.Future
17459	if err := json.Unmarshal(body, &azFuture); err != nil {
17460		return err
17461	}
17462	future.FutureAPI = &azFuture
17463	future.Result = future.result
17464	return nil
17465}
17466
17467// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
17468func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17469	var done bool
17470	done, err = future.DoneWithContext(context.Background(), client)
17471	if err != nil {
17472		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17473		return
17474	}
17475	if !done {
17476		vn.Response.Response = future.Response()
17477		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
17478		return
17479	}
17480	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17481	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17482		vn, err = client.UpdateTagsResponder(vn.Response.Response)
17483		if err != nil {
17484			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
17485		}
17486	}
17487	return
17488}
17489
17490// VirtualNetworkUsage usage details for subnet.
17491type VirtualNetworkUsage struct {
17492	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
17493	CurrentValue *float64 `json:"currentValue,omitempty"`
17494	// ID - READ-ONLY; Subnet identifier.
17495	ID *string `json:"id,omitempty"`
17496	// Limit - READ-ONLY; Indicates the size of the subnet.
17497	Limit *float64 `json:"limit,omitempty"`
17498	// Name - READ-ONLY; The name containing common and localized value for usage.
17499	Name *VirtualNetworkUsageName `json:"name,omitempty"`
17500	// Unit - READ-ONLY; Usage units. Returns 'Count'
17501	Unit *string `json:"unit,omitempty"`
17502}
17503
17504// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
17505func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
17506	objectMap := make(map[string]interface{})
17507	return json.Marshal(objectMap)
17508}
17509
17510// VirtualNetworkUsageName usage strings container.
17511type VirtualNetworkUsageName struct {
17512	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
17513	LocalizedValue *string `json:"localizedValue,omitempty"`
17514	// Value - READ-ONLY; Subnet size and usage string.
17515	Value *string `json:"value,omitempty"`
17516}
17517
17518// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
17519func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
17520	objectMap := make(map[string]interface{})
17521	return json.Marshal(objectMap)
17522}
17523
17524// VpnClientConfiguration vpnClientConfiguration for P2S client.
17525type VpnClientConfiguration struct {
17526	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
17527	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
17528	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
17529	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
17530	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
17531	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
17532	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
17533	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
17534	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
17535	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
17536	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
17537	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
17538}
17539
17540// VpnClientParameters vpn Client Parameters for package generation
17541type VpnClientParameters struct {
17542	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
17543	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
17544	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
17545	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
17546	// 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.
17547	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
17548	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
17549	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
17550}
17551
17552// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
17553type VpnClientRevokedCertificate struct {
17554	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
17555	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
17556	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17557	Name *string `json:"name,omitempty"`
17558	// Etag - A unique read-only string that changes whenever the resource is updated.
17559	Etag *string `json:"etag,omitempty"`
17560	// ID - Resource ID.
17561	ID *string `json:"id,omitempty"`
17562}
17563
17564// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
17565func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
17566	objectMap := make(map[string]interface{})
17567	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
17568		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
17569	}
17570	if vcrc.Name != nil {
17571		objectMap["name"] = vcrc.Name
17572	}
17573	if vcrc.Etag != nil {
17574		objectMap["etag"] = vcrc.Etag
17575	}
17576	if vcrc.ID != nil {
17577		objectMap["id"] = vcrc.ID
17578	}
17579	return json.Marshal(objectMap)
17580}
17581
17582// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
17583func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
17584	var m map[string]*json.RawMessage
17585	err := json.Unmarshal(body, &m)
17586	if err != nil {
17587		return err
17588	}
17589	for k, v := range m {
17590		switch k {
17591		case "properties":
17592			if v != nil {
17593				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
17594				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
17595				if err != nil {
17596					return err
17597				}
17598				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
17599			}
17600		case "name":
17601			if v != nil {
17602				var name string
17603				err = json.Unmarshal(*v, &name)
17604				if err != nil {
17605					return err
17606				}
17607				vcrc.Name = &name
17608			}
17609		case "etag":
17610			if v != nil {
17611				var etag string
17612				err = json.Unmarshal(*v, &etag)
17613				if err != nil {
17614					return err
17615				}
17616				vcrc.Etag = &etag
17617			}
17618		case "id":
17619			if v != nil {
17620				var ID string
17621				err = json.Unmarshal(*v, &ID)
17622				if err != nil {
17623					return err
17624				}
17625				vcrc.ID = &ID
17626			}
17627		}
17628	}
17629
17630	return nil
17631}
17632
17633// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
17634// network gateway.
17635type VpnClientRevokedCertificatePropertiesFormat struct {
17636	// Thumbprint - The revoked VPN client certificate thumbprint.
17637	Thumbprint *string `json:"thumbprint,omitempty"`
17638	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17639	ProvisioningState *string `json:"provisioningState,omitempty"`
17640}
17641
17642// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
17643func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17644	objectMap := make(map[string]interface{})
17645	if vcrcpf.Thumbprint != nil {
17646		objectMap["thumbprint"] = vcrcpf.Thumbprint
17647	}
17648	return json.Marshal(objectMap)
17649}
17650
17651// VpnClientRootCertificate VPN client root certificate of virtual network gateway
17652type VpnClientRootCertificate struct {
17653	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
17654	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
17655	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17656	Name *string `json:"name,omitempty"`
17657	// Etag - A unique read-only string that changes whenever the resource is updated.
17658	Etag *string `json:"etag,omitempty"`
17659	// ID - Resource ID.
17660	ID *string `json:"id,omitempty"`
17661}
17662
17663// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
17664func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
17665	objectMap := make(map[string]interface{})
17666	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
17667		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
17668	}
17669	if vcrc.Name != nil {
17670		objectMap["name"] = vcrc.Name
17671	}
17672	if vcrc.Etag != nil {
17673		objectMap["etag"] = vcrc.Etag
17674	}
17675	if vcrc.ID != nil {
17676		objectMap["id"] = vcrc.ID
17677	}
17678	return json.Marshal(objectMap)
17679}
17680
17681// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
17682func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
17683	var m map[string]*json.RawMessage
17684	err := json.Unmarshal(body, &m)
17685	if err != nil {
17686		return err
17687	}
17688	for k, v := range m {
17689		switch k {
17690		case "properties":
17691			if v != nil {
17692				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
17693				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
17694				if err != nil {
17695					return err
17696				}
17697				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
17698			}
17699		case "name":
17700			if v != nil {
17701				var name string
17702				err = json.Unmarshal(*v, &name)
17703				if err != nil {
17704					return err
17705				}
17706				vcrc.Name = &name
17707			}
17708		case "etag":
17709			if v != nil {
17710				var etag string
17711				err = json.Unmarshal(*v, &etag)
17712				if err != nil {
17713					return err
17714				}
17715				vcrc.Etag = &etag
17716			}
17717		case "id":
17718			if v != nil {
17719				var ID string
17720				err = json.Unmarshal(*v, &ID)
17721				if err != nil {
17722					return err
17723				}
17724				vcrc.ID = &ID
17725			}
17726		}
17727	}
17728
17729	return nil
17730}
17731
17732// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
17733type VpnClientRootCertificatePropertiesFormat struct {
17734	// PublicCertData - The certificate public data.
17735	PublicCertData *string `json:"publicCertData,omitempty"`
17736	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17737	ProvisioningState *string `json:"provisioningState,omitempty"`
17738}
17739
17740// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
17741func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17742	objectMap := make(map[string]interface{})
17743	if vcrcpf.PublicCertData != nil {
17744		objectMap["publicCertData"] = vcrcpf.PublicCertData
17745	}
17746	return json.Marshal(objectMap)
17747}
17748
17749// VpnDeviceScriptParameters vpn device configuration script generation parameters
17750type VpnDeviceScriptParameters struct {
17751	// Vendor - The vendor for the vpn device.
17752	Vendor *string `json:"vendor,omitempty"`
17753	// DeviceFamily - The device family for the vpn device.
17754	DeviceFamily *string `json:"deviceFamily,omitempty"`
17755	// FirmwareVersion - The firmware version for the vpn device.
17756	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
17757}
17758
17759// Watcher network watcher in a resource group.
17760type Watcher struct {
17761	autorest.Response        `json:"-"`
17762	Etag                     *string `json:"etag,omitempty"`
17763	*WatcherPropertiesFormat `json:"properties,omitempty"`
17764	// ID - Resource ID.
17765	ID *string `json:"id,omitempty"`
17766	// Name - READ-ONLY; Resource name.
17767	Name *string `json:"name,omitempty"`
17768	// Type - READ-ONLY; Resource type.
17769	Type *string `json:"type,omitempty"`
17770	// Location - Resource location.
17771	Location *string `json:"location,omitempty"`
17772	// Tags - Resource tags.
17773	Tags map[string]*string `json:"tags"`
17774}
17775
17776// MarshalJSON is the custom marshaler for Watcher.
17777func (w Watcher) MarshalJSON() ([]byte, error) {
17778	objectMap := make(map[string]interface{})
17779	if w.Etag != nil {
17780		objectMap["etag"] = w.Etag
17781	}
17782	if w.WatcherPropertiesFormat != nil {
17783		objectMap["properties"] = w.WatcherPropertiesFormat
17784	}
17785	if w.ID != nil {
17786		objectMap["id"] = w.ID
17787	}
17788	if w.Location != nil {
17789		objectMap["location"] = w.Location
17790	}
17791	if w.Tags != nil {
17792		objectMap["tags"] = w.Tags
17793	}
17794	return json.Marshal(objectMap)
17795}
17796
17797// UnmarshalJSON is the custom unmarshaler for Watcher struct.
17798func (w *Watcher) UnmarshalJSON(body []byte) error {
17799	var m map[string]*json.RawMessage
17800	err := json.Unmarshal(body, &m)
17801	if err != nil {
17802		return err
17803	}
17804	for k, v := range m {
17805		switch k {
17806		case "etag":
17807			if v != nil {
17808				var etag string
17809				err = json.Unmarshal(*v, &etag)
17810				if err != nil {
17811					return err
17812				}
17813				w.Etag = &etag
17814			}
17815		case "properties":
17816			if v != nil {
17817				var watcherPropertiesFormat WatcherPropertiesFormat
17818				err = json.Unmarshal(*v, &watcherPropertiesFormat)
17819				if err != nil {
17820					return err
17821				}
17822				w.WatcherPropertiesFormat = &watcherPropertiesFormat
17823			}
17824		case "id":
17825			if v != nil {
17826				var ID string
17827				err = json.Unmarshal(*v, &ID)
17828				if err != nil {
17829					return err
17830				}
17831				w.ID = &ID
17832			}
17833		case "name":
17834			if v != nil {
17835				var name string
17836				err = json.Unmarshal(*v, &name)
17837				if err != nil {
17838					return err
17839				}
17840				w.Name = &name
17841			}
17842		case "type":
17843			if v != nil {
17844				var typeVar string
17845				err = json.Unmarshal(*v, &typeVar)
17846				if err != nil {
17847					return err
17848				}
17849				w.Type = &typeVar
17850			}
17851		case "location":
17852			if v != nil {
17853				var location string
17854				err = json.Unmarshal(*v, &location)
17855				if err != nil {
17856					return err
17857				}
17858				w.Location = &location
17859			}
17860		case "tags":
17861			if v != nil {
17862				var tags map[string]*string
17863				err = json.Unmarshal(*v, &tags)
17864				if err != nil {
17865					return err
17866				}
17867				w.Tags = tags
17868			}
17869		}
17870	}
17871
17872	return nil
17873}
17874
17875// WatcherListResult list of network watcher resources.
17876type WatcherListResult struct {
17877	autorest.Response `json:"-"`
17878	Value             *[]Watcher `json:"value,omitempty"`
17879}
17880
17881// WatcherPropertiesFormat the network watcher properties.
17882type WatcherPropertiesFormat struct {
17883	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17884	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17885}
17886
17887// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
17888func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
17889	objectMap := make(map[string]interface{})
17890	return json.Marshal(objectMap)
17891}
17892
17893// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
17894// long-running operation.
17895type WatchersCheckConnectivityFuture struct {
17896	azure.FutureAPI
17897	// Result returns the result of the asynchronous operation.
17898	// If the operation has not completed it will return an error.
17899	Result func(WatchersClient) (ConnectivityInformation, error)
17900}
17901
17902// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17903func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
17904	var azFuture azure.Future
17905	if err := json.Unmarshal(body, &azFuture); err != nil {
17906		return err
17907	}
17908	future.FutureAPI = &azFuture
17909	future.Result = future.result
17910	return nil
17911}
17912
17913// result is the default implementation for WatchersCheckConnectivityFuture.Result.
17914func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
17915	var done bool
17916	done, err = future.DoneWithContext(context.Background(), client)
17917	if err != nil {
17918		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
17919		return
17920	}
17921	if !done {
17922		ci.Response.Response = future.Response()
17923		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
17924		return
17925	}
17926	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17927	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
17928		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
17929		if err != nil {
17930			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
17931		}
17932	}
17933	return
17934}
17935
17936// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17937// operation.
17938type WatchersDeleteFuture struct {
17939	azure.FutureAPI
17940	// Result returns the result of the asynchronous operation.
17941	// If the operation has not completed it will return an error.
17942	Result func(WatchersClient) (autorest.Response, error)
17943}
17944
17945// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17946func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
17947	var azFuture azure.Future
17948	if err := json.Unmarshal(body, &azFuture); err != nil {
17949		return err
17950	}
17951	future.FutureAPI = &azFuture
17952	future.Result = future.result
17953	return nil
17954}
17955
17956// result is the default implementation for WatchersDeleteFuture.Result.
17957func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
17958	var done bool
17959	done, err = future.DoneWithContext(context.Background(), client)
17960	if err != nil {
17961		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
17962		return
17963	}
17964	if !done {
17965		ar.Response = future.Response()
17966		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
17967		return
17968	}
17969	ar.Response = future.Response()
17970	return
17971}
17972
17973// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
17974// long-running operation.
17975type WatchersGetAzureReachabilityReportFuture struct {
17976	azure.FutureAPI
17977	// Result returns the result of the asynchronous operation.
17978	// If the operation has not completed it will return an error.
17979	Result func(WatchersClient) (AzureReachabilityReport, error)
17980}
17981
17982// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17983func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
17984	var azFuture azure.Future
17985	if err := json.Unmarshal(body, &azFuture); err != nil {
17986		return err
17987	}
17988	future.FutureAPI = &azFuture
17989	future.Result = future.result
17990	return nil
17991}
17992
17993// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
17994func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
17995	var done bool
17996	done, err = future.DoneWithContext(context.Background(), client)
17997	if err != nil {
17998		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
17999		return
18000	}
18001	if !done {
18002		arr.Response.Response = future.Response()
18003		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
18004		return
18005	}
18006	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18007	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
18008		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
18009		if err != nil {
18010			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
18011		}
18012	}
18013	return
18014}
18015
18016// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
18017// long-running operation.
18018type WatchersGetFlowLogStatusFuture struct {
18019	azure.FutureAPI
18020	// Result returns the result of the asynchronous operation.
18021	// If the operation has not completed it will return an error.
18022	Result func(WatchersClient) (FlowLogInformation, error)
18023}
18024
18025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18026func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
18027	var azFuture azure.Future
18028	if err := json.Unmarshal(body, &azFuture); err != nil {
18029		return err
18030	}
18031	future.FutureAPI = &azFuture
18032	future.Result = future.result
18033	return nil
18034}
18035
18036// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
18037func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
18038	var done bool
18039	done, err = future.DoneWithContext(context.Background(), client)
18040	if err != nil {
18041		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
18042		return
18043	}
18044	if !done {
18045		fli.Response.Response = future.Response()
18046		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
18047		return
18048	}
18049	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18050	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
18051		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
18052		if err != nil {
18053			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
18054		}
18055	}
18056	return
18057}
18058
18059// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
18060// operation.
18061type WatchersGetNextHopFuture struct {
18062	azure.FutureAPI
18063	// Result returns the result of the asynchronous operation.
18064	// If the operation has not completed it will return an error.
18065	Result func(WatchersClient) (NextHopResult, error)
18066}
18067
18068// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18069func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
18070	var azFuture azure.Future
18071	if err := json.Unmarshal(body, &azFuture); err != nil {
18072		return err
18073	}
18074	future.FutureAPI = &azFuture
18075	future.Result = future.result
18076	return nil
18077}
18078
18079// result is the default implementation for WatchersGetNextHopFuture.Result.
18080func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
18081	var done bool
18082	done, err = future.DoneWithContext(context.Background(), client)
18083	if err != nil {
18084		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
18085		return
18086	}
18087	if !done {
18088		nhr.Response.Response = future.Response()
18089		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
18090		return
18091	}
18092	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18093	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
18094		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
18095		if err != nil {
18096			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
18097		}
18098	}
18099	return
18100}
18101
18102// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
18103// long-running operation.
18104type WatchersGetTroubleshootingFuture struct {
18105	azure.FutureAPI
18106	// Result returns the result of the asynchronous operation.
18107	// If the operation has not completed it will return an error.
18108	Result func(WatchersClient) (TroubleshootingResult, error)
18109}
18110
18111// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18112func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
18113	var azFuture azure.Future
18114	if err := json.Unmarshal(body, &azFuture); err != nil {
18115		return err
18116	}
18117	future.FutureAPI = &azFuture
18118	future.Result = future.result
18119	return nil
18120}
18121
18122// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
18123func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18124	var done bool
18125	done, err = future.DoneWithContext(context.Background(), client)
18126	if err != nil {
18127		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
18128		return
18129	}
18130	if !done {
18131		tr.Response.Response = future.Response()
18132		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
18133		return
18134	}
18135	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18136	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18137		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
18138		if err != nil {
18139			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
18140		}
18141	}
18142	return
18143}
18144
18145// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
18146// long-running operation.
18147type WatchersGetTroubleshootingResultFuture struct {
18148	azure.FutureAPI
18149	// Result returns the result of the asynchronous operation.
18150	// If the operation has not completed it will return an error.
18151	Result func(WatchersClient) (TroubleshootingResult, error)
18152}
18153
18154// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18155func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
18156	var azFuture azure.Future
18157	if err := json.Unmarshal(body, &azFuture); err != nil {
18158		return err
18159	}
18160	future.FutureAPI = &azFuture
18161	future.Result = future.result
18162	return nil
18163}
18164
18165// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
18166func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18167	var done bool
18168	done, err = future.DoneWithContext(context.Background(), client)
18169	if err != nil {
18170		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
18171		return
18172	}
18173	if !done {
18174		tr.Response.Response = future.Response()
18175		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
18176		return
18177	}
18178	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18179	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18180		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
18181		if err != nil {
18182			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
18183		}
18184	}
18185	return
18186}
18187
18188// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
18189// long-running operation.
18190type WatchersGetVMSecurityRulesFuture struct {
18191	azure.FutureAPI
18192	// Result returns the result of the asynchronous operation.
18193	// If the operation has not completed it will return an error.
18194	Result func(WatchersClient) (SecurityGroupViewResult, error)
18195}
18196
18197// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18198func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
18199	var azFuture azure.Future
18200	if err := json.Unmarshal(body, &azFuture); err != nil {
18201		return err
18202	}
18203	future.FutureAPI = &azFuture
18204	future.Result = future.result
18205	return nil
18206}
18207
18208// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
18209func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
18210	var done bool
18211	done, err = future.DoneWithContext(context.Background(), client)
18212	if err != nil {
18213		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
18214		return
18215	}
18216	if !done {
18217		sgvr.Response.Response = future.Response()
18218		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
18219		return
18220	}
18221	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18222	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
18223		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
18224		if err != nil {
18225			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
18226		}
18227	}
18228	return
18229}
18230
18231// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
18232// long-running operation.
18233type WatchersListAvailableProvidersFuture struct {
18234	azure.FutureAPI
18235	// Result returns the result of the asynchronous operation.
18236	// If the operation has not completed it will return an error.
18237	Result func(WatchersClient) (AvailableProvidersList, error)
18238}
18239
18240// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18241func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
18242	var azFuture azure.Future
18243	if err := json.Unmarshal(body, &azFuture); err != nil {
18244		return err
18245	}
18246	future.FutureAPI = &azFuture
18247	future.Result = future.result
18248	return nil
18249}
18250
18251// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
18252func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
18253	var done bool
18254	done, err = future.DoneWithContext(context.Background(), client)
18255	if err != nil {
18256		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
18257		return
18258	}
18259	if !done {
18260		apl.Response.Response = future.Response()
18261		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
18262		return
18263	}
18264	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18265	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
18266		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
18267		if err != nil {
18268			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
18269		}
18270	}
18271	return
18272}
18273
18274// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
18275// long-running operation.
18276type WatchersSetFlowLogConfigurationFuture struct {
18277	azure.FutureAPI
18278	// Result returns the result of the asynchronous operation.
18279	// If the operation has not completed it will return an error.
18280	Result func(WatchersClient) (FlowLogInformation, error)
18281}
18282
18283// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18284func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
18285	var azFuture azure.Future
18286	if err := json.Unmarshal(body, &azFuture); err != nil {
18287		return err
18288	}
18289	future.FutureAPI = &azFuture
18290	future.Result = future.result
18291	return nil
18292}
18293
18294// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
18295func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
18296	var done bool
18297	done, err = future.DoneWithContext(context.Background(), client)
18298	if err != nil {
18299		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
18300		return
18301	}
18302	if !done {
18303		fli.Response.Response = future.Response()
18304		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
18305		return
18306	}
18307	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18308	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
18309		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
18310		if err != nil {
18311			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
18312		}
18313	}
18314	return
18315}
18316
18317// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
18318// operation.
18319type WatchersVerifyIPFlowFuture struct {
18320	azure.FutureAPI
18321	// Result returns the result of the asynchronous operation.
18322	// If the operation has not completed it will return an error.
18323	Result func(WatchersClient) (VerificationIPFlowResult, error)
18324}
18325
18326// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18327func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
18328	var azFuture azure.Future
18329	if err := json.Unmarshal(body, &azFuture); err != nil {
18330		return err
18331	}
18332	future.FutureAPI = &azFuture
18333	future.Result = future.result
18334	return nil
18335}
18336
18337// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
18338func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
18339	var done bool
18340	done, err = future.DoneWithContext(context.Background(), client)
18341	if err != nil {
18342		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
18343		return
18344	}
18345	if !done {
18346		vifr.Response.Response = future.Response()
18347		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
18348		return
18349	}
18350	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18351	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
18352		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
18353		if err != nil {
18354			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
18355		}
18356	}
18357	return
18358}
18359