1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-08-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	// ResourceGUID - Resource GUID property of the application gateway resource.
1812	ResourceGUID *string `json:"resourceGuid,omitempty"`
1813	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1814	ProvisioningState *string `json:"provisioningState,omitempty"`
1815}
1816
1817// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1818func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1819	objectMap := make(map[string]interface{})
1820	if agpf.Sku != nil {
1821		objectMap["sku"] = agpf.Sku
1822	}
1823	if agpf.SslPolicy != nil {
1824		objectMap["sslPolicy"] = agpf.SslPolicy
1825	}
1826	if agpf.GatewayIPConfigurations != nil {
1827		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1828	}
1829	if agpf.AuthenticationCertificates != nil {
1830		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1831	}
1832	if agpf.SslCertificates != nil {
1833		objectMap["sslCertificates"] = agpf.SslCertificates
1834	}
1835	if agpf.FrontendIPConfigurations != nil {
1836		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1837	}
1838	if agpf.FrontendPorts != nil {
1839		objectMap["frontendPorts"] = agpf.FrontendPorts
1840	}
1841	if agpf.Probes != nil {
1842		objectMap["probes"] = agpf.Probes
1843	}
1844	if agpf.BackendAddressPools != nil {
1845		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1846	}
1847	if agpf.BackendHTTPSettingsCollection != nil {
1848		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1849	}
1850	if agpf.HTTPListeners != nil {
1851		objectMap["httpListeners"] = agpf.HTTPListeners
1852	}
1853	if agpf.URLPathMaps != nil {
1854		objectMap["urlPathMaps"] = agpf.URLPathMaps
1855	}
1856	if agpf.RequestRoutingRules != nil {
1857		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1858	}
1859	if agpf.RedirectConfigurations != nil {
1860		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1861	}
1862	if agpf.WebApplicationFirewallConfiguration != nil {
1863		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1864	}
1865	if agpf.ResourceGUID != nil {
1866		objectMap["resourceGuid"] = agpf.ResourceGUID
1867	}
1868	if agpf.ProvisioningState != nil {
1869		objectMap["provisioningState"] = agpf.ProvisioningState
1870	}
1871	return json.Marshal(objectMap)
1872}
1873
1874// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1875type ApplicationGatewayRedirectConfiguration struct {
1876	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1877	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1878	Name *string `json:"name,omitempty"`
1879	// Etag - A unique read-only string that changes whenever the resource is updated.
1880	Etag *string `json:"etag,omitempty"`
1881	// Type - Type of the resource.
1882	Type *string `json:"type,omitempty"`
1883	// ID - Resource ID.
1884	ID *string `json:"id,omitempty"`
1885}
1886
1887// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1888func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1889	objectMap := make(map[string]interface{})
1890	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1891		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1892	}
1893	if agrc.Name != nil {
1894		objectMap["name"] = agrc.Name
1895	}
1896	if agrc.Etag != nil {
1897		objectMap["etag"] = agrc.Etag
1898	}
1899	if agrc.Type != nil {
1900		objectMap["type"] = agrc.Type
1901	}
1902	if agrc.ID != nil {
1903		objectMap["id"] = agrc.ID
1904	}
1905	return json.Marshal(objectMap)
1906}
1907
1908// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1909func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1910	var m map[string]*json.RawMessage
1911	err := json.Unmarshal(body, &m)
1912	if err != nil {
1913		return err
1914	}
1915	for k, v := range m {
1916		switch k {
1917		case "properties":
1918			if v != nil {
1919				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1920				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1921				if err != nil {
1922					return err
1923				}
1924				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1925			}
1926		case "name":
1927			if v != nil {
1928				var name string
1929				err = json.Unmarshal(*v, &name)
1930				if err != nil {
1931					return err
1932				}
1933				agrc.Name = &name
1934			}
1935		case "etag":
1936			if v != nil {
1937				var etag string
1938				err = json.Unmarshal(*v, &etag)
1939				if err != nil {
1940					return err
1941				}
1942				agrc.Etag = &etag
1943			}
1944		case "type":
1945			if v != nil {
1946				var typeVar string
1947				err = json.Unmarshal(*v, &typeVar)
1948				if err != nil {
1949					return err
1950				}
1951				agrc.Type = &typeVar
1952			}
1953		case "id":
1954			if v != nil {
1955				var ID string
1956				err = json.Unmarshal(*v, &ID)
1957				if err != nil {
1958					return err
1959				}
1960				agrc.ID = &ID
1961			}
1962		}
1963	}
1964
1965	return nil
1966}
1967
1968// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1969// application gateway.
1970type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1971	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1972	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1973	// TargetListener - Reference to a listener to redirect the request to.
1974	TargetListener *SubResource `json:"targetListener,omitempty"`
1975	// TargetURL - Url to redirect the request to.
1976	TargetURL *string `json:"targetUrl,omitempty"`
1977	// IncludePath - Include path in the redirected url.
1978	IncludePath *bool `json:"includePath,omitempty"`
1979	// IncludeQueryString - Include query string in the redirected url.
1980	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1981	// RequestRoutingRules - Request routing specifying redirect configuration.
1982	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1983	// URLPathMaps - Url path maps specifying default redirect configuration.
1984	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
1985	// PathRules - Path rules specifying redirect configuration.
1986	PathRules *[]SubResource `json:"pathRules,omitempty"`
1987}
1988
1989// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
1990type ApplicationGatewayRequestRoutingRule struct {
1991	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
1992	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1993	Name *string `json:"name,omitempty"`
1994	// Etag - A unique read-only string that changes whenever the resource is updated.
1995	Etag *string `json:"etag,omitempty"`
1996	// Type - Type of the resource.
1997	Type *string `json:"type,omitempty"`
1998	// ID - Resource ID.
1999	ID *string `json:"id,omitempty"`
2000}
2001
2002// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2003func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2004	objectMap := make(map[string]interface{})
2005	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2006		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2007	}
2008	if agrrr.Name != nil {
2009		objectMap["name"] = agrrr.Name
2010	}
2011	if agrrr.Etag != nil {
2012		objectMap["etag"] = agrrr.Etag
2013	}
2014	if agrrr.Type != nil {
2015		objectMap["type"] = agrrr.Type
2016	}
2017	if agrrr.ID != nil {
2018		objectMap["id"] = agrrr.ID
2019	}
2020	return json.Marshal(objectMap)
2021}
2022
2023// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2024func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2025	var m map[string]*json.RawMessage
2026	err := json.Unmarshal(body, &m)
2027	if err != nil {
2028		return err
2029	}
2030	for k, v := range m {
2031		switch k {
2032		case "properties":
2033			if v != nil {
2034				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2035				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2036				if err != nil {
2037					return err
2038				}
2039				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2040			}
2041		case "name":
2042			if v != nil {
2043				var name string
2044				err = json.Unmarshal(*v, &name)
2045				if err != nil {
2046					return err
2047				}
2048				agrrr.Name = &name
2049			}
2050		case "etag":
2051			if v != nil {
2052				var etag string
2053				err = json.Unmarshal(*v, &etag)
2054				if err != nil {
2055					return err
2056				}
2057				agrrr.Etag = &etag
2058			}
2059		case "type":
2060			if v != nil {
2061				var typeVar string
2062				err = json.Unmarshal(*v, &typeVar)
2063				if err != nil {
2064					return err
2065				}
2066				agrrr.Type = &typeVar
2067			}
2068		case "id":
2069			if v != nil {
2070				var ID string
2071				err = json.Unmarshal(*v, &ID)
2072				if err != nil {
2073					return err
2074				}
2075				agrrr.ID = &ID
2076			}
2077		}
2078	}
2079
2080	return nil
2081}
2082
2083// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2084// application gateway.
2085type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2086	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2087	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2088	// BackendAddressPool - Backend address pool resource of the application gateway.
2089	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2090	// BackendHTTPSettings - Frontend port resource of the application gateway.
2091	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2092	// HTTPListener - Http listener resource of the application gateway.
2093	HTTPListener *SubResource `json:"httpListener,omitempty"`
2094	// URLPathMap - URL path map resource of the application gateway.
2095	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2096	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2097	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2098	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2099	ProvisioningState *string `json:"provisioningState,omitempty"`
2100}
2101
2102// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2103// long-running operation.
2104type ApplicationGatewaysBackendHealthFuture struct {
2105	azure.FutureAPI
2106	// Result returns the result of the asynchronous operation.
2107	// If the operation has not completed it will return an error.
2108	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2109}
2110
2111// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2112func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2113	var azFuture azure.Future
2114	if err := json.Unmarshal(body, &azFuture); err != nil {
2115		return err
2116	}
2117	future.FutureAPI = &azFuture
2118	future.Result = future.result
2119	return nil
2120}
2121
2122// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2123func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2124	var done bool
2125	done, err = future.DoneWithContext(context.Background(), client)
2126	if err != nil {
2127		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2128		return
2129	}
2130	if !done {
2131		agbh.Response.Response = future.Response()
2132		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2133		return
2134	}
2135	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2136	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2137		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2138		if err != nil {
2139			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2140		}
2141	}
2142	return
2143}
2144
2145// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2146// long-running operation.
2147type ApplicationGatewaysCreateOrUpdateFuture struct {
2148	azure.FutureAPI
2149	// Result returns the result of the asynchronous operation.
2150	// If the operation has not completed it will return an error.
2151	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2152}
2153
2154// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2155func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2156	var azFuture azure.Future
2157	if err := json.Unmarshal(body, &azFuture); err != nil {
2158		return err
2159	}
2160	future.FutureAPI = &azFuture
2161	future.Result = future.result
2162	return nil
2163}
2164
2165// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2166func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2167	var done bool
2168	done, err = future.DoneWithContext(context.Background(), client)
2169	if err != nil {
2170		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2171		return
2172	}
2173	if !done {
2174		ag.Response.Response = future.Response()
2175		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2176		return
2177	}
2178	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2179	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2180		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2181		if err != nil {
2182			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2183		}
2184	}
2185	return
2186}
2187
2188// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2189// long-running operation.
2190type ApplicationGatewaysDeleteFuture struct {
2191	azure.FutureAPI
2192	// Result returns the result of the asynchronous operation.
2193	// If the operation has not completed it will return an error.
2194	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2195}
2196
2197// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2198func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2199	var azFuture azure.Future
2200	if err := json.Unmarshal(body, &azFuture); err != nil {
2201		return err
2202	}
2203	future.FutureAPI = &azFuture
2204	future.Result = future.result
2205	return nil
2206}
2207
2208// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2209func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2210	var done bool
2211	done, err = future.DoneWithContext(context.Background(), client)
2212	if err != nil {
2213		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2214		return
2215	}
2216	if !done {
2217		ar.Response = future.Response()
2218		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2219		return
2220	}
2221	ar.Response = future.Response()
2222	return
2223}
2224
2225// ApplicationGatewaySku SKU of an application gateway
2226type ApplicationGatewaySku struct {
2227	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2228	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2229	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2230	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2231	// Capacity - Capacity (instance count) of an application gateway.
2232	Capacity *int32 `json:"capacity,omitempty"`
2233}
2234
2235// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2236type ApplicationGatewaySslCertificate struct {
2237	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2238	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2239	Name *string `json:"name,omitempty"`
2240	// Etag - A unique read-only string that changes whenever the resource is updated.
2241	Etag *string `json:"etag,omitempty"`
2242	// Type - Type of the resource.
2243	Type *string `json:"type,omitempty"`
2244	// ID - Resource ID.
2245	ID *string `json:"id,omitempty"`
2246}
2247
2248// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2249func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2250	objectMap := make(map[string]interface{})
2251	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2252		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2253	}
2254	if agsc.Name != nil {
2255		objectMap["name"] = agsc.Name
2256	}
2257	if agsc.Etag != nil {
2258		objectMap["etag"] = agsc.Etag
2259	}
2260	if agsc.Type != nil {
2261		objectMap["type"] = agsc.Type
2262	}
2263	if agsc.ID != nil {
2264		objectMap["id"] = agsc.ID
2265	}
2266	return json.Marshal(objectMap)
2267}
2268
2269// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2270func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2271	var m map[string]*json.RawMessage
2272	err := json.Unmarshal(body, &m)
2273	if err != nil {
2274		return err
2275	}
2276	for k, v := range m {
2277		switch k {
2278		case "properties":
2279			if v != nil {
2280				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2281				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2282				if err != nil {
2283					return err
2284				}
2285				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2286			}
2287		case "name":
2288			if v != nil {
2289				var name string
2290				err = json.Unmarshal(*v, &name)
2291				if err != nil {
2292					return err
2293				}
2294				agsc.Name = &name
2295			}
2296		case "etag":
2297			if v != nil {
2298				var etag string
2299				err = json.Unmarshal(*v, &etag)
2300				if err != nil {
2301					return err
2302				}
2303				agsc.Etag = &etag
2304			}
2305		case "type":
2306			if v != nil {
2307				var typeVar string
2308				err = json.Unmarshal(*v, &typeVar)
2309				if err != nil {
2310					return err
2311				}
2312				agsc.Type = &typeVar
2313			}
2314		case "id":
2315			if v != nil {
2316				var ID string
2317				err = json.Unmarshal(*v, &ID)
2318				if err != nil {
2319					return err
2320				}
2321				agsc.ID = &ID
2322			}
2323		}
2324	}
2325
2326	return nil
2327}
2328
2329// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2330// gateway.
2331type ApplicationGatewaySslCertificatePropertiesFormat struct {
2332	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2333	Data *string `json:"data,omitempty"`
2334	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2335	Password *string `json:"password,omitempty"`
2336	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2337	PublicCertData *string `json:"publicCertData,omitempty"`
2338	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2339	ProvisioningState *string `json:"provisioningState,omitempty"`
2340}
2341
2342// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2343type ApplicationGatewaySslPolicy struct {
2344	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2345	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2346	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2347	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2348	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2349	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2350	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2351	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2352	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2353	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2354}
2355
2356// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2357type ApplicationGatewaySslPredefinedPolicy struct {
2358	autorest.Response `json:"-"`
2359	// Name - Name of Ssl predefined policy.
2360	Name                                                   *string `json:"name,omitempty"`
2361	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2362	// ID - Resource ID.
2363	ID *string `json:"id,omitempty"`
2364}
2365
2366// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2367func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2368	objectMap := make(map[string]interface{})
2369	if agspp.Name != nil {
2370		objectMap["name"] = agspp.Name
2371	}
2372	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2373		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2374	}
2375	if agspp.ID != nil {
2376		objectMap["id"] = agspp.ID
2377	}
2378	return json.Marshal(objectMap)
2379}
2380
2381// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2382func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2383	var m map[string]*json.RawMessage
2384	err := json.Unmarshal(body, &m)
2385	if err != nil {
2386		return err
2387	}
2388	for k, v := range m {
2389		switch k {
2390		case "name":
2391			if v != nil {
2392				var name string
2393				err = json.Unmarshal(*v, &name)
2394				if err != nil {
2395					return err
2396				}
2397				agspp.Name = &name
2398			}
2399		case "properties":
2400			if v != nil {
2401				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2402				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2403				if err != nil {
2404					return err
2405				}
2406				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2407			}
2408		case "id":
2409			if v != nil {
2410				var ID string
2411				err = json.Unmarshal(*v, &ID)
2412				if err != nil {
2413					return err
2414				}
2415				agspp.ID = &ID
2416			}
2417		}
2418	}
2419
2420	return nil
2421}
2422
2423// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2424// ApplicationGatewaySslPredefinedPolicy
2425type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2426	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2427	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2428	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2429	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2430}
2431
2432// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2433// long-running operation.
2434type ApplicationGatewaysStartFuture struct {
2435	azure.FutureAPI
2436	// Result returns the result of the asynchronous operation.
2437	// If the operation has not completed it will return an error.
2438	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2439}
2440
2441// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2442func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2443	var azFuture azure.Future
2444	if err := json.Unmarshal(body, &azFuture); err != nil {
2445		return err
2446	}
2447	future.FutureAPI = &azFuture
2448	future.Result = future.result
2449	return nil
2450}
2451
2452// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2453func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2454	var done bool
2455	done, err = future.DoneWithContext(context.Background(), client)
2456	if err != nil {
2457		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2458		return
2459	}
2460	if !done {
2461		ar.Response = future.Response()
2462		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2463		return
2464	}
2465	ar.Response = future.Response()
2466	return
2467}
2468
2469// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2470// operation.
2471type ApplicationGatewaysStopFuture struct {
2472	azure.FutureAPI
2473	// Result returns the result of the asynchronous operation.
2474	// If the operation has not completed it will return an error.
2475	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2476}
2477
2478// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2479func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2480	var azFuture azure.Future
2481	if err := json.Unmarshal(body, &azFuture); err != nil {
2482		return err
2483	}
2484	future.FutureAPI = &azFuture
2485	future.Result = future.result
2486	return nil
2487}
2488
2489// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2490func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2491	var done bool
2492	done, err = future.DoneWithContext(context.Background(), client)
2493	if err != nil {
2494		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2495		return
2496	}
2497	if !done {
2498		ar.Response = future.Response()
2499		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2500		return
2501	}
2502	ar.Response = future.Response()
2503	return
2504}
2505
2506// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2507// PathBasedRouting.
2508type ApplicationGatewayURLPathMap struct {
2509	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2510	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2511	Name *string `json:"name,omitempty"`
2512	// Etag - A unique read-only string that changes whenever the resource is updated.
2513	Etag *string `json:"etag,omitempty"`
2514	// Type - Type of the resource.
2515	Type *string `json:"type,omitempty"`
2516	// ID - Resource ID.
2517	ID *string `json:"id,omitempty"`
2518}
2519
2520// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2521func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2522	objectMap := make(map[string]interface{})
2523	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2524		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2525	}
2526	if agupm.Name != nil {
2527		objectMap["name"] = agupm.Name
2528	}
2529	if agupm.Etag != nil {
2530		objectMap["etag"] = agupm.Etag
2531	}
2532	if agupm.Type != nil {
2533		objectMap["type"] = agupm.Type
2534	}
2535	if agupm.ID != nil {
2536		objectMap["id"] = agupm.ID
2537	}
2538	return json.Marshal(objectMap)
2539}
2540
2541// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2542func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2543	var m map[string]*json.RawMessage
2544	err := json.Unmarshal(body, &m)
2545	if err != nil {
2546		return err
2547	}
2548	for k, v := range m {
2549		switch k {
2550		case "properties":
2551			if v != nil {
2552				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2553				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2554				if err != nil {
2555					return err
2556				}
2557				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2558			}
2559		case "name":
2560			if v != nil {
2561				var name string
2562				err = json.Unmarshal(*v, &name)
2563				if err != nil {
2564					return err
2565				}
2566				agupm.Name = &name
2567			}
2568		case "etag":
2569			if v != nil {
2570				var etag string
2571				err = json.Unmarshal(*v, &etag)
2572				if err != nil {
2573					return err
2574				}
2575				agupm.Etag = &etag
2576			}
2577		case "type":
2578			if v != nil {
2579				var typeVar string
2580				err = json.Unmarshal(*v, &typeVar)
2581				if err != nil {
2582					return err
2583				}
2584				agupm.Type = &typeVar
2585			}
2586		case "id":
2587			if v != nil {
2588				var ID string
2589				err = json.Unmarshal(*v, &ID)
2590				if err != nil {
2591					return err
2592				}
2593				agupm.ID = &ID
2594			}
2595		}
2596	}
2597
2598	return nil
2599}
2600
2601// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2602type ApplicationGatewayURLPathMapPropertiesFormat struct {
2603	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2604	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2605	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2606	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2607	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2608	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2609	// PathRules - Path rule of URL path map resource.
2610	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2611	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2612	ProvisioningState *string `json:"provisioningState,omitempty"`
2613}
2614
2615// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2616// configuration.
2617type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2618	// Enabled - Whether the web application firewall is enabled or not.
2619	Enabled *bool `json:"enabled,omitempty"`
2620	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2621	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2622	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2623	RuleSetType *string `json:"ruleSetType,omitempty"`
2624	// RuleSetVersion - The version of the rule set type.
2625	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2626	// DisabledRuleGroups - The disabled rule groups.
2627	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2628}
2629
2630// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
2631// that belongs to an ExpressRouteCircuit.
2632type AuthorizationListResult struct {
2633	autorest.Response `json:"-"`
2634	// Value - The authorizations in an ExpressRoute Circuit.
2635	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
2636	// NextLink - The URL to get the next set of results.
2637	NextLink *string `json:"nextLink,omitempty"`
2638}
2639
2640// AuthorizationListResultIterator provides access to a complete listing of
2641// ExpressRouteCircuitAuthorization values.
2642type AuthorizationListResultIterator struct {
2643	i    int
2644	page AuthorizationListResultPage
2645}
2646
2647// NextWithContext advances to the next value.  If there was an error making
2648// the request the iterator does not advance and the error is returned.
2649func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2650	if tracing.IsEnabled() {
2651		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
2652		defer func() {
2653			sc := -1
2654			if iter.Response().Response.Response != nil {
2655				sc = iter.Response().Response.Response.StatusCode
2656			}
2657			tracing.EndSpan(ctx, sc, err)
2658		}()
2659	}
2660	iter.i++
2661	if iter.i < len(iter.page.Values()) {
2662		return nil
2663	}
2664	err = iter.page.NextWithContext(ctx)
2665	if err != nil {
2666		iter.i--
2667		return err
2668	}
2669	iter.i = 0
2670	return nil
2671}
2672
2673// Next advances to the next value.  If there was an error making
2674// the request the iterator does not advance and the error is returned.
2675// Deprecated: Use NextWithContext() instead.
2676func (iter *AuthorizationListResultIterator) Next() error {
2677	return iter.NextWithContext(context.Background())
2678}
2679
2680// NotDone returns true if the enumeration should be started or is not yet complete.
2681func (iter AuthorizationListResultIterator) NotDone() bool {
2682	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2683}
2684
2685// Response returns the raw server response from the last page request.
2686func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
2687	return iter.page.Response()
2688}
2689
2690// Value returns the current value or a zero-initialized value if the
2691// iterator has advanced beyond the end of the collection.
2692func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
2693	if !iter.page.NotDone() {
2694		return ExpressRouteCircuitAuthorization{}
2695	}
2696	return iter.page.Values()[iter.i]
2697}
2698
2699// Creates a new instance of the AuthorizationListResultIterator type.
2700func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
2701	return AuthorizationListResultIterator{page: page}
2702}
2703
2704// IsEmpty returns true if the ListResult contains no values.
2705func (alr AuthorizationListResult) IsEmpty() bool {
2706	return alr.Value == nil || len(*alr.Value) == 0
2707}
2708
2709// hasNextLink returns true if the NextLink is not empty.
2710func (alr AuthorizationListResult) hasNextLink() bool {
2711	return alr.NextLink != nil && len(*alr.NextLink) != 0
2712}
2713
2714// authorizationListResultPreparer prepares a request to retrieve the next set of results.
2715// It returns nil if no more results exist.
2716func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
2717	if !alr.hasNextLink() {
2718		return nil, nil
2719	}
2720	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2721		autorest.AsJSON(),
2722		autorest.AsGet(),
2723		autorest.WithBaseURL(to.String(alr.NextLink)))
2724}
2725
2726// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
2727type AuthorizationListResultPage struct {
2728	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
2729	alr AuthorizationListResult
2730}
2731
2732// NextWithContext advances to the next page of values.  If there was an error making
2733// the request the page does not advance and the error is returned.
2734func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
2735	if tracing.IsEnabled() {
2736		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
2737		defer func() {
2738			sc := -1
2739			if page.Response().Response.Response != nil {
2740				sc = page.Response().Response.Response.StatusCode
2741			}
2742			tracing.EndSpan(ctx, sc, err)
2743		}()
2744	}
2745	for {
2746		next, err := page.fn(ctx, page.alr)
2747		if err != nil {
2748			return err
2749		}
2750		page.alr = next
2751		if !next.hasNextLink() || !next.IsEmpty() {
2752			break
2753		}
2754	}
2755	return nil
2756}
2757
2758// Next advances to the next page of values.  If there was an error making
2759// the request the page does not advance and the error is returned.
2760// Deprecated: Use NextWithContext() instead.
2761func (page *AuthorizationListResultPage) Next() error {
2762	return page.NextWithContext(context.Background())
2763}
2764
2765// NotDone returns true if the page enumeration should be started or is not yet complete.
2766func (page AuthorizationListResultPage) NotDone() bool {
2767	return !page.alr.IsEmpty()
2768}
2769
2770// Response returns the raw server response from the last page request.
2771func (page AuthorizationListResultPage) Response() AuthorizationListResult {
2772	return page.alr
2773}
2774
2775// Values returns the slice of values for the current page or nil if there are no values.
2776func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
2777	if page.alr.IsEmpty() {
2778		return nil
2779	}
2780	return *page.alr.Value
2781}
2782
2783// Creates a new instance of the AuthorizationListResultPage type.
2784func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
2785	return AuthorizationListResultPage{
2786		fn:  getNextPage,
2787		alr: cur,
2788	}
2789}
2790
2791// AuthorizationPropertiesFormat ...
2792type AuthorizationPropertiesFormat struct {
2793	// AuthorizationKey - The authorization key.
2794	AuthorizationKey *string `json:"authorizationKey,omitempty"`
2795	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
2796	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
2797	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2798	ProvisioningState *string `json:"provisioningState,omitempty"`
2799}
2800
2801// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
2802// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
2803// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
2804// operation succeeded, the response body includes the HTTP status code for the successful request. If the
2805// asynchronous operation failed, the response body includes the HTTP status code for the failed request
2806// and error information regarding the failure.
2807type AzureAsyncOperationResult struct {
2808	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed'
2809	Status OperationStatus `json:"status,omitempty"`
2810	Error  *Error          `json:"error,omitempty"`
2811}
2812
2813// BackendAddressPool pool of backend IP addresses.
2814type BackendAddressPool struct {
2815	autorest.Response `json:"-"`
2816	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
2817	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
2818	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
2819	Name *string `json:"name,omitempty"`
2820	// Etag - A unique read-only string that changes whenever the resource is updated.
2821	Etag *string `json:"etag,omitempty"`
2822	// ID - Resource ID.
2823	ID *string `json:"id,omitempty"`
2824}
2825
2826// MarshalJSON is the custom marshaler for BackendAddressPool.
2827func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
2828	objectMap := make(map[string]interface{})
2829	if bap.BackendAddressPoolPropertiesFormat != nil {
2830		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
2831	}
2832	if bap.Name != nil {
2833		objectMap["name"] = bap.Name
2834	}
2835	if bap.Etag != nil {
2836		objectMap["etag"] = bap.Etag
2837	}
2838	if bap.ID != nil {
2839		objectMap["id"] = bap.ID
2840	}
2841	return json.Marshal(objectMap)
2842}
2843
2844// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
2845func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
2846	var m map[string]*json.RawMessage
2847	err := json.Unmarshal(body, &m)
2848	if err != nil {
2849		return err
2850	}
2851	for k, v := range m {
2852		switch k {
2853		case "properties":
2854			if v != nil {
2855				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
2856				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
2857				if err != nil {
2858					return err
2859				}
2860				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
2861			}
2862		case "name":
2863			if v != nil {
2864				var name string
2865				err = json.Unmarshal(*v, &name)
2866				if err != nil {
2867					return err
2868				}
2869				bap.Name = &name
2870			}
2871		case "etag":
2872			if v != nil {
2873				var etag string
2874				err = json.Unmarshal(*v, &etag)
2875				if err != nil {
2876					return err
2877				}
2878				bap.Etag = &etag
2879			}
2880		case "id":
2881			if v != nil {
2882				var ID string
2883				err = json.Unmarshal(*v, &ID)
2884				if err != nil {
2885					return err
2886				}
2887				bap.ID = &ID
2888			}
2889		}
2890	}
2891
2892	return nil
2893}
2894
2895// BackendAddressPoolPropertiesFormat properties of the backend address pool.
2896type BackendAddressPoolPropertiesFormat struct {
2897	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
2898	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
2899	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
2900	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
2901	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
2902	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
2903	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2904	ProvisioningState *string `json:"provisioningState,omitempty"`
2905}
2906
2907// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
2908func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
2909	objectMap := make(map[string]interface{})
2910	if bappf.ProvisioningState != nil {
2911		objectMap["provisioningState"] = bappf.ProvisioningState
2912	}
2913	return json.Marshal(objectMap)
2914}
2915
2916// BGPCommunity contains bgp community information offered in Service Community resources.
2917type BGPCommunity struct {
2918	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
2919	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
2920	// CommunityName - The name of the bgp community. e.g. Skype.
2921	CommunityName *string `json:"communityName,omitempty"`
2922	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
2923	CommunityValue *string `json:"communityValue,omitempty"`
2924	// CommunityPrefixes - The prefixes that the bgp community contains.
2925	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
2926	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
2927	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
2928	// ServiceGroup - The service group of the bgp community contains.
2929	ServiceGroup *string `json:"serviceGroup,omitempty"`
2930}
2931
2932// BgpPeerStatus BGP peer status details
2933type BgpPeerStatus struct {
2934	// LocalAddress - READ-ONLY; The virtual network gateway's local address
2935	LocalAddress *string `json:"localAddress,omitempty"`
2936	// Neighbor - READ-ONLY; The remote BGP peer
2937	Neighbor *string `json:"neighbor,omitempty"`
2938	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
2939	Asn *int32 `json:"asn,omitempty"`
2940	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
2941	State BgpPeerState `json:"state,omitempty"`
2942	// ConnectedDuration - READ-ONLY; For how long the peering has been up
2943	ConnectedDuration *string `json:"connectedDuration,omitempty"`
2944	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
2945	RoutesReceived *int64 `json:"routesReceived,omitempty"`
2946	// MessagesSent - READ-ONLY; The number of BGP messages sent
2947	MessagesSent *int64 `json:"messagesSent,omitempty"`
2948	// MessagesReceived - READ-ONLY; The number of BGP messages received
2949	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
2950}
2951
2952// MarshalJSON is the custom marshaler for BgpPeerStatus.
2953func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
2954	objectMap := make(map[string]interface{})
2955	return json.Marshal(objectMap)
2956}
2957
2958// BgpPeerStatusListResult response for list BGP peer status API service call
2959type BgpPeerStatusListResult struct {
2960	autorest.Response `json:"-"`
2961	// Value - List of BGP peers
2962	Value *[]BgpPeerStatus `json:"value,omitempty"`
2963}
2964
2965// BgpServiceCommunity service Community Properties.
2966type BgpServiceCommunity struct {
2967	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
2968	// ID - Resource ID.
2969	ID *string `json:"id,omitempty"`
2970	// Name - READ-ONLY; Resource name.
2971	Name *string `json:"name,omitempty"`
2972	// Type - READ-ONLY; Resource type.
2973	Type *string `json:"type,omitempty"`
2974	// Location - Resource location.
2975	Location *string `json:"location,omitempty"`
2976	// Tags - Resource tags.
2977	Tags map[string]*string `json:"tags"`
2978}
2979
2980// MarshalJSON is the custom marshaler for BgpServiceCommunity.
2981func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
2982	objectMap := make(map[string]interface{})
2983	if bsc.BgpServiceCommunityPropertiesFormat != nil {
2984		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
2985	}
2986	if bsc.ID != nil {
2987		objectMap["id"] = bsc.ID
2988	}
2989	if bsc.Location != nil {
2990		objectMap["location"] = bsc.Location
2991	}
2992	if bsc.Tags != nil {
2993		objectMap["tags"] = bsc.Tags
2994	}
2995	return json.Marshal(objectMap)
2996}
2997
2998// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
2999func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3000	var m map[string]*json.RawMessage
3001	err := json.Unmarshal(body, &m)
3002	if err != nil {
3003		return err
3004	}
3005	for k, v := range m {
3006		switch k {
3007		case "properties":
3008			if v != nil {
3009				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3010				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3011				if err != nil {
3012					return err
3013				}
3014				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3015			}
3016		case "id":
3017			if v != nil {
3018				var ID string
3019				err = json.Unmarshal(*v, &ID)
3020				if err != nil {
3021					return err
3022				}
3023				bsc.ID = &ID
3024			}
3025		case "name":
3026			if v != nil {
3027				var name string
3028				err = json.Unmarshal(*v, &name)
3029				if err != nil {
3030					return err
3031				}
3032				bsc.Name = &name
3033			}
3034		case "type":
3035			if v != nil {
3036				var typeVar string
3037				err = json.Unmarshal(*v, &typeVar)
3038				if err != nil {
3039					return err
3040				}
3041				bsc.Type = &typeVar
3042			}
3043		case "location":
3044			if v != nil {
3045				var location string
3046				err = json.Unmarshal(*v, &location)
3047				if err != nil {
3048					return err
3049				}
3050				bsc.Location = &location
3051			}
3052		case "tags":
3053			if v != nil {
3054				var tags map[string]*string
3055				err = json.Unmarshal(*v, &tags)
3056				if err != nil {
3057					return err
3058				}
3059				bsc.Tags = tags
3060			}
3061		}
3062	}
3063
3064	return nil
3065}
3066
3067// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3068type BgpServiceCommunityListResult struct {
3069	autorest.Response `json:"-"`
3070	// Value - A list of service community resources.
3071	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3072	// NextLink - The URL to get the next set of results.
3073	NextLink *string `json:"nextLink,omitempty"`
3074}
3075
3076// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3077// values.
3078type BgpServiceCommunityListResultIterator struct {
3079	i    int
3080	page BgpServiceCommunityListResultPage
3081}
3082
3083// NextWithContext advances to the next value.  If there was an error making
3084// the request the iterator does not advance and the error is returned.
3085func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3086	if tracing.IsEnabled() {
3087		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3088		defer func() {
3089			sc := -1
3090			if iter.Response().Response.Response != nil {
3091				sc = iter.Response().Response.Response.StatusCode
3092			}
3093			tracing.EndSpan(ctx, sc, err)
3094		}()
3095	}
3096	iter.i++
3097	if iter.i < len(iter.page.Values()) {
3098		return nil
3099	}
3100	err = iter.page.NextWithContext(ctx)
3101	if err != nil {
3102		iter.i--
3103		return err
3104	}
3105	iter.i = 0
3106	return nil
3107}
3108
3109// Next advances to the next value.  If there was an error making
3110// the request the iterator does not advance and the error is returned.
3111// Deprecated: Use NextWithContext() instead.
3112func (iter *BgpServiceCommunityListResultIterator) Next() error {
3113	return iter.NextWithContext(context.Background())
3114}
3115
3116// NotDone returns true if the enumeration should be started or is not yet complete.
3117func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3118	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3119}
3120
3121// Response returns the raw server response from the last page request.
3122func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3123	return iter.page.Response()
3124}
3125
3126// Value returns the current value or a zero-initialized value if the
3127// iterator has advanced beyond the end of the collection.
3128func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3129	if !iter.page.NotDone() {
3130		return BgpServiceCommunity{}
3131	}
3132	return iter.page.Values()[iter.i]
3133}
3134
3135// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3136func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3137	return BgpServiceCommunityListResultIterator{page: page}
3138}
3139
3140// IsEmpty returns true if the ListResult contains no values.
3141func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3142	return bsclr.Value == nil || len(*bsclr.Value) == 0
3143}
3144
3145// hasNextLink returns true if the NextLink is not empty.
3146func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3147	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3148}
3149
3150// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3151// It returns nil if no more results exist.
3152func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3153	if !bsclr.hasNextLink() {
3154		return nil, nil
3155	}
3156	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3157		autorest.AsJSON(),
3158		autorest.AsGet(),
3159		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3160}
3161
3162// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3163type BgpServiceCommunityListResultPage struct {
3164	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3165	bsclr BgpServiceCommunityListResult
3166}
3167
3168// NextWithContext advances to the next page of values.  If there was an error making
3169// the request the page does not advance and the error is returned.
3170func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3171	if tracing.IsEnabled() {
3172		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3173		defer func() {
3174			sc := -1
3175			if page.Response().Response.Response != nil {
3176				sc = page.Response().Response.Response.StatusCode
3177			}
3178			tracing.EndSpan(ctx, sc, err)
3179		}()
3180	}
3181	for {
3182		next, err := page.fn(ctx, page.bsclr)
3183		if err != nil {
3184			return err
3185		}
3186		page.bsclr = next
3187		if !next.hasNextLink() || !next.IsEmpty() {
3188			break
3189		}
3190	}
3191	return nil
3192}
3193
3194// Next advances to the next page of values.  If there was an error making
3195// the request the page does not advance and the error is returned.
3196// Deprecated: Use NextWithContext() instead.
3197func (page *BgpServiceCommunityListResultPage) Next() error {
3198	return page.NextWithContext(context.Background())
3199}
3200
3201// NotDone returns true if the page enumeration should be started or is not yet complete.
3202func (page BgpServiceCommunityListResultPage) NotDone() bool {
3203	return !page.bsclr.IsEmpty()
3204}
3205
3206// Response returns the raw server response from the last page request.
3207func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3208	return page.bsclr
3209}
3210
3211// Values returns the slice of values for the current page or nil if there are no values.
3212func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3213	if page.bsclr.IsEmpty() {
3214		return nil
3215	}
3216	return *page.bsclr.Value
3217}
3218
3219// Creates a new instance of the BgpServiceCommunityListResultPage type.
3220func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3221	return BgpServiceCommunityListResultPage{
3222		fn:    getNextPage,
3223		bsclr: cur,
3224	}
3225}
3226
3227// BgpServiceCommunityPropertiesFormat properties of Service Community.
3228type BgpServiceCommunityPropertiesFormat struct {
3229	// ServiceName - The name of the bgp community. e.g. Skype.
3230	ServiceName *string `json:"serviceName,omitempty"`
3231	// BgpCommunities - Get a list of bgp communities.
3232	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3233}
3234
3235// BgpSettings BGP settings details
3236type BgpSettings struct {
3237	// Asn - The BGP speaker's ASN.
3238	Asn *int64 `json:"asn,omitempty"`
3239	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3240	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3241	// PeerWeight - The weight added to routes learned from this BGP speaker.
3242	PeerWeight *int32 `json:"peerWeight,omitempty"`
3243}
3244
3245// ConnectionResetSharedKey the virtual network connection reset shared key
3246type ConnectionResetSharedKey struct {
3247	autorest.Response `json:"-"`
3248	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
3249	KeyLength *int32 `json:"keyLength,omitempty"`
3250}
3251
3252// ConnectionSharedKey response for GetConnectionSharedKey API service call
3253type ConnectionSharedKey struct {
3254	autorest.Response `json:"-"`
3255	// Value - The virtual network connection shared key value.
3256	Value *string `json:"value,omitempty"`
3257}
3258
3259// ConnectivityDestination parameters that define destination of connection.
3260type ConnectivityDestination struct {
3261	// ResourceID - The ID of the resource to which a connection attempt will be made.
3262	ResourceID *string `json:"resourceId,omitempty"`
3263	// Address - The IP address or URI the resource to which a connection attempt will be made.
3264	Address *string `json:"address,omitempty"`
3265	// Port - Port on which check connectivity will be performed.
3266	Port *int32 `json:"port,omitempty"`
3267}
3268
3269// ConnectivityHop information about a hop between the source and the destination.
3270type ConnectivityHop struct {
3271	// Type - READ-ONLY; The type of the hop.
3272	Type *string `json:"type,omitempty"`
3273	// ID - READ-ONLY; The ID of the hop.
3274	ID *string `json:"id,omitempty"`
3275	// Address - READ-ONLY; The IP address of the hop.
3276	Address *string `json:"address,omitempty"`
3277	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
3278	ResourceID *string `json:"resourceId,omitempty"`
3279	// NextHopIds - READ-ONLY; List of next hop identifiers.
3280	NextHopIds *[]string `json:"nextHopIds,omitempty"`
3281	// Issues - READ-ONLY; List of issues.
3282	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
3283}
3284
3285// MarshalJSON is the custom marshaler for ConnectivityHop.
3286func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
3287	objectMap := make(map[string]interface{})
3288	return json.Marshal(objectMap)
3289}
3290
3291// ConnectivityInformation information on the connectivity status.
3292type ConnectivityInformation struct {
3293	autorest.Response `json:"-"`
3294	// Hops - READ-ONLY; List of hops between the source and the destination.
3295	Hops *[]ConnectivityHop `json:"hops,omitempty"`
3296	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
3297	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
3298	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
3299	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
3300	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
3301	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
3302	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
3303	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
3304	// ProbesSent - READ-ONLY; Total number of probes sent.
3305	ProbesSent *int32 `json:"probesSent,omitempty"`
3306	// ProbesFailed - READ-ONLY; Number of failed probes.
3307	ProbesFailed *int32 `json:"probesFailed,omitempty"`
3308}
3309
3310// MarshalJSON is the custom marshaler for ConnectivityInformation.
3311func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
3312	objectMap := make(map[string]interface{})
3313	return json.Marshal(objectMap)
3314}
3315
3316// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
3317type ConnectivityIssue struct {
3318	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
3319	Origin Origin `json:"origin,omitempty"`
3320	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
3321	Severity Severity `json:"severity,omitempty"`
3322	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
3323	Type IssueType `json:"type,omitempty"`
3324	// Context - READ-ONLY; Provides additional context on the issue.
3325	Context *[]map[string]*string `json:"context,omitempty"`
3326}
3327
3328// MarshalJSON is the custom marshaler for ConnectivityIssue.
3329func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
3330	objectMap := make(map[string]interface{})
3331	return json.Marshal(objectMap)
3332}
3333
3334// ConnectivityParameters parameters that determine how the connectivity check will be performed.
3335type ConnectivityParameters struct {
3336	Source      *ConnectivitySource      `json:"source,omitempty"`
3337	Destination *ConnectivityDestination `json:"destination,omitempty"`
3338}
3339
3340// ConnectivitySource parameters that define the source of the connection.
3341type ConnectivitySource struct {
3342	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
3343	ResourceID *string `json:"resourceId,omitempty"`
3344	// Port - The source port from which a connectivity check will be performed.
3345	Port *int32 `json:"port,omitempty"`
3346}
3347
3348// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
3349// network. Standard DHCP option for a subnet overrides VNET DHCP options.
3350type DhcpOptions struct {
3351	// DNSServers - The list of DNS servers IP addresses.
3352	DNSServers *[]string `json:"dnsServers,omitempty"`
3353}
3354
3355// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
3356type DNSNameAvailabilityResult struct {
3357	autorest.Response `json:"-"`
3358	// Available - Domain availability (True/False).
3359	Available *bool `json:"available,omitempty"`
3360}
3361
3362// EffectiveNetworkSecurityGroup effective network security group.
3363type EffectiveNetworkSecurityGroup struct {
3364	// NetworkSecurityGroup - The ID of network security group that is applied.
3365	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
3366	// Association - Associated resources.
3367	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
3368	// EffectiveSecurityRules - A collection of effective security rules.
3369	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
3370	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
3371	TagMap map[string][]string `json:"tagMap"`
3372}
3373
3374// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
3375func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
3376	objectMap := make(map[string]interface{})
3377	if ensg.NetworkSecurityGroup != nil {
3378		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
3379	}
3380	if ensg.Association != nil {
3381		objectMap["association"] = ensg.Association
3382	}
3383	if ensg.EffectiveSecurityRules != nil {
3384		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
3385	}
3386	if ensg.TagMap != nil {
3387		objectMap["tagMap"] = ensg.TagMap
3388	}
3389	return json.Marshal(objectMap)
3390}
3391
3392// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
3393type EffectiveNetworkSecurityGroupAssociation struct {
3394	// Subnet - The ID of the subnet if assigned.
3395	Subnet *SubResource `json:"subnet,omitempty"`
3396	// NetworkInterface - The ID of the network interface if assigned.
3397	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
3398}
3399
3400// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
3401// call.
3402type EffectiveNetworkSecurityGroupListResult struct {
3403	autorest.Response `json:"-"`
3404	// Value - A list of effective network security groups.
3405	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
3406	// NextLink - READ-ONLY; The URL to get the next set of results.
3407	NextLink *string `json:"nextLink,omitempty"`
3408}
3409
3410// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
3411func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3412	objectMap := make(map[string]interface{})
3413	if ensglr.Value != nil {
3414		objectMap["value"] = ensglr.Value
3415	}
3416	return json.Marshal(objectMap)
3417}
3418
3419// EffectiveNetworkSecurityRule effective network security rules.
3420type EffectiveNetworkSecurityRule struct {
3421	// Name - The name of the security rule specified by the user (if created by the user).
3422	Name *string `json:"name,omitempty"`
3423	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
3424	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
3425	// SourcePortRange - The source port or range.
3426	SourcePortRange *string `json:"sourcePortRange,omitempty"`
3427	// DestinationPortRange - The destination port or range.
3428	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
3429	// 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 (*)
3430	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
3431	// 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 (*)
3432	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
3433	// SourceAddressPrefix - The source address prefix.
3434	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
3435	// DestinationAddressPrefix - The destination address prefix.
3436	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
3437	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
3438	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
3439	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
3440	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
3441	// ExpandedSourceAddressPrefix - The expanded source address prefix.
3442	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
3443	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
3444	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
3445	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
3446	Access SecurityRuleAccess `json:"access,omitempty"`
3447	// Priority - The priority of the rule.
3448	Priority *int32 `json:"priority,omitempty"`
3449	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
3450	Direction SecurityRuleDirection `json:"direction,omitempty"`
3451}
3452
3453// EffectiveRoute effective Route
3454type EffectiveRoute struct {
3455	// Name - The name of the user defined route. This is optional.
3456	Name *string `json:"name,omitempty"`
3457	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
3458	Source EffectiveRouteSource `json:"source,omitempty"`
3459	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
3460	State EffectiveRouteState `json:"state,omitempty"`
3461	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
3462	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
3463	// NextHopIPAddress - The IP address of the next hop of the effective route.
3464	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
3465	// 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'
3466	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
3467}
3468
3469// EffectiveRouteListResult response for list effective route API service call.
3470type EffectiveRouteListResult struct {
3471	autorest.Response `json:"-"`
3472	// Value - A list of effective routes.
3473	Value *[]EffectiveRoute `json:"value,omitempty"`
3474	// NextLink - READ-ONLY; The URL to get the next set of results.
3475	NextLink *string `json:"nextLink,omitempty"`
3476}
3477
3478// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
3479func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
3480	objectMap := make(map[string]interface{})
3481	if erlr.Value != nil {
3482		objectMap["value"] = erlr.Value
3483	}
3484	return json.Marshal(objectMap)
3485}
3486
3487// EndpointServiceResult endpoint service.
3488type EndpointServiceResult struct {
3489	// Name - READ-ONLY; Name of the endpoint service.
3490	Name *string `json:"name,omitempty"`
3491	// Type - READ-ONLY; Type of the endpoint service.
3492	Type *string `json:"type,omitempty"`
3493	// ID - Resource ID.
3494	ID *string `json:"id,omitempty"`
3495}
3496
3497// MarshalJSON is the custom marshaler for EndpointServiceResult.
3498func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
3499	objectMap := make(map[string]interface{})
3500	if esr.ID != nil {
3501		objectMap["id"] = esr.ID
3502	}
3503	return json.Marshal(objectMap)
3504}
3505
3506// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
3507type EndpointServicesListResult struct {
3508	autorest.Response `json:"-"`
3509	// Value - List of available endpoint services in a region.
3510	Value *[]EndpointServiceResult `json:"value,omitempty"`
3511	// NextLink - The URL to get the next set of results.
3512	NextLink *string `json:"nextLink,omitempty"`
3513}
3514
3515// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
3516// values.
3517type EndpointServicesListResultIterator struct {
3518	i    int
3519	page EndpointServicesListResultPage
3520}
3521
3522// NextWithContext advances to the next value.  If there was an error making
3523// the request the iterator does not advance and the error is returned.
3524func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
3525	if tracing.IsEnabled() {
3526		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
3527		defer func() {
3528			sc := -1
3529			if iter.Response().Response.Response != nil {
3530				sc = iter.Response().Response.Response.StatusCode
3531			}
3532			tracing.EndSpan(ctx, sc, err)
3533		}()
3534	}
3535	iter.i++
3536	if iter.i < len(iter.page.Values()) {
3537		return nil
3538	}
3539	err = iter.page.NextWithContext(ctx)
3540	if err != nil {
3541		iter.i--
3542		return err
3543	}
3544	iter.i = 0
3545	return nil
3546}
3547
3548// Next advances to the next value.  If there was an error making
3549// the request the iterator does not advance and the error is returned.
3550// Deprecated: Use NextWithContext() instead.
3551func (iter *EndpointServicesListResultIterator) Next() error {
3552	return iter.NextWithContext(context.Background())
3553}
3554
3555// NotDone returns true if the enumeration should be started or is not yet complete.
3556func (iter EndpointServicesListResultIterator) NotDone() bool {
3557	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3558}
3559
3560// Response returns the raw server response from the last page request.
3561func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
3562	return iter.page.Response()
3563}
3564
3565// Value returns the current value or a zero-initialized value if the
3566// iterator has advanced beyond the end of the collection.
3567func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
3568	if !iter.page.NotDone() {
3569		return EndpointServiceResult{}
3570	}
3571	return iter.page.Values()[iter.i]
3572}
3573
3574// Creates a new instance of the EndpointServicesListResultIterator type.
3575func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
3576	return EndpointServicesListResultIterator{page: page}
3577}
3578
3579// IsEmpty returns true if the ListResult contains no values.
3580func (eslr EndpointServicesListResult) IsEmpty() bool {
3581	return eslr.Value == nil || len(*eslr.Value) == 0
3582}
3583
3584// hasNextLink returns true if the NextLink is not empty.
3585func (eslr EndpointServicesListResult) hasNextLink() bool {
3586	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
3587}
3588
3589// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
3590// It returns nil if no more results exist.
3591func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
3592	if !eslr.hasNextLink() {
3593		return nil, nil
3594	}
3595	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3596		autorest.AsJSON(),
3597		autorest.AsGet(),
3598		autorest.WithBaseURL(to.String(eslr.NextLink)))
3599}
3600
3601// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
3602type EndpointServicesListResultPage struct {
3603	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
3604	eslr EndpointServicesListResult
3605}
3606
3607// NextWithContext advances to the next page of values.  If there was an error making
3608// the request the page does not advance and the error is returned.
3609func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
3610	if tracing.IsEnabled() {
3611		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
3612		defer func() {
3613			sc := -1
3614			if page.Response().Response.Response != nil {
3615				sc = page.Response().Response.Response.StatusCode
3616			}
3617			tracing.EndSpan(ctx, sc, err)
3618		}()
3619	}
3620	for {
3621		next, err := page.fn(ctx, page.eslr)
3622		if err != nil {
3623			return err
3624		}
3625		page.eslr = next
3626		if !next.hasNextLink() || !next.IsEmpty() {
3627			break
3628		}
3629	}
3630	return nil
3631}
3632
3633// Next advances to the next page of values.  If there was an error making
3634// the request the page does not advance and the error is returned.
3635// Deprecated: Use NextWithContext() instead.
3636func (page *EndpointServicesListResultPage) Next() error {
3637	return page.NextWithContext(context.Background())
3638}
3639
3640// NotDone returns true if the page enumeration should be started or is not yet complete.
3641func (page EndpointServicesListResultPage) NotDone() bool {
3642	return !page.eslr.IsEmpty()
3643}
3644
3645// Response returns the raw server response from the last page request.
3646func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
3647	return page.eslr
3648}
3649
3650// Values returns the slice of values for the current page or nil if there are no values.
3651func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
3652	if page.eslr.IsEmpty() {
3653		return nil
3654	}
3655	return *page.eslr.Value
3656}
3657
3658// Creates a new instance of the EndpointServicesListResultPage type.
3659func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
3660	return EndpointServicesListResultPage{
3661		fn:   getNextPage,
3662		eslr: cur,
3663	}
3664}
3665
3666// Error ...
3667type Error struct {
3668	Code       *string         `json:"code,omitempty"`
3669	Message    *string         `json:"message,omitempty"`
3670	Target     *string         `json:"target,omitempty"`
3671	Details    *[]ErrorDetails `json:"details,omitempty"`
3672	InnerError *string         `json:"innerError,omitempty"`
3673}
3674
3675// ErrorDetails ...
3676type ErrorDetails struct {
3677	Code    *string `json:"code,omitempty"`
3678	Target  *string `json:"target,omitempty"`
3679	Message *string `json:"message,omitempty"`
3680}
3681
3682// ExpressRouteCircuit expressRouteCircuit resource
3683type ExpressRouteCircuit struct {
3684	autorest.Response `json:"-"`
3685	// Sku - The SKU.
3686	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
3687	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
3688	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3689	Etag *string `json:"etag,omitempty"`
3690	// ID - Resource ID.
3691	ID *string `json:"id,omitempty"`
3692	// Name - READ-ONLY; Resource name.
3693	Name *string `json:"name,omitempty"`
3694	// Type - READ-ONLY; Resource type.
3695	Type *string `json:"type,omitempty"`
3696	// Location - Resource location.
3697	Location *string `json:"location,omitempty"`
3698	// Tags - Resource tags.
3699	Tags map[string]*string `json:"tags"`
3700}
3701
3702// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
3703func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
3704	objectMap := make(map[string]interface{})
3705	if erc.Sku != nil {
3706		objectMap["sku"] = erc.Sku
3707	}
3708	if erc.ExpressRouteCircuitPropertiesFormat != nil {
3709		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
3710	}
3711	if erc.ID != nil {
3712		objectMap["id"] = erc.ID
3713	}
3714	if erc.Location != nil {
3715		objectMap["location"] = erc.Location
3716	}
3717	if erc.Tags != nil {
3718		objectMap["tags"] = erc.Tags
3719	}
3720	return json.Marshal(objectMap)
3721}
3722
3723// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
3724func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
3725	var m map[string]*json.RawMessage
3726	err := json.Unmarshal(body, &m)
3727	if err != nil {
3728		return err
3729	}
3730	for k, v := range m {
3731		switch k {
3732		case "sku":
3733			if v != nil {
3734				var sku ExpressRouteCircuitSku
3735				err = json.Unmarshal(*v, &sku)
3736				if err != nil {
3737					return err
3738				}
3739				erc.Sku = &sku
3740			}
3741		case "properties":
3742			if v != nil {
3743				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
3744				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
3745				if err != nil {
3746					return err
3747				}
3748				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
3749			}
3750		case "etag":
3751			if v != nil {
3752				var etag string
3753				err = json.Unmarshal(*v, &etag)
3754				if err != nil {
3755					return err
3756				}
3757				erc.Etag = &etag
3758			}
3759		case "id":
3760			if v != nil {
3761				var ID string
3762				err = json.Unmarshal(*v, &ID)
3763				if err != nil {
3764					return err
3765				}
3766				erc.ID = &ID
3767			}
3768		case "name":
3769			if v != nil {
3770				var name string
3771				err = json.Unmarshal(*v, &name)
3772				if err != nil {
3773					return err
3774				}
3775				erc.Name = &name
3776			}
3777		case "type":
3778			if v != nil {
3779				var typeVar string
3780				err = json.Unmarshal(*v, &typeVar)
3781				if err != nil {
3782					return err
3783				}
3784				erc.Type = &typeVar
3785			}
3786		case "location":
3787			if v != nil {
3788				var location string
3789				err = json.Unmarshal(*v, &location)
3790				if err != nil {
3791					return err
3792				}
3793				erc.Location = &location
3794			}
3795		case "tags":
3796			if v != nil {
3797				var tags map[string]*string
3798				err = json.Unmarshal(*v, &tags)
3799				if err != nil {
3800					return err
3801				}
3802				erc.Tags = tags
3803			}
3804		}
3805	}
3806
3807	return nil
3808}
3809
3810// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
3811type ExpressRouteCircuitArpTable struct {
3812	// Age - Age
3813	Age *int32 `json:"age,omitempty"`
3814	// Interface - Interface
3815	Interface *string `json:"interface,omitempty"`
3816	// IPAddress - The IP address.
3817	IPAddress *string `json:"ipAddress,omitempty"`
3818	// MacAddress - The MAC address.
3819	MacAddress *string `json:"macAddress,omitempty"`
3820}
3821
3822// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
3823type ExpressRouteCircuitAuthorization struct {
3824	autorest.Response              `json:"-"`
3825	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
3826	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3827	Name *string `json:"name,omitempty"`
3828	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3829	Etag *string `json:"etag,omitempty"`
3830	// ID - Resource ID.
3831	ID *string `json:"id,omitempty"`
3832}
3833
3834// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
3835func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
3836	objectMap := make(map[string]interface{})
3837	if erca.AuthorizationPropertiesFormat != nil {
3838		objectMap["properties"] = erca.AuthorizationPropertiesFormat
3839	}
3840	if erca.Name != nil {
3841		objectMap["name"] = erca.Name
3842	}
3843	if erca.ID != nil {
3844		objectMap["id"] = erca.ID
3845	}
3846	return json.Marshal(objectMap)
3847}
3848
3849// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
3850func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
3851	var m map[string]*json.RawMessage
3852	err := json.Unmarshal(body, &m)
3853	if err != nil {
3854		return err
3855	}
3856	for k, v := range m {
3857		switch k {
3858		case "properties":
3859			if v != nil {
3860				var authorizationPropertiesFormat AuthorizationPropertiesFormat
3861				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
3862				if err != nil {
3863					return err
3864				}
3865				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
3866			}
3867		case "name":
3868			if v != nil {
3869				var name string
3870				err = json.Unmarshal(*v, &name)
3871				if err != nil {
3872					return err
3873				}
3874				erca.Name = &name
3875			}
3876		case "etag":
3877			if v != nil {
3878				var etag string
3879				err = json.Unmarshal(*v, &etag)
3880				if err != nil {
3881					return err
3882				}
3883				erca.Etag = &etag
3884			}
3885		case "id":
3886			if v != nil {
3887				var ID string
3888				err = json.Unmarshal(*v, &ID)
3889				if err != nil {
3890					return err
3891				}
3892				erca.ID = &ID
3893			}
3894		}
3895	}
3896
3897	return nil
3898}
3899
3900// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
3901// results of a long-running operation.
3902type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
3903	azure.FutureAPI
3904	// Result returns the result of the asynchronous operation.
3905	// If the operation has not completed it will return an error.
3906	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
3907}
3908
3909// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3910func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3911	var azFuture azure.Future
3912	if err := json.Unmarshal(body, &azFuture); err != nil {
3913		return err
3914	}
3915	future.FutureAPI = &azFuture
3916	future.Result = future.result
3917	return nil
3918}
3919
3920// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
3921func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
3922	var done bool
3923	done, err = future.DoneWithContext(context.Background(), client)
3924	if err != nil {
3925		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3926		return
3927	}
3928	if !done {
3929		erca.Response.Response = future.Response()
3930		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
3931		return
3932	}
3933	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3934	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
3935		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
3936		if err != nil {
3937			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
3938		}
3939	}
3940	return
3941}
3942
3943// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
3944// of a long-running operation.
3945type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
3946	azure.FutureAPI
3947	// Result returns the result of the asynchronous operation.
3948	// If the operation has not completed it will return an error.
3949	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
3950}
3951
3952// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3953func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
3954	var azFuture azure.Future
3955	if err := json.Unmarshal(body, &azFuture); err != nil {
3956		return err
3957	}
3958	future.FutureAPI = &azFuture
3959	future.Result = future.result
3960	return nil
3961}
3962
3963// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
3964func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
3965	var done bool
3966	done, err = future.DoneWithContext(context.Background(), client)
3967	if err != nil {
3968		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
3969		return
3970	}
3971	if !done {
3972		ar.Response = future.Response()
3973		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
3974		return
3975	}
3976	ar.Response = future.Response()
3977	return
3978}
3979
3980// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
3981type ExpressRouteCircuitListResult struct {
3982	autorest.Response `json:"-"`
3983	// Value - A list of ExpressRouteCircuits in a resource group.
3984	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
3985	// NextLink - The URL to get the next set of results.
3986	NextLink *string `json:"nextLink,omitempty"`
3987}
3988
3989// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
3990// values.
3991type ExpressRouteCircuitListResultIterator struct {
3992	i    int
3993	page ExpressRouteCircuitListResultPage
3994}
3995
3996// NextWithContext advances to the next value.  If there was an error making
3997// the request the iterator does not advance and the error is returned.
3998func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
3999	if tracing.IsEnabled() {
4000		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
4001		defer func() {
4002			sc := -1
4003			if iter.Response().Response.Response != nil {
4004				sc = iter.Response().Response.Response.StatusCode
4005			}
4006			tracing.EndSpan(ctx, sc, err)
4007		}()
4008	}
4009	iter.i++
4010	if iter.i < len(iter.page.Values()) {
4011		return nil
4012	}
4013	err = iter.page.NextWithContext(ctx)
4014	if err != nil {
4015		iter.i--
4016		return err
4017	}
4018	iter.i = 0
4019	return nil
4020}
4021
4022// Next advances to the next value.  If there was an error making
4023// the request the iterator does not advance and the error is returned.
4024// Deprecated: Use NextWithContext() instead.
4025func (iter *ExpressRouteCircuitListResultIterator) Next() error {
4026	return iter.NextWithContext(context.Background())
4027}
4028
4029// NotDone returns true if the enumeration should be started or is not yet complete.
4030func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
4031	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4032}
4033
4034// Response returns the raw server response from the last page request.
4035func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
4036	return iter.page.Response()
4037}
4038
4039// Value returns the current value or a zero-initialized value if the
4040// iterator has advanced beyond the end of the collection.
4041func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
4042	if !iter.page.NotDone() {
4043		return ExpressRouteCircuit{}
4044	}
4045	return iter.page.Values()[iter.i]
4046}
4047
4048// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
4049func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
4050	return ExpressRouteCircuitListResultIterator{page: page}
4051}
4052
4053// IsEmpty returns true if the ListResult contains no values.
4054func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
4055	return erclr.Value == nil || len(*erclr.Value) == 0
4056}
4057
4058// hasNextLink returns true if the NextLink is not empty.
4059func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
4060	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
4061}
4062
4063// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
4064// It returns nil if no more results exist.
4065func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
4066	if !erclr.hasNextLink() {
4067		return nil, nil
4068	}
4069	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4070		autorest.AsJSON(),
4071		autorest.AsGet(),
4072		autorest.WithBaseURL(to.String(erclr.NextLink)))
4073}
4074
4075// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
4076type ExpressRouteCircuitListResultPage struct {
4077	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
4078	erclr ExpressRouteCircuitListResult
4079}
4080
4081// NextWithContext advances to the next page of values.  If there was an error making
4082// the request the page does not advance and the error is returned.
4083func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
4084	if tracing.IsEnabled() {
4085		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
4086		defer func() {
4087			sc := -1
4088			if page.Response().Response.Response != nil {
4089				sc = page.Response().Response.Response.StatusCode
4090			}
4091			tracing.EndSpan(ctx, sc, err)
4092		}()
4093	}
4094	for {
4095		next, err := page.fn(ctx, page.erclr)
4096		if err != nil {
4097			return err
4098		}
4099		page.erclr = next
4100		if !next.hasNextLink() || !next.IsEmpty() {
4101			break
4102		}
4103	}
4104	return nil
4105}
4106
4107// Next advances to the next page of values.  If there was an error making
4108// the request the page does not advance and the error is returned.
4109// Deprecated: Use NextWithContext() instead.
4110func (page *ExpressRouteCircuitListResultPage) Next() error {
4111	return page.NextWithContext(context.Background())
4112}
4113
4114// NotDone returns true if the page enumeration should be started or is not yet complete.
4115func (page ExpressRouteCircuitListResultPage) NotDone() bool {
4116	return !page.erclr.IsEmpty()
4117}
4118
4119// Response returns the raw server response from the last page request.
4120func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
4121	return page.erclr
4122}
4123
4124// Values returns the slice of values for the current page or nil if there are no values.
4125func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
4126	if page.erclr.IsEmpty() {
4127		return nil
4128	}
4129	return *page.erclr.Value
4130}
4131
4132// Creates a new instance of the ExpressRouteCircuitListResultPage type.
4133func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
4134	return ExpressRouteCircuitListResultPage{
4135		fn:    getNextPage,
4136		erclr: cur,
4137	}
4138}
4139
4140// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
4141type ExpressRouteCircuitPeering struct {
4142	autorest.Response                           `json:"-"`
4143	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
4144	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4145	Name *string `json:"name,omitempty"`
4146	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4147	Etag *string `json:"etag,omitempty"`
4148	// ID - Resource ID.
4149	ID *string `json:"id,omitempty"`
4150}
4151
4152// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
4153func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
4154	objectMap := make(map[string]interface{})
4155	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
4156		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
4157	}
4158	if ercp.Name != nil {
4159		objectMap["name"] = ercp.Name
4160	}
4161	if ercp.ID != nil {
4162		objectMap["id"] = ercp.ID
4163	}
4164	return json.Marshal(objectMap)
4165}
4166
4167// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
4168func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
4169	var m map[string]*json.RawMessage
4170	err := json.Unmarshal(body, &m)
4171	if err != nil {
4172		return err
4173	}
4174	for k, v := range m {
4175		switch k {
4176		case "properties":
4177			if v != nil {
4178				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
4179				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
4180				if err != nil {
4181					return err
4182				}
4183				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
4184			}
4185		case "name":
4186			if v != nil {
4187				var name string
4188				err = json.Unmarshal(*v, &name)
4189				if err != nil {
4190					return err
4191				}
4192				ercp.Name = &name
4193			}
4194		case "etag":
4195			if v != nil {
4196				var etag string
4197				err = json.Unmarshal(*v, &etag)
4198				if err != nil {
4199					return err
4200				}
4201				ercp.Etag = &etag
4202			}
4203		case "id":
4204			if v != nil {
4205				var ID string
4206				err = json.Unmarshal(*v, &ID)
4207				if err != nil {
4208					return err
4209				}
4210				ercp.ID = &ID
4211			}
4212		}
4213	}
4214
4215	return nil
4216}
4217
4218// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
4219type ExpressRouteCircuitPeeringConfig struct {
4220	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
4221	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
4222	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
4223	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
4224	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
4225	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
4226	// LegacyMode - The legacy mode of the peering.
4227	LegacyMode *int32 `json:"legacyMode,omitempty"`
4228	// CustomerASN - The CustomerASN of the peering.
4229	CustomerASN *int32 `json:"customerASN,omitempty"`
4230	// RoutingRegistryName - The RoutingRegistryName of the configuration.
4231	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
4232}
4233
4234// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
4235// that belong to an ExpressRouteCircuit.
4236type ExpressRouteCircuitPeeringListResult struct {
4237	autorest.Response `json:"-"`
4238	// Value - The peerings in an express route circuit.
4239	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
4240	// NextLink - The URL to get the next set of results.
4241	NextLink *string `json:"nextLink,omitempty"`
4242}
4243
4244// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
4245// ExpressRouteCircuitPeering values.
4246type ExpressRouteCircuitPeeringListResultIterator struct {
4247	i    int
4248	page ExpressRouteCircuitPeeringListResultPage
4249}
4250
4251// NextWithContext advances to the next value.  If there was an error making
4252// the request the iterator does not advance and the error is returned.
4253func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
4254	if tracing.IsEnabled() {
4255		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
4256		defer func() {
4257			sc := -1
4258			if iter.Response().Response.Response != nil {
4259				sc = iter.Response().Response.Response.StatusCode
4260			}
4261			tracing.EndSpan(ctx, sc, err)
4262		}()
4263	}
4264	iter.i++
4265	if iter.i < len(iter.page.Values()) {
4266		return nil
4267	}
4268	err = iter.page.NextWithContext(ctx)
4269	if err != nil {
4270		iter.i--
4271		return err
4272	}
4273	iter.i = 0
4274	return nil
4275}
4276
4277// Next advances to the next value.  If there was an error making
4278// the request the iterator does not advance and the error is returned.
4279// Deprecated: Use NextWithContext() instead.
4280func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
4281	return iter.NextWithContext(context.Background())
4282}
4283
4284// NotDone returns true if the enumeration should be started or is not yet complete.
4285func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
4286	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4287}
4288
4289// Response returns the raw server response from the last page request.
4290func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
4291	return iter.page.Response()
4292}
4293
4294// Value returns the current value or a zero-initialized value if the
4295// iterator has advanced beyond the end of the collection.
4296func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
4297	if !iter.page.NotDone() {
4298		return ExpressRouteCircuitPeering{}
4299	}
4300	return iter.page.Values()[iter.i]
4301}
4302
4303// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
4304func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
4305	return ExpressRouteCircuitPeeringListResultIterator{page: page}
4306}
4307
4308// IsEmpty returns true if the ListResult contains no values.
4309func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
4310	return ercplr.Value == nil || len(*ercplr.Value) == 0
4311}
4312
4313// hasNextLink returns true if the NextLink is not empty.
4314func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
4315	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
4316}
4317
4318// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
4319// It returns nil if no more results exist.
4320func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
4321	if !ercplr.hasNextLink() {
4322		return nil, nil
4323	}
4324	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4325		autorest.AsJSON(),
4326		autorest.AsGet(),
4327		autorest.WithBaseURL(to.String(ercplr.NextLink)))
4328}
4329
4330// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
4331type ExpressRouteCircuitPeeringListResultPage struct {
4332	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
4333	ercplr ExpressRouteCircuitPeeringListResult
4334}
4335
4336// NextWithContext advances to the next page of values.  If there was an error making
4337// the request the page does not advance and the error is returned.
4338func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
4339	if tracing.IsEnabled() {
4340		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
4341		defer func() {
4342			sc := -1
4343			if page.Response().Response.Response != nil {
4344				sc = page.Response().Response.Response.StatusCode
4345			}
4346			tracing.EndSpan(ctx, sc, err)
4347		}()
4348	}
4349	for {
4350		next, err := page.fn(ctx, page.ercplr)
4351		if err != nil {
4352			return err
4353		}
4354		page.ercplr = next
4355		if !next.hasNextLink() || !next.IsEmpty() {
4356			break
4357		}
4358	}
4359	return nil
4360}
4361
4362// Next advances to the next page of values.  If there was an error making
4363// the request the page does not advance and the error is returned.
4364// Deprecated: Use NextWithContext() instead.
4365func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
4366	return page.NextWithContext(context.Background())
4367}
4368
4369// NotDone returns true if the page enumeration should be started or is not yet complete.
4370func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
4371	return !page.ercplr.IsEmpty()
4372}
4373
4374// Response returns the raw server response from the last page request.
4375func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
4376	return page.ercplr
4377}
4378
4379// Values returns the slice of values for the current page or nil if there are no values.
4380func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
4381	if page.ercplr.IsEmpty() {
4382		return nil
4383	}
4384	return *page.ercplr.Value
4385}
4386
4387// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
4388func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
4389	return ExpressRouteCircuitPeeringListResultPage{
4390		fn:     getNextPage,
4391		ercplr: cur,
4392	}
4393}
4394
4395// ExpressRouteCircuitPeeringPropertiesFormat ...
4396type ExpressRouteCircuitPeeringPropertiesFormat struct {
4397	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
4398	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
4399	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
4400	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
4401	// AzureASN - The Azure ASN.
4402	AzureASN *int32 `json:"azureASN,omitempty"`
4403	// PeerASN - The peer ASN.
4404	PeerASN *int32 `json:"peerASN,omitempty"`
4405	// PrimaryPeerAddressPrefix - The primary address prefix.
4406	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
4407	// SecondaryPeerAddressPrefix - The secondary address prefix.
4408	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
4409	// PrimaryAzurePort - The primary port.
4410	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
4411	// SecondaryAzurePort - The secondary port.
4412	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
4413	// SharedKey - The shared key.
4414	SharedKey *string `json:"sharedKey,omitempty"`
4415	// VlanID - The VLAN ID.
4416	VlanID *int32 `json:"vlanId,omitempty"`
4417	// MicrosoftPeeringConfig - The Microsoft peering configuration.
4418	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
4419	// Stats - Gets peering stats.
4420	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
4421	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4422	ProvisioningState *string `json:"provisioningState,omitempty"`
4423	// GatewayManagerEtag - The GatewayManager Etag.
4424	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
4425	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
4426	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
4427	// RouteFilter - The reference of the RouteFilter resource.
4428	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
4429	// Ipv6PeeringConfig - The IPv6 peering configuration.
4430	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
4431}
4432
4433// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4434// of a long-running operation.
4435type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
4436	azure.FutureAPI
4437	// Result returns the result of the asynchronous operation.
4438	// If the operation has not completed it will return an error.
4439	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
4440}
4441
4442// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4443func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4444	var azFuture azure.Future
4445	if err := json.Unmarshal(body, &azFuture); err != nil {
4446		return err
4447	}
4448	future.FutureAPI = &azFuture
4449	future.Result = future.result
4450	return nil
4451}
4452
4453// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
4454func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
4455	var done bool
4456	done, err = future.DoneWithContext(context.Background(), client)
4457	if err != nil {
4458		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4459		return
4460	}
4461	if !done {
4462		ercp.Response.Response = future.Response()
4463		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
4464		return
4465	}
4466	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4467	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
4468		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
4469		if err != nil {
4470			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
4471		}
4472	}
4473	return
4474}
4475
4476// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
4477// long-running operation.
4478type ExpressRouteCircuitPeeringsDeleteFuture struct {
4479	azure.FutureAPI
4480	// Result returns the result of the asynchronous operation.
4481	// If the operation has not completed it will return an error.
4482	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
4483}
4484
4485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4486func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
4487	var azFuture azure.Future
4488	if err := json.Unmarshal(body, &azFuture); err != nil {
4489		return err
4490	}
4491	future.FutureAPI = &azFuture
4492	future.Result = future.result
4493	return nil
4494}
4495
4496// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
4497func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
4498	var done bool
4499	done, err = future.DoneWithContext(context.Background(), client)
4500	if err != nil {
4501		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
4502		return
4503	}
4504	if !done {
4505		ar.Response = future.Response()
4506		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
4507		return
4508	}
4509	ar.Response = future.Response()
4510	return
4511}
4512
4513// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
4514type ExpressRouteCircuitPropertiesFormat struct {
4515	// AllowClassicOperations - Allow classic operations
4516	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
4517	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
4518	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
4519	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
4520	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
4521	// Authorizations - The list of authorizations.
4522	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
4523	// Peerings - The list of peerings.
4524	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
4525	// ServiceKey - The ServiceKey.
4526	ServiceKey *string `json:"serviceKey,omitempty"`
4527	// ServiceProviderNotes - The ServiceProviderNotes.
4528	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
4529	// ServiceProviderProperties - The ServiceProviderProperties.
4530	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
4531	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4532	ProvisioningState *string `json:"provisioningState,omitempty"`
4533	// GatewayManagerEtag - The GatewayManager Etag.
4534	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
4535}
4536
4537// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
4538type ExpressRouteCircuitRoutesTable struct {
4539	// NetworkProperty - network
4540	NetworkProperty *string `json:"network,omitempty"`
4541	// NextHop - nextHop
4542	NextHop *string `json:"nextHop,omitempty"`
4543	// LocPrf - locPrf
4544	LocPrf *string `json:"locPrf,omitempty"`
4545	// Weight - weight.
4546	Weight *int32 `json:"weight,omitempty"`
4547	// Path - path
4548	Path *string `json:"path,omitempty"`
4549}
4550
4551// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
4552type ExpressRouteCircuitRoutesTableSummary struct {
4553	// Neighbor - Neighbor
4554	Neighbor *string `json:"neighbor,omitempty"`
4555	// V - BGP version number spoken to the neighbor.
4556	V *int32 `json:"v,omitempty"`
4557	// As - Autonomous system number.
4558	As *int32 `json:"as,omitempty"`
4559	// 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.
4560	UpDown *string `json:"upDown,omitempty"`
4561	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
4562	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
4563}
4564
4565// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
4566// Circuits API.
4567type ExpressRouteCircuitsArpTableListResult struct {
4568	autorest.Response `json:"-"`
4569	// Value - Gets list of the ARP table.
4570	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
4571	// NextLink - The URL to get the next set of results.
4572	NextLink *string `json:"nextLink,omitempty"`
4573}
4574
4575// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4576// long-running operation.
4577type ExpressRouteCircuitsCreateOrUpdateFuture struct {
4578	azure.FutureAPI
4579	// Result returns the result of the asynchronous operation.
4580	// If the operation has not completed it will return an error.
4581	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
4582}
4583
4584// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4585func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4586	var azFuture azure.Future
4587	if err := json.Unmarshal(body, &azFuture); err != nil {
4588		return err
4589	}
4590	future.FutureAPI = &azFuture
4591	future.Result = future.result
4592	return nil
4593}
4594
4595// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
4596func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
4597	var done bool
4598	done, err = future.DoneWithContext(context.Background(), client)
4599	if err != nil {
4600		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4601		return
4602	}
4603	if !done {
4604		erc.Response.Response = future.Response()
4605		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
4606		return
4607	}
4608	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4609	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
4610		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
4611		if err != nil {
4612			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
4613		}
4614	}
4615	return
4616}
4617
4618// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
4619// long-running operation.
4620type ExpressRouteCircuitsDeleteFuture struct {
4621	azure.FutureAPI
4622	// Result returns the result of the asynchronous operation.
4623	// If the operation has not completed it will return an error.
4624	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
4625}
4626
4627// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4628func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
4629	var azFuture azure.Future
4630	if err := json.Unmarshal(body, &azFuture); err != nil {
4631		return err
4632	}
4633	future.FutureAPI = &azFuture
4634	future.Result = future.result
4635	return nil
4636}
4637
4638// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
4639func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
4640	var done bool
4641	done, err = future.DoneWithContext(context.Background(), client)
4642	if err != nil {
4643		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
4644		return
4645	}
4646	if !done {
4647		ar.Response = future.Response()
4648		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
4649		return
4650	}
4651	ar.Response = future.Response()
4652	return
4653}
4654
4655// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
4656// ExpressRouteCircuit.
4657type ExpressRouteCircuitServiceProviderProperties struct {
4658	// ServiceProviderName - The serviceProviderName.
4659	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
4660	// PeeringLocation - The peering location.
4661	PeeringLocation *string `json:"peeringLocation,omitempty"`
4662	// BandwidthInMbps - The BandwidthInMbps.
4663	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
4664}
4665
4666// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
4667type ExpressRouteCircuitSku struct {
4668	// Name - The name of the SKU.
4669	Name *string `json:"name,omitempty"`
4670	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
4671	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
4672	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
4673	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
4674}
4675
4676// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
4677// long-running operation.
4678type ExpressRouteCircuitsListArpTableFuture struct {
4679	azure.FutureAPI
4680	// Result returns the result of the asynchronous operation.
4681	// If the operation has not completed it will return an error.
4682	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
4683}
4684
4685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4686func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
4687	var azFuture azure.Future
4688	if err := json.Unmarshal(body, &azFuture); err != nil {
4689		return err
4690	}
4691	future.FutureAPI = &azFuture
4692	future.Result = future.result
4693	return nil
4694}
4695
4696// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
4697func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
4698	var done bool
4699	done, err = future.DoneWithContext(context.Background(), client)
4700	if err != nil {
4701		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
4702		return
4703	}
4704	if !done {
4705		ercatlr.Response.Response = future.Response()
4706		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
4707		return
4708	}
4709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4710	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
4711		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
4712		if err != nil {
4713			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
4714		}
4715	}
4716	return
4717}
4718
4719// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
4720// long-running operation.
4721type ExpressRouteCircuitsListRoutesTableFuture struct {
4722	azure.FutureAPI
4723	// Result returns the result of the asynchronous operation.
4724	// If the operation has not completed it will return an error.
4725	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
4726}
4727
4728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4729func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
4730	var azFuture azure.Future
4731	if err := json.Unmarshal(body, &azFuture); err != nil {
4732		return err
4733	}
4734	future.FutureAPI = &azFuture
4735	future.Result = future.result
4736	return nil
4737}
4738
4739// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
4740func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
4741	var done bool
4742	done, err = future.DoneWithContext(context.Background(), client)
4743	if err != nil {
4744		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
4745		return
4746	}
4747	if !done {
4748		ercrtlr.Response.Response = future.Response()
4749		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
4750		return
4751	}
4752	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4753	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
4754		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
4755		if err != nil {
4756			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
4757		}
4758	}
4759	return
4760}
4761
4762// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
4763// results of a long-running operation.
4764type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
4765	azure.FutureAPI
4766	// Result returns the result of the asynchronous operation.
4767	// If the operation has not completed it will return an error.
4768	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
4769}
4770
4771// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4772func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
4773	var azFuture azure.Future
4774	if err := json.Unmarshal(body, &azFuture); err != nil {
4775		return err
4776	}
4777	future.FutureAPI = &azFuture
4778	future.Result = future.result
4779	return nil
4780}
4781
4782// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
4783func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
4784	var done bool
4785	done, err = future.DoneWithContext(context.Background(), client)
4786	if err != nil {
4787		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
4788		return
4789	}
4790	if !done {
4791		ercrtslr.Response.Response = future.Response()
4792		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
4793		return
4794	}
4795	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4796	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
4797		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
4798		if err != nil {
4799			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
4800		}
4801	}
4802	return
4803}
4804
4805// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
4806// Circuits API.
4807type ExpressRouteCircuitsRoutesTableListResult struct {
4808	autorest.Response `json:"-"`
4809	// Value - The list of routes table.
4810	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
4811	// NextLink - The URL to get the next set of results.
4812	NextLink *string `json:"nextLink,omitempty"`
4813}
4814
4815// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
4816// Express Route Circuits API.
4817type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
4818	autorest.Response `json:"-"`
4819	// Value - A list of the routes table.
4820	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
4821	// NextLink - The URL to get the next set of results.
4822	NextLink *string `json:"nextLink,omitempty"`
4823}
4824
4825// ExpressRouteCircuitStats contains stats associated with the peering.
4826type ExpressRouteCircuitStats struct {
4827	autorest.Response `json:"-"`
4828	// PrimarybytesIn - Gets BytesIn of the peering.
4829	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
4830	// PrimarybytesOut - Gets BytesOut of the peering.
4831	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
4832	// SecondarybytesIn - Gets BytesIn of the peering.
4833	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
4834	// SecondarybytesOut - Gets BytesOut of the peering.
4835	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
4836}
4837
4838// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
4839type ExpressRouteServiceProvider struct {
4840	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
4841	// ID - Resource ID.
4842	ID *string `json:"id,omitempty"`
4843	// Name - READ-ONLY; Resource name.
4844	Name *string `json:"name,omitempty"`
4845	// Type - READ-ONLY; Resource type.
4846	Type *string `json:"type,omitempty"`
4847	// Location - Resource location.
4848	Location *string `json:"location,omitempty"`
4849	// Tags - Resource tags.
4850	Tags map[string]*string `json:"tags"`
4851}
4852
4853// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
4854func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
4855	objectMap := make(map[string]interface{})
4856	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
4857		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
4858	}
4859	if ersp.ID != nil {
4860		objectMap["id"] = ersp.ID
4861	}
4862	if ersp.Location != nil {
4863		objectMap["location"] = ersp.Location
4864	}
4865	if ersp.Tags != nil {
4866		objectMap["tags"] = ersp.Tags
4867	}
4868	return json.Marshal(objectMap)
4869}
4870
4871// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
4872func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
4873	var m map[string]*json.RawMessage
4874	err := json.Unmarshal(body, &m)
4875	if err != nil {
4876		return err
4877	}
4878	for k, v := range m {
4879		switch k {
4880		case "properties":
4881			if v != nil {
4882				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
4883				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
4884				if err != nil {
4885					return err
4886				}
4887				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
4888			}
4889		case "id":
4890			if v != nil {
4891				var ID string
4892				err = json.Unmarshal(*v, &ID)
4893				if err != nil {
4894					return err
4895				}
4896				ersp.ID = &ID
4897			}
4898		case "name":
4899			if v != nil {
4900				var name string
4901				err = json.Unmarshal(*v, &name)
4902				if err != nil {
4903					return err
4904				}
4905				ersp.Name = &name
4906			}
4907		case "type":
4908			if v != nil {
4909				var typeVar string
4910				err = json.Unmarshal(*v, &typeVar)
4911				if err != nil {
4912					return err
4913				}
4914				ersp.Type = &typeVar
4915			}
4916		case "location":
4917			if v != nil {
4918				var location string
4919				err = json.Unmarshal(*v, &location)
4920				if err != nil {
4921					return err
4922				}
4923				ersp.Location = &location
4924			}
4925		case "tags":
4926			if v != nil {
4927				var tags map[string]*string
4928				err = json.Unmarshal(*v, &tags)
4929				if err != nil {
4930					return err
4931				}
4932				ersp.Tags = tags
4933			}
4934		}
4935	}
4936
4937	return nil
4938}
4939
4940// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
4941// resources.
4942type ExpressRouteServiceProviderBandwidthsOffered struct {
4943	// OfferName - The OfferName.
4944	OfferName *string `json:"offerName,omitempty"`
4945	// ValueInMbps - The ValueInMbps.
4946	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
4947}
4948
4949// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
4950type ExpressRouteServiceProviderListResult struct {
4951	autorest.Response `json:"-"`
4952	// Value - A list of ExpressRouteResourceProvider resources.
4953	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
4954	// NextLink - The URL to get the next set of results.
4955	NextLink *string `json:"nextLink,omitempty"`
4956}
4957
4958// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
4959// ExpressRouteServiceProvider values.
4960type ExpressRouteServiceProviderListResultIterator struct {
4961	i    int
4962	page ExpressRouteServiceProviderListResultPage
4963}
4964
4965// NextWithContext advances to the next value.  If there was an error making
4966// the request the iterator does not advance and the error is returned.
4967func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
4968	if tracing.IsEnabled() {
4969		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
4970		defer func() {
4971			sc := -1
4972			if iter.Response().Response.Response != nil {
4973				sc = iter.Response().Response.Response.StatusCode
4974			}
4975			tracing.EndSpan(ctx, sc, err)
4976		}()
4977	}
4978	iter.i++
4979	if iter.i < len(iter.page.Values()) {
4980		return nil
4981	}
4982	err = iter.page.NextWithContext(ctx)
4983	if err != nil {
4984		iter.i--
4985		return err
4986	}
4987	iter.i = 0
4988	return nil
4989}
4990
4991// Next advances to the next value.  If there was an error making
4992// the request the iterator does not advance and the error is returned.
4993// Deprecated: Use NextWithContext() instead.
4994func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
4995	return iter.NextWithContext(context.Background())
4996}
4997
4998// NotDone returns true if the enumeration should be started or is not yet complete.
4999func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
5000	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5001}
5002
5003// Response returns the raw server response from the last page request.
5004func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
5005	return iter.page.Response()
5006}
5007
5008// Value returns the current value or a zero-initialized value if the
5009// iterator has advanced beyond the end of the collection.
5010func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
5011	if !iter.page.NotDone() {
5012		return ExpressRouteServiceProvider{}
5013	}
5014	return iter.page.Values()[iter.i]
5015}
5016
5017// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
5018func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
5019	return ExpressRouteServiceProviderListResultIterator{page: page}
5020}
5021
5022// IsEmpty returns true if the ListResult contains no values.
5023func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
5024	return ersplr.Value == nil || len(*ersplr.Value) == 0
5025}
5026
5027// hasNextLink returns true if the NextLink is not empty.
5028func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
5029	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
5030}
5031
5032// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
5033// It returns nil if no more results exist.
5034func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
5035	if !ersplr.hasNextLink() {
5036		return nil, nil
5037	}
5038	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5039		autorest.AsJSON(),
5040		autorest.AsGet(),
5041		autorest.WithBaseURL(to.String(ersplr.NextLink)))
5042}
5043
5044// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
5045type ExpressRouteServiceProviderListResultPage struct {
5046	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
5047	ersplr ExpressRouteServiceProviderListResult
5048}
5049
5050// NextWithContext advances to the next page of values.  If there was an error making
5051// the request the page does not advance and the error is returned.
5052func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
5053	if tracing.IsEnabled() {
5054		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
5055		defer func() {
5056			sc := -1
5057			if page.Response().Response.Response != nil {
5058				sc = page.Response().Response.Response.StatusCode
5059			}
5060			tracing.EndSpan(ctx, sc, err)
5061		}()
5062	}
5063	for {
5064		next, err := page.fn(ctx, page.ersplr)
5065		if err != nil {
5066			return err
5067		}
5068		page.ersplr = next
5069		if !next.hasNextLink() || !next.IsEmpty() {
5070			break
5071		}
5072	}
5073	return nil
5074}
5075
5076// Next advances to the next page of values.  If there was an error making
5077// the request the page does not advance and the error is returned.
5078// Deprecated: Use NextWithContext() instead.
5079func (page *ExpressRouteServiceProviderListResultPage) Next() error {
5080	return page.NextWithContext(context.Background())
5081}
5082
5083// NotDone returns true if the page enumeration should be started or is not yet complete.
5084func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
5085	return !page.ersplr.IsEmpty()
5086}
5087
5088// Response returns the raw server response from the last page request.
5089func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
5090	return page.ersplr
5091}
5092
5093// Values returns the slice of values for the current page or nil if there are no values.
5094func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
5095	if page.ersplr.IsEmpty() {
5096		return nil
5097	}
5098	return *page.ersplr.Value
5099}
5100
5101// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
5102func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
5103	return ExpressRouteServiceProviderListResultPage{
5104		fn:     getNextPage,
5105		ersplr: cur,
5106	}
5107}
5108
5109// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
5110type ExpressRouteServiceProviderPropertiesFormat struct {
5111	// PeeringLocations - Get a list of peering locations.
5112	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
5113	// BandwidthsOffered - Gets bandwidths offered.
5114	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
5115	// ProvisioningState - Gets the provisioning state of the resource.
5116	ProvisioningState *string `json:"provisioningState,omitempty"`
5117}
5118
5119// FlowLogInformation information on the configuration of flow log.
5120type FlowLogInformation struct {
5121	autorest.Response `json:"-"`
5122	// TargetResourceID - The ID of the resource to configure for flow logging.
5123	TargetResourceID   *string `json:"targetResourceId,omitempty"`
5124	*FlowLogProperties `json:"properties,omitempty"`
5125}
5126
5127// MarshalJSON is the custom marshaler for FlowLogInformation.
5128func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
5129	objectMap := make(map[string]interface{})
5130	if fli.TargetResourceID != nil {
5131		objectMap["targetResourceId"] = fli.TargetResourceID
5132	}
5133	if fli.FlowLogProperties != nil {
5134		objectMap["properties"] = fli.FlowLogProperties
5135	}
5136	return json.Marshal(objectMap)
5137}
5138
5139// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
5140func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
5141	var m map[string]*json.RawMessage
5142	err := json.Unmarshal(body, &m)
5143	if err != nil {
5144		return err
5145	}
5146	for k, v := range m {
5147		switch k {
5148		case "targetResourceId":
5149			if v != nil {
5150				var targetResourceID string
5151				err = json.Unmarshal(*v, &targetResourceID)
5152				if err != nil {
5153					return err
5154				}
5155				fli.TargetResourceID = &targetResourceID
5156			}
5157		case "properties":
5158			if v != nil {
5159				var flowLogProperties FlowLogProperties
5160				err = json.Unmarshal(*v, &flowLogProperties)
5161				if err != nil {
5162					return err
5163				}
5164				fli.FlowLogProperties = &flowLogProperties
5165			}
5166		}
5167	}
5168
5169	return nil
5170}
5171
5172// FlowLogProperties parameters that define the configuration of flow log.
5173type FlowLogProperties struct {
5174	// StorageID - ID of the storage account which is used to store the flow log.
5175	StorageID *string `json:"storageId,omitempty"`
5176	// Enabled - Flag to enable/disable flow logging.
5177	Enabled         *bool                      `json:"enabled,omitempty"`
5178	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
5179}
5180
5181// FlowLogStatusParameters parameters that define a resource to query flow log status.
5182type FlowLogStatusParameters struct {
5183	// TargetResourceID - The target resource where getting the flow logging status.
5184	TargetResourceID *string `json:"targetResourceId,omitempty"`
5185}
5186
5187// FrontendIPConfiguration frontend IP address of the load balancer.
5188type FrontendIPConfiguration struct {
5189	autorest.Response `json:"-"`
5190	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
5191	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5192	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5193	Name *string `json:"name,omitempty"`
5194	// Etag - A unique read-only string that changes whenever the resource is updated.
5195	Etag *string `json:"etag,omitempty"`
5196	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
5197	Zones *[]string `json:"zones,omitempty"`
5198	// ID - Resource ID.
5199	ID *string `json:"id,omitempty"`
5200}
5201
5202// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
5203func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
5204	objectMap := make(map[string]interface{})
5205	if fic.FrontendIPConfigurationPropertiesFormat != nil {
5206		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
5207	}
5208	if fic.Name != nil {
5209		objectMap["name"] = fic.Name
5210	}
5211	if fic.Etag != nil {
5212		objectMap["etag"] = fic.Etag
5213	}
5214	if fic.Zones != nil {
5215		objectMap["zones"] = fic.Zones
5216	}
5217	if fic.ID != nil {
5218		objectMap["id"] = fic.ID
5219	}
5220	return json.Marshal(objectMap)
5221}
5222
5223// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
5224func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
5225	var m map[string]*json.RawMessage
5226	err := json.Unmarshal(body, &m)
5227	if err != nil {
5228		return err
5229	}
5230	for k, v := range m {
5231		switch k {
5232		case "properties":
5233			if v != nil {
5234				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
5235				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
5236				if err != nil {
5237					return err
5238				}
5239				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
5240			}
5241		case "name":
5242			if v != nil {
5243				var name string
5244				err = json.Unmarshal(*v, &name)
5245				if err != nil {
5246					return err
5247				}
5248				fic.Name = &name
5249			}
5250		case "etag":
5251			if v != nil {
5252				var etag string
5253				err = json.Unmarshal(*v, &etag)
5254				if err != nil {
5255					return err
5256				}
5257				fic.Etag = &etag
5258			}
5259		case "zones":
5260			if v != nil {
5261				var zones []string
5262				err = json.Unmarshal(*v, &zones)
5263				if err != nil {
5264					return err
5265				}
5266				fic.Zones = &zones
5267			}
5268		case "id":
5269			if v != nil {
5270				var ID string
5271				err = json.Unmarshal(*v, &ID)
5272				if err != nil {
5273					return err
5274				}
5275				fic.ID = &ID
5276			}
5277		}
5278	}
5279
5280	return nil
5281}
5282
5283// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
5284type FrontendIPConfigurationPropertiesFormat struct {
5285	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
5286	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
5287	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
5288	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
5289	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
5290	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
5291	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
5292	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5293	// PrivateIPAddress - The private IP address of the IP configuration.
5294	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5295	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
5296	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5297	// Subnet - The reference of the subnet resource.
5298	Subnet *Subnet `json:"subnet,omitempty"`
5299	// PublicIPAddress - The reference of the Public IP resource.
5300	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
5301	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5302	ProvisioningState *string `json:"provisioningState,omitempty"`
5303}
5304
5305// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
5306func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5307	objectMap := make(map[string]interface{})
5308	if ficpf.PrivateIPAddress != nil {
5309		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
5310	}
5311	if ficpf.PrivateIPAllocationMethod != "" {
5312		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
5313	}
5314	if ficpf.Subnet != nil {
5315		objectMap["subnet"] = ficpf.Subnet
5316	}
5317	if ficpf.PublicIPAddress != nil {
5318		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
5319	}
5320	if ficpf.ProvisioningState != nil {
5321		objectMap["provisioningState"] = ficpf.ProvisioningState
5322	}
5323	return json.Marshal(objectMap)
5324}
5325
5326// GatewayRoute gateway routing details
5327type GatewayRoute struct {
5328	// LocalAddress - READ-ONLY; The gateway's local address
5329	LocalAddress *string `json:"localAddress,omitempty"`
5330	// NetworkProperty - READ-ONLY; The route's network prefix
5331	NetworkProperty *string `json:"network,omitempty"`
5332	// NextHop - READ-ONLY; The route's next hop
5333	NextHop *string `json:"nextHop,omitempty"`
5334	// SourcePeer - READ-ONLY; The peer this route was learned from
5335	SourcePeer *string `json:"sourcePeer,omitempty"`
5336	// Origin - READ-ONLY; The source this route was learned from
5337	Origin *string `json:"origin,omitempty"`
5338	// AsPath - READ-ONLY; The route's AS path sequence
5339	AsPath *string `json:"asPath,omitempty"`
5340	// Weight - READ-ONLY; The route's weight
5341	Weight *int32 `json:"weight,omitempty"`
5342}
5343
5344// MarshalJSON is the custom marshaler for GatewayRoute.
5345func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
5346	objectMap := make(map[string]interface{})
5347	return json.Marshal(objectMap)
5348}
5349
5350// GatewayRouteListResult list of virtual network gateway routes
5351type GatewayRouteListResult struct {
5352	autorest.Response `json:"-"`
5353	// Value - List of gateway routes
5354	Value *[]GatewayRoute `json:"value,omitempty"`
5355}
5356
5357// InboundNatPool inbound NAT pool of the load balancer.
5358type InboundNatPool struct {
5359	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
5360	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
5361	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5362	Name *string `json:"name,omitempty"`
5363	// Etag - A unique read-only string that changes whenever the resource is updated.
5364	Etag *string `json:"etag,omitempty"`
5365	// ID - Resource ID.
5366	ID *string `json:"id,omitempty"`
5367}
5368
5369// MarshalJSON is the custom marshaler for InboundNatPool.
5370func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
5371	objectMap := make(map[string]interface{})
5372	if inp.InboundNatPoolPropertiesFormat != nil {
5373		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
5374	}
5375	if inp.Name != nil {
5376		objectMap["name"] = inp.Name
5377	}
5378	if inp.Etag != nil {
5379		objectMap["etag"] = inp.Etag
5380	}
5381	if inp.ID != nil {
5382		objectMap["id"] = inp.ID
5383	}
5384	return json.Marshal(objectMap)
5385}
5386
5387// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
5388func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
5389	var m map[string]*json.RawMessage
5390	err := json.Unmarshal(body, &m)
5391	if err != nil {
5392		return err
5393	}
5394	for k, v := range m {
5395		switch k {
5396		case "properties":
5397			if v != nil {
5398				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
5399				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
5400				if err != nil {
5401					return err
5402				}
5403				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
5404			}
5405		case "name":
5406			if v != nil {
5407				var name string
5408				err = json.Unmarshal(*v, &name)
5409				if err != nil {
5410					return err
5411				}
5412				inp.Name = &name
5413			}
5414		case "etag":
5415			if v != nil {
5416				var etag string
5417				err = json.Unmarshal(*v, &etag)
5418				if err != nil {
5419					return err
5420				}
5421				inp.Etag = &etag
5422			}
5423		case "id":
5424			if v != nil {
5425				var ID string
5426				err = json.Unmarshal(*v, &ID)
5427				if err != nil {
5428					return err
5429				}
5430				inp.ID = &ID
5431			}
5432		}
5433	}
5434
5435	return nil
5436}
5437
5438// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
5439type InboundNatPoolPropertiesFormat struct {
5440	// FrontendIPConfiguration - A reference to frontend IP addresses.
5441	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
5442	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
5443	Protocol TransportProtocol `json:"protocol,omitempty"`
5444	// 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.
5445	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
5446	// 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.
5447	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
5448	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
5449	BackendPort *int32 `json:"backendPort,omitempty"`
5450	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5451	ProvisioningState *string `json:"provisioningState,omitempty"`
5452}
5453
5454// InboundNatRule inbound NAT rule of the load balancer.
5455type InboundNatRule struct {
5456	autorest.Response `json:"-"`
5457	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
5458	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
5459	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5460	Name *string `json:"name,omitempty"`
5461	// Etag - A unique read-only string that changes whenever the resource is updated.
5462	Etag *string `json:"etag,omitempty"`
5463	// ID - Resource ID.
5464	ID *string `json:"id,omitempty"`
5465}
5466
5467// MarshalJSON is the custom marshaler for InboundNatRule.
5468func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
5469	objectMap := make(map[string]interface{})
5470	if inr.InboundNatRulePropertiesFormat != nil {
5471		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
5472	}
5473	if inr.Name != nil {
5474		objectMap["name"] = inr.Name
5475	}
5476	if inr.Etag != nil {
5477		objectMap["etag"] = inr.Etag
5478	}
5479	if inr.ID != nil {
5480		objectMap["id"] = inr.ID
5481	}
5482	return json.Marshal(objectMap)
5483}
5484
5485// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
5486func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
5487	var m map[string]*json.RawMessage
5488	err := json.Unmarshal(body, &m)
5489	if err != nil {
5490		return err
5491	}
5492	for k, v := range m {
5493		switch k {
5494		case "properties":
5495			if v != nil {
5496				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
5497				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
5498				if err != nil {
5499					return err
5500				}
5501				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
5502			}
5503		case "name":
5504			if v != nil {
5505				var name string
5506				err = json.Unmarshal(*v, &name)
5507				if err != nil {
5508					return err
5509				}
5510				inr.Name = &name
5511			}
5512		case "etag":
5513			if v != nil {
5514				var etag string
5515				err = json.Unmarshal(*v, &etag)
5516				if err != nil {
5517					return err
5518				}
5519				inr.Etag = &etag
5520			}
5521		case "id":
5522			if v != nil {
5523				var ID string
5524				err = json.Unmarshal(*v, &ID)
5525				if err != nil {
5526					return err
5527				}
5528				inr.ID = &ID
5529			}
5530		}
5531	}
5532
5533	return nil
5534}
5535
5536// InboundNatRuleListResult response for ListInboundNatRule API service call.
5537type InboundNatRuleListResult struct {
5538	autorest.Response `json:"-"`
5539	// Value - A list of inbound nat rules in a load balancer.
5540	Value *[]InboundNatRule `json:"value,omitempty"`
5541	// NextLink - READ-ONLY; The URL to get the next set of results.
5542	NextLink *string `json:"nextLink,omitempty"`
5543}
5544
5545// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
5546func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
5547	objectMap := make(map[string]interface{})
5548	if inrlr.Value != nil {
5549		objectMap["value"] = inrlr.Value
5550	}
5551	return json.Marshal(objectMap)
5552}
5553
5554// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
5555type InboundNatRuleListResultIterator struct {
5556	i    int
5557	page InboundNatRuleListResultPage
5558}
5559
5560// NextWithContext advances to the next value.  If there was an error making
5561// the request the iterator does not advance and the error is returned.
5562func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
5563	if tracing.IsEnabled() {
5564		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
5565		defer func() {
5566			sc := -1
5567			if iter.Response().Response.Response != nil {
5568				sc = iter.Response().Response.Response.StatusCode
5569			}
5570			tracing.EndSpan(ctx, sc, err)
5571		}()
5572	}
5573	iter.i++
5574	if iter.i < len(iter.page.Values()) {
5575		return nil
5576	}
5577	err = iter.page.NextWithContext(ctx)
5578	if err != nil {
5579		iter.i--
5580		return err
5581	}
5582	iter.i = 0
5583	return nil
5584}
5585
5586// Next advances to the next value.  If there was an error making
5587// the request the iterator does not advance and the error is returned.
5588// Deprecated: Use NextWithContext() instead.
5589func (iter *InboundNatRuleListResultIterator) Next() error {
5590	return iter.NextWithContext(context.Background())
5591}
5592
5593// NotDone returns true if the enumeration should be started or is not yet complete.
5594func (iter InboundNatRuleListResultIterator) NotDone() bool {
5595	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5596}
5597
5598// Response returns the raw server response from the last page request.
5599func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
5600	return iter.page.Response()
5601}
5602
5603// Value returns the current value or a zero-initialized value if the
5604// iterator has advanced beyond the end of the collection.
5605func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
5606	if !iter.page.NotDone() {
5607		return InboundNatRule{}
5608	}
5609	return iter.page.Values()[iter.i]
5610}
5611
5612// Creates a new instance of the InboundNatRuleListResultIterator type.
5613func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
5614	return InboundNatRuleListResultIterator{page: page}
5615}
5616
5617// IsEmpty returns true if the ListResult contains no values.
5618func (inrlr InboundNatRuleListResult) IsEmpty() bool {
5619	return inrlr.Value == nil || len(*inrlr.Value) == 0
5620}
5621
5622// hasNextLink returns true if the NextLink is not empty.
5623func (inrlr InboundNatRuleListResult) hasNextLink() bool {
5624	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
5625}
5626
5627// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
5628// It returns nil if no more results exist.
5629func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
5630	if !inrlr.hasNextLink() {
5631		return nil, nil
5632	}
5633	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5634		autorest.AsJSON(),
5635		autorest.AsGet(),
5636		autorest.WithBaseURL(to.String(inrlr.NextLink)))
5637}
5638
5639// InboundNatRuleListResultPage contains a page of InboundNatRule values.
5640type InboundNatRuleListResultPage struct {
5641	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
5642	inrlr InboundNatRuleListResult
5643}
5644
5645// NextWithContext advances to the next page of values.  If there was an error making
5646// the request the page does not advance and the error is returned.
5647func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
5648	if tracing.IsEnabled() {
5649		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
5650		defer func() {
5651			sc := -1
5652			if page.Response().Response.Response != nil {
5653				sc = page.Response().Response.Response.StatusCode
5654			}
5655			tracing.EndSpan(ctx, sc, err)
5656		}()
5657	}
5658	for {
5659		next, err := page.fn(ctx, page.inrlr)
5660		if err != nil {
5661			return err
5662		}
5663		page.inrlr = next
5664		if !next.hasNextLink() || !next.IsEmpty() {
5665			break
5666		}
5667	}
5668	return nil
5669}
5670
5671// Next advances to the next page of values.  If there was an error making
5672// the request the page does not advance and the error is returned.
5673// Deprecated: Use NextWithContext() instead.
5674func (page *InboundNatRuleListResultPage) Next() error {
5675	return page.NextWithContext(context.Background())
5676}
5677
5678// NotDone returns true if the page enumeration should be started or is not yet complete.
5679func (page InboundNatRuleListResultPage) NotDone() bool {
5680	return !page.inrlr.IsEmpty()
5681}
5682
5683// Response returns the raw server response from the last page request.
5684func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
5685	return page.inrlr
5686}
5687
5688// Values returns the slice of values for the current page or nil if there are no values.
5689func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
5690	if page.inrlr.IsEmpty() {
5691		return nil
5692	}
5693	return *page.inrlr.Value
5694}
5695
5696// Creates a new instance of the InboundNatRuleListResultPage type.
5697func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
5698	return InboundNatRuleListResultPage{
5699		fn:    getNextPage,
5700		inrlr: cur,
5701	}
5702}
5703
5704// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
5705type InboundNatRulePropertiesFormat struct {
5706	// FrontendIPConfiguration - A reference to frontend IP addresses.
5707	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
5708	// 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.
5709	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
5710	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
5711	Protocol TransportProtocol `json:"protocol,omitempty"`
5712	// 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.
5713	FrontendPort *int32 `json:"frontendPort,omitempty"`
5714	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
5715	BackendPort *int32 `json:"backendPort,omitempty"`
5716	// 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.
5717	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5718	// 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.
5719	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
5720	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5721	ProvisioningState *string `json:"provisioningState,omitempty"`
5722}
5723
5724// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
5725func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
5726	objectMap := make(map[string]interface{})
5727	if inrpf.FrontendIPConfiguration != nil {
5728		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
5729	}
5730	if inrpf.Protocol != "" {
5731		objectMap["protocol"] = inrpf.Protocol
5732	}
5733	if inrpf.FrontendPort != nil {
5734		objectMap["frontendPort"] = inrpf.FrontendPort
5735	}
5736	if inrpf.BackendPort != nil {
5737		objectMap["backendPort"] = inrpf.BackendPort
5738	}
5739	if inrpf.IdleTimeoutInMinutes != nil {
5740		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
5741	}
5742	if inrpf.EnableFloatingIP != nil {
5743		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
5744	}
5745	if inrpf.ProvisioningState != nil {
5746		objectMap["provisioningState"] = inrpf.ProvisioningState
5747	}
5748	return json.Marshal(objectMap)
5749}
5750
5751// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5752// long-running operation.
5753type InboundNatRulesCreateOrUpdateFuture struct {
5754	azure.FutureAPI
5755	// Result returns the result of the asynchronous operation.
5756	// If the operation has not completed it will return an error.
5757	Result func(InboundNatRulesClient) (InboundNatRule, error)
5758}
5759
5760// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5761func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5762	var azFuture azure.Future
5763	if err := json.Unmarshal(body, &azFuture); err != nil {
5764		return err
5765	}
5766	future.FutureAPI = &azFuture
5767	future.Result = future.result
5768	return nil
5769}
5770
5771// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
5772func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
5773	var done bool
5774	done, err = future.DoneWithContext(context.Background(), client)
5775	if err != nil {
5776		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5777		return
5778	}
5779	if !done {
5780		inr.Response.Response = future.Response()
5781		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
5782		return
5783	}
5784	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5785	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
5786		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
5787		if err != nil {
5788			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
5789		}
5790	}
5791	return
5792}
5793
5794// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5795// operation.
5796type InboundNatRulesDeleteFuture struct {
5797	azure.FutureAPI
5798	// Result returns the result of the asynchronous operation.
5799	// If the operation has not completed it will return an error.
5800	Result func(InboundNatRulesClient) (autorest.Response, error)
5801}
5802
5803// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5804func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
5805	var azFuture azure.Future
5806	if err := json.Unmarshal(body, &azFuture); err != nil {
5807		return err
5808	}
5809	future.FutureAPI = &azFuture
5810	future.Result = future.result
5811	return nil
5812}
5813
5814// result is the default implementation for InboundNatRulesDeleteFuture.Result.
5815func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
5816	var done bool
5817	done, err = future.DoneWithContext(context.Background(), client)
5818	if err != nil {
5819		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
5820		return
5821	}
5822	if !done {
5823		ar.Response = future.Response()
5824		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
5825		return
5826	}
5827	ar.Response = future.Response()
5828	return
5829}
5830
5831// Interface a network interface in a resource group.
5832type Interface struct {
5833	autorest.Response `json:"-"`
5834	// InterfacePropertiesFormat - Properties of the network interface.
5835	*InterfacePropertiesFormat `json:"properties,omitempty"`
5836	// Etag - A unique read-only string that changes whenever the resource is updated.
5837	Etag *string `json:"etag,omitempty"`
5838	// ID - Resource ID.
5839	ID *string `json:"id,omitempty"`
5840	// Name - READ-ONLY; Resource name.
5841	Name *string `json:"name,omitempty"`
5842	// Type - READ-ONLY; Resource type.
5843	Type *string `json:"type,omitempty"`
5844	// Location - Resource location.
5845	Location *string `json:"location,omitempty"`
5846	// Tags - Resource tags.
5847	Tags map[string]*string `json:"tags"`
5848}
5849
5850// MarshalJSON is the custom marshaler for Interface.
5851func (i Interface) MarshalJSON() ([]byte, error) {
5852	objectMap := make(map[string]interface{})
5853	if i.InterfacePropertiesFormat != nil {
5854		objectMap["properties"] = i.InterfacePropertiesFormat
5855	}
5856	if i.Etag != nil {
5857		objectMap["etag"] = i.Etag
5858	}
5859	if i.ID != nil {
5860		objectMap["id"] = i.ID
5861	}
5862	if i.Location != nil {
5863		objectMap["location"] = i.Location
5864	}
5865	if i.Tags != nil {
5866		objectMap["tags"] = i.Tags
5867	}
5868	return json.Marshal(objectMap)
5869}
5870
5871// UnmarshalJSON is the custom unmarshaler for Interface struct.
5872func (i *Interface) UnmarshalJSON(body []byte) error {
5873	var m map[string]*json.RawMessage
5874	err := json.Unmarshal(body, &m)
5875	if err != nil {
5876		return err
5877	}
5878	for k, v := range m {
5879		switch k {
5880		case "properties":
5881			if v != nil {
5882				var interfacePropertiesFormat InterfacePropertiesFormat
5883				err = json.Unmarshal(*v, &interfacePropertiesFormat)
5884				if err != nil {
5885					return err
5886				}
5887				i.InterfacePropertiesFormat = &interfacePropertiesFormat
5888			}
5889		case "etag":
5890			if v != nil {
5891				var etag string
5892				err = json.Unmarshal(*v, &etag)
5893				if err != nil {
5894					return err
5895				}
5896				i.Etag = &etag
5897			}
5898		case "id":
5899			if v != nil {
5900				var ID string
5901				err = json.Unmarshal(*v, &ID)
5902				if err != nil {
5903					return err
5904				}
5905				i.ID = &ID
5906			}
5907		case "name":
5908			if v != nil {
5909				var name string
5910				err = json.Unmarshal(*v, &name)
5911				if err != nil {
5912					return err
5913				}
5914				i.Name = &name
5915			}
5916		case "type":
5917			if v != nil {
5918				var typeVar string
5919				err = json.Unmarshal(*v, &typeVar)
5920				if err != nil {
5921					return err
5922				}
5923				i.Type = &typeVar
5924			}
5925		case "location":
5926			if v != nil {
5927				var location string
5928				err = json.Unmarshal(*v, &location)
5929				if err != nil {
5930					return err
5931				}
5932				i.Location = &location
5933			}
5934		case "tags":
5935			if v != nil {
5936				var tags map[string]*string
5937				err = json.Unmarshal(*v, &tags)
5938				if err != nil {
5939					return err
5940				}
5941				i.Tags = tags
5942			}
5943		}
5944	}
5945
5946	return nil
5947}
5948
5949// InterfaceAssociation network interface and its custom security rules.
5950type InterfaceAssociation struct {
5951	// ID - READ-ONLY; Network interface ID.
5952	ID *string `json:"id,omitempty"`
5953	// SecurityRules - Collection of custom security rules.
5954	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
5955}
5956
5957// MarshalJSON is the custom marshaler for InterfaceAssociation.
5958func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
5959	objectMap := make(map[string]interface{})
5960	if ia.SecurityRules != nil {
5961		objectMap["securityRules"] = ia.SecurityRules
5962	}
5963	return json.Marshal(objectMap)
5964}
5965
5966// InterfaceDNSSettings DNS settings of a network interface.
5967type InterfaceDNSSettings struct {
5968	// 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.
5969	DNSServers *[]string `json:"dnsServers,omitempty"`
5970	// 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.
5971	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
5972	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
5973	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
5974	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
5975	InternalFqdn *string `json:"internalFqdn,omitempty"`
5976	// 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.
5977	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
5978}
5979
5980// InterfaceIPConfiguration iPConfiguration in a network interface.
5981type InterfaceIPConfiguration struct {
5982	autorest.Response `json:"-"`
5983	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
5984	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5985	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5986	Name *string `json:"name,omitempty"`
5987	// Etag - A unique read-only string that changes whenever the resource is updated.
5988	Etag *string `json:"etag,omitempty"`
5989	// ID - Resource ID.
5990	ID *string `json:"id,omitempty"`
5991}
5992
5993// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
5994func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
5995	objectMap := make(map[string]interface{})
5996	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
5997		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
5998	}
5999	if iic.Name != nil {
6000		objectMap["name"] = iic.Name
6001	}
6002	if iic.Etag != nil {
6003		objectMap["etag"] = iic.Etag
6004	}
6005	if iic.ID != nil {
6006		objectMap["id"] = iic.ID
6007	}
6008	return json.Marshal(objectMap)
6009}
6010
6011// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
6012func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6013	var m map[string]*json.RawMessage
6014	err := json.Unmarshal(body, &m)
6015	if err != nil {
6016		return err
6017	}
6018	for k, v := range m {
6019		switch k {
6020		case "properties":
6021			if v != nil {
6022				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
6023				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
6024				if err != nil {
6025					return err
6026				}
6027				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
6028			}
6029		case "name":
6030			if v != nil {
6031				var name string
6032				err = json.Unmarshal(*v, &name)
6033				if err != nil {
6034					return err
6035				}
6036				iic.Name = &name
6037			}
6038		case "etag":
6039			if v != nil {
6040				var etag string
6041				err = json.Unmarshal(*v, &etag)
6042				if err != nil {
6043					return err
6044				}
6045				iic.Etag = &etag
6046			}
6047		case "id":
6048			if v != nil {
6049				var ID string
6050				err = json.Unmarshal(*v, &ID)
6051				if err != nil {
6052					return err
6053				}
6054				iic.ID = &ID
6055			}
6056		}
6057	}
6058
6059	return nil
6060}
6061
6062// InterfaceIPConfigurationListResult response for list ip configurations API service call.
6063type InterfaceIPConfigurationListResult struct {
6064	autorest.Response `json:"-"`
6065	// Value - A list of ip configurations.
6066	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
6067	// NextLink - READ-ONLY; The URL to get the next set of results.
6068	NextLink *string `json:"nextLink,omitempty"`
6069}
6070
6071// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
6072func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
6073	objectMap := make(map[string]interface{})
6074	if iiclr.Value != nil {
6075		objectMap["value"] = iiclr.Value
6076	}
6077	return json.Marshal(objectMap)
6078}
6079
6080// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
6081// InterfaceIPConfiguration values.
6082type InterfaceIPConfigurationListResultIterator struct {
6083	i    int
6084	page InterfaceIPConfigurationListResultPage
6085}
6086
6087// NextWithContext advances to the next value.  If there was an error making
6088// the request the iterator does not advance and the error is returned.
6089func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
6090	if tracing.IsEnabled() {
6091		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
6092		defer func() {
6093			sc := -1
6094			if iter.Response().Response.Response != nil {
6095				sc = iter.Response().Response.Response.StatusCode
6096			}
6097			tracing.EndSpan(ctx, sc, err)
6098		}()
6099	}
6100	iter.i++
6101	if iter.i < len(iter.page.Values()) {
6102		return nil
6103	}
6104	err = iter.page.NextWithContext(ctx)
6105	if err != nil {
6106		iter.i--
6107		return err
6108	}
6109	iter.i = 0
6110	return nil
6111}
6112
6113// Next advances to the next value.  If there was an error making
6114// the request the iterator does not advance and the error is returned.
6115// Deprecated: Use NextWithContext() instead.
6116func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
6117	return iter.NextWithContext(context.Background())
6118}
6119
6120// NotDone returns true if the enumeration should be started or is not yet complete.
6121func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
6122	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6123}
6124
6125// Response returns the raw server response from the last page request.
6126func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
6127	return iter.page.Response()
6128}
6129
6130// Value returns the current value or a zero-initialized value if the
6131// iterator has advanced beyond the end of the collection.
6132func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
6133	if !iter.page.NotDone() {
6134		return InterfaceIPConfiguration{}
6135	}
6136	return iter.page.Values()[iter.i]
6137}
6138
6139// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
6140func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
6141	return InterfaceIPConfigurationListResultIterator{page: page}
6142}
6143
6144// IsEmpty returns true if the ListResult contains no values.
6145func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
6146	return iiclr.Value == nil || len(*iiclr.Value) == 0
6147}
6148
6149// hasNextLink returns true if the NextLink is not empty.
6150func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
6151	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
6152}
6153
6154// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
6155// It returns nil if no more results exist.
6156func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
6157	if !iiclr.hasNextLink() {
6158		return nil, nil
6159	}
6160	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6161		autorest.AsJSON(),
6162		autorest.AsGet(),
6163		autorest.WithBaseURL(to.String(iiclr.NextLink)))
6164}
6165
6166// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
6167type InterfaceIPConfigurationListResultPage struct {
6168	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
6169	iiclr InterfaceIPConfigurationListResult
6170}
6171
6172// NextWithContext advances to the next page of values.  If there was an error making
6173// the request the page does not advance and the error is returned.
6174func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
6175	if tracing.IsEnabled() {
6176		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
6177		defer func() {
6178			sc := -1
6179			if page.Response().Response.Response != nil {
6180				sc = page.Response().Response.Response.StatusCode
6181			}
6182			tracing.EndSpan(ctx, sc, err)
6183		}()
6184	}
6185	for {
6186		next, err := page.fn(ctx, page.iiclr)
6187		if err != nil {
6188			return err
6189		}
6190		page.iiclr = next
6191		if !next.hasNextLink() || !next.IsEmpty() {
6192			break
6193		}
6194	}
6195	return nil
6196}
6197
6198// Next advances to the next page of values.  If there was an error making
6199// the request the page does not advance and the error is returned.
6200// Deprecated: Use NextWithContext() instead.
6201func (page *InterfaceIPConfigurationListResultPage) Next() error {
6202	return page.NextWithContext(context.Background())
6203}
6204
6205// NotDone returns true if the page enumeration should be started or is not yet complete.
6206func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
6207	return !page.iiclr.IsEmpty()
6208}
6209
6210// Response returns the raw server response from the last page request.
6211func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
6212	return page.iiclr
6213}
6214
6215// Values returns the slice of values for the current page or nil if there are no values.
6216func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
6217	if page.iiclr.IsEmpty() {
6218		return nil
6219	}
6220	return *page.iiclr.Value
6221}
6222
6223// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
6224func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
6225	return InterfaceIPConfigurationListResultPage{
6226		fn:    getNextPage,
6227		iiclr: cur,
6228	}
6229}
6230
6231// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
6232type InterfaceIPConfigurationPropertiesFormat struct {
6233	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
6234	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
6235	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
6236	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
6237	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
6238	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
6239	// PrivateIPAddress - Private IP address of the IP configuration.
6240	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6241	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6242	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6243	// 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'
6244	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
6245	// Subnet - Subnet bound to the IP configuration.
6246	Subnet *Subnet `json:"subnet,omitempty"`
6247	// Primary - Gets whether this is a primary customer address on the network interface.
6248	Primary *bool `json:"primary,omitempty"`
6249	// PublicIPAddress - Public IP address bound to the IP configuration.
6250	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6251	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6252	ProvisioningState *string `json:"provisioningState,omitempty"`
6253}
6254
6255// InterfaceListResult response for the ListNetworkInterface API service call.
6256type InterfaceListResult struct {
6257	autorest.Response `json:"-"`
6258	// Value - A list of network interfaces in a resource group.
6259	Value *[]Interface `json:"value,omitempty"`
6260	// NextLink - READ-ONLY; The URL to get the next set of results.
6261	NextLink *string `json:"nextLink,omitempty"`
6262}
6263
6264// MarshalJSON is the custom marshaler for InterfaceListResult.
6265func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
6266	objectMap := make(map[string]interface{})
6267	if ilr.Value != nil {
6268		objectMap["value"] = ilr.Value
6269	}
6270	return json.Marshal(objectMap)
6271}
6272
6273// InterfaceListResultIterator provides access to a complete listing of Interface values.
6274type InterfaceListResultIterator struct {
6275	i    int
6276	page InterfaceListResultPage
6277}
6278
6279// NextWithContext advances to the next value.  If there was an error making
6280// the request the iterator does not advance and the error is returned.
6281func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
6282	if tracing.IsEnabled() {
6283		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
6284		defer func() {
6285			sc := -1
6286			if iter.Response().Response.Response != nil {
6287				sc = iter.Response().Response.Response.StatusCode
6288			}
6289			tracing.EndSpan(ctx, sc, err)
6290		}()
6291	}
6292	iter.i++
6293	if iter.i < len(iter.page.Values()) {
6294		return nil
6295	}
6296	err = iter.page.NextWithContext(ctx)
6297	if err != nil {
6298		iter.i--
6299		return err
6300	}
6301	iter.i = 0
6302	return nil
6303}
6304
6305// Next advances to the next value.  If there was an error making
6306// the request the iterator does not advance and the error is returned.
6307// Deprecated: Use NextWithContext() instead.
6308func (iter *InterfaceListResultIterator) Next() error {
6309	return iter.NextWithContext(context.Background())
6310}
6311
6312// NotDone returns true if the enumeration should be started or is not yet complete.
6313func (iter InterfaceListResultIterator) NotDone() bool {
6314	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6315}
6316
6317// Response returns the raw server response from the last page request.
6318func (iter InterfaceListResultIterator) Response() InterfaceListResult {
6319	return iter.page.Response()
6320}
6321
6322// Value returns the current value or a zero-initialized value if the
6323// iterator has advanced beyond the end of the collection.
6324func (iter InterfaceListResultIterator) Value() Interface {
6325	if !iter.page.NotDone() {
6326		return Interface{}
6327	}
6328	return iter.page.Values()[iter.i]
6329}
6330
6331// Creates a new instance of the InterfaceListResultIterator type.
6332func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
6333	return InterfaceListResultIterator{page: page}
6334}
6335
6336// IsEmpty returns true if the ListResult contains no values.
6337func (ilr InterfaceListResult) IsEmpty() bool {
6338	return ilr.Value == nil || len(*ilr.Value) == 0
6339}
6340
6341// hasNextLink returns true if the NextLink is not empty.
6342func (ilr InterfaceListResult) hasNextLink() bool {
6343	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
6344}
6345
6346// interfaceListResultPreparer prepares a request to retrieve the next set of results.
6347// It returns nil if no more results exist.
6348func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
6349	if !ilr.hasNextLink() {
6350		return nil, nil
6351	}
6352	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6353		autorest.AsJSON(),
6354		autorest.AsGet(),
6355		autorest.WithBaseURL(to.String(ilr.NextLink)))
6356}
6357
6358// InterfaceListResultPage contains a page of Interface values.
6359type InterfaceListResultPage struct {
6360	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
6361	ilr InterfaceListResult
6362}
6363
6364// NextWithContext advances to the next page of values.  If there was an error making
6365// the request the page does not advance and the error is returned.
6366func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
6367	if tracing.IsEnabled() {
6368		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
6369		defer func() {
6370			sc := -1
6371			if page.Response().Response.Response != nil {
6372				sc = page.Response().Response.Response.StatusCode
6373			}
6374			tracing.EndSpan(ctx, sc, err)
6375		}()
6376	}
6377	for {
6378		next, err := page.fn(ctx, page.ilr)
6379		if err != nil {
6380			return err
6381		}
6382		page.ilr = next
6383		if !next.hasNextLink() || !next.IsEmpty() {
6384			break
6385		}
6386	}
6387	return nil
6388}
6389
6390// Next advances to the next page of values.  If there was an error making
6391// the request the page does not advance and the error is returned.
6392// Deprecated: Use NextWithContext() instead.
6393func (page *InterfaceListResultPage) Next() error {
6394	return page.NextWithContext(context.Background())
6395}
6396
6397// NotDone returns true if the page enumeration should be started or is not yet complete.
6398func (page InterfaceListResultPage) NotDone() bool {
6399	return !page.ilr.IsEmpty()
6400}
6401
6402// Response returns the raw server response from the last page request.
6403func (page InterfaceListResultPage) Response() InterfaceListResult {
6404	return page.ilr
6405}
6406
6407// Values returns the slice of values for the current page or nil if there are no values.
6408func (page InterfaceListResultPage) Values() []Interface {
6409	if page.ilr.IsEmpty() {
6410		return nil
6411	}
6412	return *page.ilr.Value
6413}
6414
6415// Creates a new instance of the InterfaceListResultPage type.
6416func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
6417	return InterfaceListResultPage{
6418		fn:  getNextPage,
6419		ilr: cur,
6420	}
6421}
6422
6423// InterfaceLoadBalancerListResult response for list ip configurations API service call.
6424type InterfaceLoadBalancerListResult struct {
6425	autorest.Response `json:"-"`
6426	// Value - A list of load balancers.
6427	Value *[]LoadBalancer `json:"value,omitempty"`
6428	// NextLink - READ-ONLY; The URL to get the next set of results.
6429	NextLink *string `json:"nextLink,omitempty"`
6430}
6431
6432// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
6433func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
6434	objectMap := make(map[string]interface{})
6435	if ilblr.Value != nil {
6436		objectMap["value"] = ilblr.Value
6437	}
6438	return json.Marshal(objectMap)
6439}
6440
6441// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
6442type InterfaceLoadBalancerListResultIterator struct {
6443	i    int
6444	page InterfaceLoadBalancerListResultPage
6445}
6446
6447// NextWithContext advances to the next value.  If there was an error making
6448// the request the iterator does not advance and the error is returned.
6449func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
6450	if tracing.IsEnabled() {
6451		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
6452		defer func() {
6453			sc := -1
6454			if iter.Response().Response.Response != nil {
6455				sc = iter.Response().Response.Response.StatusCode
6456			}
6457			tracing.EndSpan(ctx, sc, err)
6458		}()
6459	}
6460	iter.i++
6461	if iter.i < len(iter.page.Values()) {
6462		return nil
6463	}
6464	err = iter.page.NextWithContext(ctx)
6465	if err != nil {
6466		iter.i--
6467		return err
6468	}
6469	iter.i = 0
6470	return nil
6471}
6472
6473// Next advances to the next value.  If there was an error making
6474// the request the iterator does not advance and the error is returned.
6475// Deprecated: Use NextWithContext() instead.
6476func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
6477	return iter.NextWithContext(context.Background())
6478}
6479
6480// NotDone returns true if the enumeration should be started or is not yet complete.
6481func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
6482	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6483}
6484
6485// Response returns the raw server response from the last page request.
6486func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
6487	return iter.page.Response()
6488}
6489
6490// Value returns the current value or a zero-initialized value if the
6491// iterator has advanced beyond the end of the collection.
6492func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
6493	if !iter.page.NotDone() {
6494		return LoadBalancer{}
6495	}
6496	return iter.page.Values()[iter.i]
6497}
6498
6499// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
6500func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
6501	return InterfaceLoadBalancerListResultIterator{page: page}
6502}
6503
6504// IsEmpty returns true if the ListResult contains no values.
6505func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
6506	return ilblr.Value == nil || len(*ilblr.Value) == 0
6507}
6508
6509// hasNextLink returns true if the NextLink is not empty.
6510func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
6511	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
6512}
6513
6514// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
6515// It returns nil if no more results exist.
6516func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
6517	if !ilblr.hasNextLink() {
6518		return nil, nil
6519	}
6520	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6521		autorest.AsJSON(),
6522		autorest.AsGet(),
6523		autorest.WithBaseURL(to.String(ilblr.NextLink)))
6524}
6525
6526// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
6527type InterfaceLoadBalancerListResultPage struct {
6528	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
6529	ilblr InterfaceLoadBalancerListResult
6530}
6531
6532// NextWithContext advances to the next page of values.  If there was an error making
6533// the request the page does not advance and the error is returned.
6534func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
6535	if tracing.IsEnabled() {
6536		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
6537		defer func() {
6538			sc := -1
6539			if page.Response().Response.Response != nil {
6540				sc = page.Response().Response.Response.StatusCode
6541			}
6542			tracing.EndSpan(ctx, sc, err)
6543		}()
6544	}
6545	for {
6546		next, err := page.fn(ctx, page.ilblr)
6547		if err != nil {
6548			return err
6549		}
6550		page.ilblr = next
6551		if !next.hasNextLink() || !next.IsEmpty() {
6552			break
6553		}
6554	}
6555	return nil
6556}
6557
6558// Next advances to the next page of values.  If there was an error making
6559// the request the page does not advance and the error is returned.
6560// Deprecated: Use NextWithContext() instead.
6561func (page *InterfaceLoadBalancerListResultPage) Next() error {
6562	return page.NextWithContext(context.Background())
6563}
6564
6565// NotDone returns true if the page enumeration should be started or is not yet complete.
6566func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
6567	return !page.ilblr.IsEmpty()
6568}
6569
6570// Response returns the raw server response from the last page request.
6571func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
6572	return page.ilblr
6573}
6574
6575// Values returns the slice of values for the current page or nil if there are no values.
6576func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
6577	if page.ilblr.IsEmpty() {
6578		return nil
6579	}
6580	return *page.ilblr.Value
6581}
6582
6583// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
6584func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
6585	return InterfaceLoadBalancerListResultPage{
6586		fn:    getNextPage,
6587		ilblr: cur,
6588	}
6589}
6590
6591// InterfacePropertiesFormat networkInterface properties.
6592type InterfacePropertiesFormat struct {
6593	// VirtualMachine - The reference of a virtual machine.
6594	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
6595	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
6596	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
6597	// IPConfigurations - A list of IPConfigurations of the network interface.
6598	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6599	// DNSSettings - The DNS settings in network interface.
6600	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
6601	// MacAddress - The MAC address of the network interface.
6602	MacAddress *string `json:"macAddress,omitempty"`
6603	// Primary - Gets whether this is a primary network interface on a virtual machine.
6604	Primary *bool `json:"primary,omitempty"`
6605	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
6606	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
6607	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
6608	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
6609	// ResourceGUID - The resource GUID property of the network interface resource.
6610	ResourceGUID *string `json:"resourceGuid,omitempty"`
6611	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6612	ProvisioningState *string `json:"provisioningState,omitempty"`
6613}
6614
6615// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6616// long-running operation.
6617type InterfacesCreateOrUpdateFuture struct {
6618	azure.FutureAPI
6619	// Result returns the result of the asynchronous operation.
6620	// If the operation has not completed it will return an error.
6621	Result func(InterfacesClient) (Interface, error)
6622}
6623
6624// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6625func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6626	var azFuture azure.Future
6627	if err := json.Unmarshal(body, &azFuture); err != nil {
6628		return err
6629	}
6630	future.FutureAPI = &azFuture
6631	future.Result = future.result
6632	return nil
6633}
6634
6635// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
6636func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
6637	var done bool
6638	done, err = future.DoneWithContext(context.Background(), client)
6639	if err != nil {
6640		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6641		return
6642	}
6643	if !done {
6644		i.Response.Response = future.Response()
6645		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
6646		return
6647	}
6648	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6649	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
6650		i, err = client.CreateOrUpdateResponder(i.Response.Response)
6651		if err != nil {
6652			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
6653		}
6654	}
6655	return
6656}
6657
6658// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6659// operation.
6660type InterfacesDeleteFuture struct {
6661	azure.FutureAPI
6662	// Result returns the result of the asynchronous operation.
6663	// If the operation has not completed it will return an error.
6664	Result func(InterfacesClient) (autorest.Response, error)
6665}
6666
6667// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6668func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
6669	var azFuture azure.Future
6670	if err := json.Unmarshal(body, &azFuture); err != nil {
6671		return err
6672	}
6673	future.FutureAPI = &azFuture
6674	future.Result = future.result
6675	return nil
6676}
6677
6678// result is the default implementation for InterfacesDeleteFuture.Result.
6679func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
6680	var done bool
6681	done, err = future.DoneWithContext(context.Background(), client)
6682	if err != nil {
6683		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
6684		return
6685	}
6686	if !done {
6687		ar.Response = future.Response()
6688		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
6689		return
6690	}
6691	ar.Response = future.Response()
6692	return
6693}
6694
6695// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
6696// long-running operation.
6697type InterfacesGetEffectiveRouteTableFuture struct {
6698	azure.FutureAPI
6699	// Result returns the result of the asynchronous operation.
6700	// If the operation has not completed it will return an error.
6701	Result func(InterfacesClient) (EffectiveRouteListResult, error)
6702}
6703
6704// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6705func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
6706	var azFuture azure.Future
6707	if err := json.Unmarshal(body, &azFuture); err != nil {
6708		return err
6709	}
6710	future.FutureAPI = &azFuture
6711	future.Result = future.result
6712	return nil
6713}
6714
6715// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
6716func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
6717	var done bool
6718	done, err = future.DoneWithContext(context.Background(), client)
6719	if err != nil {
6720		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
6721		return
6722	}
6723	if !done {
6724		erlr.Response.Response = future.Response()
6725		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
6726		return
6727	}
6728	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6729	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
6730		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
6731		if err != nil {
6732			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
6733		}
6734	}
6735	return
6736}
6737
6738// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
6739// results of a long-running operation.
6740type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
6741	azure.FutureAPI
6742	// Result returns the result of the asynchronous operation.
6743	// If the operation has not completed it will return an error.
6744	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
6745}
6746
6747// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6748func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
6749	var azFuture azure.Future
6750	if err := json.Unmarshal(body, &azFuture); err != nil {
6751		return err
6752	}
6753	future.FutureAPI = &azFuture
6754	future.Result = future.result
6755	return nil
6756}
6757
6758// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
6759func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
6760	var done bool
6761	done, err = future.DoneWithContext(context.Background(), client)
6762	if err != nil {
6763		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
6764		return
6765	}
6766	if !done {
6767		ensglr.Response.Response = future.Response()
6768		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
6769		return
6770	}
6771	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6772	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
6773		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
6774		if err != nil {
6775			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
6776		}
6777	}
6778	return
6779}
6780
6781// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
6782type IPAddressAvailabilityResult struct {
6783	autorest.Response `json:"-"`
6784	// Available - Private IP address availability.
6785	Available *bool `json:"available,omitempty"`
6786	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
6787	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
6788}
6789
6790// IPConfiguration IP configuration
6791type IPConfiguration struct {
6792	// IPConfigurationPropertiesFormat - Properties of the IP configuration
6793	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
6794	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6795	Name *string `json:"name,omitempty"`
6796	// Etag - A unique read-only string that changes whenever the resource is updated.
6797	Etag *string `json:"etag,omitempty"`
6798	// ID - Resource ID.
6799	ID *string `json:"id,omitempty"`
6800}
6801
6802// MarshalJSON is the custom marshaler for IPConfiguration.
6803func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
6804	objectMap := make(map[string]interface{})
6805	if ic.IPConfigurationPropertiesFormat != nil {
6806		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
6807	}
6808	if ic.Name != nil {
6809		objectMap["name"] = ic.Name
6810	}
6811	if ic.Etag != nil {
6812		objectMap["etag"] = ic.Etag
6813	}
6814	if ic.ID != nil {
6815		objectMap["id"] = ic.ID
6816	}
6817	return json.Marshal(objectMap)
6818}
6819
6820// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
6821func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
6822	var m map[string]*json.RawMessage
6823	err := json.Unmarshal(body, &m)
6824	if err != nil {
6825		return err
6826	}
6827	for k, v := range m {
6828		switch k {
6829		case "properties":
6830			if v != nil {
6831				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
6832				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
6833				if err != nil {
6834					return err
6835				}
6836				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
6837			}
6838		case "name":
6839			if v != nil {
6840				var name string
6841				err = json.Unmarshal(*v, &name)
6842				if err != nil {
6843					return err
6844				}
6845				ic.Name = &name
6846			}
6847		case "etag":
6848			if v != nil {
6849				var etag string
6850				err = json.Unmarshal(*v, &etag)
6851				if err != nil {
6852					return err
6853				}
6854				ic.Etag = &etag
6855			}
6856		case "id":
6857			if v != nil {
6858				var ID string
6859				err = json.Unmarshal(*v, &ID)
6860				if err != nil {
6861					return err
6862				}
6863				ic.ID = &ID
6864			}
6865		}
6866	}
6867
6868	return nil
6869}
6870
6871// IPConfigurationPropertiesFormat properties of IP configuration.
6872type IPConfigurationPropertiesFormat struct {
6873	// PrivateIPAddress - The private IP address of the IP configuration.
6874	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6875	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6876	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6877	// Subnet - The reference of the subnet resource.
6878	Subnet *Subnet `json:"subnet,omitempty"`
6879	// PublicIPAddress - The reference of the public IP resource.
6880	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6881	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6882	ProvisioningState *string `json:"provisioningState,omitempty"`
6883}
6884
6885// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
6886type IpsecPolicy struct {
6887	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
6888	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
6889	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
6890	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
6891	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
6892	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
6893	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
6894	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
6895	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
6896	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
6897	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
6898	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
6899	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
6900	DhGroup DhGroup `json:"dhGroup,omitempty"`
6901	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
6902	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
6903}
6904
6905// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
6906type Ipv6ExpressRouteCircuitPeeringConfig struct {
6907	// PrimaryPeerAddressPrefix - The primary address prefix.
6908	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
6909	// SecondaryPeerAddressPrefix - The secondary address prefix.
6910	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6911	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6912	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6913	// RouteFilter - The reference of the RouteFilter resource.
6914	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
6915	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
6916	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
6917}
6918
6919// LoadBalancer loadBalancer resource
6920type LoadBalancer struct {
6921	autorest.Response `json:"-"`
6922	// Sku - The load balancer SKU.
6923	Sku *LoadBalancerSku `json:"sku,omitempty"`
6924	// LoadBalancerPropertiesFormat - Properties of load balancer.
6925	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
6926	// Etag - A unique read-only string that changes whenever the resource is updated.
6927	Etag *string `json:"etag,omitempty"`
6928	// ID - Resource ID.
6929	ID *string `json:"id,omitempty"`
6930	// Name - READ-ONLY; Resource name.
6931	Name *string `json:"name,omitempty"`
6932	// Type - READ-ONLY; Resource type.
6933	Type *string `json:"type,omitempty"`
6934	// Location - Resource location.
6935	Location *string `json:"location,omitempty"`
6936	// Tags - Resource tags.
6937	Tags map[string]*string `json:"tags"`
6938}
6939
6940// MarshalJSON is the custom marshaler for LoadBalancer.
6941func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
6942	objectMap := make(map[string]interface{})
6943	if lb.Sku != nil {
6944		objectMap["sku"] = lb.Sku
6945	}
6946	if lb.LoadBalancerPropertiesFormat != nil {
6947		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
6948	}
6949	if lb.Etag != nil {
6950		objectMap["etag"] = lb.Etag
6951	}
6952	if lb.ID != nil {
6953		objectMap["id"] = lb.ID
6954	}
6955	if lb.Location != nil {
6956		objectMap["location"] = lb.Location
6957	}
6958	if lb.Tags != nil {
6959		objectMap["tags"] = lb.Tags
6960	}
6961	return json.Marshal(objectMap)
6962}
6963
6964// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
6965func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
6966	var m map[string]*json.RawMessage
6967	err := json.Unmarshal(body, &m)
6968	if err != nil {
6969		return err
6970	}
6971	for k, v := range m {
6972		switch k {
6973		case "sku":
6974			if v != nil {
6975				var sku LoadBalancerSku
6976				err = json.Unmarshal(*v, &sku)
6977				if err != nil {
6978					return err
6979				}
6980				lb.Sku = &sku
6981			}
6982		case "properties":
6983			if v != nil {
6984				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
6985				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
6986				if err != nil {
6987					return err
6988				}
6989				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
6990			}
6991		case "etag":
6992			if v != nil {
6993				var etag string
6994				err = json.Unmarshal(*v, &etag)
6995				if err != nil {
6996					return err
6997				}
6998				lb.Etag = &etag
6999			}
7000		case "id":
7001			if v != nil {
7002				var ID string
7003				err = json.Unmarshal(*v, &ID)
7004				if err != nil {
7005					return err
7006				}
7007				lb.ID = &ID
7008			}
7009		case "name":
7010			if v != nil {
7011				var name string
7012				err = json.Unmarshal(*v, &name)
7013				if err != nil {
7014					return err
7015				}
7016				lb.Name = &name
7017			}
7018		case "type":
7019			if v != nil {
7020				var typeVar string
7021				err = json.Unmarshal(*v, &typeVar)
7022				if err != nil {
7023					return err
7024				}
7025				lb.Type = &typeVar
7026			}
7027		case "location":
7028			if v != nil {
7029				var location string
7030				err = json.Unmarshal(*v, &location)
7031				if err != nil {
7032					return err
7033				}
7034				lb.Location = &location
7035			}
7036		case "tags":
7037			if v != nil {
7038				var tags map[string]*string
7039				err = json.Unmarshal(*v, &tags)
7040				if err != nil {
7041					return err
7042				}
7043				lb.Tags = tags
7044			}
7045		}
7046	}
7047
7048	return nil
7049}
7050
7051// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
7052type LoadBalancerBackendAddressPoolListResult struct {
7053	autorest.Response `json:"-"`
7054	// Value - A list of backend address pools in a load balancer.
7055	Value *[]BackendAddressPool `json:"value,omitempty"`
7056	// NextLink - READ-ONLY; The URL to get the next set of results.
7057	NextLink *string `json:"nextLink,omitempty"`
7058}
7059
7060// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
7061func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
7062	objectMap := make(map[string]interface{})
7063	if lbbaplr.Value != nil {
7064		objectMap["value"] = lbbaplr.Value
7065	}
7066	return json.Marshal(objectMap)
7067}
7068
7069// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
7070// BackendAddressPool values.
7071type LoadBalancerBackendAddressPoolListResultIterator struct {
7072	i    int
7073	page LoadBalancerBackendAddressPoolListResultPage
7074}
7075
7076// NextWithContext advances to the next value.  If there was an error making
7077// the request the iterator does not advance and the error is returned.
7078func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
7079	if tracing.IsEnabled() {
7080		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
7081		defer func() {
7082			sc := -1
7083			if iter.Response().Response.Response != nil {
7084				sc = iter.Response().Response.Response.StatusCode
7085			}
7086			tracing.EndSpan(ctx, sc, err)
7087		}()
7088	}
7089	iter.i++
7090	if iter.i < len(iter.page.Values()) {
7091		return nil
7092	}
7093	err = iter.page.NextWithContext(ctx)
7094	if err != nil {
7095		iter.i--
7096		return err
7097	}
7098	iter.i = 0
7099	return nil
7100}
7101
7102// Next advances to the next value.  If there was an error making
7103// the request the iterator does not advance and the error is returned.
7104// Deprecated: Use NextWithContext() instead.
7105func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
7106	return iter.NextWithContext(context.Background())
7107}
7108
7109// NotDone returns true if the enumeration should be started or is not yet complete.
7110func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
7111	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7112}
7113
7114// Response returns the raw server response from the last page request.
7115func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
7116	return iter.page.Response()
7117}
7118
7119// Value returns the current value or a zero-initialized value if the
7120// iterator has advanced beyond the end of the collection.
7121func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
7122	if !iter.page.NotDone() {
7123		return BackendAddressPool{}
7124	}
7125	return iter.page.Values()[iter.i]
7126}
7127
7128// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
7129func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
7130	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
7131}
7132
7133// IsEmpty returns true if the ListResult contains no values.
7134func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
7135	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
7136}
7137
7138// hasNextLink returns true if the NextLink is not empty.
7139func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
7140	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
7141}
7142
7143// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
7144// It returns nil if no more results exist.
7145func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
7146	if !lbbaplr.hasNextLink() {
7147		return nil, nil
7148	}
7149	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7150		autorest.AsJSON(),
7151		autorest.AsGet(),
7152		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
7153}
7154
7155// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
7156type LoadBalancerBackendAddressPoolListResultPage struct {
7157	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
7158	lbbaplr LoadBalancerBackendAddressPoolListResult
7159}
7160
7161// NextWithContext advances to the next page of values.  If there was an error making
7162// the request the page does not advance and the error is returned.
7163func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
7164	if tracing.IsEnabled() {
7165		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
7166		defer func() {
7167			sc := -1
7168			if page.Response().Response.Response != nil {
7169				sc = page.Response().Response.Response.StatusCode
7170			}
7171			tracing.EndSpan(ctx, sc, err)
7172		}()
7173	}
7174	for {
7175		next, err := page.fn(ctx, page.lbbaplr)
7176		if err != nil {
7177			return err
7178		}
7179		page.lbbaplr = next
7180		if !next.hasNextLink() || !next.IsEmpty() {
7181			break
7182		}
7183	}
7184	return nil
7185}
7186
7187// Next advances to the next page of values.  If there was an error making
7188// the request the page does not advance and the error is returned.
7189// Deprecated: Use NextWithContext() instead.
7190func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
7191	return page.NextWithContext(context.Background())
7192}
7193
7194// NotDone returns true if the page enumeration should be started or is not yet complete.
7195func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
7196	return !page.lbbaplr.IsEmpty()
7197}
7198
7199// Response returns the raw server response from the last page request.
7200func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
7201	return page.lbbaplr
7202}
7203
7204// Values returns the slice of values for the current page or nil if there are no values.
7205func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
7206	if page.lbbaplr.IsEmpty() {
7207		return nil
7208	}
7209	return *page.lbbaplr.Value
7210}
7211
7212// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
7213func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
7214	return LoadBalancerBackendAddressPoolListResultPage{
7215		fn:      getNextPage,
7216		lbbaplr: cur,
7217	}
7218}
7219
7220// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
7221type LoadBalancerFrontendIPConfigurationListResult struct {
7222	autorest.Response `json:"-"`
7223	// Value - A list of frontend IP configurations in a load balancer.
7224	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
7225	// NextLink - READ-ONLY; The URL to get the next set of results.
7226	NextLink *string `json:"nextLink,omitempty"`
7227}
7228
7229// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
7230func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
7231	objectMap := make(map[string]interface{})
7232	if lbficlr.Value != nil {
7233		objectMap["value"] = lbficlr.Value
7234	}
7235	return json.Marshal(objectMap)
7236}
7237
7238// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
7239// FrontendIPConfiguration values.
7240type LoadBalancerFrontendIPConfigurationListResultIterator struct {
7241	i    int
7242	page LoadBalancerFrontendIPConfigurationListResultPage
7243}
7244
7245// NextWithContext advances to the next value.  If there was an error making
7246// the request the iterator does not advance and the error is returned.
7247func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
7248	if tracing.IsEnabled() {
7249		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
7250		defer func() {
7251			sc := -1
7252			if iter.Response().Response.Response != nil {
7253				sc = iter.Response().Response.Response.StatusCode
7254			}
7255			tracing.EndSpan(ctx, sc, err)
7256		}()
7257	}
7258	iter.i++
7259	if iter.i < len(iter.page.Values()) {
7260		return nil
7261	}
7262	err = iter.page.NextWithContext(ctx)
7263	if err != nil {
7264		iter.i--
7265		return err
7266	}
7267	iter.i = 0
7268	return nil
7269}
7270
7271// Next advances to the next value.  If there was an error making
7272// the request the iterator does not advance and the error is returned.
7273// Deprecated: Use NextWithContext() instead.
7274func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
7275	return iter.NextWithContext(context.Background())
7276}
7277
7278// NotDone returns true if the enumeration should be started or is not yet complete.
7279func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
7280	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7281}
7282
7283// Response returns the raw server response from the last page request.
7284func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
7285	return iter.page.Response()
7286}
7287
7288// Value returns the current value or a zero-initialized value if the
7289// iterator has advanced beyond the end of the collection.
7290func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
7291	if !iter.page.NotDone() {
7292		return FrontendIPConfiguration{}
7293	}
7294	return iter.page.Values()[iter.i]
7295}
7296
7297// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
7298func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
7299	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
7300}
7301
7302// IsEmpty returns true if the ListResult contains no values.
7303func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
7304	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
7305}
7306
7307// hasNextLink returns true if the NextLink is not empty.
7308func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
7309	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
7310}
7311
7312// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
7313// It returns nil if no more results exist.
7314func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
7315	if !lbficlr.hasNextLink() {
7316		return nil, nil
7317	}
7318	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7319		autorest.AsJSON(),
7320		autorest.AsGet(),
7321		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
7322}
7323
7324// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
7325type LoadBalancerFrontendIPConfigurationListResultPage struct {
7326	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
7327	lbficlr LoadBalancerFrontendIPConfigurationListResult
7328}
7329
7330// NextWithContext advances to the next page of values.  If there was an error making
7331// the request the page does not advance and the error is returned.
7332func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
7333	if tracing.IsEnabled() {
7334		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
7335		defer func() {
7336			sc := -1
7337			if page.Response().Response.Response != nil {
7338				sc = page.Response().Response.Response.StatusCode
7339			}
7340			tracing.EndSpan(ctx, sc, err)
7341		}()
7342	}
7343	for {
7344		next, err := page.fn(ctx, page.lbficlr)
7345		if err != nil {
7346			return err
7347		}
7348		page.lbficlr = next
7349		if !next.hasNextLink() || !next.IsEmpty() {
7350			break
7351		}
7352	}
7353	return nil
7354}
7355
7356// Next advances to the next page of values.  If there was an error making
7357// the request the page does not advance and the error is returned.
7358// Deprecated: Use NextWithContext() instead.
7359func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
7360	return page.NextWithContext(context.Background())
7361}
7362
7363// NotDone returns true if the page enumeration should be started or is not yet complete.
7364func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
7365	return !page.lbficlr.IsEmpty()
7366}
7367
7368// Response returns the raw server response from the last page request.
7369func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
7370	return page.lbficlr
7371}
7372
7373// Values returns the slice of values for the current page or nil if there are no values.
7374func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
7375	if page.lbficlr.IsEmpty() {
7376		return nil
7377	}
7378	return *page.lbficlr.Value
7379}
7380
7381// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
7382func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
7383	return LoadBalancerFrontendIPConfigurationListResultPage{
7384		fn:      getNextPage,
7385		lbficlr: cur,
7386	}
7387}
7388
7389// LoadBalancerListResult response for ListLoadBalancers API service call.
7390type LoadBalancerListResult struct {
7391	autorest.Response `json:"-"`
7392	// Value - A list of load balancers in a resource group.
7393	Value *[]LoadBalancer `json:"value,omitempty"`
7394	// NextLink - READ-ONLY; The URL to get the next set of results.
7395	NextLink *string `json:"nextLink,omitempty"`
7396}
7397
7398// MarshalJSON is the custom marshaler for LoadBalancerListResult.
7399func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
7400	objectMap := make(map[string]interface{})
7401	if lblr.Value != nil {
7402		objectMap["value"] = lblr.Value
7403	}
7404	return json.Marshal(objectMap)
7405}
7406
7407// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
7408type LoadBalancerListResultIterator struct {
7409	i    int
7410	page LoadBalancerListResultPage
7411}
7412
7413// NextWithContext advances to the next value.  If there was an error making
7414// the request the iterator does not advance and the error is returned.
7415func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
7416	if tracing.IsEnabled() {
7417		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
7418		defer func() {
7419			sc := -1
7420			if iter.Response().Response.Response != nil {
7421				sc = iter.Response().Response.Response.StatusCode
7422			}
7423			tracing.EndSpan(ctx, sc, err)
7424		}()
7425	}
7426	iter.i++
7427	if iter.i < len(iter.page.Values()) {
7428		return nil
7429	}
7430	err = iter.page.NextWithContext(ctx)
7431	if err != nil {
7432		iter.i--
7433		return err
7434	}
7435	iter.i = 0
7436	return nil
7437}
7438
7439// Next advances to the next value.  If there was an error making
7440// the request the iterator does not advance and the error is returned.
7441// Deprecated: Use NextWithContext() instead.
7442func (iter *LoadBalancerListResultIterator) Next() error {
7443	return iter.NextWithContext(context.Background())
7444}
7445
7446// NotDone returns true if the enumeration should be started or is not yet complete.
7447func (iter LoadBalancerListResultIterator) NotDone() bool {
7448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7449}
7450
7451// Response returns the raw server response from the last page request.
7452func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
7453	return iter.page.Response()
7454}
7455
7456// Value returns the current value or a zero-initialized value if the
7457// iterator has advanced beyond the end of the collection.
7458func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
7459	if !iter.page.NotDone() {
7460		return LoadBalancer{}
7461	}
7462	return iter.page.Values()[iter.i]
7463}
7464
7465// Creates a new instance of the LoadBalancerListResultIterator type.
7466func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
7467	return LoadBalancerListResultIterator{page: page}
7468}
7469
7470// IsEmpty returns true if the ListResult contains no values.
7471func (lblr LoadBalancerListResult) IsEmpty() bool {
7472	return lblr.Value == nil || len(*lblr.Value) == 0
7473}
7474
7475// hasNextLink returns true if the NextLink is not empty.
7476func (lblr LoadBalancerListResult) hasNextLink() bool {
7477	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
7478}
7479
7480// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
7481// It returns nil if no more results exist.
7482func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
7483	if !lblr.hasNextLink() {
7484		return nil, nil
7485	}
7486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7487		autorest.AsJSON(),
7488		autorest.AsGet(),
7489		autorest.WithBaseURL(to.String(lblr.NextLink)))
7490}
7491
7492// LoadBalancerListResultPage contains a page of LoadBalancer values.
7493type LoadBalancerListResultPage struct {
7494	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
7495	lblr LoadBalancerListResult
7496}
7497
7498// NextWithContext advances to the next page of values.  If there was an error making
7499// the request the page does not advance and the error is returned.
7500func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
7501	if tracing.IsEnabled() {
7502		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
7503		defer func() {
7504			sc := -1
7505			if page.Response().Response.Response != nil {
7506				sc = page.Response().Response.Response.StatusCode
7507			}
7508			tracing.EndSpan(ctx, sc, err)
7509		}()
7510	}
7511	for {
7512		next, err := page.fn(ctx, page.lblr)
7513		if err != nil {
7514			return err
7515		}
7516		page.lblr = next
7517		if !next.hasNextLink() || !next.IsEmpty() {
7518			break
7519		}
7520	}
7521	return nil
7522}
7523
7524// Next advances to the next page of values.  If there was an error making
7525// the request the page does not advance and the error is returned.
7526// Deprecated: Use NextWithContext() instead.
7527func (page *LoadBalancerListResultPage) Next() error {
7528	return page.NextWithContext(context.Background())
7529}
7530
7531// NotDone returns true if the page enumeration should be started or is not yet complete.
7532func (page LoadBalancerListResultPage) NotDone() bool {
7533	return !page.lblr.IsEmpty()
7534}
7535
7536// Response returns the raw server response from the last page request.
7537func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
7538	return page.lblr
7539}
7540
7541// Values returns the slice of values for the current page or nil if there are no values.
7542func (page LoadBalancerListResultPage) Values() []LoadBalancer {
7543	if page.lblr.IsEmpty() {
7544		return nil
7545	}
7546	return *page.lblr.Value
7547}
7548
7549// Creates a new instance of the LoadBalancerListResultPage type.
7550func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
7551	return LoadBalancerListResultPage{
7552		fn:   getNextPage,
7553		lblr: cur,
7554	}
7555}
7556
7557// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
7558type LoadBalancerLoadBalancingRuleListResult struct {
7559	autorest.Response `json:"-"`
7560	// Value - A list of load balancing rules in a load balancer.
7561	Value *[]LoadBalancingRule `json:"value,omitempty"`
7562	// NextLink - READ-ONLY; The URL to get the next set of results.
7563	NextLink *string `json:"nextLink,omitempty"`
7564}
7565
7566// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
7567func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
7568	objectMap := make(map[string]interface{})
7569	if lblbrlr.Value != nil {
7570		objectMap["value"] = lblbrlr.Value
7571	}
7572	return json.Marshal(objectMap)
7573}
7574
7575// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
7576// LoadBalancingRule values.
7577type LoadBalancerLoadBalancingRuleListResultIterator struct {
7578	i    int
7579	page LoadBalancerLoadBalancingRuleListResultPage
7580}
7581
7582// NextWithContext advances to the next value.  If there was an error making
7583// the request the iterator does not advance and the error is returned.
7584func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
7585	if tracing.IsEnabled() {
7586		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
7587		defer func() {
7588			sc := -1
7589			if iter.Response().Response.Response != nil {
7590				sc = iter.Response().Response.Response.StatusCode
7591			}
7592			tracing.EndSpan(ctx, sc, err)
7593		}()
7594	}
7595	iter.i++
7596	if iter.i < len(iter.page.Values()) {
7597		return nil
7598	}
7599	err = iter.page.NextWithContext(ctx)
7600	if err != nil {
7601		iter.i--
7602		return err
7603	}
7604	iter.i = 0
7605	return nil
7606}
7607
7608// Next advances to the next value.  If there was an error making
7609// the request the iterator does not advance and the error is returned.
7610// Deprecated: Use NextWithContext() instead.
7611func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
7612	return iter.NextWithContext(context.Background())
7613}
7614
7615// NotDone returns true if the enumeration should be started or is not yet complete.
7616func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
7617	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7618}
7619
7620// Response returns the raw server response from the last page request.
7621func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
7622	return iter.page.Response()
7623}
7624
7625// Value returns the current value or a zero-initialized value if the
7626// iterator has advanced beyond the end of the collection.
7627func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
7628	if !iter.page.NotDone() {
7629		return LoadBalancingRule{}
7630	}
7631	return iter.page.Values()[iter.i]
7632}
7633
7634// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
7635func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
7636	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
7637}
7638
7639// IsEmpty returns true if the ListResult contains no values.
7640func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
7641	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
7642}
7643
7644// hasNextLink returns true if the NextLink is not empty.
7645func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
7646	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
7647}
7648
7649// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
7650// It returns nil if no more results exist.
7651func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
7652	if !lblbrlr.hasNextLink() {
7653		return nil, nil
7654	}
7655	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7656		autorest.AsJSON(),
7657		autorest.AsGet(),
7658		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
7659}
7660
7661// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
7662type LoadBalancerLoadBalancingRuleListResultPage struct {
7663	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
7664	lblbrlr LoadBalancerLoadBalancingRuleListResult
7665}
7666
7667// NextWithContext advances to the next page of values.  If there was an error making
7668// the request the page does not advance and the error is returned.
7669func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
7670	if tracing.IsEnabled() {
7671		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
7672		defer func() {
7673			sc := -1
7674			if page.Response().Response.Response != nil {
7675				sc = page.Response().Response.Response.StatusCode
7676			}
7677			tracing.EndSpan(ctx, sc, err)
7678		}()
7679	}
7680	for {
7681		next, err := page.fn(ctx, page.lblbrlr)
7682		if err != nil {
7683			return err
7684		}
7685		page.lblbrlr = next
7686		if !next.hasNextLink() || !next.IsEmpty() {
7687			break
7688		}
7689	}
7690	return nil
7691}
7692
7693// Next advances to the next page of values.  If there was an error making
7694// the request the page does not advance and the error is returned.
7695// Deprecated: Use NextWithContext() instead.
7696func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
7697	return page.NextWithContext(context.Background())
7698}
7699
7700// NotDone returns true if the page enumeration should be started or is not yet complete.
7701func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
7702	return !page.lblbrlr.IsEmpty()
7703}
7704
7705// Response returns the raw server response from the last page request.
7706func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
7707	return page.lblbrlr
7708}
7709
7710// Values returns the slice of values for the current page or nil if there are no values.
7711func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
7712	if page.lblbrlr.IsEmpty() {
7713		return nil
7714	}
7715	return *page.lblbrlr.Value
7716}
7717
7718// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
7719func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
7720	return LoadBalancerLoadBalancingRuleListResultPage{
7721		fn:      getNextPage,
7722		lblbrlr: cur,
7723	}
7724}
7725
7726// LoadBalancerProbeListResult response for ListProbe API service call.
7727type LoadBalancerProbeListResult struct {
7728	autorest.Response `json:"-"`
7729	// Value - A list of probes in a load balancer.
7730	Value *[]Probe `json:"value,omitempty"`
7731	// NextLink - READ-ONLY; The URL to get the next set of results.
7732	NextLink *string `json:"nextLink,omitempty"`
7733}
7734
7735// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
7736func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
7737	objectMap := make(map[string]interface{})
7738	if lbplr.Value != nil {
7739		objectMap["value"] = lbplr.Value
7740	}
7741	return json.Marshal(objectMap)
7742}
7743
7744// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
7745type LoadBalancerProbeListResultIterator struct {
7746	i    int
7747	page LoadBalancerProbeListResultPage
7748}
7749
7750// NextWithContext advances to the next value.  If there was an error making
7751// the request the iterator does not advance and the error is returned.
7752func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
7753	if tracing.IsEnabled() {
7754		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
7755		defer func() {
7756			sc := -1
7757			if iter.Response().Response.Response != nil {
7758				sc = iter.Response().Response.Response.StatusCode
7759			}
7760			tracing.EndSpan(ctx, sc, err)
7761		}()
7762	}
7763	iter.i++
7764	if iter.i < len(iter.page.Values()) {
7765		return nil
7766	}
7767	err = iter.page.NextWithContext(ctx)
7768	if err != nil {
7769		iter.i--
7770		return err
7771	}
7772	iter.i = 0
7773	return nil
7774}
7775
7776// Next advances to the next value.  If there was an error making
7777// the request the iterator does not advance and the error is returned.
7778// Deprecated: Use NextWithContext() instead.
7779func (iter *LoadBalancerProbeListResultIterator) Next() error {
7780	return iter.NextWithContext(context.Background())
7781}
7782
7783// NotDone returns true if the enumeration should be started or is not yet complete.
7784func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
7785	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7786}
7787
7788// Response returns the raw server response from the last page request.
7789func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
7790	return iter.page.Response()
7791}
7792
7793// Value returns the current value or a zero-initialized value if the
7794// iterator has advanced beyond the end of the collection.
7795func (iter LoadBalancerProbeListResultIterator) Value() Probe {
7796	if !iter.page.NotDone() {
7797		return Probe{}
7798	}
7799	return iter.page.Values()[iter.i]
7800}
7801
7802// Creates a new instance of the LoadBalancerProbeListResultIterator type.
7803func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
7804	return LoadBalancerProbeListResultIterator{page: page}
7805}
7806
7807// IsEmpty returns true if the ListResult contains no values.
7808func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
7809	return lbplr.Value == nil || len(*lbplr.Value) == 0
7810}
7811
7812// hasNextLink returns true if the NextLink is not empty.
7813func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
7814	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
7815}
7816
7817// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
7818// It returns nil if no more results exist.
7819func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
7820	if !lbplr.hasNextLink() {
7821		return nil, nil
7822	}
7823	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7824		autorest.AsJSON(),
7825		autorest.AsGet(),
7826		autorest.WithBaseURL(to.String(lbplr.NextLink)))
7827}
7828
7829// LoadBalancerProbeListResultPage contains a page of Probe values.
7830type LoadBalancerProbeListResultPage struct {
7831	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
7832	lbplr LoadBalancerProbeListResult
7833}
7834
7835// NextWithContext advances to the next page of values.  If there was an error making
7836// the request the page does not advance and the error is returned.
7837func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
7838	if tracing.IsEnabled() {
7839		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
7840		defer func() {
7841			sc := -1
7842			if page.Response().Response.Response != nil {
7843				sc = page.Response().Response.Response.StatusCode
7844			}
7845			tracing.EndSpan(ctx, sc, err)
7846		}()
7847	}
7848	for {
7849		next, err := page.fn(ctx, page.lbplr)
7850		if err != nil {
7851			return err
7852		}
7853		page.lbplr = next
7854		if !next.hasNextLink() || !next.IsEmpty() {
7855			break
7856		}
7857	}
7858	return nil
7859}
7860
7861// Next advances to the next page of values.  If there was an error making
7862// the request the page does not advance and the error is returned.
7863// Deprecated: Use NextWithContext() instead.
7864func (page *LoadBalancerProbeListResultPage) Next() error {
7865	return page.NextWithContext(context.Background())
7866}
7867
7868// NotDone returns true if the page enumeration should be started or is not yet complete.
7869func (page LoadBalancerProbeListResultPage) NotDone() bool {
7870	return !page.lbplr.IsEmpty()
7871}
7872
7873// Response returns the raw server response from the last page request.
7874func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
7875	return page.lbplr
7876}
7877
7878// Values returns the slice of values for the current page or nil if there are no values.
7879func (page LoadBalancerProbeListResultPage) Values() []Probe {
7880	if page.lbplr.IsEmpty() {
7881		return nil
7882	}
7883	return *page.lbplr.Value
7884}
7885
7886// Creates a new instance of the LoadBalancerProbeListResultPage type.
7887func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
7888	return LoadBalancerProbeListResultPage{
7889		fn:    getNextPage,
7890		lbplr: cur,
7891	}
7892}
7893
7894// LoadBalancerPropertiesFormat properties of the load balancer.
7895type LoadBalancerPropertiesFormat struct {
7896	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
7897	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
7898	// BackendAddressPools - Collection of backend address pools used by a load balancer
7899	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
7900	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
7901	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
7902	// Probes - Collection of probe objects used in the load balancer
7903	Probes *[]Probe `json:"probes,omitempty"`
7904	// 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.
7905	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
7906	// 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.
7907	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
7908	// OutboundNatRules - The outbound NAT rules.
7909	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
7910	// ResourceGUID - The resource GUID property of the load balancer resource.
7911	ResourceGUID *string `json:"resourceGuid,omitempty"`
7912	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7913	ProvisioningState *string `json:"provisioningState,omitempty"`
7914}
7915
7916// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7917// long-running operation.
7918type LoadBalancersCreateOrUpdateFuture struct {
7919	azure.FutureAPI
7920	// Result returns the result of the asynchronous operation.
7921	// If the operation has not completed it will return an error.
7922	Result func(LoadBalancersClient) (LoadBalancer, error)
7923}
7924
7925// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7926func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7927	var azFuture azure.Future
7928	if err := json.Unmarshal(body, &azFuture); err != nil {
7929		return err
7930	}
7931	future.FutureAPI = &azFuture
7932	future.Result = future.result
7933	return nil
7934}
7935
7936// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
7937func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
7938	var done bool
7939	done, err = future.DoneWithContext(context.Background(), client)
7940	if err != nil {
7941		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7942		return
7943	}
7944	if !done {
7945		lb.Response.Response = future.Response()
7946		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
7947		return
7948	}
7949	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7950	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
7951		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
7952		if err != nil {
7953			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
7954		}
7955	}
7956	return
7957}
7958
7959// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7960// operation.
7961type LoadBalancersDeleteFuture struct {
7962	azure.FutureAPI
7963	// Result returns the result of the asynchronous operation.
7964	// If the operation has not completed it will return an error.
7965	Result func(LoadBalancersClient) (autorest.Response, error)
7966}
7967
7968// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7969func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
7970	var azFuture azure.Future
7971	if err := json.Unmarshal(body, &azFuture); err != nil {
7972		return err
7973	}
7974	future.FutureAPI = &azFuture
7975	future.Result = future.result
7976	return nil
7977}
7978
7979// result is the default implementation for LoadBalancersDeleteFuture.Result.
7980func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
7981	var done bool
7982	done, err = future.DoneWithContext(context.Background(), client)
7983	if err != nil {
7984		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
7985		return
7986	}
7987	if !done {
7988		ar.Response = future.Response()
7989		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
7990		return
7991	}
7992	ar.Response = future.Response()
7993	return
7994}
7995
7996// LoadBalancerSku SKU of a load balancer
7997type LoadBalancerSku struct {
7998	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
7999	Name LoadBalancerSkuName `json:"name,omitempty"`
8000}
8001
8002// LoadBalancingRule a load balancing rule for a load balancer.
8003type LoadBalancingRule struct {
8004	autorest.Response `json:"-"`
8005	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
8006	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
8007	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8008	Name *string `json:"name,omitempty"`
8009	// Etag - A unique read-only string that changes whenever the resource is updated.
8010	Etag *string `json:"etag,omitempty"`
8011	// ID - Resource ID.
8012	ID *string `json:"id,omitempty"`
8013}
8014
8015// MarshalJSON is the custom marshaler for LoadBalancingRule.
8016func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
8017	objectMap := make(map[string]interface{})
8018	if lbr.LoadBalancingRulePropertiesFormat != nil {
8019		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
8020	}
8021	if lbr.Name != nil {
8022		objectMap["name"] = lbr.Name
8023	}
8024	if lbr.Etag != nil {
8025		objectMap["etag"] = lbr.Etag
8026	}
8027	if lbr.ID != nil {
8028		objectMap["id"] = lbr.ID
8029	}
8030	return json.Marshal(objectMap)
8031}
8032
8033// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
8034func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
8035	var m map[string]*json.RawMessage
8036	err := json.Unmarshal(body, &m)
8037	if err != nil {
8038		return err
8039	}
8040	for k, v := range m {
8041		switch k {
8042		case "properties":
8043			if v != nil {
8044				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
8045				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
8046				if err != nil {
8047					return err
8048				}
8049				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
8050			}
8051		case "name":
8052			if v != nil {
8053				var name string
8054				err = json.Unmarshal(*v, &name)
8055				if err != nil {
8056					return err
8057				}
8058				lbr.Name = &name
8059			}
8060		case "etag":
8061			if v != nil {
8062				var etag string
8063				err = json.Unmarshal(*v, &etag)
8064				if err != nil {
8065					return err
8066				}
8067				lbr.Etag = &etag
8068			}
8069		case "id":
8070			if v != nil {
8071				var ID string
8072				err = json.Unmarshal(*v, &ID)
8073				if err != nil {
8074					return err
8075				}
8076				lbr.ID = &ID
8077			}
8078		}
8079	}
8080
8081	return nil
8082}
8083
8084// LoadBalancingRulePropertiesFormat properties of the load balancer.
8085type LoadBalancingRulePropertiesFormat struct {
8086	// FrontendIPConfiguration - A reference to frontend IP addresses.
8087	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
8088	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
8089	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
8090	// Probe - The reference of the load balancer probe used by the load balancing rule.
8091	Probe *SubResource `json:"probe,omitempty"`
8092	// Protocol - The transport protocol for the external endpoint. Possible values are 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
8093	Protocol TransportProtocol `json:"protocol,omitempty"`
8094	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
8095	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
8096	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.
8097	FrontendPort *int32 `json:"frontendPort,omitempty"`
8098	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
8099	BackendPort *int32 `json:"backendPort,omitempty"`
8100	// 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.
8101	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8102	// 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.
8103	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
8104	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
8105	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
8106	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8107	ProvisioningState *string `json:"provisioningState,omitempty"`
8108}
8109
8110// LocalNetworkGateway a common class for general resource information
8111type LocalNetworkGateway struct {
8112	autorest.Response `json:"-"`
8113	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
8114	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
8115	// Etag - A unique read-only string that changes whenever the resource is updated.
8116	Etag *string `json:"etag,omitempty"`
8117	// ID - Resource ID.
8118	ID *string `json:"id,omitempty"`
8119	// Name - READ-ONLY; Resource name.
8120	Name *string `json:"name,omitempty"`
8121	// Type - READ-ONLY; Resource type.
8122	Type *string `json:"type,omitempty"`
8123	// Location - Resource location.
8124	Location *string `json:"location,omitempty"`
8125	// Tags - Resource tags.
8126	Tags map[string]*string `json:"tags"`
8127}
8128
8129// MarshalJSON is the custom marshaler for LocalNetworkGateway.
8130func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
8131	objectMap := make(map[string]interface{})
8132	if lng.LocalNetworkGatewayPropertiesFormat != nil {
8133		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
8134	}
8135	if lng.Etag != nil {
8136		objectMap["etag"] = lng.Etag
8137	}
8138	if lng.ID != nil {
8139		objectMap["id"] = lng.ID
8140	}
8141	if lng.Location != nil {
8142		objectMap["location"] = lng.Location
8143	}
8144	if lng.Tags != nil {
8145		objectMap["tags"] = lng.Tags
8146	}
8147	return json.Marshal(objectMap)
8148}
8149
8150// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
8151func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
8152	var m map[string]*json.RawMessage
8153	err := json.Unmarshal(body, &m)
8154	if err != nil {
8155		return err
8156	}
8157	for k, v := range m {
8158		switch k {
8159		case "properties":
8160			if v != nil {
8161				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
8162				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
8163				if err != nil {
8164					return err
8165				}
8166				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
8167			}
8168		case "etag":
8169			if v != nil {
8170				var etag string
8171				err = json.Unmarshal(*v, &etag)
8172				if err != nil {
8173					return err
8174				}
8175				lng.Etag = &etag
8176			}
8177		case "id":
8178			if v != nil {
8179				var ID string
8180				err = json.Unmarshal(*v, &ID)
8181				if err != nil {
8182					return err
8183				}
8184				lng.ID = &ID
8185			}
8186		case "name":
8187			if v != nil {
8188				var name string
8189				err = json.Unmarshal(*v, &name)
8190				if err != nil {
8191					return err
8192				}
8193				lng.Name = &name
8194			}
8195		case "type":
8196			if v != nil {
8197				var typeVar string
8198				err = json.Unmarshal(*v, &typeVar)
8199				if err != nil {
8200					return err
8201				}
8202				lng.Type = &typeVar
8203			}
8204		case "location":
8205			if v != nil {
8206				var location string
8207				err = json.Unmarshal(*v, &location)
8208				if err != nil {
8209					return err
8210				}
8211				lng.Location = &location
8212			}
8213		case "tags":
8214			if v != nil {
8215				var tags map[string]*string
8216				err = json.Unmarshal(*v, &tags)
8217				if err != nil {
8218					return err
8219				}
8220				lng.Tags = tags
8221			}
8222		}
8223	}
8224
8225	return nil
8226}
8227
8228// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
8229type LocalNetworkGatewayListResult struct {
8230	autorest.Response `json:"-"`
8231	// Value - A list of local network gateways that exists in a resource group.
8232	Value *[]LocalNetworkGateway `json:"value,omitempty"`
8233	// NextLink - READ-ONLY; The URL to get the next set of results.
8234	NextLink *string `json:"nextLink,omitempty"`
8235}
8236
8237// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
8238func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
8239	objectMap := make(map[string]interface{})
8240	if lnglr.Value != nil {
8241		objectMap["value"] = lnglr.Value
8242	}
8243	return json.Marshal(objectMap)
8244}
8245
8246// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
8247// values.
8248type LocalNetworkGatewayListResultIterator struct {
8249	i    int
8250	page LocalNetworkGatewayListResultPage
8251}
8252
8253// NextWithContext advances to the next value.  If there was an error making
8254// the request the iterator does not advance and the error is returned.
8255func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
8256	if tracing.IsEnabled() {
8257		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
8258		defer func() {
8259			sc := -1
8260			if iter.Response().Response.Response != nil {
8261				sc = iter.Response().Response.Response.StatusCode
8262			}
8263			tracing.EndSpan(ctx, sc, err)
8264		}()
8265	}
8266	iter.i++
8267	if iter.i < len(iter.page.Values()) {
8268		return nil
8269	}
8270	err = iter.page.NextWithContext(ctx)
8271	if err != nil {
8272		iter.i--
8273		return err
8274	}
8275	iter.i = 0
8276	return nil
8277}
8278
8279// Next advances to the next value.  If there was an error making
8280// the request the iterator does not advance and the error is returned.
8281// Deprecated: Use NextWithContext() instead.
8282func (iter *LocalNetworkGatewayListResultIterator) Next() error {
8283	return iter.NextWithContext(context.Background())
8284}
8285
8286// NotDone returns true if the enumeration should be started or is not yet complete.
8287func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
8288	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8289}
8290
8291// Response returns the raw server response from the last page request.
8292func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
8293	return iter.page.Response()
8294}
8295
8296// Value returns the current value or a zero-initialized value if the
8297// iterator has advanced beyond the end of the collection.
8298func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
8299	if !iter.page.NotDone() {
8300		return LocalNetworkGateway{}
8301	}
8302	return iter.page.Values()[iter.i]
8303}
8304
8305// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
8306func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
8307	return LocalNetworkGatewayListResultIterator{page: page}
8308}
8309
8310// IsEmpty returns true if the ListResult contains no values.
8311func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
8312	return lnglr.Value == nil || len(*lnglr.Value) == 0
8313}
8314
8315// hasNextLink returns true if the NextLink is not empty.
8316func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
8317	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
8318}
8319
8320// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
8321// It returns nil if no more results exist.
8322func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
8323	if !lnglr.hasNextLink() {
8324		return nil, nil
8325	}
8326	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8327		autorest.AsJSON(),
8328		autorest.AsGet(),
8329		autorest.WithBaseURL(to.String(lnglr.NextLink)))
8330}
8331
8332// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
8333type LocalNetworkGatewayListResultPage struct {
8334	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
8335	lnglr LocalNetworkGatewayListResult
8336}
8337
8338// NextWithContext advances to the next page of values.  If there was an error making
8339// the request the page does not advance and the error is returned.
8340func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
8341	if tracing.IsEnabled() {
8342		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
8343		defer func() {
8344			sc := -1
8345			if page.Response().Response.Response != nil {
8346				sc = page.Response().Response.Response.StatusCode
8347			}
8348			tracing.EndSpan(ctx, sc, err)
8349		}()
8350	}
8351	for {
8352		next, err := page.fn(ctx, page.lnglr)
8353		if err != nil {
8354			return err
8355		}
8356		page.lnglr = next
8357		if !next.hasNextLink() || !next.IsEmpty() {
8358			break
8359		}
8360	}
8361	return nil
8362}
8363
8364// Next advances to the next page of values.  If there was an error making
8365// the request the page does not advance and the error is returned.
8366// Deprecated: Use NextWithContext() instead.
8367func (page *LocalNetworkGatewayListResultPage) Next() error {
8368	return page.NextWithContext(context.Background())
8369}
8370
8371// NotDone returns true if the page enumeration should be started or is not yet complete.
8372func (page LocalNetworkGatewayListResultPage) NotDone() bool {
8373	return !page.lnglr.IsEmpty()
8374}
8375
8376// Response returns the raw server response from the last page request.
8377func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
8378	return page.lnglr
8379}
8380
8381// Values returns the slice of values for the current page or nil if there are no values.
8382func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
8383	if page.lnglr.IsEmpty() {
8384		return nil
8385	}
8386	return *page.lnglr.Value
8387}
8388
8389// Creates a new instance of the LocalNetworkGatewayListResultPage type.
8390func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
8391	return LocalNetworkGatewayListResultPage{
8392		fn:    getNextPage,
8393		lnglr: cur,
8394	}
8395}
8396
8397// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
8398type LocalNetworkGatewayPropertiesFormat struct {
8399	// LocalNetworkAddressSpace - Local network site address space.
8400	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
8401	// GatewayIPAddress - IP address of local network gateway.
8402	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
8403	// BgpSettings - Local network gateway's BGP speaker settings.
8404	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
8405	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
8406	ResourceGUID *string `json:"resourceGuid,omitempty"`
8407	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8408	ProvisioningState *string `json:"provisioningState,omitempty"`
8409}
8410
8411// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
8412func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
8413	objectMap := make(map[string]interface{})
8414	if lngpf.LocalNetworkAddressSpace != nil {
8415		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
8416	}
8417	if lngpf.GatewayIPAddress != nil {
8418		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
8419	}
8420	if lngpf.BgpSettings != nil {
8421		objectMap["bgpSettings"] = lngpf.BgpSettings
8422	}
8423	if lngpf.ResourceGUID != nil {
8424		objectMap["resourceGuid"] = lngpf.ResourceGUID
8425	}
8426	return json.Marshal(objectMap)
8427}
8428
8429// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8430// long-running operation.
8431type LocalNetworkGatewaysCreateOrUpdateFuture struct {
8432	azure.FutureAPI
8433	// Result returns the result of the asynchronous operation.
8434	// If the operation has not completed it will return an error.
8435	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
8436}
8437
8438// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8439func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8440	var azFuture azure.Future
8441	if err := json.Unmarshal(body, &azFuture); err != nil {
8442		return err
8443	}
8444	future.FutureAPI = &azFuture
8445	future.Result = future.result
8446	return nil
8447}
8448
8449// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
8450func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
8451	var done bool
8452	done, err = future.DoneWithContext(context.Background(), client)
8453	if err != nil {
8454		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8455		return
8456	}
8457	if !done {
8458		lng.Response.Response = future.Response()
8459		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
8460		return
8461	}
8462	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8463	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
8464		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
8465		if err != nil {
8466			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
8467		}
8468	}
8469	return
8470}
8471
8472// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
8473// long-running operation.
8474type LocalNetworkGatewaysDeleteFuture struct {
8475	azure.FutureAPI
8476	// Result returns the result of the asynchronous operation.
8477	// If the operation has not completed it will return an error.
8478	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
8479}
8480
8481// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8482func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
8483	var azFuture azure.Future
8484	if err := json.Unmarshal(body, &azFuture); err != nil {
8485		return err
8486	}
8487	future.FutureAPI = &azFuture
8488	future.Result = future.result
8489	return nil
8490}
8491
8492// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
8493func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
8494	var done bool
8495	done, err = future.DoneWithContext(context.Background(), client)
8496	if err != nil {
8497		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
8498		return
8499	}
8500	if !done {
8501		ar.Response = future.Response()
8502		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
8503		return
8504	}
8505	ar.Response = future.Response()
8506	return
8507}
8508
8509// NextHopParameters parameters that define the source and destination endpoint.
8510type NextHopParameters struct {
8511	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
8512	TargetResourceID *string `json:"targetResourceId,omitempty"`
8513	// SourceIPAddress - The source IP address.
8514	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
8515	// DestinationIPAddress - The destination IP address.
8516	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
8517	// 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).
8518	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
8519}
8520
8521// NextHopResult the information about next hop from the specified VM.
8522type NextHopResult struct {
8523	autorest.Response `json:"-"`
8524	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
8525	NextHopType NextHopType `json:"nextHopType,omitempty"`
8526	// NextHopIPAddress - Next hop IP Address
8527	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
8528	// 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'.
8529	RouteTableID *string `json:"routeTableId,omitempty"`
8530}
8531
8532// OutboundNatRule outbound NAT pool of the load balancer.
8533type OutboundNatRule struct {
8534	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
8535	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
8536	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8537	Name *string `json:"name,omitempty"`
8538	// Etag - A unique read-only string that changes whenever the resource is updated.
8539	Etag *string `json:"etag,omitempty"`
8540	// ID - Resource ID.
8541	ID *string `json:"id,omitempty"`
8542}
8543
8544// MarshalJSON is the custom marshaler for OutboundNatRule.
8545func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
8546	objectMap := make(map[string]interface{})
8547	if onr.OutboundNatRulePropertiesFormat != nil {
8548		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
8549	}
8550	if onr.Name != nil {
8551		objectMap["name"] = onr.Name
8552	}
8553	if onr.Etag != nil {
8554		objectMap["etag"] = onr.Etag
8555	}
8556	if onr.ID != nil {
8557		objectMap["id"] = onr.ID
8558	}
8559	return json.Marshal(objectMap)
8560}
8561
8562// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
8563func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
8564	var m map[string]*json.RawMessage
8565	err := json.Unmarshal(body, &m)
8566	if err != nil {
8567		return err
8568	}
8569	for k, v := range m {
8570		switch k {
8571		case "properties":
8572			if v != nil {
8573				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
8574				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
8575				if err != nil {
8576					return err
8577				}
8578				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
8579			}
8580		case "name":
8581			if v != nil {
8582				var name string
8583				err = json.Unmarshal(*v, &name)
8584				if err != nil {
8585					return err
8586				}
8587				onr.Name = &name
8588			}
8589		case "etag":
8590			if v != nil {
8591				var etag string
8592				err = json.Unmarshal(*v, &etag)
8593				if err != nil {
8594					return err
8595				}
8596				onr.Etag = &etag
8597			}
8598		case "id":
8599			if v != nil {
8600				var ID string
8601				err = json.Unmarshal(*v, &ID)
8602				if err != nil {
8603					return err
8604				}
8605				onr.ID = &ID
8606			}
8607		}
8608	}
8609
8610	return nil
8611}
8612
8613// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
8614type OutboundNatRulePropertiesFormat struct {
8615	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
8616	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
8617	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
8618	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
8619	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
8620	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
8621	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8622	ProvisioningState *string `json:"provisioningState,omitempty"`
8623}
8624
8625// PacketCapture parameters that define the create packet capture operation.
8626type PacketCapture struct {
8627	*PacketCaptureParameters `json:"properties,omitempty"`
8628}
8629
8630// MarshalJSON is the custom marshaler for PacketCapture.
8631func (pc PacketCapture) MarshalJSON() ([]byte, error) {
8632	objectMap := make(map[string]interface{})
8633	if pc.PacketCaptureParameters != nil {
8634		objectMap["properties"] = pc.PacketCaptureParameters
8635	}
8636	return json.Marshal(objectMap)
8637}
8638
8639// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
8640func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
8641	var m map[string]*json.RawMessage
8642	err := json.Unmarshal(body, &m)
8643	if err != nil {
8644		return err
8645	}
8646	for k, v := range m {
8647		switch k {
8648		case "properties":
8649			if v != nil {
8650				var packetCaptureParameters PacketCaptureParameters
8651				err = json.Unmarshal(*v, &packetCaptureParameters)
8652				if err != nil {
8653					return err
8654				}
8655				pc.PacketCaptureParameters = &packetCaptureParameters
8656			}
8657		}
8658	}
8659
8660	return nil
8661}
8662
8663// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
8664type PacketCaptureFilter struct {
8665	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
8666	Protocol PcProtocol `json:"protocol,omitempty"`
8667	// 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.
8668	LocalIPAddress *string `json:"localIPAddress,omitempty"`
8669	// 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.
8670	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
8671	// 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.
8672	LocalPort *string `json:"localPort,omitempty"`
8673	// 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.
8674	RemotePort *string `json:"remotePort,omitempty"`
8675}
8676
8677// PacketCaptureListResult list of packet capture sessions.
8678type PacketCaptureListResult struct {
8679	autorest.Response `json:"-"`
8680	// Value - Information about packet capture sessions.
8681	Value *[]PacketCaptureResult `json:"value,omitempty"`
8682}
8683
8684// PacketCaptureParameters parameters that define the create packet capture operation.
8685type PacketCaptureParameters struct {
8686	// Target - The ID of the targeted resource, only VM is currently supported.
8687	Target *string `json:"target,omitempty"`
8688	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
8689	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
8690	// TotalBytesPerSession - Maximum size of the capture output.
8691	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
8692	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
8693	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
8694	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
8695	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
8696}
8697
8698// PacketCaptureQueryStatusResult status of packet capture session.
8699type PacketCaptureQueryStatusResult struct {
8700	autorest.Response `json:"-"`
8701	// Name - The name of the packet capture resource.
8702	Name *string `json:"name,omitempty"`
8703	// ID - The ID of the packet capture resource.
8704	ID *string `json:"id,omitempty"`
8705	// CaptureStartTime - The start time of the packet capture session.
8706	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
8707	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
8708	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
8709	// StopReason - The reason the current packet capture session was stopped.
8710	StopReason *string `json:"stopReason,omitempty"`
8711	// PacketCaptureError - List of errors of packet capture session.
8712	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
8713}
8714
8715// PacketCaptureResult information about packet capture session.
8716type PacketCaptureResult struct {
8717	autorest.Response `json:"-"`
8718	// Name - READ-ONLY; Name of the packet capture session.
8719	Name *string `json:"name,omitempty"`
8720	// ID - READ-ONLY; ID of the packet capture operation.
8721	ID                             *string `json:"id,omitempty"`
8722	Etag                           *string `json:"etag,omitempty"`
8723	*PacketCaptureResultProperties `json:"properties,omitempty"`
8724}
8725
8726// MarshalJSON is the custom marshaler for PacketCaptureResult.
8727func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
8728	objectMap := make(map[string]interface{})
8729	if pcr.Etag != nil {
8730		objectMap["etag"] = pcr.Etag
8731	}
8732	if pcr.PacketCaptureResultProperties != nil {
8733		objectMap["properties"] = pcr.PacketCaptureResultProperties
8734	}
8735	return json.Marshal(objectMap)
8736}
8737
8738// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
8739func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
8740	var m map[string]*json.RawMessage
8741	err := json.Unmarshal(body, &m)
8742	if err != nil {
8743		return err
8744	}
8745	for k, v := range m {
8746		switch k {
8747		case "name":
8748			if v != nil {
8749				var name string
8750				err = json.Unmarshal(*v, &name)
8751				if err != nil {
8752					return err
8753				}
8754				pcr.Name = &name
8755			}
8756		case "id":
8757			if v != nil {
8758				var ID string
8759				err = json.Unmarshal(*v, &ID)
8760				if err != nil {
8761					return err
8762				}
8763				pcr.ID = &ID
8764			}
8765		case "etag":
8766			if v != nil {
8767				var etag string
8768				err = json.Unmarshal(*v, &etag)
8769				if err != nil {
8770					return err
8771				}
8772				pcr.Etag = &etag
8773			}
8774		case "properties":
8775			if v != nil {
8776				var packetCaptureResultProperties PacketCaptureResultProperties
8777				err = json.Unmarshal(*v, &packetCaptureResultProperties)
8778				if err != nil {
8779					return err
8780				}
8781				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
8782			}
8783		}
8784	}
8785
8786	return nil
8787}
8788
8789// PacketCaptureResultProperties describes the properties of a packet capture session.
8790type PacketCaptureResultProperties struct {
8791	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
8792	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8793	// Target - The ID of the targeted resource, only VM is currently supported.
8794	Target *string `json:"target,omitempty"`
8795	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
8796	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
8797	// TotalBytesPerSession - Maximum size of the capture output.
8798	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
8799	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
8800	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
8801	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
8802	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
8803}
8804
8805// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
8806// operation.
8807type PacketCapturesCreateFuture struct {
8808	azure.FutureAPI
8809	// Result returns the result of the asynchronous operation.
8810	// If the operation has not completed it will return an error.
8811	Result func(PacketCapturesClient) (PacketCaptureResult, error)
8812}
8813
8814// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8815func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
8816	var azFuture azure.Future
8817	if err := json.Unmarshal(body, &azFuture); err != nil {
8818		return err
8819	}
8820	future.FutureAPI = &azFuture
8821	future.Result = future.result
8822	return nil
8823}
8824
8825// result is the default implementation for PacketCapturesCreateFuture.Result.
8826func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
8827	var done bool
8828	done, err = future.DoneWithContext(context.Background(), client)
8829	if err != nil {
8830		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
8831		return
8832	}
8833	if !done {
8834		pcr.Response.Response = future.Response()
8835		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
8836		return
8837	}
8838	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8839	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
8840		pcr, err = client.CreateResponder(pcr.Response.Response)
8841		if err != nil {
8842			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
8843		}
8844	}
8845	return
8846}
8847
8848// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8849// operation.
8850type PacketCapturesDeleteFuture struct {
8851	azure.FutureAPI
8852	// Result returns the result of the asynchronous operation.
8853	// If the operation has not completed it will return an error.
8854	Result func(PacketCapturesClient) (autorest.Response, error)
8855}
8856
8857// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8858func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
8859	var azFuture azure.Future
8860	if err := json.Unmarshal(body, &azFuture); err != nil {
8861		return err
8862	}
8863	future.FutureAPI = &azFuture
8864	future.Result = future.result
8865	return nil
8866}
8867
8868// result is the default implementation for PacketCapturesDeleteFuture.Result.
8869func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
8870	var done bool
8871	done, err = future.DoneWithContext(context.Background(), client)
8872	if err != nil {
8873		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
8874		return
8875	}
8876	if !done {
8877		ar.Response = future.Response()
8878		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
8879		return
8880	}
8881	ar.Response = future.Response()
8882	return
8883}
8884
8885// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
8886// operation.
8887type PacketCapturesGetStatusFuture struct {
8888	azure.FutureAPI
8889	// Result returns the result of the asynchronous operation.
8890	// If the operation has not completed it will return an error.
8891	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
8892}
8893
8894// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8895func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
8896	var azFuture azure.Future
8897	if err := json.Unmarshal(body, &azFuture); err != nil {
8898		return err
8899	}
8900	future.FutureAPI = &azFuture
8901	future.Result = future.result
8902	return nil
8903}
8904
8905// result is the default implementation for PacketCapturesGetStatusFuture.Result.
8906func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
8907	var done bool
8908	done, err = future.DoneWithContext(context.Background(), client)
8909	if err != nil {
8910		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
8911		return
8912	}
8913	if !done {
8914		pcqsr.Response.Response = future.Response()
8915		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
8916		return
8917	}
8918	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8919	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
8920		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
8921		if err != nil {
8922			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
8923		}
8924	}
8925	return
8926}
8927
8928// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
8929// operation.
8930type PacketCapturesStopFuture struct {
8931	azure.FutureAPI
8932	// Result returns the result of the asynchronous operation.
8933	// If the operation has not completed it will return an error.
8934	Result func(PacketCapturesClient) (autorest.Response, error)
8935}
8936
8937// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8938func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
8939	var azFuture azure.Future
8940	if err := json.Unmarshal(body, &azFuture); err != nil {
8941		return err
8942	}
8943	future.FutureAPI = &azFuture
8944	future.Result = future.result
8945	return nil
8946}
8947
8948// result is the default implementation for PacketCapturesStopFuture.Result.
8949func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
8950	var done bool
8951	done, err = future.DoneWithContext(context.Background(), client)
8952	if err != nil {
8953		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
8954		return
8955	}
8956	if !done {
8957		ar.Response = future.Response()
8958		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
8959		return
8960	}
8961	ar.Response = future.Response()
8962	return
8963}
8964
8965// PacketCaptureStorageLocation describes the storage location for a packet capture session.
8966type PacketCaptureStorageLocation struct {
8967	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
8968	StorageID *string `json:"storageId,omitempty"`
8969	// 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.
8970	StoragePath *string `json:"storagePath,omitempty"`
8971	// 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.
8972	FilePath *string `json:"filePath,omitempty"`
8973}
8974
8975// PatchRouteFilter route Filter Resource.
8976type PatchRouteFilter struct {
8977	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
8978	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
8979	Name *string `json:"name,omitempty"`
8980	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8981	Etag *string `json:"etag,omitempty"`
8982	// Type - READ-ONLY; Resource type.
8983	Type *string `json:"type,omitempty"`
8984	// Tags - Resource tags.
8985	Tags map[string]*string `json:"tags"`
8986	// ID - Resource ID.
8987	ID *string `json:"id,omitempty"`
8988}
8989
8990// MarshalJSON is the custom marshaler for PatchRouteFilter.
8991func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
8992	objectMap := make(map[string]interface{})
8993	if prf.RouteFilterPropertiesFormat != nil {
8994		objectMap["properties"] = prf.RouteFilterPropertiesFormat
8995	}
8996	if prf.Tags != nil {
8997		objectMap["tags"] = prf.Tags
8998	}
8999	if prf.ID != nil {
9000		objectMap["id"] = prf.ID
9001	}
9002	return json.Marshal(objectMap)
9003}
9004
9005// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
9006func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
9007	var m map[string]*json.RawMessage
9008	err := json.Unmarshal(body, &m)
9009	if err != nil {
9010		return err
9011	}
9012	for k, v := range m {
9013		switch k {
9014		case "properties":
9015			if v != nil {
9016				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
9017				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
9018				if err != nil {
9019					return err
9020				}
9021				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
9022			}
9023		case "name":
9024			if v != nil {
9025				var name string
9026				err = json.Unmarshal(*v, &name)
9027				if err != nil {
9028					return err
9029				}
9030				prf.Name = &name
9031			}
9032		case "etag":
9033			if v != nil {
9034				var etag string
9035				err = json.Unmarshal(*v, &etag)
9036				if err != nil {
9037					return err
9038				}
9039				prf.Etag = &etag
9040			}
9041		case "type":
9042			if v != nil {
9043				var typeVar string
9044				err = json.Unmarshal(*v, &typeVar)
9045				if err != nil {
9046					return err
9047				}
9048				prf.Type = &typeVar
9049			}
9050		case "tags":
9051			if v != nil {
9052				var tags map[string]*string
9053				err = json.Unmarshal(*v, &tags)
9054				if err != nil {
9055					return err
9056				}
9057				prf.Tags = tags
9058			}
9059		case "id":
9060			if v != nil {
9061				var ID string
9062				err = json.Unmarshal(*v, &ID)
9063				if err != nil {
9064					return err
9065				}
9066				prf.ID = &ID
9067			}
9068		}
9069	}
9070
9071	return nil
9072}
9073
9074// PatchRouteFilterRule route Filter Rule Resource
9075type PatchRouteFilterRule struct {
9076	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
9077	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
9078	Name *string `json:"name,omitempty"`
9079	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9080	Etag *string `json:"etag,omitempty"`
9081	// Tags - Resource tags.
9082	Tags map[string]*string `json:"tags"`
9083	// ID - Resource ID.
9084	ID *string `json:"id,omitempty"`
9085}
9086
9087// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
9088func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
9089	objectMap := make(map[string]interface{})
9090	if prfr.RouteFilterRulePropertiesFormat != nil {
9091		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
9092	}
9093	if prfr.Tags != nil {
9094		objectMap["tags"] = prfr.Tags
9095	}
9096	if prfr.ID != nil {
9097		objectMap["id"] = prfr.ID
9098	}
9099	return json.Marshal(objectMap)
9100}
9101
9102// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
9103func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
9104	var m map[string]*json.RawMessage
9105	err := json.Unmarshal(body, &m)
9106	if err != nil {
9107		return err
9108	}
9109	for k, v := range m {
9110		switch k {
9111		case "properties":
9112			if v != nil {
9113				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
9114				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
9115				if err != nil {
9116					return err
9117				}
9118				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
9119			}
9120		case "name":
9121			if v != nil {
9122				var name string
9123				err = json.Unmarshal(*v, &name)
9124				if err != nil {
9125					return err
9126				}
9127				prfr.Name = &name
9128			}
9129		case "etag":
9130			if v != nil {
9131				var etag string
9132				err = json.Unmarshal(*v, &etag)
9133				if err != nil {
9134					return err
9135				}
9136				prfr.Etag = &etag
9137			}
9138		case "tags":
9139			if v != nil {
9140				var tags map[string]*string
9141				err = json.Unmarshal(*v, &tags)
9142				if err != nil {
9143					return err
9144				}
9145				prfr.Tags = tags
9146			}
9147		case "id":
9148			if v != nil {
9149				var ID string
9150				err = json.Unmarshal(*v, &ID)
9151				if err != nil {
9152					return err
9153				}
9154				prfr.ID = &ID
9155			}
9156		}
9157	}
9158
9159	return nil
9160}
9161
9162// Probe a load balancer probe.
9163type Probe struct {
9164	autorest.Response `json:"-"`
9165	// ProbePropertiesFormat - Properties of load balancer probe.
9166	*ProbePropertiesFormat `json:"properties,omitempty"`
9167	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9168	Name *string `json:"name,omitempty"`
9169	// Etag - A unique read-only string that changes whenever the resource is updated.
9170	Etag *string `json:"etag,omitempty"`
9171	// ID - Resource ID.
9172	ID *string `json:"id,omitempty"`
9173}
9174
9175// MarshalJSON is the custom marshaler for Probe.
9176func (p Probe) MarshalJSON() ([]byte, error) {
9177	objectMap := make(map[string]interface{})
9178	if p.ProbePropertiesFormat != nil {
9179		objectMap["properties"] = p.ProbePropertiesFormat
9180	}
9181	if p.Name != nil {
9182		objectMap["name"] = p.Name
9183	}
9184	if p.Etag != nil {
9185		objectMap["etag"] = p.Etag
9186	}
9187	if p.ID != nil {
9188		objectMap["id"] = p.ID
9189	}
9190	return json.Marshal(objectMap)
9191}
9192
9193// UnmarshalJSON is the custom unmarshaler for Probe struct.
9194func (p *Probe) UnmarshalJSON(body []byte) error {
9195	var m map[string]*json.RawMessage
9196	err := json.Unmarshal(body, &m)
9197	if err != nil {
9198		return err
9199	}
9200	for k, v := range m {
9201		switch k {
9202		case "properties":
9203			if v != nil {
9204				var probePropertiesFormat ProbePropertiesFormat
9205				err = json.Unmarshal(*v, &probePropertiesFormat)
9206				if err != nil {
9207					return err
9208				}
9209				p.ProbePropertiesFormat = &probePropertiesFormat
9210			}
9211		case "name":
9212			if v != nil {
9213				var name string
9214				err = json.Unmarshal(*v, &name)
9215				if err != nil {
9216					return err
9217				}
9218				p.Name = &name
9219			}
9220		case "etag":
9221			if v != nil {
9222				var etag string
9223				err = json.Unmarshal(*v, &etag)
9224				if err != nil {
9225					return err
9226				}
9227				p.Etag = &etag
9228			}
9229		case "id":
9230			if v != nil {
9231				var ID string
9232				err = json.Unmarshal(*v, &ID)
9233				if err != nil {
9234					return err
9235				}
9236				p.ID = &ID
9237			}
9238		}
9239	}
9240
9241	return nil
9242}
9243
9244// ProbePropertiesFormat load balancer probe resource.
9245type ProbePropertiesFormat struct {
9246	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
9247	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
9248	// 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'
9249	Protocol ProbeProtocol `json:"protocol,omitempty"`
9250	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
9251	Port *int32 `json:"port,omitempty"`
9252	// 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.
9253	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
9254	// 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.
9255	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
9256	// 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.
9257	RequestPath *string `json:"requestPath,omitempty"`
9258	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9259	ProvisioningState *string `json:"provisioningState,omitempty"`
9260}
9261
9262// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
9263func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
9264	objectMap := make(map[string]interface{})
9265	if ppf.Protocol != "" {
9266		objectMap["protocol"] = ppf.Protocol
9267	}
9268	if ppf.Port != nil {
9269		objectMap["port"] = ppf.Port
9270	}
9271	if ppf.IntervalInSeconds != nil {
9272		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
9273	}
9274	if ppf.NumberOfProbes != nil {
9275		objectMap["numberOfProbes"] = ppf.NumberOfProbes
9276	}
9277	if ppf.RequestPath != nil {
9278		objectMap["requestPath"] = ppf.RequestPath
9279	}
9280	if ppf.ProvisioningState != nil {
9281		objectMap["provisioningState"] = ppf.ProvisioningState
9282	}
9283	return json.Marshal(objectMap)
9284}
9285
9286// PublicIPAddress public IP address resource.
9287type PublicIPAddress struct {
9288	autorest.Response `json:"-"`
9289	// Sku - The public IP address SKU.
9290	Sku *PublicIPAddressSku `json:"sku,omitempty"`
9291	// PublicIPAddressPropertiesFormat - Public IP address properties.
9292	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
9293	// Etag - A unique read-only string that changes whenever the resource is updated.
9294	Etag *string `json:"etag,omitempty"`
9295	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
9296	Zones *[]string `json:"zones,omitempty"`
9297	// ID - Resource ID.
9298	ID *string `json:"id,omitempty"`
9299	// Name - READ-ONLY; Resource name.
9300	Name *string `json:"name,omitempty"`
9301	// Type - READ-ONLY; Resource type.
9302	Type *string `json:"type,omitempty"`
9303	// Location - Resource location.
9304	Location *string `json:"location,omitempty"`
9305	// Tags - Resource tags.
9306	Tags map[string]*string `json:"tags"`
9307}
9308
9309// MarshalJSON is the custom marshaler for PublicIPAddress.
9310func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
9311	objectMap := make(map[string]interface{})
9312	if pia.Sku != nil {
9313		objectMap["sku"] = pia.Sku
9314	}
9315	if pia.PublicIPAddressPropertiesFormat != nil {
9316		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
9317	}
9318	if pia.Etag != nil {
9319		objectMap["etag"] = pia.Etag
9320	}
9321	if pia.Zones != nil {
9322		objectMap["zones"] = pia.Zones
9323	}
9324	if pia.ID != nil {
9325		objectMap["id"] = pia.ID
9326	}
9327	if pia.Location != nil {
9328		objectMap["location"] = pia.Location
9329	}
9330	if pia.Tags != nil {
9331		objectMap["tags"] = pia.Tags
9332	}
9333	return json.Marshal(objectMap)
9334}
9335
9336// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
9337func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
9338	var m map[string]*json.RawMessage
9339	err := json.Unmarshal(body, &m)
9340	if err != nil {
9341		return err
9342	}
9343	for k, v := range m {
9344		switch k {
9345		case "sku":
9346			if v != nil {
9347				var sku PublicIPAddressSku
9348				err = json.Unmarshal(*v, &sku)
9349				if err != nil {
9350					return err
9351				}
9352				pia.Sku = &sku
9353			}
9354		case "properties":
9355			if v != nil {
9356				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
9357				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
9358				if err != nil {
9359					return err
9360				}
9361				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
9362			}
9363		case "etag":
9364			if v != nil {
9365				var etag string
9366				err = json.Unmarshal(*v, &etag)
9367				if err != nil {
9368					return err
9369				}
9370				pia.Etag = &etag
9371			}
9372		case "zones":
9373			if v != nil {
9374				var zones []string
9375				err = json.Unmarshal(*v, &zones)
9376				if err != nil {
9377					return err
9378				}
9379				pia.Zones = &zones
9380			}
9381		case "id":
9382			if v != nil {
9383				var ID string
9384				err = json.Unmarshal(*v, &ID)
9385				if err != nil {
9386					return err
9387				}
9388				pia.ID = &ID
9389			}
9390		case "name":
9391			if v != nil {
9392				var name string
9393				err = json.Unmarshal(*v, &name)
9394				if err != nil {
9395					return err
9396				}
9397				pia.Name = &name
9398			}
9399		case "type":
9400			if v != nil {
9401				var typeVar string
9402				err = json.Unmarshal(*v, &typeVar)
9403				if err != nil {
9404					return err
9405				}
9406				pia.Type = &typeVar
9407			}
9408		case "location":
9409			if v != nil {
9410				var location string
9411				err = json.Unmarshal(*v, &location)
9412				if err != nil {
9413					return err
9414				}
9415				pia.Location = &location
9416			}
9417		case "tags":
9418			if v != nil {
9419				var tags map[string]*string
9420				err = json.Unmarshal(*v, &tags)
9421				if err != nil {
9422					return err
9423				}
9424				pia.Tags = tags
9425			}
9426		}
9427	}
9428
9429	return nil
9430}
9431
9432// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
9433type PublicIPAddressDNSSettings struct {
9434	// 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.
9435	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
9436	// 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.
9437	Fqdn *string `json:"fqdn,omitempty"`
9438	// 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.
9439	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
9440}
9441
9442// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9443// long-running operation.
9444type PublicIPAddressesCreateOrUpdateFuture struct {
9445	azure.FutureAPI
9446	// Result returns the result of the asynchronous operation.
9447	// If the operation has not completed it will return an error.
9448	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
9449}
9450
9451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9452func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9453	var azFuture azure.Future
9454	if err := json.Unmarshal(body, &azFuture); err != nil {
9455		return err
9456	}
9457	future.FutureAPI = &azFuture
9458	future.Result = future.result
9459	return nil
9460}
9461
9462// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
9463func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
9464	var done bool
9465	done, err = future.DoneWithContext(context.Background(), client)
9466	if err != nil {
9467		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9468		return
9469	}
9470	if !done {
9471		pia.Response.Response = future.Response()
9472		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
9473		return
9474	}
9475	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9476	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
9477		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
9478		if err != nil {
9479			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
9480		}
9481	}
9482	return
9483}
9484
9485// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9486// operation.
9487type PublicIPAddressesDeleteFuture struct {
9488	azure.FutureAPI
9489	// Result returns the result of the asynchronous operation.
9490	// If the operation has not completed it will return an error.
9491	Result func(PublicIPAddressesClient) (autorest.Response, error)
9492}
9493
9494// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9495func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
9496	var azFuture azure.Future
9497	if err := json.Unmarshal(body, &azFuture); err != nil {
9498		return err
9499	}
9500	future.FutureAPI = &azFuture
9501	future.Result = future.result
9502	return nil
9503}
9504
9505// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
9506func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
9507	var done bool
9508	done, err = future.DoneWithContext(context.Background(), client)
9509	if err != nil {
9510		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
9511		return
9512	}
9513	if !done {
9514		ar.Response = future.Response()
9515		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
9516		return
9517	}
9518	ar.Response = future.Response()
9519	return
9520}
9521
9522// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
9523type PublicIPAddressListResult struct {
9524	autorest.Response `json:"-"`
9525	// Value - A list of public IP addresses that exists in a resource group.
9526	Value *[]PublicIPAddress `json:"value,omitempty"`
9527	// NextLink - The URL to get the next set of results.
9528	NextLink *string `json:"nextLink,omitempty"`
9529}
9530
9531// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
9532type PublicIPAddressListResultIterator struct {
9533	i    int
9534	page PublicIPAddressListResultPage
9535}
9536
9537// NextWithContext advances to the next value.  If there was an error making
9538// the request the iterator does not advance and the error is returned.
9539func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
9540	if tracing.IsEnabled() {
9541		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
9542		defer func() {
9543			sc := -1
9544			if iter.Response().Response.Response != nil {
9545				sc = iter.Response().Response.Response.StatusCode
9546			}
9547			tracing.EndSpan(ctx, sc, err)
9548		}()
9549	}
9550	iter.i++
9551	if iter.i < len(iter.page.Values()) {
9552		return nil
9553	}
9554	err = iter.page.NextWithContext(ctx)
9555	if err != nil {
9556		iter.i--
9557		return err
9558	}
9559	iter.i = 0
9560	return nil
9561}
9562
9563// Next advances to the next value.  If there was an error making
9564// the request the iterator does not advance and the error is returned.
9565// Deprecated: Use NextWithContext() instead.
9566func (iter *PublicIPAddressListResultIterator) Next() error {
9567	return iter.NextWithContext(context.Background())
9568}
9569
9570// NotDone returns true if the enumeration should be started or is not yet complete.
9571func (iter PublicIPAddressListResultIterator) NotDone() bool {
9572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9573}
9574
9575// Response returns the raw server response from the last page request.
9576func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
9577	return iter.page.Response()
9578}
9579
9580// Value returns the current value or a zero-initialized value if the
9581// iterator has advanced beyond the end of the collection.
9582func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
9583	if !iter.page.NotDone() {
9584		return PublicIPAddress{}
9585	}
9586	return iter.page.Values()[iter.i]
9587}
9588
9589// Creates a new instance of the PublicIPAddressListResultIterator type.
9590func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
9591	return PublicIPAddressListResultIterator{page: page}
9592}
9593
9594// IsEmpty returns true if the ListResult contains no values.
9595func (pialr PublicIPAddressListResult) IsEmpty() bool {
9596	return pialr.Value == nil || len(*pialr.Value) == 0
9597}
9598
9599// hasNextLink returns true if the NextLink is not empty.
9600func (pialr PublicIPAddressListResult) hasNextLink() bool {
9601	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
9602}
9603
9604// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
9605// It returns nil if no more results exist.
9606func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
9607	if !pialr.hasNextLink() {
9608		return nil, nil
9609	}
9610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9611		autorest.AsJSON(),
9612		autorest.AsGet(),
9613		autorest.WithBaseURL(to.String(pialr.NextLink)))
9614}
9615
9616// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
9617type PublicIPAddressListResultPage struct {
9618	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
9619	pialr PublicIPAddressListResult
9620}
9621
9622// NextWithContext advances to the next page of values.  If there was an error making
9623// the request the page does not advance and the error is returned.
9624func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
9625	if tracing.IsEnabled() {
9626		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
9627		defer func() {
9628			sc := -1
9629			if page.Response().Response.Response != nil {
9630				sc = page.Response().Response.Response.StatusCode
9631			}
9632			tracing.EndSpan(ctx, sc, err)
9633		}()
9634	}
9635	for {
9636		next, err := page.fn(ctx, page.pialr)
9637		if err != nil {
9638			return err
9639		}
9640		page.pialr = next
9641		if !next.hasNextLink() || !next.IsEmpty() {
9642			break
9643		}
9644	}
9645	return nil
9646}
9647
9648// Next advances to the next page of values.  If there was an error making
9649// the request the page does not advance and the error is returned.
9650// Deprecated: Use NextWithContext() instead.
9651func (page *PublicIPAddressListResultPage) Next() error {
9652	return page.NextWithContext(context.Background())
9653}
9654
9655// NotDone returns true if the page enumeration should be started or is not yet complete.
9656func (page PublicIPAddressListResultPage) NotDone() bool {
9657	return !page.pialr.IsEmpty()
9658}
9659
9660// Response returns the raw server response from the last page request.
9661func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
9662	return page.pialr
9663}
9664
9665// Values returns the slice of values for the current page or nil if there are no values.
9666func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
9667	if page.pialr.IsEmpty() {
9668		return nil
9669	}
9670	return *page.pialr.Value
9671}
9672
9673// Creates a new instance of the PublicIPAddressListResultPage type.
9674func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
9675	return PublicIPAddressListResultPage{
9676		fn:    getNextPage,
9677		pialr: cur,
9678	}
9679}
9680
9681// PublicIPAddressPropertiesFormat public IP address properties.
9682type PublicIPAddressPropertiesFormat struct {
9683	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9684	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
9685	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
9686	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
9687	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
9688	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
9689	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
9690	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
9691	// IPAddress - The IP address associated with the public IP address resource.
9692	IPAddress *string `json:"ipAddress,omitempty"`
9693	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
9694	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9695	// ResourceGUID - The resource GUID property of the public IP resource.
9696	ResourceGUID *string `json:"resourceGuid,omitempty"`
9697	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9698	ProvisioningState *string `json:"provisioningState,omitempty"`
9699}
9700
9701// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
9702func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
9703	objectMap := make(map[string]interface{})
9704	if piapf.PublicIPAllocationMethod != "" {
9705		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
9706	}
9707	if piapf.PublicIPAddressVersion != "" {
9708		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
9709	}
9710	if piapf.DNSSettings != nil {
9711		objectMap["dnsSettings"] = piapf.DNSSettings
9712	}
9713	if piapf.IPAddress != nil {
9714		objectMap["ipAddress"] = piapf.IPAddress
9715	}
9716	if piapf.IdleTimeoutInMinutes != nil {
9717		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
9718	}
9719	if piapf.ResourceGUID != nil {
9720		objectMap["resourceGuid"] = piapf.ResourceGUID
9721	}
9722	if piapf.ProvisioningState != nil {
9723		objectMap["provisioningState"] = piapf.ProvisioningState
9724	}
9725	return json.Marshal(objectMap)
9726}
9727
9728// PublicIPAddressSku SKU of a public IP address
9729type PublicIPAddressSku struct {
9730	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
9731	Name PublicIPAddressSkuName `json:"name,omitempty"`
9732}
9733
9734// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
9735type QueryTroubleshootingParameters struct {
9736	// TargetResourceID - The target resource ID to query the troubleshooting result.
9737	TargetResourceID *string `json:"targetResourceId,omitempty"`
9738}
9739
9740// Resource common resource representation.
9741type Resource struct {
9742	// ID - Resource ID.
9743	ID *string `json:"id,omitempty"`
9744	// Name - READ-ONLY; Resource name.
9745	Name *string `json:"name,omitempty"`
9746	// Type - READ-ONLY; Resource type.
9747	Type *string `json:"type,omitempty"`
9748	// Location - Resource location.
9749	Location *string `json:"location,omitempty"`
9750	// Tags - Resource tags.
9751	Tags map[string]*string `json:"tags"`
9752}
9753
9754// MarshalJSON is the custom marshaler for Resource.
9755func (r Resource) MarshalJSON() ([]byte, error) {
9756	objectMap := make(map[string]interface{})
9757	if r.ID != nil {
9758		objectMap["id"] = r.ID
9759	}
9760	if r.Location != nil {
9761		objectMap["location"] = r.Location
9762	}
9763	if r.Tags != nil {
9764		objectMap["tags"] = r.Tags
9765	}
9766	return json.Marshal(objectMap)
9767}
9768
9769// ResourceNavigationLink resourceNavigationLink resource.
9770type ResourceNavigationLink struct {
9771	// ResourceNavigationLinkFormat - Resource navigation link properties format.
9772	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
9773	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
9774	Name *string `json:"name,omitempty"`
9775	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9776	Etag *string `json:"etag,omitempty"`
9777	// ID - Resource ID.
9778	ID *string `json:"id,omitempty"`
9779}
9780
9781// MarshalJSON is the custom marshaler for ResourceNavigationLink.
9782func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
9783	objectMap := make(map[string]interface{})
9784	if rnl.ResourceNavigationLinkFormat != nil {
9785		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
9786	}
9787	if rnl.Name != nil {
9788		objectMap["name"] = rnl.Name
9789	}
9790	if rnl.ID != nil {
9791		objectMap["id"] = rnl.ID
9792	}
9793	return json.Marshal(objectMap)
9794}
9795
9796// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
9797func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
9798	var m map[string]*json.RawMessage
9799	err := json.Unmarshal(body, &m)
9800	if err != nil {
9801		return err
9802	}
9803	for k, v := range m {
9804		switch k {
9805		case "properties":
9806			if v != nil {
9807				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
9808				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
9809				if err != nil {
9810					return err
9811				}
9812				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
9813			}
9814		case "name":
9815			if v != nil {
9816				var name string
9817				err = json.Unmarshal(*v, &name)
9818				if err != nil {
9819					return err
9820				}
9821				rnl.Name = &name
9822			}
9823		case "etag":
9824			if v != nil {
9825				var etag string
9826				err = json.Unmarshal(*v, &etag)
9827				if err != nil {
9828					return err
9829				}
9830				rnl.Etag = &etag
9831			}
9832		case "id":
9833			if v != nil {
9834				var ID string
9835				err = json.Unmarshal(*v, &ID)
9836				if err != nil {
9837					return err
9838				}
9839				rnl.ID = &ID
9840			}
9841		}
9842	}
9843
9844	return nil
9845}
9846
9847// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
9848type ResourceNavigationLinkFormat struct {
9849	// LinkedResourceType - Resource type of the linked resource.
9850	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
9851	// Link - Link to the external resource
9852	Link *string `json:"link,omitempty"`
9853	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
9854	ProvisioningState *string `json:"provisioningState,omitempty"`
9855}
9856
9857// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
9858func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
9859	objectMap := make(map[string]interface{})
9860	if rnlf.LinkedResourceType != nil {
9861		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
9862	}
9863	if rnlf.Link != nil {
9864		objectMap["link"] = rnlf.Link
9865	}
9866	return json.Marshal(objectMap)
9867}
9868
9869// RetentionPolicyParameters parameters that define the retention policy for flow log.
9870type RetentionPolicyParameters struct {
9871	// Days - Number of days to retain flow log records.
9872	Days *int32 `json:"days,omitempty"`
9873	// Enabled - Flag to enable/disable retention.
9874	Enabled *bool `json:"enabled,omitempty"`
9875}
9876
9877// Route route resource
9878type Route struct {
9879	autorest.Response `json:"-"`
9880	// RoutePropertiesFormat - Properties of the route.
9881	*RoutePropertiesFormat `json:"properties,omitempty"`
9882	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9883	Name *string `json:"name,omitempty"`
9884	// Etag - A unique read-only string that changes whenever the resource is updated.
9885	Etag *string `json:"etag,omitempty"`
9886	// ID - Resource ID.
9887	ID *string `json:"id,omitempty"`
9888}
9889
9890// MarshalJSON is the custom marshaler for Route.
9891func (r Route) MarshalJSON() ([]byte, error) {
9892	objectMap := make(map[string]interface{})
9893	if r.RoutePropertiesFormat != nil {
9894		objectMap["properties"] = r.RoutePropertiesFormat
9895	}
9896	if r.Name != nil {
9897		objectMap["name"] = r.Name
9898	}
9899	if r.Etag != nil {
9900		objectMap["etag"] = r.Etag
9901	}
9902	if r.ID != nil {
9903		objectMap["id"] = r.ID
9904	}
9905	return json.Marshal(objectMap)
9906}
9907
9908// UnmarshalJSON is the custom unmarshaler for Route struct.
9909func (r *Route) UnmarshalJSON(body []byte) error {
9910	var m map[string]*json.RawMessage
9911	err := json.Unmarshal(body, &m)
9912	if err != nil {
9913		return err
9914	}
9915	for k, v := range m {
9916		switch k {
9917		case "properties":
9918			if v != nil {
9919				var routePropertiesFormat RoutePropertiesFormat
9920				err = json.Unmarshal(*v, &routePropertiesFormat)
9921				if err != nil {
9922					return err
9923				}
9924				r.RoutePropertiesFormat = &routePropertiesFormat
9925			}
9926		case "name":
9927			if v != nil {
9928				var name string
9929				err = json.Unmarshal(*v, &name)
9930				if err != nil {
9931					return err
9932				}
9933				r.Name = &name
9934			}
9935		case "etag":
9936			if v != nil {
9937				var etag string
9938				err = json.Unmarshal(*v, &etag)
9939				if err != nil {
9940					return err
9941				}
9942				r.Etag = &etag
9943			}
9944		case "id":
9945			if v != nil {
9946				var ID string
9947				err = json.Unmarshal(*v, &ID)
9948				if err != nil {
9949					return err
9950				}
9951				r.ID = &ID
9952			}
9953		}
9954	}
9955
9956	return nil
9957}
9958
9959// RouteFilter route Filter Resource.
9960type RouteFilter struct {
9961	autorest.Response            `json:"-"`
9962	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
9963	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9964	Etag *string `json:"etag,omitempty"`
9965	// ID - Resource ID.
9966	ID *string `json:"id,omitempty"`
9967	// Name - READ-ONLY; Resource name.
9968	Name *string `json:"name,omitempty"`
9969	// Type - READ-ONLY; Resource type.
9970	Type *string `json:"type,omitempty"`
9971	// Location - Resource location.
9972	Location *string `json:"location,omitempty"`
9973	// Tags - Resource tags.
9974	Tags map[string]*string `json:"tags"`
9975}
9976
9977// MarshalJSON is the custom marshaler for RouteFilter.
9978func (rf RouteFilter) MarshalJSON() ([]byte, error) {
9979	objectMap := make(map[string]interface{})
9980	if rf.RouteFilterPropertiesFormat != nil {
9981		objectMap["properties"] = rf.RouteFilterPropertiesFormat
9982	}
9983	if rf.ID != nil {
9984		objectMap["id"] = rf.ID
9985	}
9986	if rf.Location != nil {
9987		objectMap["location"] = rf.Location
9988	}
9989	if rf.Tags != nil {
9990		objectMap["tags"] = rf.Tags
9991	}
9992	return json.Marshal(objectMap)
9993}
9994
9995// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
9996func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
9997	var m map[string]*json.RawMessage
9998	err := json.Unmarshal(body, &m)
9999	if err != nil {
10000		return err
10001	}
10002	for k, v := range m {
10003		switch k {
10004		case "properties":
10005			if v != nil {
10006				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
10007				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
10008				if err != nil {
10009					return err
10010				}
10011				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
10012			}
10013		case "etag":
10014			if v != nil {
10015				var etag string
10016				err = json.Unmarshal(*v, &etag)
10017				if err != nil {
10018					return err
10019				}
10020				rf.Etag = &etag
10021			}
10022		case "id":
10023			if v != nil {
10024				var ID string
10025				err = json.Unmarshal(*v, &ID)
10026				if err != nil {
10027					return err
10028				}
10029				rf.ID = &ID
10030			}
10031		case "name":
10032			if v != nil {
10033				var name string
10034				err = json.Unmarshal(*v, &name)
10035				if err != nil {
10036					return err
10037				}
10038				rf.Name = &name
10039			}
10040		case "type":
10041			if v != nil {
10042				var typeVar string
10043				err = json.Unmarshal(*v, &typeVar)
10044				if err != nil {
10045					return err
10046				}
10047				rf.Type = &typeVar
10048			}
10049		case "location":
10050			if v != nil {
10051				var location string
10052				err = json.Unmarshal(*v, &location)
10053				if err != nil {
10054					return err
10055				}
10056				rf.Location = &location
10057			}
10058		case "tags":
10059			if v != nil {
10060				var tags map[string]*string
10061				err = json.Unmarshal(*v, &tags)
10062				if err != nil {
10063					return err
10064				}
10065				rf.Tags = tags
10066			}
10067		}
10068	}
10069
10070	return nil
10071}
10072
10073// RouteFilterListResult response for the ListRouteFilters API service call.
10074type RouteFilterListResult struct {
10075	autorest.Response `json:"-"`
10076	// Value - Gets a list of route filters in a resource group.
10077	Value *[]RouteFilter `json:"value,omitempty"`
10078	// NextLink - The URL to get the next set of results.
10079	NextLink *string `json:"nextLink,omitempty"`
10080}
10081
10082// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
10083type RouteFilterListResultIterator struct {
10084	i    int
10085	page RouteFilterListResultPage
10086}
10087
10088// NextWithContext advances to the next value.  If there was an error making
10089// the request the iterator does not advance and the error is returned.
10090func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
10091	if tracing.IsEnabled() {
10092		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
10093		defer func() {
10094			sc := -1
10095			if iter.Response().Response.Response != nil {
10096				sc = iter.Response().Response.Response.StatusCode
10097			}
10098			tracing.EndSpan(ctx, sc, err)
10099		}()
10100	}
10101	iter.i++
10102	if iter.i < len(iter.page.Values()) {
10103		return nil
10104	}
10105	err = iter.page.NextWithContext(ctx)
10106	if err != nil {
10107		iter.i--
10108		return err
10109	}
10110	iter.i = 0
10111	return nil
10112}
10113
10114// Next advances to the next value.  If there was an error making
10115// the request the iterator does not advance and the error is returned.
10116// Deprecated: Use NextWithContext() instead.
10117func (iter *RouteFilterListResultIterator) Next() error {
10118	return iter.NextWithContext(context.Background())
10119}
10120
10121// NotDone returns true if the enumeration should be started or is not yet complete.
10122func (iter RouteFilterListResultIterator) NotDone() bool {
10123	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10124}
10125
10126// Response returns the raw server response from the last page request.
10127func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
10128	return iter.page.Response()
10129}
10130
10131// Value returns the current value or a zero-initialized value if the
10132// iterator has advanced beyond the end of the collection.
10133func (iter RouteFilterListResultIterator) Value() RouteFilter {
10134	if !iter.page.NotDone() {
10135		return RouteFilter{}
10136	}
10137	return iter.page.Values()[iter.i]
10138}
10139
10140// Creates a new instance of the RouteFilterListResultIterator type.
10141func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
10142	return RouteFilterListResultIterator{page: page}
10143}
10144
10145// IsEmpty returns true if the ListResult contains no values.
10146func (rflr RouteFilterListResult) IsEmpty() bool {
10147	return rflr.Value == nil || len(*rflr.Value) == 0
10148}
10149
10150// hasNextLink returns true if the NextLink is not empty.
10151func (rflr RouteFilterListResult) hasNextLink() bool {
10152	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
10153}
10154
10155// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
10156// It returns nil if no more results exist.
10157func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
10158	if !rflr.hasNextLink() {
10159		return nil, nil
10160	}
10161	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10162		autorest.AsJSON(),
10163		autorest.AsGet(),
10164		autorest.WithBaseURL(to.String(rflr.NextLink)))
10165}
10166
10167// RouteFilterListResultPage contains a page of RouteFilter values.
10168type RouteFilterListResultPage struct {
10169	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
10170	rflr RouteFilterListResult
10171}
10172
10173// NextWithContext advances to the next page of values.  If there was an error making
10174// the request the page does not advance and the error is returned.
10175func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
10176	if tracing.IsEnabled() {
10177		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
10178		defer func() {
10179			sc := -1
10180			if page.Response().Response.Response != nil {
10181				sc = page.Response().Response.Response.StatusCode
10182			}
10183			tracing.EndSpan(ctx, sc, err)
10184		}()
10185	}
10186	for {
10187		next, err := page.fn(ctx, page.rflr)
10188		if err != nil {
10189			return err
10190		}
10191		page.rflr = next
10192		if !next.hasNextLink() || !next.IsEmpty() {
10193			break
10194		}
10195	}
10196	return nil
10197}
10198
10199// Next advances to the next page of values.  If there was an error making
10200// the request the page does not advance and the error is returned.
10201// Deprecated: Use NextWithContext() instead.
10202func (page *RouteFilterListResultPage) Next() error {
10203	return page.NextWithContext(context.Background())
10204}
10205
10206// NotDone returns true if the page enumeration should be started or is not yet complete.
10207func (page RouteFilterListResultPage) NotDone() bool {
10208	return !page.rflr.IsEmpty()
10209}
10210
10211// Response returns the raw server response from the last page request.
10212func (page RouteFilterListResultPage) Response() RouteFilterListResult {
10213	return page.rflr
10214}
10215
10216// Values returns the slice of values for the current page or nil if there are no values.
10217func (page RouteFilterListResultPage) Values() []RouteFilter {
10218	if page.rflr.IsEmpty() {
10219		return nil
10220	}
10221	return *page.rflr.Value
10222}
10223
10224// Creates a new instance of the RouteFilterListResultPage type.
10225func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
10226	return RouteFilterListResultPage{
10227		fn:   getNextPage,
10228		rflr: cur,
10229	}
10230}
10231
10232// RouteFilterPropertiesFormat route Filter Resource
10233type RouteFilterPropertiesFormat struct {
10234	// Rules - Collection of RouteFilterRules contained within a route filter.
10235	Rules *[]RouteFilterRule `json:"rules,omitempty"`
10236	// Peerings - A collection of references to express route circuit peerings.
10237	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
10238	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
10239	ProvisioningState *string `json:"provisioningState,omitempty"`
10240}
10241
10242// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
10243func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
10244	objectMap := make(map[string]interface{})
10245	if rfpf.Rules != nil {
10246		objectMap["rules"] = rfpf.Rules
10247	}
10248	if rfpf.Peerings != nil {
10249		objectMap["peerings"] = rfpf.Peerings
10250	}
10251	return json.Marshal(objectMap)
10252}
10253
10254// RouteFilterRule route Filter Rule Resource
10255type RouteFilterRule struct {
10256	autorest.Response                `json:"-"`
10257	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
10258	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10259	Name *string `json:"name,omitempty"`
10260	// Location - Resource location.
10261	Location *string `json:"location,omitempty"`
10262	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10263	Etag *string `json:"etag,omitempty"`
10264	// Tags - Resource tags.
10265	Tags map[string]*string `json:"tags"`
10266	// ID - Resource ID.
10267	ID *string `json:"id,omitempty"`
10268}
10269
10270// MarshalJSON is the custom marshaler for RouteFilterRule.
10271func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
10272	objectMap := make(map[string]interface{})
10273	if rfr.RouteFilterRulePropertiesFormat != nil {
10274		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
10275	}
10276	if rfr.Name != nil {
10277		objectMap["name"] = rfr.Name
10278	}
10279	if rfr.Location != nil {
10280		objectMap["location"] = rfr.Location
10281	}
10282	if rfr.Tags != nil {
10283		objectMap["tags"] = rfr.Tags
10284	}
10285	if rfr.ID != nil {
10286		objectMap["id"] = rfr.ID
10287	}
10288	return json.Marshal(objectMap)
10289}
10290
10291// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
10292func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
10293	var m map[string]*json.RawMessage
10294	err := json.Unmarshal(body, &m)
10295	if err != nil {
10296		return err
10297	}
10298	for k, v := range m {
10299		switch k {
10300		case "properties":
10301			if v != nil {
10302				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
10303				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
10304				if err != nil {
10305					return err
10306				}
10307				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
10308			}
10309		case "name":
10310			if v != nil {
10311				var name string
10312				err = json.Unmarshal(*v, &name)
10313				if err != nil {
10314					return err
10315				}
10316				rfr.Name = &name
10317			}
10318		case "location":
10319			if v != nil {
10320				var location string
10321				err = json.Unmarshal(*v, &location)
10322				if err != nil {
10323					return err
10324				}
10325				rfr.Location = &location
10326			}
10327		case "etag":
10328			if v != nil {
10329				var etag string
10330				err = json.Unmarshal(*v, &etag)
10331				if err != nil {
10332					return err
10333				}
10334				rfr.Etag = &etag
10335			}
10336		case "tags":
10337			if v != nil {
10338				var tags map[string]*string
10339				err = json.Unmarshal(*v, &tags)
10340				if err != nil {
10341					return err
10342				}
10343				rfr.Tags = tags
10344			}
10345		case "id":
10346			if v != nil {
10347				var ID string
10348				err = json.Unmarshal(*v, &ID)
10349				if err != nil {
10350					return err
10351				}
10352				rfr.ID = &ID
10353			}
10354		}
10355	}
10356
10357	return nil
10358}
10359
10360// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
10361type RouteFilterRuleListResult struct {
10362	autorest.Response `json:"-"`
10363	// Value - Gets a list of RouteFilterRules in a resource group.
10364	Value *[]RouteFilterRule `json:"value,omitempty"`
10365	// NextLink - The URL to get the next set of results.
10366	NextLink *string `json:"nextLink,omitempty"`
10367}
10368
10369// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
10370type RouteFilterRuleListResultIterator struct {
10371	i    int
10372	page RouteFilterRuleListResultPage
10373}
10374
10375// NextWithContext advances to the next value.  If there was an error making
10376// the request the iterator does not advance and the error is returned.
10377func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10378	if tracing.IsEnabled() {
10379		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
10380		defer func() {
10381			sc := -1
10382			if iter.Response().Response.Response != nil {
10383				sc = iter.Response().Response.Response.StatusCode
10384			}
10385			tracing.EndSpan(ctx, sc, err)
10386		}()
10387	}
10388	iter.i++
10389	if iter.i < len(iter.page.Values()) {
10390		return nil
10391	}
10392	err = iter.page.NextWithContext(ctx)
10393	if err != nil {
10394		iter.i--
10395		return err
10396	}
10397	iter.i = 0
10398	return nil
10399}
10400
10401// Next advances to the next value.  If there was an error making
10402// the request the iterator does not advance and the error is returned.
10403// Deprecated: Use NextWithContext() instead.
10404func (iter *RouteFilterRuleListResultIterator) Next() error {
10405	return iter.NextWithContext(context.Background())
10406}
10407
10408// NotDone returns true if the enumeration should be started or is not yet complete.
10409func (iter RouteFilterRuleListResultIterator) NotDone() bool {
10410	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10411}
10412
10413// Response returns the raw server response from the last page request.
10414func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
10415	return iter.page.Response()
10416}
10417
10418// Value returns the current value or a zero-initialized value if the
10419// iterator has advanced beyond the end of the collection.
10420func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
10421	if !iter.page.NotDone() {
10422		return RouteFilterRule{}
10423	}
10424	return iter.page.Values()[iter.i]
10425}
10426
10427// Creates a new instance of the RouteFilterRuleListResultIterator type.
10428func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
10429	return RouteFilterRuleListResultIterator{page: page}
10430}
10431
10432// IsEmpty returns true if the ListResult contains no values.
10433func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
10434	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
10435}
10436
10437// hasNextLink returns true if the NextLink is not empty.
10438func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
10439	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
10440}
10441
10442// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
10443// It returns nil if no more results exist.
10444func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10445	if !rfrlr.hasNextLink() {
10446		return nil, nil
10447	}
10448	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10449		autorest.AsJSON(),
10450		autorest.AsGet(),
10451		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
10452}
10453
10454// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
10455type RouteFilterRuleListResultPage struct {
10456	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
10457	rfrlr RouteFilterRuleListResult
10458}
10459
10460// NextWithContext advances to the next page of values.  If there was an error making
10461// the request the page does not advance and the error is returned.
10462func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
10463	if tracing.IsEnabled() {
10464		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
10465		defer func() {
10466			sc := -1
10467			if page.Response().Response.Response != nil {
10468				sc = page.Response().Response.Response.StatusCode
10469			}
10470			tracing.EndSpan(ctx, sc, err)
10471		}()
10472	}
10473	for {
10474		next, err := page.fn(ctx, page.rfrlr)
10475		if err != nil {
10476			return err
10477		}
10478		page.rfrlr = next
10479		if !next.hasNextLink() || !next.IsEmpty() {
10480			break
10481		}
10482	}
10483	return nil
10484}
10485
10486// Next advances to the next page of values.  If there was an error making
10487// the request the page does not advance and the error is returned.
10488// Deprecated: Use NextWithContext() instead.
10489func (page *RouteFilterRuleListResultPage) Next() error {
10490	return page.NextWithContext(context.Background())
10491}
10492
10493// NotDone returns true if the page enumeration should be started or is not yet complete.
10494func (page RouteFilterRuleListResultPage) NotDone() bool {
10495	return !page.rfrlr.IsEmpty()
10496}
10497
10498// Response returns the raw server response from the last page request.
10499func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
10500	return page.rfrlr
10501}
10502
10503// Values returns the slice of values for the current page or nil if there are no values.
10504func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
10505	if page.rfrlr.IsEmpty() {
10506		return nil
10507	}
10508	return *page.rfrlr.Value
10509}
10510
10511// Creates a new instance of the RouteFilterRuleListResultPage type.
10512func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
10513	return RouteFilterRuleListResultPage{
10514		fn:    getNextPage,
10515		rfrlr: cur,
10516	}
10517}
10518
10519// RouteFilterRulePropertiesFormat route Filter Rule Resource
10520type RouteFilterRulePropertiesFormat struct {
10521	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
10522	Access Access `json:"access,omitempty"`
10523	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
10524	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
10525	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
10526	Communities *[]string `json:"communities,omitempty"`
10527	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
10528	ProvisioningState *string `json:"provisioningState,omitempty"`
10529}
10530
10531// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
10532func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
10533	objectMap := make(map[string]interface{})
10534	if rfrpf.Access != "" {
10535		objectMap["access"] = rfrpf.Access
10536	}
10537	if rfrpf.RouteFilterRuleType != nil {
10538		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
10539	}
10540	if rfrpf.Communities != nil {
10541		objectMap["communities"] = rfrpf.Communities
10542	}
10543	return json.Marshal(objectMap)
10544}
10545
10546// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10547// long-running operation.
10548type RouteFilterRulesCreateOrUpdateFuture struct {
10549	azure.FutureAPI
10550	// Result returns the result of the asynchronous operation.
10551	// If the operation has not completed it will return an error.
10552	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
10553}
10554
10555// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10556func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10557	var azFuture azure.Future
10558	if err := json.Unmarshal(body, &azFuture); err != nil {
10559		return err
10560	}
10561	future.FutureAPI = &azFuture
10562	future.Result = future.result
10563	return nil
10564}
10565
10566// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
10567func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
10568	var done bool
10569	done, err = future.DoneWithContext(context.Background(), client)
10570	if err != nil {
10571		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10572		return
10573	}
10574	if !done {
10575		rfr.Response.Response = future.Response()
10576		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
10577		return
10578	}
10579	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10580	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
10581		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
10582		if err != nil {
10583			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
10584		}
10585	}
10586	return
10587}
10588
10589// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10590// operation.
10591type RouteFilterRulesDeleteFuture struct {
10592	azure.FutureAPI
10593	// Result returns the result of the asynchronous operation.
10594	// If the operation has not completed it will return an error.
10595	Result func(RouteFilterRulesClient) (autorest.Response, error)
10596}
10597
10598// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10599func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
10600	var azFuture azure.Future
10601	if err := json.Unmarshal(body, &azFuture); err != nil {
10602		return err
10603	}
10604	future.FutureAPI = &azFuture
10605	future.Result = future.result
10606	return nil
10607}
10608
10609// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
10610func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
10611	var done bool
10612	done, err = future.DoneWithContext(context.Background(), client)
10613	if err != nil {
10614		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
10615		return
10616	}
10617	if !done {
10618		ar.Response = future.Response()
10619		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
10620		return
10621	}
10622	ar.Response = future.Response()
10623	return
10624}
10625
10626// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10627// operation.
10628type RouteFilterRulesUpdateFuture struct {
10629	azure.FutureAPI
10630	// Result returns the result of the asynchronous operation.
10631	// If the operation has not completed it will return an error.
10632	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
10633}
10634
10635// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10636func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
10637	var azFuture azure.Future
10638	if err := json.Unmarshal(body, &azFuture); err != nil {
10639		return err
10640	}
10641	future.FutureAPI = &azFuture
10642	future.Result = future.result
10643	return nil
10644}
10645
10646// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
10647func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
10648	var done bool
10649	done, err = future.DoneWithContext(context.Background(), client)
10650	if err != nil {
10651		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
10652		return
10653	}
10654	if !done {
10655		rfr.Response.Response = future.Response()
10656		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
10657		return
10658	}
10659	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10660	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
10661		rfr, err = client.UpdateResponder(rfr.Response.Response)
10662		if err != nil {
10663			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
10664		}
10665	}
10666	return
10667}
10668
10669// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10670// long-running operation.
10671type RouteFiltersCreateOrUpdateFuture struct {
10672	azure.FutureAPI
10673	// Result returns the result of the asynchronous operation.
10674	// If the operation has not completed it will return an error.
10675	Result func(RouteFiltersClient) (RouteFilter, error)
10676}
10677
10678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10679func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10680	var azFuture azure.Future
10681	if err := json.Unmarshal(body, &azFuture); err != nil {
10682		return err
10683	}
10684	future.FutureAPI = &azFuture
10685	future.Result = future.result
10686	return nil
10687}
10688
10689// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
10690func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
10691	var done bool
10692	done, err = future.DoneWithContext(context.Background(), client)
10693	if err != nil {
10694		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10695		return
10696	}
10697	if !done {
10698		rf.Response.Response = future.Response()
10699		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
10700		return
10701	}
10702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10703	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
10704		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
10705		if err != nil {
10706			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
10707		}
10708	}
10709	return
10710}
10711
10712// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10713// operation.
10714type RouteFiltersDeleteFuture struct {
10715	azure.FutureAPI
10716	// Result returns the result of the asynchronous operation.
10717	// If the operation has not completed it will return an error.
10718	Result func(RouteFiltersClient) (autorest.Response, error)
10719}
10720
10721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10722func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
10723	var azFuture azure.Future
10724	if err := json.Unmarshal(body, &azFuture); err != nil {
10725		return err
10726	}
10727	future.FutureAPI = &azFuture
10728	future.Result = future.result
10729	return nil
10730}
10731
10732// result is the default implementation for RouteFiltersDeleteFuture.Result.
10733func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
10734	var done bool
10735	done, err = future.DoneWithContext(context.Background(), client)
10736	if err != nil {
10737		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
10738		return
10739	}
10740	if !done {
10741		ar.Response = future.Response()
10742		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
10743		return
10744	}
10745	ar.Response = future.Response()
10746	return
10747}
10748
10749// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10750// operation.
10751type RouteFiltersUpdateFuture struct {
10752	azure.FutureAPI
10753	// Result returns the result of the asynchronous operation.
10754	// If the operation has not completed it will return an error.
10755	Result func(RouteFiltersClient) (RouteFilter, error)
10756}
10757
10758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10759func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
10760	var azFuture azure.Future
10761	if err := json.Unmarshal(body, &azFuture); err != nil {
10762		return err
10763	}
10764	future.FutureAPI = &azFuture
10765	future.Result = future.result
10766	return nil
10767}
10768
10769// result is the default implementation for RouteFiltersUpdateFuture.Result.
10770func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
10771	var done bool
10772	done, err = future.DoneWithContext(context.Background(), client)
10773	if err != nil {
10774		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
10775		return
10776	}
10777	if !done {
10778		rf.Response.Response = future.Response()
10779		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
10780		return
10781	}
10782	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10783	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
10784		rf, err = client.UpdateResponder(rf.Response.Response)
10785		if err != nil {
10786			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
10787		}
10788	}
10789	return
10790}
10791
10792// RouteListResult response for the ListRoute API service call
10793type RouteListResult struct {
10794	autorest.Response `json:"-"`
10795	// Value - Gets a list of routes in a resource group.
10796	Value *[]Route `json:"value,omitempty"`
10797	// NextLink - The URL to get the next set of results.
10798	NextLink *string `json:"nextLink,omitempty"`
10799}
10800
10801// RouteListResultIterator provides access to a complete listing of Route values.
10802type RouteListResultIterator struct {
10803	i    int
10804	page RouteListResultPage
10805}
10806
10807// NextWithContext advances to the next value.  If there was an error making
10808// the request the iterator does not advance and the error is returned.
10809func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
10810	if tracing.IsEnabled() {
10811		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
10812		defer func() {
10813			sc := -1
10814			if iter.Response().Response.Response != nil {
10815				sc = iter.Response().Response.Response.StatusCode
10816			}
10817			tracing.EndSpan(ctx, sc, err)
10818		}()
10819	}
10820	iter.i++
10821	if iter.i < len(iter.page.Values()) {
10822		return nil
10823	}
10824	err = iter.page.NextWithContext(ctx)
10825	if err != nil {
10826		iter.i--
10827		return err
10828	}
10829	iter.i = 0
10830	return nil
10831}
10832
10833// Next advances to the next value.  If there was an error making
10834// the request the iterator does not advance and the error is returned.
10835// Deprecated: Use NextWithContext() instead.
10836func (iter *RouteListResultIterator) Next() error {
10837	return iter.NextWithContext(context.Background())
10838}
10839
10840// NotDone returns true if the enumeration should be started or is not yet complete.
10841func (iter RouteListResultIterator) NotDone() bool {
10842	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10843}
10844
10845// Response returns the raw server response from the last page request.
10846func (iter RouteListResultIterator) Response() RouteListResult {
10847	return iter.page.Response()
10848}
10849
10850// Value returns the current value or a zero-initialized value if the
10851// iterator has advanced beyond the end of the collection.
10852func (iter RouteListResultIterator) Value() Route {
10853	if !iter.page.NotDone() {
10854		return Route{}
10855	}
10856	return iter.page.Values()[iter.i]
10857}
10858
10859// Creates a new instance of the RouteListResultIterator type.
10860func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
10861	return RouteListResultIterator{page: page}
10862}
10863
10864// IsEmpty returns true if the ListResult contains no values.
10865func (rlr RouteListResult) IsEmpty() bool {
10866	return rlr.Value == nil || len(*rlr.Value) == 0
10867}
10868
10869// hasNextLink returns true if the NextLink is not empty.
10870func (rlr RouteListResult) hasNextLink() bool {
10871	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
10872}
10873
10874// routeListResultPreparer prepares a request to retrieve the next set of results.
10875// It returns nil if no more results exist.
10876func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
10877	if !rlr.hasNextLink() {
10878		return nil, nil
10879	}
10880	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10881		autorest.AsJSON(),
10882		autorest.AsGet(),
10883		autorest.WithBaseURL(to.String(rlr.NextLink)))
10884}
10885
10886// RouteListResultPage contains a page of Route values.
10887type RouteListResultPage struct {
10888	fn  func(context.Context, RouteListResult) (RouteListResult, error)
10889	rlr RouteListResult
10890}
10891
10892// NextWithContext advances to the next page of values.  If there was an error making
10893// the request the page does not advance and the error is returned.
10894func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
10895	if tracing.IsEnabled() {
10896		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
10897		defer func() {
10898			sc := -1
10899			if page.Response().Response.Response != nil {
10900				sc = page.Response().Response.Response.StatusCode
10901			}
10902			tracing.EndSpan(ctx, sc, err)
10903		}()
10904	}
10905	for {
10906		next, err := page.fn(ctx, page.rlr)
10907		if err != nil {
10908			return err
10909		}
10910		page.rlr = next
10911		if !next.hasNextLink() || !next.IsEmpty() {
10912			break
10913		}
10914	}
10915	return nil
10916}
10917
10918// Next advances to the next page of values.  If there was an error making
10919// the request the page does not advance and the error is returned.
10920// Deprecated: Use NextWithContext() instead.
10921func (page *RouteListResultPage) Next() error {
10922	return page.NextWithContext(context.Background())
10923}
10924
10925// NotDone returns true if the page enumeration should be started or is not yet complete.
10926func (page RouteListResultPage) NotDone() bool {
10927	return !page.rlr.IsEmpty()
10928}
10929
10930// Response returns the raw server response from the last page request.
10931func (page RouteListResultPage) Response() RouteListResult {
10932	return page.rlr
10933}
10934
10935// Values returns the slice of values for the current page or nil if there are no values.
10936func (page RouteListResultPage) Values() []Route {
10937	if page.rlr.IsEmpty() {
10938		return nil
10939	}
10940	return *page.rlr.Value
10941}
10942
10943// Creates a new instance of the RouteListResultPage type.
10944func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
10945	return RouteListResultPage{
10946		fn:  getNextPage,
10947		rlr: cur,
10948	}
10949}
10950
10951// RoutePropertiesFormat route resource
10952type RoutePropertiesFormat struct {
10953	// AddressPrefix - The destination CIDR to which the route applies.
10954	AddressPrefix *string `json:"addressPrefix,omitempty"`
10955	// 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'
10956	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
10957	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
10958	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
10959	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10960	ProvisioningState *string `json:"provisioningState,omitempty"`
10961}
10962
10963// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10964// operation.
10965type RoutesCreateOrUpdateFuture struct {
10966	azure.FutureAPI
10967	// Result returns the result of the asynchronous operation.
10968	// If the operation has not completed it will return an error.
10969	Result func(RoutesClient) (Route, error)
10970}
10971
10972// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10973func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10974	var azFuture azure.Future
10975	if err := json.Unmarshal(body, &azFuture); err != nil {
10976		return err
10977	}
10978	future.FutureAPI = &azFuture
10979	future.Result = future.result
10980	return nil
10981}
10982
10983// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
10984func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
10985	var done bool
10986	done, err = future.DoneWithContext(context.Background(), client)
10987	if err != nil {
10988		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10989		return
10990	}
10991	if !done {
10992		r.Response.Response = future.Response()
10993		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
10994		return
10995	}
10996	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10997	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
10998		r, err = client.CreateOrUpdateResponder(r.Response.Response)
10999		if err != nil {
11000			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
11001		}
11002	}
11003	return
11004}
11005
11006// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
11007type RoutesDeleteFuture struct {
11008	azure.FutureAPI
11009	// Result returns the result of the asynchronous operation.
11010	// If the operation has not completed it will return an error.
11011	Result func(RoutesClient) (autorest.Response, error)
11012}
11013
11014// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11015func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
11016	var azFuture azure.Future
11017	if err := json.Unmarshal(body, &azFuture); err != nil {
11018		return err
11019	}
11020	future.FutureAPI = &azFuture
11021	future.Result = future.result
11022	return nil
11023}
11024
11025// result is the default implementation for RoutesDeleteFuture.Result.
11026func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
11027	var done bool
11028	done, err = future.DoneWithContext(context.Background(), client)
11029	if err != nil {
11030		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
11031		return
11032	}
11033	if !done {
11034		ar.Response = future.Response()
11035		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
11036		return
11037	}
11038	ar.Response = future.Response()
11039	return
11040}
11041
11042// RouteTable route table resource.
11043type RouteTable struct {
11044	autorest.Response `json:"-"`
11045	// RouteTablePropertiesFormat - Properties of the route table.
11046	*RouteTablePropertiesFormat `json:"properties,omitempty"`
11047	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11048	Etag *string `json:"etag,omitempty"`
11049	// ID - Resource ID.
11050	ID *string `json:"id,omitempty"`
11051	// Name - READ-ONLY; Resource name.
11052	Name *string `json:"name,omitempty"`
11053	// Type - READ-ONLY; Resource type.
11054	Type *string `json:"type,omitempty"`
11055	// Location - Resource location.
11056	Location *string `json:"location,omitempty"`
11057	// Tags - Resource tags.
11058	Tags map[string]*string `json:"tags"`
11059}
11060
11061// MarshalJSON is the custom marshaler for RouteTable.
11062func (rt RouteTable) MarshalJSON() ([]byte, error) {
11063	objectMap := make(map[string]interface{})
11064	if rt.RouteTablePropertiesFormat != nil {
11065		objectMap["properties"] = rt.RouteTablePropertiesFormat
11066	}
11067	if rt.Etag != nil {
11068		objectMap["etag"] = rt.Etag
11069	}
11070	if rt.ID != nil {
11071		objectMap["id"] = rt.ID
11072	}
11073	if rt.Location != nil {
11074		objectMap["location"] = rt.Location
11075	}
11076	if rt.Tags != nil {
11077		objectMap["tags"] = rt.Tags
11078	}
11079	return json.Marshal(objectMap)
11080}
11081
11082// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
11083func (rt *RouteTable) UnmarshalJSON(body []byte) error {
11084	var m map[string]*json.RawMessage
11085	err := json.Unmarshal(body, &m)
11086	if err != nil {
11087		return err
11088	}
11089	for k, v := range m {
11090		switch k {
11091		case "properties":
11092			if v != nil {
11093				var routeTablePropertiesFormat RouteTablePropertiesFormat
11094				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
11095				if err != nil {
11096					return err
11097				}
11098				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
11099			}
11100		case "etag":
11101			if v != nil {
11102				var etag string
11103				err = json.Unmarshal(*v, &etag)
11104				if err != nil {
11105					return err
11106				}
11107				rt.Etag = &etag
11108			}
11109		case "id":
11110			if v != nil {
11111				var ID string
11112				err = json.Unmarshal(*v, &ID)
11113				if err != nil {
11114					return err
11115				}
11116				rt.ID = &ID
11117			}
11118		case "name":
11119			if v != nil {
11120				var name string
11121				err = json.Unmarshal(*v, &name)
11122				if err != nil {
11123					return err
11124				}
11125				rt.Name = &name
11126			}
11127		case "type":
11128			if v != nil {
11129				var typeVar string
11130				err = json.Unmarshal(*v, &typeVar)
11131				if err != nil {
11132					return err
11133				}
11134				rt.Type = &typeVar
11135			}
11136		case "location":
11137			if v != nil {
11138				var location string
11139				err = json.Unmarshal(*v, &location)
11140				if err != nil {
11141					return err
11142				}
11143				rt.Location = &location
11144			}
11145		case "tags":
11146			if v != nil {
11147				var tags map[string]*string
11148				err = json.Unmarshal(*v, &tags)
11149				if err != nil {
11150					return err
11151				}
11152				rt.Tags = tags
11153			}
11154		}
11155	}
11156
11157	return nil
11158}
11159
11160// RouteTableListResult response for the ListRouteTable API service call.
11161type RouteTableListResult struct {
11162	autorest.Response `json:"-"`
11163	// Value - Gets a list of route tables in a resource group.
11164	Value *[]RouteTable `json:"value,omitempty"`
11165	// NextLink - The URL to get the next set of results.
11166	NextLink *string `json:"nextLink,omitempty"`
11167}
11168
11169// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
11170type RouteTableListResultIterator struct {
11171	i    int
11172	page RouteTableListResultPage
11173}
11174
11175// NextWithContext advances to the next value.  If there was an error making
11176// the request the iterator does not advance and the error is returned.
11177func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
11178	if tracing.IsEnabled() {
11179		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
11180		defer func() {
11181			sc := -1
11182			if iter.Response().Response.Response != nil {
11183				sc = iter.Response().Response.Response.StatusCode
11184			}
11185			tracing.EndSpan(ctx, sc, err)
11186		}()
11187	}
11188	iter.i++
11189	if iter.i < len(iter.page.Values()) {
11190		return nil
11191	}
11192	err = iter.page.NextWithContext(ctx)
11193	if err != nil {
11194		iter.i--
11195		return err
11196	}
11197	iter.i = 0
11198	return nil
11199}
11200
11201// Next advances to the next value.  If there was an error making
11202// the request the iterator does not advance and the error is returned.
11203// Deprecated: Use NextWithContext() instead.
11204func (iter *RouteTableListResultIterator) Next() error {
11205	return iter.NextWithContext(context.Background())
11206}
11207
11208// NotDone returns true if the enumeration should be started or is not yet complete.
11209func (iter RouteTableListResultIterator) NotDone() bool {
11210	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11211}
11212
11213// Response returns the raw server response from the last page request.
11214func (iter RouteTableListResultIterator) Response() RouteTableListResult {
11215	return iter.page.Response()
11216}
11217
11218// Value returns the current value or a zero-initialized value if the
11219// iterator has advanced beyond the end of the collection.
11220func (iter RouteTableListResultIterator) Value() RouteTable {
11221	if !iter.page.NotDone() {
11222		return RouteTable{}
11223	}
11224	return iter.page.Values()[iter.i]
11225}
11226
11227// Creates a new instance of the RouteTableListResultIterator type.
11228func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
11229	return RouteTableListResultIterator{page: page}
11230}
11231
11232// IsEmpty returns true if the ListResult contains no values.
11233func (rtlr RouteTableListResult) IsEmpty() bool {
11234	return rtlr.Value == nil || len(*rtlr.Value) == 0
11235}
11236
11237// hasNextLink returns true if the NextLink is not empty.
11238func (rtlr RouteTableListResult) hasNextLink() bool {
11239	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
11240}
11241
11242// routeTableListResultPreparer prepares a request to retrieve the next set of results.
11243// It returns nil if no more results exist.
11244func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
11245	if !rtlr.hasNextLink() {
11246		return nil, nil
11247	}
11248	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11249		autorest.AsJSON(),
11250		autorest.AsGet(),
11251		autorest.WithBaseURL(to.String(rtlr.NextLink)))
11252}
11253
11254// RouteTableListResultPage contains a page of RouteTable values.
11255type RouteTableListResultPage struct {
11256	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
11257	rtlr RouteTableListResult
11258}
11259
11260// NextWithContext advances to the next page of values.  If there was an error making
11261// the request the page does not advance and the error is returned.
11262func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
11263	if tracing.IsEnabled() {
11264		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
11265		defer func() {
11266			sc := -1
11267			if page.Response().Response.Response != nil {
11268				sc = page.Response().Response.Response.StatusCode
11269			}
11270			tracing.EndSpan(ctx, sc, err)
11271		}()
11272	}
11273	for {
11274		next, err := page.fn(ctx, page.rtlr)
11275		if err != nil {
11276			return err
11277		}
11278		page.rtlr = next
11279		if !next.hasNextLink() || !next.IsEmpty() {
11280			break
11281		}
11282	}
11283	return nil
11284}
11285
11286// Next advances to the next page of values.  If there was an error making
11287// the request the page does not advance and the error is returned.
11288// Deprecated: Use NextWithContext() instead.
11289func (page *RouteTableListResultPage) Next() error {
11290	return page.NextWithContext(context.Background())
11291}
11292
11293// NotDone returns true if the page enumeration should be started or is not yet complete.
11294func (page RouteTableListResultPage) NotDone() bool {
11295	return !page.rtlr.IsEmpty()
11296}
11297
11298// Response returns the raw server response from the last page request.
11299func (page RouteTableListResultPage) Response() RouteTableListResult {
11300	return page.rtlr
11301}
11302
11303// Values returns the slice of values for the current page or nil if there are no values.
11304func (page RouteTableListResultPage) Values() []RouteTable {
11305	if page.rtlr.IsEmpty() {
11306		return nil
11307	}
11308	return *page.rtlr.Value
11309}
11310
11311// Creates a new instance of the RouteTableListResultPage type.
11312func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
11313	return RouteTableListResultPage{
11314		fn:   getNextPage,
11315		rtlr: cur,
11316	}
11317}
11318
11319// RouteTablePropertiesFormat route Table resource
11320type RouteTablePropertiesFormat struct {
11321	// Routes - Collection of routes contained within a route table.
11322	Routes *[]Route `json:"routes,omitempty"`
11323	// Subnets - READ-ONLY; A collection of references to subnets.
11324	Subnets *[]Subnet `json:"subnets,omitempty"`
11325	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11326	ProvisioningState *string `json:"provisioningState,omitempty"`
11327}
11328
11329// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
11330func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
11331	objectMap := make(map[string]interface{})
11332	if rtpf.Routes != nil {
11333		objectMap["routes"] = rtpf.Routes
11334	}
11335	if rtpf.ProvisioningState != nil {
11336		objectMap["provisioningState"] = rtpf.ProvisioningState
11337	}
11338	return json.Marshal(objectMap)
11339}
11340
11341// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11342// long-running operation.
11343type RouteTablesCreateOrUpdateFuture struct {
11344	azure.FutureAPI
11345	// Result returns the result of the asynchronous operation.
11346	// If the operation has not completed it will return an error.
11347	Result func(RouteTablesClient) (RouteTable, error)
11348}
11349
11350// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11351func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11352	var azFuture azure.Future
11353	if err := json.Unmarshal(body, &azFuture); err != nil {
11354		return err
11355	}
11356	future.FutureAPI = &azFuture
11357	future.Result = future.result
11358	return nil
11359}
11360
11361// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
11362func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
11363	var done bool
11364	done, err = future.DoneWithContext(context.Background(), client)
11365	if err != nil {
11366		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11367		return
11368	}
11369	if !done {
11370		rt.Response.Response = future.Response()
11371		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
11372		return
11373	}
11374	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11375	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
11376		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
11377		if err != nil {
11378			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
11379		}
11380	}
11381	return
11382}
11383
11384// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11385// operation.
11386type RouteTablesDeleteFuture struct {
11387	azure.FutureAPI
11388	// Result returns the result of the asynchronous operation.
11389	// If the operation has not completed it will return an error.
11390	Result func(RouteTablesClient) (autorest.Response, error)
11391}
11392
11393// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11394func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
11395	var azFuture azure.Future
11396	if err := json.Unmarshal(body, &azFuture); err != nil {
11397		return err
11398	}
11399	future.FutureAPI = &azFuture
11400	future.Result = future.result
11401	return nil
11402}
11403
11404// result is the default implementation for RouteTablesDeleteFuture.Result.
11405func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
11406	var done bool
11407	done, err = future.DoneWithContext(context.Background(), client)
11408	if err != nil {
11409		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
11410		return
11411	}
11412	if !done {
11413		ar.Response = future.Response()
11414		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
11415		return
11416	}
11417	ar.Response = future.Response()
11418	return
11419}
11420
11421// SecurityGroup networkSecurityGroup resource.
11422type SecurityGroup struct {
11423	autorest.Response `json:"-"`
11424	// SecurityGroupPropertiesFormat - Properties of the network security group
11425	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
11426	// Etag - A unique read-only string that changes whenever the resource is updated.
11427	Etag *string `json:"etag,omitempty"`
11428	// ID - Resource ID.
11429	ID *string `json:"id,omitempty"`
11430	// Name - READ-ONLY; Resource name.
11431	Name *string `json:"name,omitempty"`
11432	// Type - READ-ONLY; Resource type.
11433	Type *string `json:"type,omitempty"`
11434	// Location - Resource location.
11435	Location *string `json:"location,omitempty"`
11436	// Tags - Resource tags.
11437	Tags map[string]*string `json:"tags"`
11438}
11439
11440// MarshalJSON is the custom marshaler for SecurityGroup.
11441func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
11442	objectMap := make(map[string]interface{})
11443	if sg.SecurityGroupPropertiesFormat != nil {
11444		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
11445	}
11446	if sg.Etag != nil {
11447		objectMap["etag"] = sg.Etag
11448	}
11449	if sg.ID != nil {
11450		objectMap["id"] = sg.ID
11451	}
11452	if sg.Location != nil {
11453		objectMap["location"] = sg.Location
11454	}
11455	if sg.Tags != nil {
11456		objectMap["tags"] = sg.Tags
11457	}
11458	return json.Marshal(objectMap)
11459}
11460
11461// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
11462func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
11463	var m map[string]*json.RawMessage
11464	err := json.Unmarshal(body, &m)
11465	if err != nil {
11466		return err
11467	}
11468	for k, v := range m {
11469		switch k {
11470		case "properties":
11471			if v != nil {
11472				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
11473				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
11474				if err != nil {
11475					return err
11476				}
11477				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
11478			}
11479		case "etag":
11480			if v != nil {
11481				var etag string
11482				err = json.Unmarshal(*v, &etag)
11483				if err != nil {
11484					return err
11485				}
11486				sg.Etag = &etag
11487			}
11488		case "id":
11489			if v != nil {
11490				var ID string
11491				err = json.Unmarshal(*v, &ID)
11492				if err != nil {
11493					return err
11494				}
11495				sg.ID = &ID
11496			}
11497		case "name":
11498			if v != nil {
11499				var name string
11500				err = json.Unmarshal(*v, &name)
11501				if err != nil {
11502					return err
11503				}
11504				sg.Name = &name
11505			}
11506		case "type":
11507			if v != nil {
11508				var typeVar string
11509				err = json.Unmarshal(*v, &typeVar)
11510				if err != nil {
11511					return err
11512				}
11513				sg.Type = &typeVar
11514			}
11515		case "location":
11516			if v != nil {
11517				var location string
11518				err = json.Unmarshal(*v, &location)
11519				if err != nil {
11520					return err
11521				}
11522				sg.Location = &location
11523			}
11524		case "tags":
11525			if v != nil {
11526				var tags map[string]*string
11527				err = json.Unmarshal(*v, &tags)
11528				if err != nil {
11529					return err
11530				}
11531				sg.Tags = tags
11532			}
11533		}
11534	}
11535
11536	return nil
11537}
11538
11539// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
11540type SecurityGroupListResult struct {
11541	autorest.Response `json:"-"`
11542	// Value - A list of NetworkSecurityGroup resources.
11543	Value *[]SecurityGroup `json:"value,omitempty"`
11544	// NextLink - The URL to get the next set of results.
11545	NextLink *string `json:"nextLink,omitempty"`
11546}
11547
11548// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
11549type SecurityGroupListResultIterator struct {
11550	i    int
11551	page SecurityGroupListResultPage
11552}
11553
11554// NextWithContext advances to the next value.  If there was an error making
11555// the request the iterator does not advance and the error is returned.
11556func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
11557	if tracing.IsEnabled() {
11558		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
11559		defer func() {
11560			sc := -1
11561			if iter.Response().Response.Response != nil {
11562				sc = iter.Response().Response.Response.StatusCode
11563			}
11564			tracing.EndSpan(ctx, sc, err)
11565		}()
11566	}
11567	iter.i++
11568	if iter.i < len(iter.page.Values()) {
11569		return nil
11570	}
11571	err = iter.page.NextWithContext(ctx)
11572	if err != nil {
11573		iter.i--
11574		return err
11575	}
11576	iter.i = 0
11577	return nil
11578}
11579
11580// Next advances to the next value.  If there was an error making
11581// the request the iterator does not advance and the error is returned.
11582// Deprecated: Use NextWithContext() instead.
11583func (iter *SecurityGroupListResultIterator) Next() error {
11584	return iter.NextWithContext(context.Background())
11585}
11586
11587// NotDone returns true if the enumeration should be started or is not yet complete.
11588func (iter SecurityGroupListResultIterator) NotDone() bool {
11589	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11590}
11591
11592// Response returns the raw server response from the last page request.
11593func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
11594	return iter.page.Response()
11595}
11596
11597// Value returns the current value or a zero-initialized value if the
11598// iterator has advanced beyond the end of the collection.
11599func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
11600	if !iter.page.NotDone() {
11601		return SecurityGroup{}
11602	}
11603	return iter.page.Values()[iter.i]
11604}
11605
11606// Creates a new instance of the SecurityGroupListResultIterator type.
11607func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
11608	return SecurityGroupListResultIterator{page: page}
11609}
11610
11611// IsEmpty returns true if the ListResult contains no values.
11612func (sglr SecurityGroupListResult) IsEmpty() bool {
11613	return sglr.Value == nil || len(*sglr.Value) == 0
11614}
11615
11616// hasNextLink returns true if the NextLink is not empty.
11617func (sglr SecurityGroupListResult) hasNextLink() bool {
11618	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
11619}
11620
11621// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
11622// It returns nil if no more results exist.
11623func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
11624	if !sglr.hasNextLink() {
11625		return nil, nil
11626	}
11627	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11628		autorest.AsJSON(),
11629		autorest.AsGet(),
11630		autorest.WithBaseURL(to.String(sglr.NextLink)))
11631}
11632
11633// SecurityGroupListResultPage contains a page of SecurityGroup values.
11634type SecurityGroupListResultPage struct {
11635	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
11636	sglr SecurityGroupListResult
11637}
11638
11639// NextWithContext advances to the next page of values.  If there was an error making
11640// the request the page does not advance and the error is returned.
11641func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
11642	if tracing.IsEnabled() {
11643		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
11644		defer func() {
11645			sc := -1
11646			if page.Response().Response.Response != nil {
11647				sc = page.Response().Response.Response.StatusCode
11648			}
11649			tracing.EndSpan(ctx, sc, err)
11650		}()
11651	}
11652	for {
11653		next, err := page.fn(ctx, page.sglr)
11654		if err != nil {
11655			return err
11656		}
11657		page.sglr = next
11658		if !next.hasNextLink() || !next.IsEmpty() {
11659			break
11660		}
11661	}
11662	return nil
11663}
11664
11665// Next advances to the next page of values.  If there was an error making
11666// the request the page does not advance and the error is returned.
11667// Deprecated: Use NextWithContext() instead.
11668func (page *SecurityGroupListResultPage) Next() error {
11669	return page.NextWithContext(context.Background())
11670}
11671
11672// NotDone returns true if the page enumeration should be started or is not yet complete.
11673func (page SecurityGroupListResultPage) NotDone() bool {
11674	return !page.sglr.IsEmpty()
11675}
11676
11677// Response returns the raw server response from the last page request.
11678func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
11679	return page.sglr
11680}
11681
11682// Values returns the slice of values for the current page or nil if there are no values.
11683func (page SecurityGroupListResultPage) Values() []SecurityGroup {
11684	if page.sglr.IsEmpty() {
11685		return nil
11686	}
11687	return *page.sglr.Value
11688}
11689
11690// Creates a new instance of the SecurityGroupListResultPage type.
11691func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
11692	return SecurityGroupListResultPage{
11693		fn:   getNextPage,
11694		sglr: cur,
11695	}
11696}
11697
11698// SecurityGroupNetworkInterface network interface and all its associated security rules.
11699type SecurityGroupNetworkInterface struct {
11700	// ID - ID of the network interface.
11701	ID                       *string                   `json:"id,omitempty"`
11702	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
11703}
11704
11705// SecurityGroupPropertiesFormat network Security Group resource.
11706type SecurityGroupPropertiesFormat struct {
11707	// SecurityRules - A collection of security rules of the network security group.
11708	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
11709	// DefaultSecurityRules - The default security rules of network security group.
11710	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
11711	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
11712	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
11713	// Subnets - READ-ONLY; A collection of references to subnets.
11714	Subnets *[]Subnet `json:"subnets,omitempty"`
11715	// ResourceGUID - The resource GUID property of the network security group resource.
11716	ResourceGUID *string `json:"resourceGuid,omitempty"`
11717	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11718	ProvisioningState *string `json:"provisioningState,omitempty"`
11719}
11720
11721// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
11722func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
11723	objectMap := make(map[string]interface{})
11724	if sgpf.SecurityRules != nil {
11725		objectMap["securityRules"] = sgpf.SecurityRules
11726	}
11727	if sgpf.DefaultSecurityRules != nil {
11728		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
11729	}
11730	if sgpf.ResourceGUID != nil {
11731		objectMap["resourceGuid"] = sgpf.ResourceGUID
11732	}
11733	if sgpf.ProvisioningState != nil {
11734		objectMap["provisioningState"] = sgpf.ProvisioningState
11735	}
11736	return json.Marshal(objectMap)
11737}
11738
11739// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11740// long-running operation.
11741type SecurityGroupsCreateOrUpdateFuture struct {
11742	azure.FutureAPI
11743	// Result returns the result of the asynchronous operation.
11744	// If the operation has not completed it will return an error.
11745	Result func(SecurityGroupsClient) (SecurityGroup, error)
11746}
11747
11748// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11749func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11750	var azFuture azure.Future
11751	if err := json.Unmarshal(body, &azFuture); err != nil {
11752		return err
11753	}
11754	future.FutureAPI = &azFuture
11755	future.Result = future.result
11756	return nil
11757}
11758
11759// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
11760func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
11761	var done bool
11762	done, err = future.DoneWithContext(context.Background(), client)
11763	if err != nil {
11764		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11765		return
11766	}
11767	if !done {
11768		sg.Response.Response = future.Response()
11769		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
11770		return
11771	}
11772	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11773	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
11774		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
11775		if err != nil {
11776			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
11777		}
11778	}
11779	return
11780}
11781
11782// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11783// operation.
11784type SecurityGroupsDeleteFuture struct {
11785	azure.FutureAPI
11786	// Result returns the result of the asynchronous operation.
11787	// If the operation has not completed it will return an error.
11788	Result func(SecurityGroupsClient) (autorest.Response, error)
11789}
11790
11791// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11792func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
11793	var azFuture azure.Future
11794	if err := json.Unmarshal(body, &azFuture); err != nil {
11795		return err
11796	}
11797	future.FutureAPI = &azFuture
11798	future.Result = future.result
11799	return nil
11800}
11801
11802// result is the default implementation for SecurityGroupsDeleteFuture.Result.
11803func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
11804	var done bool
11805	done, err = future.DoneWithContext(context.Background(), client)
11806	if err != nil {
11807		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
11808		return
11809	}
11810	if !done {
11811		ar.Response = future.Response()
11812		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
11813		return
11814	}
11815	ar.Response = future.Response()
11816	return
11817}
11818
11819// SecurityGroupViewParameters parameters that define the VM to check security groups for.
11820type SecurityGroupViewParameters struct {
11821	// TargetResourceID - ID of the target VM.
11822	TargetResourceID *string `json:"targetResourceId,omitempty"`
11823}
11824
11825// SecurityGroupViewResult the information about security rules applied to the specified VM.
11826type SecurityGroupViewResult struct {
11827	autorest.Response `json:"-"`
11828	// NetworkInterfaces - List of network interfaces on the specified VM.
11829	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
11830}
11831
11832// SecurityRule network security rule.
11833type SecurityRule struct {
11834	autorest.Response `json:"-"`
11835	// SecurityRulePropertiesFormat - Properties of the security rule
11836	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
11837	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11838	Name *string `json:"name,omitempty"`
11839	// Etag - A unique read-only string that changes whenever the resource is updated.
11840	Etag *string `json:"etag,omitempty"`
11841	// ID - Resource ID.
11842	ID *string `json:"id,omitempty"`
11843}
11844
11845// MarshalJSON is the custom marshaler for SecurityRule.
11846func (sr SecurityRule) MarshalJSON() ([]byte, error) {
11847	objectMap := make(map[string]interface{})
11848	if sr.SecurityRulePropertiesFormat != nil {
11849		objectMap["properties"] = sr.SecurityRulePropertiesFormat
11850	}
11851	if sr.Name != nil {
11852		objectMap["name"] = sr.Name
11853	}
11854	if sr.Etag != nil {
11855		objectMap["etag"] = sr.Etag
11856	}
11857	if sr.ID != nil {
11858		objectMap["id"] = sr.ID
11859	}
11860	return json.Marshal(objectMap)
11861}
11862
11863// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
11864func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
11865	var m map[string]*json.RawMessage
11866	err := json.Unmarshal(body, &m)
11867	if err != nil {
11868		return err
11869	}
11870	for k, v := range m {
11871		switch k {
11872		case "properties":
11873			if v != nil {
11874				var securityRulePropertiesFormat SecurityRulePropertiesFormat
11875				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
11876				if err != nil {
11877					return err
11878				}
11879				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
11880			}
11881		case "name":
11882			if v != nil {
11883				var name string
11884				err = json.Unmarshal(*v, &name)
11885				if err != nil {
11886					return err
11887				}
11888				sr.Name = &name
11889			}
11890		case "etag":
11891			if v != nil {
11892				var etag string
11893				err = json.Unmarshal(*v, &etag)
11894				if err != nil {
11895					return err
11896				}
11897				sr.Etag = &etag
11898			}
11899		case "id":
11900			if v != nil {
11901				var ID string
11902				err = json.Unmarshal(*v, &ID)
11903				if err != nil {
11904					return err
11905				}
11906				sr.ID = &ID
11907			}
11908		}
11909	}
11910
11911	return nil
11912}
11913
11914// SecurityRuleAssociations all security rules associated with the network interface.
11915type SecurityRuleAssociations struct {
11916	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
11917	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
11918	// DefaultSecurityRules - Collection of default security rules of the network security group.
11919	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
11920	// EffectiveSecurityRules - Collection of effective security rules.
11921	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
11922}
11923
11924// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
11925// belongs to a network security group.
11926type SecurityRuleListResult struct {
11927	autorest.Response `json:"-"`
11928	// Value - The security rules in a network security group.
11929	Value *[]SecurityRule `json:"value,omitempty"`
11930	// NextLink - The URL to get the next set of results.
11931	NextLink *string `json:"nextLink,omitempty"`
11932}
11933
11934// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
11935type SecurityRuleListResultIterator struct {
11936	i    int
11937	page SecurityRuleListResultPage
11938}
11939
11940// NextWithContext advances to the next value.  If there was an error making
11941// the request the iterator does not advance and the error is returned.
11942func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11943	if tracing.IsEnabled() {
11944		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
11945		defer func() {
11946			sc := -1
11947			if iter.Response().Response.Response != nil {
11948				sc = iter.Response().Response.Response.StatusCode
11949			}
11950			tracing.EndSpan(ctx, sc, err)
11951		}()
11952	}
11953	iter.i++
11954	if iter.i < len(iter.page.Values()) {
11955		return nil
11956	}
11957	err = iter.page.NextWithContext(ctx)
11958	if err != nil {
11959		iter.i--
11960		return err
11961	}
11962	iter.i = 0
11963	return nil
11964}
11965
11966// Next advances to the next value.  If there was an error making
11967// the request the iterator does not advance and the error is returned.
11968// Deprecated: Use NextWithContext() instead.
11969func (iter *SecurityRuleListResultIterator) Next() error {
11970	return iter.NextWithContext(context.Background())
11971}
11972
11973// NotDone returns true if the enumeration should be started or is not yet complete.
11974func (iter SecurityRuleListResultIterator) NotDone() bool {
11975	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11976}
11977
11978// Response returns the raw server response from the last page request.
11979func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
11980	return iter.page.Response()
11981}
11982
11983// Value returns the current value or a zero-initialized value if the
11984// iterator has advanced beyond the end of the collection.
11985func (iter SecurityRuleListResultIterator) Value() SecurityRule {
11986	if !iter.page.NotDone() {
11987		return SecurityRule{}
11988	}
11989	return iter.page.Values()[iter.i]
11990}
11991
11992// Creates a new instance of the SecurityRuleListResultIterator type.
11993func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
11994	return SecurityRuleListResultIterator{page: page}
11995}
11996
11997// IsEmpty returns true if the ListResult contains no values.
11998func (srlr SecurityRuleListResult) IsEmpty() bool {
11999	return srlr.Value == nil || len(*srlr.Value) == 0
12000}
12001
12002// hasNextLink returns true if the NextLink is not empty.
12003func (srlr SecurityRuleListResult) hasNextLink() bool {
12004	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
12005}
12006
12007// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
12008// It returns nil if no more results exist.
12009func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12010	if !srlr.hasNextLink() {
12011		return nil, nil
12012	}
12013	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12014		autorest.AsJSON(),
12015		autorest.AsGet(),
12016		autorest.WithBaseURL(to.String(srlr.NextLink)))
12017}
12018
12019// SecurityRuleListResultPage contains a page of SecurityRule values.
12020type SecurityRuleListResultPage struct {
12021	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
12022	srlr SecurityRuleListResult
12023}
12024
12025// NextWithContext advances to the next page of values.  If there was an error making
12026// the request the page does not advance and the error is returned.
12027func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12028	if tracing.IsEnabled() {
12029		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
12030		defer func() {
12031			sc := -1
12032			if page.Response().Response.Response != nil {
12033				sc = page.Response().Response.Response.StatusCode
12034			}
12035			tracing.EndSpan(ctx, sc, err)
12036		}()
12037	}
12038	for {
12039		next, err := page.fn(ctx, page.srlr)
12040		if err != nil {
12041			return err
12042		}
12043		page.srlr = next
12044		if !next.hasNextLink() || !next.IsEmpty() {
12045			break
12046		}
12047	}
12048	return nil
12049}
12050
12051// Next advances to the next page of values.  If there was an error making
12052// the request the page does not advance and the error is returned.
12053// Deprecated: Use NextWithContext() instead.
12054func (page *SecurityRuleListResultPage) Next() error {
12055	return page.NextWithContext(context.Background())
12056}
12057
12058// NotDone returns true if the page enumeration should be started or is not yet complete.
12059func (page SecurityRuleListResultPage) NotDone() bool {
12060	return !page.srlr.IsEmpty()
12061}
12062
12063// Response returns the raw server response from the last page request.
12064func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
12065	return page.srlr
12066}
12067
12068// Values returns the slice of values for the current page or nil if there are no values.
12069func (page SecurityRuleListResultPage) Values() []SecurityRule {
12070	if page.srlr.IsEmpty() {
12071		return nil
12072	}
12073	return *page.srlr.Value
12074}
12075
12076// Creates a new instance of the SecurityRuleListResultPage type.
12077func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
12078	return SecurityRuleListResultPage{
12079		fn:   getNextPage,
12080		srlr: cur,
12081	}
12082}
12083
12084// SecurityRulePropertiesFormat security rule resource.
12085type SecurityRulePropertiesFormat struct {
12086	// Description - A description for this rule. Restricted to 140 chars.
12087	Description *string `json:"description,omitempty"`
12088	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
12089	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
12090	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
12091	SourcePortRange *string `json:"sourcePortRange,omitempty"`
12092	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
12093	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
12094	// 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.
12095	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
12096	// SourceAddressPrefixes - The CIDR or source IP ranges.
12097	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
12098	// 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.
12099	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
12100	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
12101	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
12102	// SourcePortRanges - The source port ranges.
12103	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
12104	// DestinationPortRanges - The destination port ranges.
12105	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
12106	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
12107	Access SecurityRuleAccess `json:"access,omitempty"`
12108	// 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.
12109	Priority *int32 `json:"priority,omitempty"`
12110	// 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'
12111	Direction SecurityRuleDirection `json:"direction,omitempty"`
12112	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12113	ProvisioningState *string `json:"provisioningState,omitempty"`
12114}
12115
12116// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12117// long-running operation.
12118type SecurityRulesCreateOrUpdateFuture struct {
12119	azure.FutureAPI
12120	// Result returns the result of the asynchronous operation.
12121	// If the operation has not completed it will return an error.
12122	Result func(SecurityRulesClient) (SecurityRule, error)
12123}
12124
12125// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12126func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12127	var azFuture azure.Future
12128	if err := json.Unmarshal(body, &azFuture); err != nil {
12129		return err
12130	}
12131	future.FutureAPI = &azFuture
12132	future.Result = future.result
12133	return nil
12134}
12135
12136// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
12137func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
12138	var done bool
12139	done, err = future.DoneWithContext(context.Background(), client)
12140	if err != nil {
12141		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12142		return
12143	}
12144	if !done {
12145		sr.Response.Response = future.Response()
12146		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
12147		return
12148	}
12149	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12150	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
12151		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
12152		if err != nil {
12153			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
12154		}
12155	}
12156	return
12157}
12158
12159// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12160// operation.
12161type SecurityRulesDeleteFuture struct {
12162	azure.FutureAPI
12163	// Result returns the result of the asynchronous operation.
12164	// If the operation has not completed it will return an error.
12165	Result func(SecurityRulesClient) (autorest.Response, error)
12166}
12167
12168// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12169func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12170	var azFuture azure.Future
12171	if err := json.Unmarshal(body, &azFuture); err != nil {
12172		return err
12173	}
12174	future.FutureAPI = &azFuture
12175	future.Result = future.result
12176	return nil
12177}
12178
12179// result is the default implementation for SecurityRulesDeleteFuture.Result.
12180func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
12181	var done bool
12182	done, err = future.DoneWithContext(context.Background(), client)
12183	if err != nil {
12184		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12185		return
12186	}
12187	if !done {
12188		ar.Response = future.Response()
12189		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
12190		return
12191	}
12192	ar.Response = future.Response()
12193	return
12194}
12195
12196// ServiceEndpointPropertiesFormat the service endpoint properties.
12197type ServiceEndpointPropertiesFormat struct {
12198	// Service - The type of the endpoint service.
12199	Service *string `json:"service,omitempty"`
12200	// Locations - A list of locations.
12201	Locations *[]string `json:"locations,omitempty"`
12202	// ProvisioningState - The provisioning state of the resource.
12203	ProvisioningState *string `json:"provisioningState,omitempty"`
12204}
12205
12206// String ...
12207type String struct {
12208	autorest.Response `json:"-"`
12209	Value             *string `json:"value,omitempty"`
12210}
12211
12212// Subnet subnet in a virtual network resource.
12213type Subnet struct {
12214	autorest.Response `json:"-"`
12215	// SubnetPropertiesFormat - Properties of the subnet.
12216	*SubnetPropertiesFormat `json:"properties,omitempty"`
12217	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12218	Name *string `json:"name,omitempty"`
12219	// Etag - A unique read-only string that changes whenever the resource is updated.
12220	Etag *string `json:"etag,omitempty"`
12221	// ID - Resource ID.
12222	ID *string `json:"id,omitempty"`
12223}
12224
12225// MarshalJSON is the custom marshaler for Subnet.
12226func (s Subnet) MarshalJSON() ([]byte, error) {
12227	objectMap := make(map[string]interface{})
12228	if s.SubnetPropertiesFormat != nil {
12229		objectMap["properties"] = s.SubnetPropertiesFormat
12230	}
12231	if s.Name != nil {
12232		objectMap["name"] = s.Name
12233	}
12234	if s.Etag != nil {
12235		objectMap["etag"] = s.Etag
12236	}
12237	if s.ID != nil {
12238		objectMap["id"] = s.ID
12239	}
12240	return json.Marshal(objectMap)
12241}
12242
12243// UnmarshalJSON is the custom unmarshaler for Subnet struct.
12244func (s *Subnet) UnmarshalJSON(body []byte) error {
12245	var m map[string]*json.RawMessage
12246	err := json.Unmarshal(body, &m)
12247	if err != nil {
12248		return err
12249	}
12250	for k, v := range m {
12251		switch k {
12252		case "properties":
12253			if v != nil {
12254				var subnetPropertiesFormat SubnetPropertiesFormat
12255				err = json.Unmarshal(*v, &subnetPropertiesFormat)
12256				if err != nil {
12257					return err
12258				}
12259				s.SubnetPropertiesFormat = &subnetPropertiesFormat
12260			}
12261		case "name":
12262			if v != nil {
12263				var name string
12264				err = json.Unmarshal(*v, &name)
12265				if err != nil {
12266					return err
12267				}
12268				s.Name = &name
12269			}
12270		case "etag":
12271			if v != nil {
12272				var etag string
12273				err = json.Unmarshal(*v, &etag)
12274				if err != nil {
12275					return err
12276				}
12277				s.Etag = &etag
12278			}
12279		case "id":
12280			if v != nil {
12281				var ID string
12282				err = json.Unmarshal(*v, &ID)
12283				if err != nil {
12284					return err
12285				}
12286				s.ID = &ID
12287			}
12288		}
12289	}
12290
12291	return nil
12292}
12293
12294// SubnetAssociation network interface and its custom security rules.
12295type SubnetAssociation struct {
12296	// ID - READ-ONLY; Subnet ID.
12297	ID *string `json:"id,omitempty"`
12298	// SecurityRules - Collection of custom security rules.
12299	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
12300}
12301
12302// MarshalJSON is the custom marshaler for SubnetAssociation.
12303func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
12304	objectMap := make(map[string]interface{})
12305	if sa.SecurityRules != nil {
12306		objectMap["securityRules"] = sa.SecurityRules
12307	}
12308	return json.Marshal(objectMap)
12309}
12310
12311// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
12312// network
12313type SubnetListResult struct {
12314	autorest.Response `json:"-"`
12315	// Value - The subnets in a virtual network.
12316	Value *[]Subnet `json:"value,omitempty"`
12317	// NextLink - The URL to get the next set of results.
12318	NextLink *string `json:"nextLink,omitempty"`
12319}
12320
12321// SubnetListResultIterator provides access to a complete listing of Subnet values.
12322type SubnetListResultIterator struct {
12323	i    int
12324	page SubnetListResultPage
12325}
12326
12327// NextWithContext advances to the next value.  If there was an error making
12328// the request the iterator does not advance and the error is returned.
12329func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
12330	if tracing.IsEnabled() {
12331		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
12332		defer func() {
12333			sc := -1
12334			if iter.Response().Response.Response != nil {
12335				sc = iter.Response().Response.Response.StatusCode
12336			}
12337			tracing.EndSpan(ctx, sc, err)
12338		}()
12339	}
12340	iter.i++
12341	if iter.i < len(iter.page.Values()) {
12342		return nil
12343	}
12344	err = iter.page.NextWithContext(ctx)
12345	if err != nil {
12346		iter.i--
12347		return err
12348	}
12349	iter.i = 0
12350	return nil
12351}
12352
12353// Next advances to the next value.  If there was an error making
12354// the request the iterator does not advance and the error is returned.
12355// Deprecated: Use NextWithContext() instead.
12356func (iter *SubnetListResultIterator) Next() error {
12357	return iter.NextWithContext(context.Background())
12358}
12359
12360// NotDone returns true if the enumeration should be started or is not yet complete.
12361func (iter SubnetListResultIterator) NotDone() bool {
12362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12363}
12364
12365// Response returns the raw server response from the last page request.
12366func (iter SubnetListResultIterator) Response() SubnetListResult {
12367	return iter.page.Response()
12368}
12369
12370// Value returns the current value or a zero-initialized value if the
12371// iterator has advanced beyond the end of the collection.
12372func (iter SubnetListResultIterator) Value() Subnet {
12373	if !iter.page.NotDone() {
12374		return Subnet{}
12375	}
12376	return iter.page.Values()[iter.i]
12377}
12378
12379// Creates a new instance of the SubnetListResultIterator type.
12380func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
12381	return SubnetListResultIterator{page: page}
12382}
12383
12384// IsEmpty returns true if the ListResult contains no values.
12385func (slr SubnetListResult) IsEmpty() bool {
12386	return slr.Value == nil || len(*slr.Value) == 0
12387}
12388
12389// hasNextLink returns true if the NextLink is not empty.
12390func (slr SubnetListResult) hasNextLink() bool {
12391	return slr.NextLink != nil && len(*slr.NextLink) != 0
12392}
12393
12394// subnetListResultPreparer prepares a request to retrieve the next set of results.
12395// It returns nil if no more results exist.
12396func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
12397	if !slr.hasNextLink() {
12398		return nil, nil
12399	}
12400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12401		autorest.AsJSON(),
12402		autorest.AsGet(),
12403		autorest.WithBaseURL(to.String(slr.NextLink)))
12404}
12405
12406// SubnetListResultPage contains a page of Subnet values.
12407type SubnetListResultPage struct {
12408	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
12409	slr SubnetListResult
12410}
12411
12412// NextWithContext advances to the next page of values.  If there was an error making
12413// the request the page does not advance and the error is returned.
12414func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
12415	if tracing.IsEnabled() {
12416		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
12417		defer func() {
12418			sc := -1
12419			if page.Response().Response.Response != nil {
12420				sc = page.Response().Response.Response.StatusCode
12421			}
12422			tracing.EndSpan(ctx, sc, err)
12423		}()
12424	}
12425	for {
12426		next, err := page.fn(ctx, page.slr)
12427		if err != nil {
12428			return err
12429		}
12430		page.slr = next
12431		if !next.hasNextLink() || !next.IsEmpty() {
12432			break
12433		}
12434	}
12435	return nil
12436}
12437
12438// Next advances to the next page of values.  If there was an error making
12439// the request the page does not advance and the error is returned.
12440// Deprecated: Use NextWithContext() instead.
12441func (page *SubnetListResultPage) Next() error {
12442	return page.NextWithContext(context.Background())
12443}
12444
12445// NotDone returns true if the page enumeration should be started or is not yet complete.
12446func (page SubnetListResultPage) NotDone() bool {
12447	return !page.slr.IsEmpty()
12448}
12449
12450// Response returns the raw server response from the last page request.
12451func (page SubnetListResultPage) Response() SubnetListResult {
12452	return page.slr
12453}
12454
12455// Values returns the slice of values for the current page or nil if there are no values.
12456func (page SubnetListResultPage) Values() []Subnet {
12457	if page.slr.IsEmpty() {
12458		return nil
12459	}
12460	return *page.slr.Value
12461}
12462
12463// Creates a new instance of the SubnetListResultPage type.
12464func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
12465	return SubnetListResultPage{
12466		fn:  getNextPage,
12467		slr: cur,
12468	}
12469}
12470
12471// SubnetPropertiesFormat properties of the subnet.
12472type SubnetPropertiesFormat struct {
12473	// AddressPrefix - The address prefix for the subnet.
12474	AddressPrefix *string `json:"addressPrefix,omitempty"`
12475	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
12476	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
12477	// RouteTable - The reference of the RouteTable resource.
12478	RouteTable *RouteTable `json:"routeTable,omitempty"`
12479	// ServiceEndpoints - An array of service endpoints.
12480	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
12481	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
12482	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
12483	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
12484	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
12485	// ProvisioningState - The provisioning state of the resource.
12486	ProvisioningState *string `json:"provisioningState,omitempty"`
12487}
12488
12489// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
12490func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
12491	objectMap := make(map[string]interface{})
12492	if spf.AddressPrefix != nil {
12493		objectMap["addressPrefix"] = spf.AddressPrefix
12494	}
12495	if spf.NetworkSecurityGroup != nil {
12496		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
12497	}
12498	if spf.RouteTable != nil {
12499		objectMap["routeTable"] = spf.RouteTable
12500	}
12501	if spf.ServiceEndpoints != nil {
12502		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
12503	}
12504	if spf.ResourceNavigationLinks != nil {
12505		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
12506	}
12507	if spf.ProvisioningState != nil {
12508		objectMap["provisioningState"] = spf.ProvisioningState
12509	}
12510	return json.Marshal(objectMap)
12511}
12512
12513// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12514// operation.
12515type SubnetsCreateOrUpdateFuture struct {
12516	azure.FutureAPI
12517	// Result returns the result of the asynchronous operation.
12518	// If the operation has not completed it will return an error.
12519	Result func(SubnetsClient) (Subnet, error)
12520}
12521
12522// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12523func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12524	var azFuture azure.Future
12525	if err := json.Unmarshal(body, &azFuture); err != nil {
12526		return err
12527	}
12528	future.FutureAPI = &azFuture
12529	future.Result = future.result
12530	return nil
12531}
12532
12533// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
12534func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
12535	var done bool
12536	done, err = future.DoneWithContext(context.Background(), client)
12537	if err != nil {
12538		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12539		return
12540	}
12541	if !done {
12542		s.Response.Response = future.Response()
12543		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
12544		return
12545	}
12546	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12547	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
12548		s, err = client.CreateOrUpdateResponder(s.Response.Response)
12549		if err != nil {
12550			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
12551		}
12552	}
12553	return
12554}
12555
12556// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12557// operation.
12558type SubnetsDeleteFuture struct {
12559	azure.FutureAPI
12560	// Result returns the result of the asynchronous operation.
12561	// If the operation has not completed it will return an error.
12562	Result func(SubnetsClient) (autorest.Response, error)
12563}
12564
12565// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12566func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
12567	var azFuture azure.Future
12568	if err := json.Unmarshal(body, &azFuture); err != nil {
12569		return err
12570	}
12571	future.FutureAPI = &azFuture
12572	future.Result = future.result
12573	return nil
12574}
12575
12576// result is the default implementation for SubnetsDeleteFuture.Result.
12577func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
12578	var done bool
12579	done, err = future.DoneWithContext(context.Background(), client)
12580	if err != nil {
12581		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
12582		return
12583	}
12584	if !done {
12585		ar.Response = future.Response()
12586		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
12587		return
12588	}
12589	ar.Response = future.Response()
12590	return
12591}
12592
12593// SubResource reference to another subresource.
12594type SubResource struct {
12595	// ID - Resource ID.
12596	ID *string `json:"id,omitempty"`
12597}
12598
12599// Topology topology of the specified resource group.
12600type Topology struct {
12601	autorest.Response `json:"-"`
12602	// ID - READ-ONLY; GUID representing the operation id.
12603	ID *string `json:"id,omitempty"`
12604	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
12605	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
12606	// LastModified - READ-ONLY; The datetime when the topology was last modified.
12607	LastModified *date.Time          `json:"lastModified,omitempty"`
12608	Resources    *[]TopologyResource `json:"resources,omitempty"`
12609}
12610
12611// MarshalJSON is the custom marshaler for Topology.
12612func (t Topology) MarshalJSON() ([]byte, error) {
12613	objectMap := make(map[string]interface{})
12614	if t.Resources != nil {
12615		objectMap["resources"] = t.Resources
12616	}
12617	return json.Marshal(objectMap)
12618}
12619
12620// TopologyAssociation resources that have an association with the parent resource.
12621type TopologyAssociation struct {
12622	// Name - The name of the resource that is associated with the parent resource.
12623	Name *string `json:"name,omitempty"`
12624	// ResourceID - The ID of the resource that is associated with the parent resource.
12625	ResourceID *string `json:"resourceId,omitempty"`
12626	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
12627	AssociationType AssociationType `json:"associationType,omitempty"`
12628}
12629
12630// TopologyParameters parameters that define the representation of topology.
12631type TopologyParameters struct {
12632	// TargetResourceGroupName - The name of the target resource group to perform topology on.
12633	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
12634}
12635
12636// TopologyResource the network resource topology information for the given resource group.
12637type TopologyResource struct {
12638	// Name - Name of the resource.
12639	Name *string `json:"name,omitempty"`
12640	// ID - ID of the resource.
12641	ID *string `json:"id,omitempty"`
12642	// Location - Resource location.
12643	Location *string `json:"location,omitempty"`
12644	// Associations - Holds the associations the resource has with other resources in the resource group.
12645	Associations *[]TopologyAssociation `json:"associations,omitempty"`
12646}
12647
12648// TroubleshootingDetails information gained from troubleshooting of specified resource.
12649type TroubleshootingDetails struct {
12650	// ID - The id of the get troubleshoot operation.
12651	ID *string `json:"id,omitempty"`
12652	// ReasonType - Reason type of failure.
12653	ReasonType *string `json:"reasonType,omitempty"`
12654	// Summary - A summary of troubleshooting.
12655	Summary *string `json:"summary,omitempty"`
12656	// Detail - Details on troubleshooting results.
12657	Detail *string `json:"detail,omitempty"`
12658	// RecommendedActions - List of recommended actions.
12659	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
12660}
12661
12662// TroubleshootingParameters parameters that define the resource to troubleshoot.
12663type TroubleshootingParameters struct {
12664	// TargetResourceID - The target resource to troubleshoot.
12665	TargetResourceID           *string `json:"targetResourceId,omitempty"`
12666	*TroubleshootingProperties `json:"properties,omitempty"`
12667}
12668
12669// MarshalJSON is the custom marshaler for TroubleshootingParameters.
12670func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
12671	objectMap := make(map[string]interface{})
12672	if tp.TargetResourceID != nil {
12673		objectMap["targetResourceId"] = tp.TargetResourceID
12674	}
12675	if tp.TroubleshootingProperties != nil {
12676		objectMap["properties"] = tp.TroubleshootingProperties
12677	}
12678	return json.Marshal(objectMap)
12679}
12680
12681// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
12682func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
12683	var m map[string]*json.RawMessage
12684	err := json.Unmarshal(body, &m)
12685	if err != nil {
12686		return err
12687	}
12688	for k, v := range m {
12689		switch k {
12690		case "targetResourceId":
12691			if v != nil {
12692				var targetResourceID string
12693				err = json.Unmarshal(*v, &targetResourceID)
12694				if err != nil {
12695					return err
12696				}
12697				tp.TargetResourceID = &targetResourceID
12698			}
12699		case "properties":
12700			if v != nil {
12701				var troubleshootingProperties TroubleshootingProperties
12702				err = json.Unmarshal(*v, &troubleshootingProperties)
12703				if err != nil {
12704					return err
12705				}
12706				tp.TroubleshootingProperties = &troubleshootingProperties
12707			}
12708		}
12709	}
12710
12711	return nil
12712}
12713
12714// TroubleshootingProperties storage location provided for troubleshoot.
12715type TroubleshootingProperties struct {
12716	// StorageID - The ID for the storage account to save the troubleshoot result.
12717	StorageID *string `json:"storageId,omitempty"`
12718	// StoragePath - The path to the blob to save the troubleshoot result in.
12719	StoragePath *string `json:"storagePath,omitempty"`
12720}
12721
12722// TroubleshootingRecommendedActions recommended actions based on discovered issues.
12723type TroubleshootingRecommendedActions struct {
12724	// ActionID - ID of the recommended action.
12725	ActionID *string `json:"actionId,omitempty"`
12726	// ActionText - Description of recommended actions.
12727	ActionText *string `json:"actionText,omitempty"`
12728	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
12729	ActionURI *string `json:"actionUri,omitempty"`
12730	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
12731	ActionURIText *string `json:"actionUriText,omitempty"`
12732}
12733
12734// TroubleshootingResult troubleshooting information gained from specified resource.
12735type TroubleshootingResult struct {
12736	autorest.Response `json:"-"`
12737	// StartTime - The start time of the troubleshooting.
12738	StartTime *date.Time `json:"startTime,omitempty"`
12739	// EndTime - The end time of the troubleshooting.
12740	EndTime *date.Time `json:"endTime,omitempty"`
12741	// Code - The result code of the troubleshooting.
12742	Code *string `json:"code,omitempty"`
12743	// Results - Information from troubleshooting.
12744	Results *[]TroubleshootingDetails `json:"results,omitempty"`
12745}
12746
12747// TunnelConnectionHealth virtualNetworkGatewayConnection properties
12748type TunnelConnectionHealth struct {
12749	// Tunnel - READ-ONLY; Tunnel name.
12750	Tunnel *string `json:"tunnel,omitempty"`
12751	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
12752	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
12753	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
12754	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
12755	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
12756	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
12757	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
12758	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
12759}
12760
12761// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
12762func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
12763	objectMap := make(map[string]interface{})
12764	return json.Marshal(objectMap)
12765}
12766
12767// Usage describes network resource usage.
12768type Usage struct {
12769	// ID - READ-ONLY; Resource identifier.
12770	ID *string `json:"id,omitempty"`
12771	// Unit - An enum describing the unit of measurement.
12772	Unit *string `json:"unit,omitempty"`
12773	// CurrentValue - The current value of the usage.
12774	CurrentValue *int64 `json:"currentValue,omitempty"`
12775	// Limit - The limit of usage.
12776	Limit *int64 `json:"limit,omitempty"`
12777	// Name - The name of the type of usage.
12778	Name *UsageName `json:"name,omitempty"`
12779}
12780
12781// MarshalJSON is the custom marshaler for Usage.
12782func (u Usage) MarshalJSON() ([]byte, error) {
12783	objectMap := make(map[string]interface{})
12784	if u.Unit != nil {
12785		objectMap["unit"] = u.Unit
12786	}
12787	if u.CurrentValue != nil {
12788		objectMap["currentValue"] = u.CurrentValue
12789	}
12790	if u.Limit != nil {
12791		objectMap["limit"] = u.Limit
12792	}
12793	if u.Name != nil {
12794		objectMap["name"] = u.Name
12795	}
12796	return json.Marshal(objectMap)
12797}
12798
12799// UsageName the usage names.
12800type UsageName struct {
12801	// Value - A string describing the resource name.
12802	Value *string `json:"value,omitempty"`
12803	// LocalizedValue - A localized string describing the resource name.
12804	LocalizedValue *string `json:"localizedValue,omitempty"`
12805}
12806
12807// UsagesListResult the list usages operation response.
12808type UsagesListResult struct {
12809	autorest.Response `json:"-"`
12810	// Value - The list network resource usages.
12811	Value *[]Usage `json:"value,omitempty"`
12812	// NextLink - URL to get the next set of results.
12813	NextLink *string `json:"nextLink,omitempty"`
12814}
12815
12816// UsagesListResultIterator provides access to a complete listing of Usage values.
12817type UsagesListResultIterator struct {
12818	i    int
12819	page UsagesListResultPage
12820}
12821
12822// NextWithContext advances to the next value.  If there was an error making
12823// the request the iterator does not advance and the error is returned.
12824func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
12825	if tracing.IsEnabled() {
12826		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
12827		defer func() {
12828			sc := -1
12829			if iter.Response().Response.Response != nil {
12830				sc = iter.Response().Response.Response.StatusCode
12831			}
12832			tracing.EndSpan(ctx, sc, err)
12833		}()
12834	}
12835	iter.i++
12836	if iter.i < len(iter.page.Values()) {
12837		return nil
12838	}
12839	err = iter.page.NextWithContext(ctx)
12840	if err != nil {
12841		iter.i--
12842		return err
12843	}
12844	iter.i = 0
12845	return nil
12846}
12847
12848// Next advances to the next value.  If there was an error making
12849// the request the iterator does not advance and the error is returned.
12850// Deprecated: Use NextWithContext() instead.
12851func (iter *UsagesListResultIterator) Next() error {
12852	return iter.NextWithContext(context.Background())
12853}
12854
12855// NotDone returns true if the enumeration should be started or is not yet complete.
12856func (iter UsagesListResultIterator) NotDone() bool {
12857	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12858}
12859
12860// Response returns the raw server response from the last page request.
12861func (iter UsagesListResultIterator) Response() UsagesListResult {
12862	return iter.page.Response()
12863}
12864
12865// Value returns the current value or a zero-initialized value if the
12866// iterator has advanced beyond the end of the collection.
12867func (iter UsagesListResultIterator) Value() Usage {
12868	if !iter.page.NotDone() {
12869		return Usage{}
12870	}
12871	return iter.page.Values()[iter.i]
12872}
12873
12874// Creates a new instance of the UsagesListResultIterator type.
12875func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
12876	return UsagesListResultIterator{page: page}
12877}
12878
12879// IsEmpty returns true if the ListResult contains no values.
12880func (ulr UsagesListResult) IsEmpty() bool {
12881	return ulr.Value == nil || len(*ulr.Value) == 0
12882}
12883
12884// hasNextLink returns true if the NextLink is not empty.
12885func (ulr UsagesListResult) hasNextLink() bool {
12886	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
12887}
12888
12889// usagesListResultPreparer prepares a request to retrieve the next set of results.
12890// It returns nil if no more results exist.
12891func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
12892	if !ulr.hasNextLink() {
12893		return nil, nil
12894	}
12895	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12896		autorest.AsJSON(),
12897		autorest.AsGet(),
12898		autorest.WithBaseURL(to.String(ulr.NextLink)))
12899}
12900
12901// UsagesListResultPage contains a page of Usage values.
12902type UsagesListResultPage struct {
12903	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
12904	ulr UsagesListResult
12905}
12906
12907// NextWithContext advances to the next page of values.  If there was an error making
12908// the request the page does not advance and the error is returned.
12909func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
12910	if tracing.IsEnabled() {
12911		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
12912		defer func() {
12913			sc := -1
12914			if page.Response().Response.Response != nil {
12915				sc = page.Response().Response.Response.StatusCode
12916			}
12917			tracing.EndSpan(ctx, sc, err)
12918		}()
12919	}
12920	for {
12921		next, err := page.fn(ctx, page.ulr)
12922		if err != nil {
12923			return err
12924		}
12925		page.ulr = next
12926		if !next.hasNextLink() || !next.IsEmpty() {
12927			break
12928		}
12929	}
12930	return nil
12931}
12932
12933// Next advances to the next page of values.  If there was an error making
12934// the request the page does not advance and the error is returned.
12935// Deprecated: Use NextWithContext() instead.
12936func (page *UsagesListResultPage) Next() error {
12937	return page.NextWithContext(context.Background())
12938}
12939
12940// NotDone returns true if the page enumeration should be started or is not yet complete.
12941func (page UsagesListResultPage) NotDone() bool {
12942	return !page.ulr.IsEmpty()
12943}
12944
12945// Response returns the raw server response from the last page request.
12946func (page UsagesListResultPage) Response() UsagesListResult {
12947	return page.ulr
12948}
12949
12950// Values returns the slice of values for the current page or nil if there are no values.
12951func (page UsagesListResultPage) Values() []Usage {
12952	if page.ulr.IsEmpty() {
12953		return nil
12954	}
12955	return *page.ulr.Value
12956}
12957
12958// Creates a new instance of the UsagesListResultPage type.
12959func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
12960	return UsagesListResultPage{
12961		fn:  getNextPage,
12962		ulr: cur,
12963	}
12964}
12965
12966// VerificationIPFlowParameters parameters that define the IP flow to be verified.
12967type VerificationIPFlowParameters struct {
12968	// TargetResourceID - The ID of the target resource to perform next-hop on.
12969	TargetResourceID *string `json:"targetResourceId,omitempty"`
12970	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
12971	Direction Direction `json:"direction,omitempty"`
12972	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
12973	Protocol Protocol `json:"protocol,omitempty"`
12974	// 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.
12975	LocalPort *string `json:"localPort,omitempty"`
12976	// 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.
12977	RemotePort *string `json:"remotePort,omitempty"`
12978	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
12979	LocalIPAddress *string `json:"localIPAddress,omitempty"`
12980	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
12981	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
12982	// 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).
12983	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
12984}
12985
12986// VerificationIPFlowResult results of IP flow verification on the target resource.
12987type VerificationIPFlowResult struct {
12988	autorest.Response `json:"-"`
12989	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
12990	Access Access `json:"access,omitempty"`
12991	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
12992	RuleName *string `json:"ruleName,omitempty"`
12993}
12994
12995// VirtualNetwork virtual Network resource.
12996type VirtualNetwork struct {
12997	autorest.Response `json:"-"`
12998	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
12999	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
13000	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13001	Etag *string `json:"etag,omitempty"`
13002	// ID - Resource ID.
13003	ID *string `json:"id,omitempty"`
13004	// Name - READ-ONLY; Resource name.
13005	Name *string `json:"name,omitempty"`
13006	// Type - READ-ONLY; Resource type.
13007	Type *string `json:"type,omitempty"`
13008	// Location - Resource location.
13009	Location *string `json:"location,omitempty"`
13010	// Tags - Resource tags.
13011	Tags map[string]*string `json:"tags"`
13012}
13013
13014// MarshalJSON is the custom marshaler for VirtualNetwork.
13015func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
13016	objectMap := make(map[string]interface{})
13017	if vn.VirtualNetworkPropertiesFormat != nil {
13018		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
13019	}
13020	if vn.Etag != nil {
13021		objectMap["etag"] = vn.Etag
13022	}
13023	if vn.ID != nil {
13024		objectMap["id"] = vn.ID
13025	}
13026	if vn.Location != nil {
13027		objectMap["location"] = vn.Location
13028	}
13029	if vn.Tags != nil {
13030		objectMap["tags"] = vn.Tags
13031	}
13032	return json.Marshal(objectMap)
13033}
13034
13035// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
13036func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
13037	var m map[string]*json.RawMessage
13038	err := json.Unmarshal(body, &m)
13039	if err != nil {
13040		return err
13041	}
13042	for k, v := range m {
13043		switch k {
13044		case "properties":
13045			if v != nil {
13046				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
13047				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
13048				if err != nil {
13049					return err
13050				}
13051				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
13052			}
13053		case "etag":
13054			if v != nil {
13055				var etag string
13056				err = json.Unmarshal(*v, &etag)
13057				if err != nil {
13058					return err
13059				}
13060				vn.Etag = &etag
13061			}
13062		case "id":
13063			if v != nil {
13064				var ID string
13065				err = json.Unmarshal(*v, &ID)
13066				if err != nil {
13067					return err
13068				}
13069				vn.ID = &ID
13070			}
13071		case "name":
13072			if v != nil {
13073				var name string
13074				err = json.Unmarshal(*v, &name)
13075				if err != nil {
13076					return err
13077				}
13078				vn.Name = &name
13079			}
13080		case "type":
13081			if v != nil {
13082				var typeVar string
13083				err = json.Unmarshal(*v, &typeVar)
13084				if err != nil {
13085					return err
13086				}
13087				vn.Type = &typeVar
13088			}
13089		case "location":
13090			if v != nil {
13091				var location string
13092				err = json.Unmarshal(*v, &location)
13093				if err != nil {
13094					return err
13095				}
13096				vn.Location = &location
13097			}
13098		case "tags":
13099			if v != nil {
13100				var tags map[string]*string
13101				err = json.Unmarshal(*v, &tags)
13102				if err != nil {
13103					return err
13104				}
13105				vn.Tags = tags
13106			}
13107		}
13108	}
13109
13110	return nil
13111}
13112
13113// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
13114// resource.
13115type VirtualNetworkConnectionGatewayReference struct {
13116	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
13117	ID *string `json:"id,omitempty"`
13118}
13119
13120// VirtualNetworkGateway a common class for general resource information
13121type VirtualNetworkGateway struct {
13122	autorest.Response `json:"-"`
13123	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
13124	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
13125	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13126	Etag *string `json:"etag,omitempty"`
13127	// ID - Resource ID.
13128	ID *string `json:"id,omitempty"`
13129	// Name - READ-ONLY; Resource name.
13130	Name *string `json:"name,omitempty"`
13131	// Type - READ-ONLY; Resource type.
13132	Type *string `json:"type,omitempty"`
13133	// Location - Resource location.
13134	Location *string `json:"location,omitempty"`
13135	// Tags - Resource tags.
13136	Tags map[string]*string `json:"tags"`
13137}
13138
13139// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
13140func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
13141	objectMap := make(map[string]interface{})
13142	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
13143		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
13144	}
13145	if vng.Etag != nil {
13146		objectMap["etag"] = vng.Etag
13147	}
13148	if vng.ID != nil {
13149		objectMap["id"] = vng.ID
13150	}
13151	if vng.Location != nil {
13152		objectMap["location"] = vng.Location
13153	}
13154	if vng.Tags != nil {
13155		objectMap["tags"] = vng.Tags
13156	}
13157	return json.Marshal(objectMap)
13158}
13159
13160// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
13161func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
13162	var m map[string]*json.RawMessage
13163	err := json.Unmarshal(body, &m)
13164	if err != nil {
13165		return err
13166	}
13167	for k, v := range m {
13168		switch k {
13169		case "properties":
13170			if v != nil {
13171				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
13172				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
13173				if err != nil {
13174					return err
13175				}
13176				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
13177			}
13178		case "etag":
13179			if v != nil {
13180				var etag string
13181				err = json.Unmarshal(*v, &etag)
13182				if err != nil {
13183					return err
13184				}
13185				vng.Etag = &etag
13186			}
13187		case "id":
13188			if v != nil {
13189				var ID string
13190				err = json.Unmarshal(*v, &ID)
13191				if err != nil {
13192					return err
13193				}
13194				vng.ID = &ID
13195			}
13196		case "name":
13197			if v != nil {
13198				var name string
13199				err = json.Unmarshal(*v, &name)
13200				if err != nil {
13201					return err
13202				}
13203				vng.Name = &name
13204			}
13205		case "type":
13206			if v != nil {
13207				var typeVar string
13208				err = json.Unmarshal(*v, &typeVar)
13209				if err != nil {
13210					return err
13211				}
13212				vng.Type = &typeVar
13213			}
13214		case "location":
13215			if v != nil {
13216				var location string
13217				err = json.Unmarshal(*v, &location)
13218				if err != nil {
13219					return err
13220				}
13221				vng.Location = &location
13222			}
13223		case "tags":
13224			if v != nil {
13225				var tags map[string]*string
13226				err = json.Unmarshal(*v, &tags)
13227				if err != nil {
13228					return err
13229				}
13230				vng.Tags = tags
13231			}
13232		}
13233	}
13234
13235	return nil
13236}
13237
13238// VirtualNetworkGatewayConnection a common class for general resource information
13239type VirtualNetworkGatewayConnection struct {
13240	autorest.Response `json:"-"`
13241	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
13242	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
13243	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13244	Etag *string `json:"etag,omitempty"`
13245	// ID - Resource ID.
13246	ID *string `json:"id,omitempty"`
13247	// Name - READ-ONLY; Resource name.
13248	Name *string `json:"name,omitempty"`
13249	// Type - READ-ONLY; Resource type.
13250	Type *string `json:"type,omitempty"`
13251	// Location - Resource location.
13252	Location *string `json:"location,omitempty"`
13253	// Tags - Resource tags.
13254	Tags map[string]*string `json:"tags"`
13255}
13256
13257// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
13258func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
13259	objectMap := make(map[string]interface{})
13260	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
13261		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
13262	}
13263	if vngc.Etag != nil {
13264		objectMap["etag"] = vngc.Etag
13265	}
13266	if vngc.ID != nil {
13267		objectMap["id"] = vngc.ID
13268	}
13269	if vngc.Location != nil {
13270		objectMap["location"] = vngc.Location
13271	}
13272	if vngc.Tags != nil {
13273		objectMap["tags"] = vngc.Tags
13274	}
13275	return json.Marshal(objectMap)
13276}
13277
13278// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
13279func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
13280	var m map[string]*json.RawMessage
13281	err := json.Unmarshal(body, &m)
13282	if err != nil {
13283		return err
13284	}
13285	for k, v := range m {
13286		switch k {
13287		case "properties":
13288			if v != nil {
13289				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
13290				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
13291				if err != nil {
13292					return err
13293				}
13294				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
13295			}
13296		case "etag":
13297			if v != nil {
13298				var etag string
13299				err = json.Unmarshal(*v, &etag)
13300				if err != nil {
13301					return err
13302				}
13303				vngc.Etag = &etag
13304			}
13305		case "id":
13306			if v != nil {
13307				var ID string
13308				err = json.Unmarshal(*v, &ID)
13309				if err != nil {
13310					return err
13311				}
13312				vngc.ID = &ID
13313			}
13314		case "name":
13315			if v != nil {
13316				var name string
13317				err = json.Unmarshal(*v, &name)
13318				if err != nil {
13319					return err
13320				}
13321				vngc.Name = &name
13322			}
13323		case "type":
13324			if v != nil {
13325				var typeVar string
13326				err = json.Unmarshal(*v, &typeVar)
13327				if err != nil {
13328					return err
13329				}
13330				vngc.Type = &typeVar
13331			}
13332		case "location":
13333			if v != nil {
13334				var location string
13335				err = json.Unmarshal(*v, &location)
13336				if err != nil {
13337					return err
13338				}
13339				vngc.Location = &location
13340			}
13341		case "tags":
13342			if v != nil {
13343				var tags map[string]*string
13344				err = json.Unmarshal(*v, &tags)
13345				if err != nil {
13346					return err
13347				}
13348				vngc.Tags = tags
13349			}
13350		}
13351	}
13352
13353	return nil
13354}
13355
13356// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
13357type VirtualNetworkGatewayConnectionListEntity struct {
13358	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
13359	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
13360	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13361	Etag *string `json:"etag,omitempty"`
13362	// ID - Resource ID.
13363	ID *string `json:"id,omitempty"`
13364	// Name - READ-ONLY; Resource name.
13365	Name *string `json:"name,omitempty"`
13366	// Type - READ-ONLY; Resource type.
13367	Type *string `json:"type,omitempty"`
13368	// Location - Resource location.
13369	Location *string `json:"location,omitempty"`
13370	// Tags - Resource tags.
13371	Tags map[string]*string `json:"tags"`
13372}
13373
13374// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
13375func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
13376	objectMap := make(map[string]interface{})
13377	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
13378		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
13379	}
13380	if vngcle.Etag != nil {
13381		objectMap["etag"] = vngcle.Etag
13382	}
13383	if vngcle.ID != nil {
13384		objectMap["id"] = vngcle.ID
13385	}
13386	if vngcle.Location != nil {
13387		objectMap["location"] = vngcle.Location
13388	}
13389	if vngcle.Tags != nil {
13390		objectMap["tags"] = vngcle.Tags
13391	}
13392	return json.Marshal(objectMap)
13393}
13394
13395// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
13396func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
13397	var m map[string]*json.RawMessage
13398	err := json.Unmarshal(body, &m)
13399	if err != nil {
13400		return err
13401	}
13402	for k, v := range m {
13403		switch k {
13404		case "properties":
13405			if v != nil {
13406				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
13407				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
13408				if err != nil {
13409					return err
13410				}
13411				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
13412			}
13413		case "etag":
13414			if v != nil {
13415				var etag string
13416				err = json.Unmarshal(*v, &etag)
13417				if err != nil {
13418					return err
13419				}
13420				vngcle.Etag = &etag
13421			}
13422		case "id":
13423			if v != nil {
13424				var ID string
13425				err = json.Unmarshal(*v, &ID)
13426				if err != nil {
13427					return err
13428				}
13429				vngcle.ID = &ID
13430			}
13431		case "name":
13432			if v != nil {
13433				var name string
13434				err = json.Unmarshal(*v, &name)
13435				if err != nil {
13436					return err
13437				}
13438				vngcle.Name = &name
13439			}
13440		case "type":
13441			if v != nil {
13442				var typeVar string
13443				err = json.Unmarshal(*v, &typeVar)
13444				if err != nil {
13445					return err
13446				}
13447				vngcle.Type = &typeVar
13448			}
13449		case "location":
13450			if v != nil {
13451				var location string
13452				err = json.Unmarshal(*v, &location)
13453				if err != nil {
13454					return err
13455				}
13456				vngcle.Location = &location
13457			}
13458		case "tags":
13459			if v != nil {
13460				var tags map[string]*string
13461				err = json.Unmarshal(*v, &tags)
13462				if err != nil {
13463					return err
13464				}
13465				vngcle.Tags = tags
13466			}
13467		}
13468	}
13469
13470	return nil
13471}
13472
13473// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
13474type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
13475	// AuthorizationKey - The authorizationKey.
13476	AuthorizationKey *string `json:"authorizationKey,omitempty"`
13477	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
13478	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
13479	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
13480	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
13481	// LocalNetworkGateway2 - The reference to local network gateway resource.
13482	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
13483	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
13484	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
13485	// RoutingWeight - The routing weight.
13486	RoutingWeight *int32 `json:"routingWeight,omitempty"`
13487	// SharedKey - The IPSec shared key.
13488	SharedKey *string `json:"sharedKey,omitempty"`
13489	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
13490	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
13491	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
13492	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
13493	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
13494	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
13495	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
13496	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
13497	// Peer - The reference to peerings resource.
13498	Peer *SubResource `json:"peer,omitempty"`
13499	// EnableBgp - EnableBgp flag
13500	EnableBgp *bool `json:"enableBgp,omitempty"`
13501	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
13502	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
13503	// IpsecPolicies - The IPSec Policies to be considered by this connection.
13504	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
13505	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
13506	ResourceGUID *string `json:"resourceGuid,omitempty"`
13507	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13508	ProvisioningState *string `json:"provisioningState,omitempty"`
13509}
13510
13511// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
13512func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
13513	objectMap := make(map[string]interface{})
13514	if vngclepf.AuthorizationKey != nil {
13515		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
13516	}
13517	if vngclepf.VirtualNetworkGateway1 != nil {
13518		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
13519	}
13520	if vngclepf.VirtualNetworkGateway2 != nil {
13521		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
13522	}
13523	if vngclepf.LocalNetworkGateway2 != nil {
13524		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
13525	}
13526	if vngclepf.ConnectionType != "" {
13527		objectMap["connectionType"] = vngclepf.ConnectionType
13528	}
13529	if vngclepf.RoutingWeight != nil {
13530		objectMap["routingWeight"] = vngclepf.RoutingWeight
13531	}
13532	if vngclepf.SharedKey != nil {
13533		objectMap["sharedKey"] = vngclepf.SharedKey
13534	}
13535	if vngclepf.Peer != nil {
13536		objectMap["peer"] = vngclepf.Peer
13537	}
13538	if vngclepf.EnableBgp != nil {
13539		objectMap["enableBgp"] = vngclepf.EnableBgp
13540	}
13541	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
13542		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
13543	}
13544	if vngclepf.IpsecPolicies != nil {
13545		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
13546	}
13547	if vngclepf.ResourceGUID != nil {
13548		objectMap["resourceGuid"] = vngclepf.ResourceGUID
13549	}
13550	return json.Marshal(objectMap)
13551}
13552
13553// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
13554// service call
13555type VirtualNetworkGatewayConnectionListResult struct {
13556	autorest.Response `json:"-"`
13557	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
13558	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
13559	// NextLink - READ-ONLY; The URL to get the next set of results.
13560	NextLink *string `json:"nextLink,omitempty"`
13561}
13562
13563// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
13564func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
13565	objectMap := make(map[string]interface{})
13566	if vngclr.Value != nil {
13567		objectMap["value"] = vngclr.Value
13568	}
13569	return json.Marshal(objectMap)
13570}
13571
13572// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
13573// VirtualNetworkGatewayConnection values.
13574type VirtualNetworkGatewayConnectionListResultIterator struct {
13575	i    int
13576	page VirtualNetworkGatewayConnectionListResultPage
13577}
13578
13579// NextWithContext advances to the next value.  If there was an error making
13580// the request the iterator does not advance and the error is returned.
13581func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
13582	if tracing.IsEnabled() {
13583		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
13584		defer func() {
13585			sc := -1
13586			if iter.Response().Response.Response != nil {
13587				sc = iter.Response().Response.Response.StatusCode
13588			}
13589			tracing.EndSpan(ctx, sc, err)
13590		}()
13591	}
13592	iter.i++
13593	if iter.i < len(iter.page.Values()) {
13594		return nil
13595	}
13596	err = iter.page.NextWithContext(ctx)
13597	if err != nil {
13598		iter.i--
13599		return err
13600	}
13601	iter.i = 0
13602	return nil
13603}
13604
13605// Next advances to the next value.  If there was an error making
13606// the request the iterator does not advance and the error is returned.
13607// Deprecated: Use NextWithContext() instead.
13608func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
13609	return iter.NextWithContext(context.Background())
13610}
13611
13612// NotDone returns true if the enumeration should be started or is not yet complete.
13613func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
13614	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13615}
13616
13617// Response returns the raw server response from the last page request.
13618func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
13619	return iter.page.Response()
13620}
13621
13622// Value returns the current value or a zero-initialized value if the
13623// iterator has advanced beyond the end of the collection.
13624func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
13625	if !iter.page.NotDone() {
13626		return VirtualNetworkGatewayConnection{}
13627	}
13628	return iter.page.Values()[iter.i]
13629}
13630
13631// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
13632func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
13633	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
13634}
13635
13636// IsEmpty returns true if the ListResult contains no values.
13637func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
13638	return vngclr.Value == nil || len(*vngclr.Value) == 0
13639}
13640
13641// hasNextLink returns true if the NextLink is not empty.
13642func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
13643	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
13644}
13645
13646// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
13647// It returns nil if no more results exist.
13648func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
13649	if !vngclr.hasNextLink() {
13650		return nil, nil
13651	}
13652	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13653		autorest.AsJSON(),
13654		autorest.AsGet(),
13655		autorest.WithBaseURL(to.String(vngclr.NextLink)))
13656}
13657
13658// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
13659type VirtualNetworkGatewayConnectionListResultPage struct {
13660	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
13661	vngclr VirtualNetworkGatewayConnectionListResult
13662}
13663
13664// NextWithContext advances to the next page of values.  If there was an error making
13665// the request the page does not advance and the error is returned.
13666func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
13667	if tracing.IsEnabled() {
13668		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
13669		defer func() {
13670			sc := -1
13671			if page.Response().Response.Response != nil {
13672				sc = page.Response().Response.Response.StatusCode
13673			}
13674			tracing.EndSpan(ctx, sc, err)
13675		}()
13676	}
13677	for {
13678		next, err := page.fn(ctx, page.vngclr)
13679		if err != nil {
13680			return err
13681		}
13682		page.vngclr = next
13683		if !next.hasNextLink() || !next.IsEmpty() {
13684			break
13685		}
13686	}
13687	return nil
13688}
13689
13690// Next advances to the next page of values.  If there was an error making
13691// the request the page does not advance and the error is returned.
13692// Deprecated: Use NextWithContext() instead.
13693func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
13694	return page.NextWithContext(context.Background())
13695}
13696
13697// NotDone returns true if the page enumeration should be started or is not yet complete.
13698func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
13699	return !page.vngclr.IsEmpty()
13700}
13701
13702// Response returns the raw server response from the last page request.
13703func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
13704	return page.vngclr
13705}
13706
13707// Values returns the slice of values for the current page or nil if there are no values.
13708func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
13709	if page.vngclr.IsEmpty() {
13710		return nil
13711	}
13712	return *page.vngclr.Value
13713}
13714
13715// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
13716func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
13717	return VirtualNetworkGatewayConnectionListResultPage{
13718		fn:     getNextPage,
13719		vngclr: cur,
13720	}
13721}
13722
13723// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
13724type VirtualNetworkGatewayConnectionPropertiesFormat struct {
13725	// AuthorizationKey - The authorizationKey.
13726	AuthorizationKey *string `json:"authorizationKey,omitempty"`
13727	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
13728	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
13729	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
13730	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
13731	// LocalNetworkGateway2 - The reference to local network gateway resource.
13732	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
13733	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
13734	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
13735	// RoutingWeight - The routing weight.
13736	RoutingWeight *int32 `json:"routingWeight,omitempty"`
13737	// SharedKey - The IPSec shared key.
13738	SharedKey *string `json:"sharedKey,omitempty"`
13739	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
13740	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
13741	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
13742	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
13743	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
13744	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
13745	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
13746	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
13747	// Peer - The reference to peerings resource.
13748	Peer *SubResource `json:"peer,omitempty"`
13749	// EnableBgp - EnableBgp flag
13750	EnableBgp *bool `json:"enableBgp,omitempty"`
13751	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
13752	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
13753	// IpsecPolicies - The IPSec Policies to be considered by this connection.
13754	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
13755	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
13756	ResourceGUID *string `json:"resourceGuid,omitempty"`
13757	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13758	ProvisioningState *string `json:"provisioningState,omitempty"`
13759}
13760
13761// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
13762func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
13763	objectMap := make(map[string]interface{})
13764	if vngcpf.AuthorizationKey != nil {
13765		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
13766	}
13767	if vngcpf.VirtualNetworkGateway1 != nil {
13768		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
13769	}
13770	if vngcpf.VirtualNetworkGateway2 != nil {
13771		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
13772	}
13773	if vngcpf.LocalNetworkGateway2 != nil {
13774		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
13775	}
13776	if vngcpf.ConnectionType != "" {
13777		objectMap["connectionType"] = vngcpf.ConnectionType
13778	}
13779	if vngcpf.RoutingWeight != nil {
13780		objectMap["routingWeight"] = vngcpf.RoutingWeight
13781	}
13782	if vngcpf.SharedKey != nil {
13783		objectMap["sharedKey"] = vngcpf.SharedKey
13784	}
13785	if vngcpf.Peer != nil {
13786		objectMap["peer"] = vngcpf.Peer
13787	}
13788	if vngcpf.EnableBgp != nil {
13789		objectMap["enableBgp"] = vngcpf.EnableBgp
13790	}
13791	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
13792		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
13793	}
13794	if vngcpf.IpsecPolicies != nil {
13795		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
13796	}
13797	if vngcpf.ResourceGUID != nil {
13798		objectMap["resourceGuid"] = vngcpf.ResourceGUID
13799	}
13800	return json.Marshal(objectMap)
13801}
13802
13803// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
13804// results of a long-running operation.
13805type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
13806	azure.FutureAPI
13807	// Result returns the result of the asynchronous operation.
13808	// If the operation has not completed it will return an error.
13809	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
13810}
13811
13812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13813func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13814	var azFuture azure.Future
13815	if err := json.Unmarshal(body, &azFuture); err != nil {
13816		return err
13817	}
13818	future.FutureAPI = &azFuture
13819	future.Result = future.result
13820	return nil
13821}
13822
13823// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
13824func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
13825	var done bool
13826	done, err = future.DoneWithContext(context.Background(), client)
13827	if err != nil {
13828		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13829		return
13830	}
13831	if !done {
13832		vngc.Response.Response = future.Response()
13833		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
13834		return
13835	}
13836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13837	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
13838		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
13839		if err != nil {
13840			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
13841		}
13842	}
13843	return
13844}
13845
13846// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
13847// a long-running operation.
13848type VirtualNetworkGatewayConnectionsDeleteFuture struct {
13849	azure.FutureAPI
13850	// Result returns the result of the asynchronous operation.
13851	// If the operation has not completed it will return an error.
13852	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
13853}
13854
13855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13856func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
13857	var azFuture azure.Future
13858	if err := json.Unmarshal(body, &azFuture); err != nil {
13859		return err
13860	}
13861	future.FutureAPI = &azFuture
13862	future.Result = future.result
13863	return nil
13864}
13865
13866// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
13867func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
13868	var done bool
13869	done, err = future.DoneWithContext(context.Background(), client)
13870	if err != nil {
13871		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
13872		return
13873	}
13874	if !done {
13875		ar.Response = future.Response()
13876		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
13877		return
13878	}
13879	ar.Response = future.Response()
13880	return
13881}
13882
13883// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
13884// results of a long-running operation.
13885type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
13886	azure.FutureAPI
13887	// Result returns the result of the asynchronous operation.
13888	// If the operation has not completed it will return an error.
13889	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
13890}
13891
13892// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13893func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
13894	var azFuture azure.Future
13895	if err := json.Unmarshal(body, &azFuture); err != nil {
13896		return err
13897	}
13898	future.FutureAPI = &azFuture
13899	future.Result = future.result
13900	return nil
13901}
13902
13903// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
13904func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
13905	var done bool
13906	done, err = future.DoneWithContext(context.Background(), client)
13907	if err != nil {
13908		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
13909		return
13910	}
13911	if !done {
13912		crsk.Response.Response = future.Response()
13913		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
13914		return
13915	}
13916	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13917	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
13918		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
13919		if err != nil {
13920			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
13921		}
13922	}
13923	return
13924}
13925
13926// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
13927// results of a long-running operation.
13928type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
13929	azure.FutureAPI
13930	// Result returns the result of the asynchronous operation.
13931	// If the operation has not completed it will return an error.
13932	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
13933}
13934
13935// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13936func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
13937	var azFuture azure.Future
13938	if err := json.Unmarshal(body, &azFuture); err != nil {
13939		return err
13940	}
13941	future.FutureAPI = &azFuture
13942	future.Result = future.result
13943	return nil
13944}
13945
13946// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
13947func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
13948	var done bool
13949	done, err = future.DoneWithContext(context.Background(), client)
13950	if err != nil {
13951		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
13952		return
13953	}
13954	if !done {
13955		csk.Response.Response = future.Response()
13956		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
13957		return
13958	}
13959	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13960	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
13961		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
13962		if err != nil {
13963			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
13964		}
13965	}
13966	return
13967}
13968
13969// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
13970type VirtualNetworkGatewayIPConfiguration struct {
13971	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
13972	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13973	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13974	Name *string `json:"name,omitempty"`
13975	// Etag - A unique read-only string that changes whenever the resource is updated.
13976	Etag *string `json:"etag,omitempty"`
13977	// ID - Resource ID.
13978	ID *string `json:"id,omitempty"`
13979}
13980
13981// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
13982func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
13983	objectMap := make(map[string]interface{})
13984	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
13985		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
13986	}
13987	if vngic.Name != nil {
13988		objectMap["name"] = vngic.Name
13989	}
13990	if vngic.Etag != nil {
13991		objectMap["etag"] = vngic.Etag
13992	}
13993	if vngic.ID != nil {
13994		objectMap["id"] = vngic.ID
13995	}
13996	return json.Marshal(objectMap)
13997}
13998
13999// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
14000func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
14001	var m map[string]*json.RawMessage
14002	err := json.Unmarshal(body, &m)
14003	if err != nil {
14004		return err
14005	}
14006	for k, v := range m {
14007		switch k {
14008		case "properties":
14009			if v != nil {
14010				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
14011				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
14012				if err != nil {
14013					return err
14014				}
14015				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
14016			}
14017		case "name":
14018			if v != nil {
14019				var name string
14020				err = json.Unmarshal(*v, &name)
14021				if err != nil {
14022					return err
14023				}
14024				vngic.Name = &name
14025			}
14026		case "etag":
14027			if v != nil {
14028				var etag string
14029				err = json.Unmarshal(*v, &etag)
14030				if err != nil {
14031					return err
14032				}
14033				vngic.Etag = &etag
14034			}
14035		case "id":
14036			if v != nil {
14037				var ID string
14038				err = json.Unmarshal(*v, &ID)
14039				if err != nil {
14040					return err
14041				}
14042				vngic.ID = &ID
14043			}
14044		}
14045	}
14046
14047	return nil
14048}
14049
14050// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
14051type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
14052	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14053	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14054	// Subnet - The reference of the subnet resource.
14055	Subnet *SubResource `json:"subnet,omitempty"`
14056	// PublicIPAddress - The reference of the public IP resource.
14057	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
14058	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14059	ProvisioningState *string `json:"provisioningState,omitempty"`
14060}
14061
14062// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
14063func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14064	objectMap := make(map[string]interface{})
14065	if vngicpf.PrivateIPAllocationMethod != "" {
14066		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
14067	}
14068	if vngicpf.Subnet != nil {
14069		objectMap["subnet"] = vngicpf.Subnet
14070	}
14071	if vngicpf.PublicIPAddress != nil {
14072		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
14073	}
14074	return json.Marshal(objectMap)
14075}
14076
14077// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
14078// service call
14079type VirtualNetworkGatewayListConnectionsResult struct {
14080	autorest.Response `json:"-"`
14081	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
14082	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
14083	// NextLink - READ-ONLY; The URL to get the next set of results.
14084	NextLink *string `json:"nextLink,omitempty"`
14085}
14086
14087// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
14088func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
14089	objectMap := make(map[string]interface{})
14090	if vnglcr.Value != nil {
14091		objectMap["value"] = vnglcr.Value
14092	}
14093	return json.Marshal(objectMap)
14094}
14095
14096// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
14097// VirtualNetworkGatewayConnectionListEntity values.
14098type VirtualNetworkGatewayListConnectionsResultIterator struct {
14099	i    int
14100	page VirtualNetworkGatewayListConnectionsResultPage
14101}
14102
14103// NextWithContext advances to the next value.  If there was an error making
14104// the request the iterator does not advance and the error is returned.
14105func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14106	if tracing.IsEnabled() {
14107		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
14108		defer func() {
14109			sc := -1
14110			if iter.Response().Response.Response != nil {
14111				sc = iter.Response().Response.Response.StatusCode
14112			}
14113			tracing.EndSpan(ctx, sc, err)
14114		}()
14115	}
14116	iter.i++
14117	if iter.i < len(iter.page.Values()) {
14118		return nil
14119	}
14120	err = iter.page.NextWithContext(ctx)
14121	if err != nil {
14122		iter.i--
14123		return err
14124	}
14125	iter.i = 0
14126	return nil
14127}
14128
14129// Next advances to the next value.  If there was an error making
14130// the request the iterator does not advance and the error is returned.
14131// Deprecated: Use NextWithContext() instead.
14132func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
14133	return iter.NextWithContext(context.Background())
14134}
14135
14136// NotDone returns true if the enumeration should be started or is not yet complete.
14137func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
14138	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14139}
14140
14141// Response returns the raw server response from the last page request.
14142func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
14143	return iter.page.Response()
14144}
14145
14146// Value returns the current value or a zero-initialized value if the
14147// iterator has advanced beyond the end of the collection.
14148func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
14149	if !iter.page.NotDone() {
14150		return VirtualNetworkGatewayConnectionListEntity{}
14151	}
14152	return iter.page.Values()[iter.i]
14153}
14154
14155// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
14156func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
14157	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
14158}
14159
14160// IsEmpty returns true if the ListResult contains no values.
14161func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
14162	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
14163}
14164
14165// hasNextLink returns true if the NextLink is not empty.
14166func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
14167	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
14168}
14169
14170// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
14171// It returns nil if no more results exist.
14172func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14173	if !vnglcr.hasNextLink() {
14174		return nil, nil
14175	}
14176	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14177		autorest.AsJSON(),
14178		autorest.AsGet(),
14179		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
14180}
14181
14182// VirtualNetworkGatewayListConnectionsResultPage contains a page of
14183// VirtualNetworkGatewayConnectionListEntity values.
14184type VirtualNetworkGatewayListConnectionsResultPage struct {
14185	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
14186	vnglcr VirtualNetworkGatewayListConnectionsResult
14187}
14188
14189// NextWithContext advances to the next page of values.  If there was an error making
14190// the request the page does not advance and the error is returned.
14191func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14192	if tracing.IsEnabled() {
14193		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
14194		defer func() {
14195			sc := -1
14196			if page.Response().Response.Response != nil {
14197				sc = page.Response().Response.Response.StatusCode
14198			}
14199			tracing.EndSpan(ctx, sc, err)
14200		}()
14201	}
14202	for {
14203		next, err := page.fn(ctx, page.vnglcr)
14204		if err != nil {
14205			return err
14206		}
14207		page.vnglcr = next
14208		if !next.hasNextLink() || !next.IsEmpty() {
14209			break
14210		}
14211	}
14212	return nil
14213}
14214
14215// Next advances to the next page of values.  If there was an error making
14216// the request the page does not advance and the error is returned.
14217// Deprecated: Use NextWithContext() instead.
14218func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
14219	return page.NextWithContext(context.Background())
14220}
14221
14222// NotDone returns true if the page enumeration should be started or is not yet complete.
14223func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
14224	return !page.vnglcr.IsEmpty()
14225}
14226
14227// Response returns the raw server response from the last page request.
14228func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
14229	return page.vnglcr
14230}
14231
14232// Values returns the slice of values for the current page or nil if there are no values.
14233func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
14234	if page.vnglcr.IsEmpty() {
14235		return nil
14236	}
14237	return *page.vnglcr.Value
14238}
14239
14240// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
14241func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
14242	return VirtualNetworkGatewayListConnectionsResultPage{
14243		fn:     getNextPage,
14244		vnglcr: cur,
14245	}
14246}
14247
14248// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
14249type VirtualNetworkGatewayListResult struct {
14250	autorest.Response `json:"-"`
14251	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
14252	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
14253	// NextLink - READ-ONLY; The URL to get the next set of results.
14254	NextLink *string `json:"nextLink,omitempty"`
14255}
14256
14257// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
14258func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
14259	objectMap := make(map[string]interface{})
14260	if vnglr.Value != nil {
14261		objectMap["value"] = vnglr.Value
14262	}
14263	return json.Marshal(objectMap)
14264}
14265
14266// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
14267// values.
14268type VirtualNetworkGatewayListResultIterator struct {
14269	i    int
14270	page VirtualNetworkGatewayListResultPage
14271}
14272
14273// NextWithContext advances to the next value.  If there was an error making
14274// the request the iterator does not advance and the error is returned.
14275func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
14276	if tracing.IsEnabled() {
14277		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
14278		defer func() {
14279			sc := -1
14280			if iter.Response().Response.Response != nil {
14281				sc = iter.Response().Response.Response.StatusCode
14282			}
14283			tracing.EndSpan(ctx, sc, err)
14284		}()
14285	}
14286	iter.i++
14287	if iter.i < len(iter.page.Values()) {
14288		return nil
14289	}
14290	err = iter.page.NextWithContext(ctx)
14291	if err != nil {
14292		iter.i--
14293		return err
14294	}
14295	iter.i = 0
14296	return nil
14297}
14298
14299// Next advances to the next value.  If there was an error making
14300// the request the iterator does not advance and the error is returned.
14301// Deprecated: Use NextWithContext() instead.
14302func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
14303	return iter.NextWithContext(context.Background())
14304}
14305
14306// NotDone returns true if the enumeration should be started or is not yet complete.
14307func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
14308	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14309}
14310
14311// Response returns the raw server response from the last page request.
14312func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
14313	return iter.page.Response()
14314}
14315
14316// Value returns the current value or a zero-initialized value if the
14317// iterator has advanced beyond the end of the collection.
14318func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
14319	if !iter.page.NotDone() {
14320		return VirtualNetworkGateway{}
14321	}
14322	return iter.page.Values()[iter.i]
14323}
14324
14325// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
14326func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
14327	return VirtualNetworkGatewayListResultIterator{page: page}
14328}
14329
14330// IsEmpty returns true if the ListResult contains no values.
14331func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
14332	return vnglr.Value == nil || len(*vnglr.Value) == 0
14333}
14334
14335// hasNextLink returns true if the NextLink is not empty.
14336func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
14337	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
14338}
14339
14340// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
14341// It returns nil if no more results exist.
14342func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
14343	if !vnglr.hasNextLink() {
14344		return nil, nil
14345	}
14346	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14347		autorest.AsJSON(),
14348		autorest.AsGet(),
14349		autorest.WithBaseURL(to.String(vnglr.NextLink)))
14350}
14351
14352// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
14353type VirtualNetworkGatewayListResultPage struct {
14354	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
14355	vnglr VirtualNetworkGatewayListResult
14356}
14357
14358// NextWithContext advances to the next page of values.  If there was an error making
14359// the request the page does not advance and the error is returned.
14360func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
14361	if tracing.IsEnabled() {
14362		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
14363		defer func() {
14364			sc := -1
14365			if page.Response().Response.Response != nil {
14366				sc = page.Response().Response.Response.StatusCode
14367			}
14368			tracing.EndSpan(ctx, sc, err)
14369		}()
14370	}
14371	for {
14372		next, err := page.fn(ctx, page.vnglr)
14373		if err != nil {
14374			return err
14375		}
14376		page.vnglr = next
14377		if !next.hasNextLink() || !next.IsEmpty() {
14378			break
14379		}
14380	}
14381	return nil
14382}
14383
14384// Next advances to the next page of values.  If there was an error making
14385// the request the page does not advance and the error is returned.
14386// Deprecated: Use NextWithContext() instead.
14387func (page *VirtualNetworkGatewayListResultPage) Next() error {
14388	return page.NextWithContext(context.Background())
14389}
14390
14391// NotDone returns true if the page enumeration should be started or is not yet complete.
14392func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
14393	return !page.vnglr.IsEmpty()
14394}
14395
14396// Response returns the raw server response from the last page request.
14397func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
14398	return page.vnglr
14399}
14400
14401// Values returns the slice of values for the current page or nil if there are no values.
14402func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
14403	if page.vnglr.IsEmpty() {
14404		return nil
14405	}
14406	return *page.vnglr.Value
14407}
14408
14409// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
14410func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
14411	return VirtualNetworkGatewayListResultPage{
14412		fn:    getNextPage,
14413		vnglr: cur,
14414	}
14415}
14416
14417// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
14418type VirtualNetworkGatewayPropertiesFormat struct {
14419	// IPConfigurations - IP configurations for virtual network gateway.
14420	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
14421	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
14422	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
14423	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
14424	VpnType VpnType `json:"vpnType,omitempty"`
14425	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
14426	EnableBgp *bool `json:"enableBgp,omitempty"`
14427	// ActiveActive - ActiveActive flag
14428	ActiveActive *bool `json:"activeActive,omitempty"`
14429	// 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.
14430	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
14431	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
14432	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
14433	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
14434	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
14435	// BgpSettings - Virtual network gateway's BGP speaker settings.
14436	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
14437	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
14438	ResourceGUID *string `json:"resourceGuid,omitempty"`
14439	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14440	ProvisioningState *string `json:"provisioningState,omitempty"`
14441}
14442
14443// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
14444func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
14445	objectMap := make(map[string]interface{})
14446	if vngpf.IPConfigurations != nil {
14447		objectMap["ipConfigurations"] = vngpf.IPConfigurations
14448	}
14449	if vngpf.GatewayType != "" {
14450		objectMap["gatewayType"] = vngpf.GatewayType
14451	}
14452	if vngpf.VpnType != "" {
14453		objectMap["vpnType"] = vngpf.VpnType
14454	}
14455	if vngpf.EnableBgp != nil {
14456		objectMap["enableBgp"] = vngpf.EnableBgp
14457	}
14458	if vngpf.ActiveActive != nil {
14459		objectMap["activeActive"] = vngpf.ActiveActive
14460	}
14461	if vngpf.GatewayDefaultSite != nil {
14462		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
14463	}
14464	if vngpf.Sku != nil {
14465		objectMap["sku"] = vngpf.Sku
14466	}
14467	if vngpf.VpnClientConfiguration != nil {
14468		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
14469	}
14470	if vngpf.BgpSettings != nil {
14471		objectMap["bgpSettings"] = vngpf.BgpSettings
14472	}
14473	if vngpf.ResourceGUID != nil {
14474		objectMap["resourceGuid"] = vngpf.ResourceGUID
14475	}
14476	return json.Marshal(objectMap)
14477}
14478
14479// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14480// long-running operation.
14481type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
14482	azure.FutureAPI
14483	// Result returns the result of the asynchronous operation.
14484	// If the operation has not completed it will return an error.
14485	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
14486}
14487
14488// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14489func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14490	var azFuture azure.Future
14491	if err := json.Unmarshal(body, &azFuture); err != nil {
14492		return err
14493	}
14494	future.FutureAPI = &azFuture
14495	future.Result = future.result
14496	return nil
14497}
14498
14499// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
14500func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
14501	var done bool
14502	done, err = future.DoneWithContext(context.Background(), client)
14503	if err != nil {
14504		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14505		return
14506	}
14507	if !done {
14508		vng.Response.Response = future.Response()
14509		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
14510		return
14511	}
14512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14513	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
14514		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
14515		if err != nil {
14516			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
14517		}
14518	}
14519	return
14520}
14521
14522// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
14523// long-running operation.
14524type VirtualNetworkGatewaysDeleteFuture struct {
14525	azure.FutureAPI
14526	// Result returns the result of the asynchronous operation.
14527	// If the operation has not completed it will return an error.
14528	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
14529}
14530
14531// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14532func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
14533	var azFuture azure.Future
14534	if err := json.Unmarshal(body, &azFuture); err != nil {
14535		return err
14536	}
14537	future.FutureAPI = &azFuture
14538	future.Result = future.result
14539	return nil
14540}
14541
14542// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
14543func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
14544	var done bool
14545	done, err = future.DoneWithContext(context.Background(), client)
14546	if err != nil {
14547		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
14548		return
14549	}
14550	if !done {
14551		ar.Response = future.Response()
14552		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
14553		return
14554	}
14555	ar.Response = future.Response()
14556	return
14557}
14558
14559// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
14560// results of a long-running operation.
14561type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
14562	azure.FutureAPI
14563	// Result returns the result of the asynchronous operation.
14564	// If the operation has not completed it will return an error.
14565	Result func(VirtualNetworkGatewaysClient) (String, error)
14566}
14567
14568// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14569func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
14570	var azFuture azure.Future
14571	if err := json.Unmarshal(body, &azFuture); err != nil {
14572		return err
14573	}
14574	future.FutureAPI = &azFuture
14575	future.Result = future.result
14576	return nil
14577}
14578
14579// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
14580func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
14581	var done bool
14582	done, err = future.DoneWithContext(context.Background(), client)
14583	if err != nil {
14584		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
14585		return
14586	}
14587	if !done {
14588		s.Response.Response = future.Response()
14589		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
14590		return
14591	}
14592	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14593	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14594		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
14595		if err != nil {
14596			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
14597		}
14598	}
14599	return
14600}
14601
14602// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
14603// of a long-running operation.
14604type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
14605	azure.FutureAPI
14606	// Result returns the result of the asynchronous operation.
14607	// If the operation has not completed it will return an error.
14608	Result func(VirtualNetworkGatewaysClient) (String, error)
14609}
14610
14611// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14612func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
14613	var azFuture azure.Future
14614	if err := json.Unmarshal(body, &azFuture); err != nil {
14615		return err
14616	}
14617	future.FutureAPI = &azFuture
14618	future.Result = future.result
14619	return nil
14620}
14621
14622// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
14623func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
14624	var done bool
14625	done, err = future.DoneWithContext(context.Background(), client)
14626	if err != nil {
14627		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
14628		return
14629	}
14630	if !done {
14631		s.Response.Response = future.Response()
14632		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
14633		return
14634	}
14635	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14636	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14637		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
14638		if err != nil {
14639			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
14640		}
14641	}
14642	return
14643}
14644
14645// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
14646// of a long-running operation.
14647type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
14648	azure.FutureAPI
14649	// Result returns the result of the asynchronous operation.
14650	// If the operation has not completed it will return an error.
14651	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
14652}
14653
14654// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14655func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
14656	var azFuture azure.Future
14657	if err := json.Unmarshal(body, &azFuture); err != nil {
14658		return err
14659	}
14660	future.FutureAPI = &azFuture
14661	future.Result = future.result
14662	return nil
14663}
14664
14665// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
14666func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
14667	var done bool
14668	done, err = future.DoneWithContext(context.Background(), client)
14669	if err != nil {
14670		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
14671		return
14672	}
14673	if !done {
14674		grlr.Response.Response = future.Response()
14675		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
14676		return
14677	}
14678	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14679	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
14680		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
14681		if err != nil {
14682			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
14683		}
14684	}
14685	return
14686}
14687
14688// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
14689// a long-running operation.
14690type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
14691	azure.FutureAPI
14692	// Result returns the result of the asynchronous operation.
14693	// If the operation has not completed it will return an error.
14694	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
14695}
14696
14697// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14698func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
14699	var azFuture azure.Future
14700	if err := json.Unmarshal(body, &azFuture); err != nil {
14701		return err
14702	}
14703	future.FutureAPI = &azFuture
14704	future.Result = future.result
14705	return nil
14706}
14707
14708// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
14709func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
14710	var done bool
14711	done, err = future.DoneWithContext(context.Background(), client)
14712	if err != nil {
14713		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
14714		return
14715	}
14716	if !done {
14717		bpslr.Response.Response = future.Response()
14718		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
14719		return
14720	}
14721	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14722	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
14723		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
14724		if err != nil {
14725			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
14726		}
14727	}
14728	return
14729}
14730
14731// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
14732// a long-running operation.
14733type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
14734	azure.FutureAPI
14735	// Result returns the result of the asynchronous operation.
14736	// If the operation has not completed it will return an error.
14737	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
14738}
14739
14740// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14741func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
14742	var azFuture azure.Future
14743	if err := json.Unmarshal(body, &azFuture); err != nil {
14744		return err
14745	}
14746	future.FutureAPI = &azFuture
14747	future.Result = future.result
14748	return nil
14749}
14750
14751// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
14752func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
14753	var done bool
14754	done, err = future.DoneWithContext(context.Background(), client)
14755	if err != nil {
14756		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
14757		return
14758	}
14759	if !done {
14760		grlr.Response.Response = future.Response()
14761		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
14762		return
14763	}
14764	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14765	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
14766		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
14767		if err != nil {
14768			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
14769		}
14770	}
14771	return
14772}
14773
14774// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
14775// results of a long-running operation.
14776type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
14777	azure.FutureAPI
14778	// Result returns the result of the asynchronous operation.
14779	// If the operation has not completed it will return an error.
14780	Result func(VirtualNetworkGatewaysClient) (String, error)
14781}
14782
14783// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14784func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
14785	var azFuture azure.Future
14786	if err := json.Unmarshal(body, &azFuture); err != nil {
14787		return err
14788	}
14789	future.FutureAPI = &azFuture
14790	future.Result = future.result
14791	return nil
14792}
14793
14794// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
14795func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
14796	var done bool
14797	done, err = future.DoneWithContext(context.Background(), client)
14798	if err != nil {
14799		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
14800		return
14801	}
14802	if !done {
14803		s.Response.Response = future.Response()
14804		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
14805		return
14806	}
14807	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14808	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14809		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
14810		if err != nil {
14811			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
14812		}
14813	}
14814	return
14815}
14816
14817// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
14818type VirtualNetworkGatewaySku struct {
14819	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
14820	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
14821	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
14822	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
14823	// Capacity - The capacity.
14824	Capacity *int32 `json:"capacity,omitempty"`
14825}
14826
14827// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
14828// long-running operation.
14829type VirtualNetworkGatewaysResetFuture struct {
14830	azure.FutureAPI
14831	// Result returns the result of the asynchronous operation.
14832	// If the operation has not completed it will return an error.
14833	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
14834}
14835
14836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14837func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
14838	var azFuture azure.Future
14839	if err := json.Unmarshal(body, &azFuture); err != nil {
14840		return err
14841	}
14842	future.FutureAPI = &azFuture
14843	future.Result = future.result
14844	return nil
14845}
14846
14847// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
14848func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
14849	var done bool
14850	done, err = future.DoneWithContext(context.Background(), client)
14851	if err != nil {
14852		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
14853		return
14854	}
14855	if !done {
14856		vng.Response.Response = future.Response()
14857		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
14858		return
14859	}
14860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14861	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
14862		vng, err = client.ResetResponder(vng.Response.Response)
14863		if err != nil {
14864			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
14865		}
14866	}
14867	return
14868}
14869
14870// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
14871type VirtualNetworkListResult struct {
14872	autorest.Response `json:"-"`
14873	// Value - Gets a list of VirtualNetwork resources in a resource group.
14874	Value *[]VirtualNetwork `json:"value,omitempty"`
14875	// NextLink - The URL to get the next set of results.
14876	NextLink *string `json:"nextLink,omitempty"`
14877}
14878
14879// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
14880type VirtualNetworkListResultIterator struct {
14881	i    int
14882	page VirtualNetworkListResultPage
14883}
14884
14885// NextWithContext advances to the next value.  If there was an error making
14886// the request the iterator does not advance and the error is returned.
14887func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
14888	if tracing.IsEnabled() {
14889		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
14890		defer func() {
14891			sc := -1
14892			if iter.Response().Response.Response != nil {
14893				sc = iter.Response().Response.Response.StatusCode
14894			}
14895			tracing.EndSpan(ctx, sc, err)
14896		}()
14897	}
14898	iter.i++
14899	if iter.i < len(iter.page.Values()) {
14900		return nil
14901	}
14902	err = iter.page.NextWithContext(ctx)
14903	if err != nil {
14904		iter.i--
14905		return err
14906	}
14907	iter.i = 0
14908	return nil
14909}
14910
14911// Next advances to the next value.  If there was an error making
14912// the request the iterator does not advance and the error is returned.
14913// Deprecated: Use NextWithContext() instead.
14914func (iter *VirtualNetworkListResultIterator) Next() error {
14915	return iter.NextWithContext(context.Background())
14916}
14917
14918// NotDone returns true if the enumeration should be started or is not yet complete.
14919func (iter VirtualNetworkListResultIterator) NotDone() bool {
14920	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14921}
14922
14923// Response returns the raw server response from the last page request.
14924func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
14925	return iter.page.Response()
14926}
14927
14928// Value returns the current value or a zero-initialized value if the
14929// iterator has advanced beyond the end of the collection.
14930func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
14931	if !iter.page.NotDone() {
14932		return VirtualNetwork{}
14933	}
14934	return iter.page.Values()[iter.i]
14935}
14936
14937// Creates a new instance of the VirtualNetworkListResultIterator type.
14938func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
14939	return VirtualNetworkListResultIterator{page: page}
14940}
14941
14942// IsEmpty returns true if the ListResult contains no values.
14943func (vnlr VirtualNetworkListResult) IsEmpty() bool {
14944	return vnlr.Value == nil || len(*vnlr.Value) == 0
14945}
14946
14947// hasNextLink returns true if the NextLink is not empty.
14948func (vnlr VirtualNetworkListResult) hasNextLink() bool {
14949	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
14950}
14951
14952// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
14953// It returns nil if no more results exist.
14954func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
14955	if !vnlr.hasNextLink() {
14956		return nil, nil
14957	}
14958	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14959		autorest.AsJSON(),
14960		autorest.AsGet(),
14961		autorest.WithBaseURL(to.String(vnlr.NextLink)))
14962}
14963
14964// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
14965type VirtualNetworkListResultPage struct {
14966	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
14967	vnlr VirtualNetworkListResult
14968}
14969
14970// NextWithContext advances to the next page of values.  If there was an error making
14971// the request the page does not advance and the error is returned.
14972func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
14973	if tracing.IsEnabled() {
14974		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
14975		defer func() {
14976			sc := -1
14977			if page.Response().Response.Response != nil {
14978				sc = page.Response().Response.Response.StatusCode
14979			}
14980			tracing.EndSpan(ctx, sc, err)
14981		}()
14982	}
14983	for {
14984		next, err := page.fn(ctx, page.vnlr)
14985		if err != nil {
14986			return err
14987		}
14988		page.vnlr = next
14989		if !next.hasNextLink() || !next.IsEmpty() {
14990			break
14991		}
14992	}
14993	return nil
14994}
14995
14996// Next advances to the next page of values.  If there was an error making
14997// the request the page does not advance and the error is returned.
14998// Deprecated: Use NextWithContext() instead.
14999func (page *VirtualNetworkListResultPage) Next() error {
15000	return page.NextWithContext(context.Background())
15001}
15002
15003// NotDone returns true if the page enumeration should be started or is not yet complete.
15004func (page VirtualNetworkListResultPage) NotDone() bool {
15005	return !page.vnlr.IsEmpty()
15006}
15007
15008// Response returns the raw server response from the last page request.
15009func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
15010	return page.vnlr
15011}
15012
15013// Values returns the slice of values for the current page or nil if there are no values.
15014func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
15015	if page.vnlr.IsEmpty() {
15016		return nil
15017	}
15018	return *page.vnlr.Value
15019}
15020
15021// Creates a new instance of the VirtualNetworkListResultPage type.
15022func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
15023	return VirtualNetworkListResultPage{
15024		fn:   getNextPage,
15025		vnlr: cur,
15026	}
15027}
15028
15029// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
15030type VirtualNetworkListUsageResult struct {
15031	autorest.Response `json:"-"`
15032	// Value - READ-ONLY; VirtualNetwork usage stats.
15033	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
15034	// NextLink - The URL to get the next set of results.
15035	NextLink *string `json:"nextLink,omitempty"`
15036}
15037
15038// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
15039func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
15040	objectMap := make(map[string]interface{})
15041	if vnlur.NextLink != nil {
15042		objectMap["nextLink"] = vnlur.NextLink
15043	}
15044	return json.Marshal(objectMap)
15045}
15046
15047// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
15048// values.
15049type VirtualNetworkListUsageResultIterator struct {
15050	i    int
15051	page VirtualNetworkListUsageResultPage
15052}
15053
15054// NextWithContext advances to the next value.  If there was an error making
15055// the request the iterator does not advance and the error is returned.
15056func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
15057	if tracing.IsEnabled() {
15058		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
15059		defer func() {
15060			sc := -1
15061			if iter.Response().Response.Response != nil {
15062				sc = iter.Response().Response.Response.StatusCode
15063			}
15064			tracing.EndSpan(ctx, sc, err)
15065		}()
15066	}
15067	iter.i++
15068	if iter.i < len(iter.page.Values()) {
15069		return nil
15070	}
15071	err = iter.page.NextWithContext(ctx)
15072	if err != nil {
15073		iter.i--
15074		return err
15075	}
15076	iter.i = 0
15077	return nil
15078}
15079
15080// Next advances to the next value.  If there was an error making
15081// the request the iterator does not advance and the error is returned.
15082// Deprecated: Use NextWithContext() instead.
15083func (iter *VirtualNetworkListUsageResultIterator) Next() error {
15084	return iter.NextWithContext(context.Background())
15085}
15086
15087// NotDone returns true if the enumeration should be started or is not yet complete.
15088func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
15089	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15090}
15091
15092// Response returns the raw server response from the last page request.
15093func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
15094	return iter.page.Response()
15095}
15096
15097// Value returns the current value or a zero-initialized value if the
15098// iterator has advanced beyond the end of the collection.
15099func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
15100	if !iter.page.NotDone() {
15101		return VirtualNetworkUsage{}
15102	}
15103	return iter.page.Values()[iter.i]
15104}
15105
15106// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
15107func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
15108	return VirtualNetworkListUsageResultIterator{page: page}
15109}
15110
15111// IsEmpty returns true if the ListResult contains no values.
15112func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
15113	return vnlur.Value == nil || len(*vnlur.Value) == 0
15114}
15115
15116// hasNextLink returns true if the NextLink is not empty.
15117func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
15118	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
15119}
15120
15121// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
15122// It returns nil if no more results exist.
15123func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
15124	if !vnlur.hasNextLink() {
15125		return nil, nil
15126	}
15127	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15128		autorest.AsJSON(),
15129		autorest.AsGet(),
15130		autorest.WithBaseURL(to.String(vnlur.NextLink)))
15131}
15132
15133// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
15134type VirtualNetworkListUsageResultPage struct {
15135	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
15136	vnlur VirtualNetworkListUsageResult
15137}
15138
15139// NextWithContext advances to the next page of values.  If there was an error making
15140// the request the page does not advance and the error is returned.
15141func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
15142	if tracing.IsEnabled() {
15143		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
15144		defer func() {
15145			sc := -1
15146			if page.Response().Response.Response != nil {
15147				sc = page.Response().Response.Response.StatusCode
15148			}
15149			tracing.EndSpan(ctx, sc, err)
15150		}()
15151	}
15152	for {
15153		next, err := page.fn(ctx, page.vnlur)
15154		if err != nil {
15155			return err
15156		}
15157		page.vnlur = next
15158		if !next.hasNextLink() || !next.IsEmpty() {
15159			break
15160		}
15161	}
15162	return nil
15163}
15164
15165// Next advances to the next page of values.  If there was an error making
15166// the request the page does not advance and the error is returned.
15167// Deprecated: Use NextWithContext() instead.
15168func (page *VirtualNetworkListUsageResultPage) Next() error {
15169	return page.NextWithContext(context.Background())
15170}
15171
15172// NotDone returns true if the page enumeration should be started or is not yet complete.
15173func (page VirtualNetworkListUsageResultPage) NotDone() bool {
15174	return !page.vnlur.IsEmpty()
15175}
15176
15177// Response returns the raw server response from the last page request.
15178func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
15179	return page.vnlur
15180}
15181
15182// Values returns the slice of values for the current page or nil if there are no values.
15183func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
15184	if page.vnlur.IsEmpty() {
15185		return nil
15186	}
15187	return *page.vnlur.Value
15188}
15189
15190// Creates a new instance of the VirtualNetworkListUsageResultPage type.
15191func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
15192	return VirtualNetworkListUsageResultPage{
15193		fn:    getNextPage,
15194		vnlur: cur,
15195	}
15196}
15197
15198// VirtualNetworkPeering peerings in a virtual network resource.
15199type VirtualNetworkPeering struct {
15200	autorest.Response `json:"-"`
15201	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
15202	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
15203	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15204	Name *string `json:"name,omitempty"`
15205	// Etag - A unique read-only string that changes whenever the resource is updated.
15206	Etag *string `json:"etag,omitempty"`
15207	// ID - Resource ID.
15208	ID *string `json:"id,omitempty"`
15209}
15210
15211// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
15212func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
15213	objectMap := make(map[string]interface{})
15214	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
15215		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
15216	}
15217	if vnp.Name != nil {
15218		objectMap["name"] = vnp.Name
15219	}
15220	if vnp.Etag != nil {
15221		objectMap["etag"] = vnp.Etag
15222	}
15223	if vnp.ID != nil {
15224		objectMap["id"] = vnp.ID
15225	}
15226	return json.Marshal(objectMap)
15227}
15228
15229// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
15230func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
15231	var m map[string]*json.RawMessage
15232	err := json.Unmarshal(body, &m)
15233	if err != nil {
15234		return err
15235	}
15236	for k, v := range m {
15237		switch k {
15238		case "properties":
15239			if v != nil {
15240				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
15241				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
15242				if err != nil {
15243					return err
15244				}
15245				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
15246			}
15247		case "name":
15248			if v != nil {
15249				var name string
15250				err = json.Unmarshal(*v, &name)
15251				if err != nil {
15252					return err
15253				}
15254				vnp.Name = &name
15255			}
15256		case "etag":
15257			if v != nil {
15258				var etag string
15259				err = json.Unmarshal(*v, &etag)
15260				if err != nil {
15261					return err
15262				}
15263				vnp.Etag = &etag
15264			}
15265		case "id":
15266			if v != nil {
15267				var ID string
15268				err = json.Unmarshal(*v, &ID)
15269				if err != nil {
15270					return err
15271				}
15272				vnp.ID = &ID
15273			}
15274		}
15275	}
15276
15277	return nil
15278}
15279
15280// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
15281// belong to a virtual network.
15282type VirtualNetworkPeeringListResult struct {
15283	autorest.Response `json:"-"`
15284	// Value - The peerings in a virtual network.
15285	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
15286	// NextLink - The URL to get the next set of results.
15287	NextLink *string `json:"nextLink,omitempty"`
15288}
15289
15290// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
15291// values.
15292type VirtualNetworkPeeringListResultIterator struct {
15293	i    int
15294	page VirtualNetworkPeeringListResultPage
15295}
15296
15297// NextWithContext advances to the next value.  If there was an error making
15298// the request the iterator does not advance and the error is returned.
15299func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
15300	if tracing.IsEnabled() {
15301		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
15302		defer func() {
15303			sc := -1
15304			if iter.Response().Response.Response != nil {
15305				sc = iter.Response().Response.Response.StatusCode
15306			}
15307			tracing.EndSpan(ctx, sc, err)
15308		}()
15309	}
15310	iter.i++
15311	if iter.i < len(iter.page.Values()) {
15312		return nil
15313	}
15314	err = iter.page.NextWithContext(ctx)
15315	if err != nil {
15316		iter.i--
15317		return err
15318	}
15319	iter.i = 0
15320	return nil
15321}
15322
15323// Next advances to the next value.  If there was an error making
15324// the request the iterator does not advance and the error is returned.
15325// Deprecated: Use NextWithContext() instead.
15326func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
15327	return iter.NextWithContext(context.Background())
15328}
15329
15330// NotDone returns true if the enumeration should be started or is not yet complete.
15331func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
15332	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15333}
15334
15335// Response returns the raw server response from the last page request.
15336func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
15337	return iter.page.Response()
15338}
15339
15340// Value returns the current value or a zero-initialized value if the
15341// iterator has advanced beyond the end of the collection.
15342func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
15343	if !iter.page.NotDone() {
15344		return VirtualNetworkPeering{}
15345	}
15346	return iter.page.Values()[iter.i]
15347}
15348
15349// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
15350func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
15351	return VirtualNetworkPeeringListResultIterator{page: page}
15352}
15353
15354// IsEmpty returns true if the ListResult contains no values.
15355func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
15356	return vnplr.Value == nil || len(*vnplr.Value) == 0
15357}
15358
15359// hasNextLink returns true if the NextLink is not empty.
15360func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
15361	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
15362}
15363
15364// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
15365// It returns nil if no more results exist.
15366func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
15367	if !vnplr.hasNextLink() {
15368		return nil, nil
15369	}
15370	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15371		autorest.AsJSON(),
15372		autorest.AsGet(),
15373		autorest.WithBaseURL(to.String(vnplr.NextLink)))
15374}
15375
15376// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
15377type VirtualNetworkPeeringListResultPage struct {
15378	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
15379	vnplr VirtualNetworkPeeringListResult
15380}
15381
15382// NextWithContext advances to the next page of values.  If there was an error making
15383// the request the page does not advance and the error is returned.
15384func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
15385	if tracing.IsEnabled() {
15386		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
15387		defer func() {
15388			sc := -1
15389			if page.Response().Response.Response != nil {
15390				sc = page.Response().Response.Response.StatusCode
15391			}
15392			tracing.EndSpan(ctx, sc, err)
15393		}()
15394	}
15395	for {
15396		next, err := page.fn(ctx, page.vnplr)
15397		if err != nil {
15398			return err
15399		}
15400		page.vnplr = next
15401		if !next.hasNextLink() || !next.IsEmpty() {
15402			break
15403		}
15404	}
15405	return nil
15406}
15407
15408// Next advances to the next page of values.  If there was an error making
15409// the request the page does not advance and the error is returned.
15410// Deprecated: Use NextWithContext() instead.
15411func (page *VirtualNetworkPeeringListResultPage) Next() error {
15412	return page.NextWithContext(context.Background())
15413}
15414
15415// NotDone returns true if the page enumeration should be started or is not yet complete.
15416func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
15417	return !page.vnplr.IsEmpty()
15418}
15419
15420// Response returns the raw server response from the last page request.
15421func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
15422	return page.vnplr
15423}
15424
15425// Values returns the slice of values for the current page or nil if there are no values.
15426func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
15427	if page.vnplr.IsEmpty() {
15428		return nil
15429	}
15430	return *page.vnplr.Value
15431}
15432
15433// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
15434func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
15435	return VirtualNetworkPeeringListResultPage{
15436		fn:    getNextPage,
15437		vnplr: cur,
15438	}
15439}
15440
15441// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
15442type VirtualNetworkPeeringPropertiesFormat struct {
15443	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
15444	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
15445	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
15446	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
15447	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
15448	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
15449	// 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.
15450	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
15451	// RemoteVirtualNetwork - The reference of the remote virtual network.
15452	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
15453	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
15454	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
15455	// ProvisioningState - The provisioning state of the resource.
15456	ProvisioningState *string `json:"provisioningState,omitempty"`
15457}
15458
15459// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15460// long-running operation.
15461type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
15462	azure.FutureAPI
15463	// Result returns the result of the asynchronous operation.
15464	// If the operation has not completed it will return an error.
15465	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
15466}
15467
15468// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15469func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15470	var azFuture azure.Future
15471	if err := json.Unmarshal(body, &azFuture); err != nil {
15472		return err
15473	}
15474	future.FutureAPI = &azFuture
15475	future.Result = future.result
15476	return nil
15477}
15478
15479// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
15480func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
15481	var done bool
15482	done, err = future.DoneWithContext(context.Background(), client)
15483	if err != nil {
15484		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15485		return
15486	}
15487	if !done {
15488		vnp.Response.Response = future.Response()
15489		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
15490		return
15491	}
15492	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15493	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
15494		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
15495		if err != nil {
15496			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
15497		}
15498	}
15499	return
15500}
15501
15502// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
15503// long-running operation.
15504type VirtualNetworkPeeringsDeleteFuture struct {
15505	azure.FutureAPI
15506	// Result returns the result of the asynchronous operation.
15507	// If the operation has not completed it will return an error.
15508	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
15509}
15510
15511// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15512func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
15513	var azFuture azure.Future
15514	if err := json.Unmarshal(body, &azFuture); err != nil {
15515		return err
15516	}
15517	future.FutureAPI = &azFuture
15518	future.Result = future.result
15519	return nil
15520}
15521
15522// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
15523func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
15524	var done bool
15525	done, err = future.DoneWithContext(context.Background(), client)
15526	if err != nil {
15527		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
15528		return
15529	}
15530	if !done {
15531		ar.Response = future.Response()
15532		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
15533		return
15534	}
15535	ar.Response = future.Response()
15536	return
15537}
15538
15539// VirtualNetworkPropertiesFormat properties of the virtual network.
15540type VirtualNetworkPropertiesFormat struct {
15541	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
15542	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
15543	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
15544	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
15545	// Subnets - A list of subnets in a Virtual Network.
15546	Subnets *[]Subnet `json:"subnets,omitempty"`
15547	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
15548	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
15549	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
15550	ResourceGUID *string `json:"resourceGuid,omitempty"`
15551	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15552	ProvisioningState *string `json:"provisioningState,omitempty"`
15553}
15554
15555// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15556// long-running operation.
15557type VirtualNetworksCreateOrUpdateFuture struct {
15558	azure.FutureAPI
15559	// Result returns the result of the asynchronous operation.
15560	// If the operation has not completed it will return an error.
15561	Result func(VirtualNetworksClient) (VirtualNetwork, error)
15562}
15563
15564// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15565func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15566	var azFuture azure.Future
15567	if err := json.Unmarshal(body, &azFuture); err != nil {
15568		return err
15569	}
15570	future.FutureAPI = &azFuture
15571	future.Result = future.result
15572	return nil
15573}
15574
15575// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
15576func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
15577	var done bool
15578	done, err = future.DoneWithContext(context.Background(), client)
15579	if err != nil {
15580		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15581		return
15582	}
15583	if !done {
15584		vn.Response.Response = future.Response()
15585		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
15586		return
15587	}
15588	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15589	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
15590		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
15591		if err != nil {
15592			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
15593		}
15594	}
15595	return
15596}
15597
15598// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15599// operation.
15600type VirtualNetworksDeleteFuture struct {
15601	azure.FutureAPI
15602	// Result returns the result of the asynchronous operation.
15603	// If the operation has not completed it will return an error.
15604	Result func(VirtualNetworksClient) (autorest.Response, error)
15605}
15606
15607// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15608func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
15609	var azFuture azure.Future
15610	if err := json.Unmarshal(body, &azFuture); err != nil {
15611		return err
15612	}
15613	future.FutureAPI = &azFuture
15614	future.Result = future.result
15615	return nil
15616}
15617
15618// result is the default implementation for VirtualNetworksDeleteFuture.Result.
15619func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
15620	var done bool
15621	done, err = future.DoneWithContext(context.Background(), client)
15622	if err != nil {
15623		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
15624		return
15625	}
15626	if !done {
15627		ar.Response = future.Response()
15628		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
15629		return
15630	}
15631	ar.Response = future.Response()
15632	return
15633}
15634
15635// VirtualNetworkUsage usage details for subnet.
15636type VirtualNetworkUsage struct {
15637	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
15638	CurrentValue *float64 `json:"currentValue,omitempty"`
15639	// ID - READ-ONLY; Subnet identifier.
15640	ID *string `json:"id,omitempty"`
15641	// Limit - READ-ONLY; Indicates the size of the subnet.
15642	Limit *float64 `json:"limit,omitempty"`
15643	// Name - READ-ONLY; The name containing common and localized value for usage.
15644	Name *VirtualNetworkUsageName `json:"name,omitempty"`
15645	// Unit - READ-ONLY; Usage units. Returns 'Count'
15646	Unit *string `json:"unit,omitempty"`
15647}
15648
15649// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
15650func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
15651	objectMap := make(map[string]interface{})
15652	return json.Marshal(objectMap)
15653}
15654
15655// VirtualNetworkUsageName usage strings container.
15656type VirtualNetworkUsageName struct {
15657	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
15658	LocalizedValue *string `json:"localizedValue,omitempty"`
15659	// Value - READ-ONLY; Subnet size and usage string.
15660	Value *string `json:"value,omitempty"`
15661}
15662
15663// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
15664func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
15665	objectMap := make(map[string]interface{})
15666	return json.Marshal(objectMap)
15667}
15668
15669// VpnClientConfiguration vpnClientConfiguration for P2S client.
15670type VpnClientConfiguration struct {
15671	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
15672	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
15673	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
15674	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
15675	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
15676	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
15677	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
15678	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
15679	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
15680	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
15681	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
15682	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
15683}
15684
15685// VpnClientParameters vpn Client Parameters for package generation
15686type VpnClientParameters struct {
15687	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
15688	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
15689	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
15690	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
15691	// 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.
15692	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
15693	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
15694	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
15695}
15696
15697// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
15698type VpnClientRevokedCertificate struct {
15699	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
15700	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
15701	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15702	Name *string `json:"name,omitempty"`
15703	// Etag - A unique read-only string that changes whenever the resource is updated.
15704	Etag *string `json:"etag,omitempty"`
15705	// ID - Resource ID.
15706	ID *string `json:"id,omitempty"`
15707}
15708
15709// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
15710func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
15711	objectMap := make(map[string]interface{})
15712	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
15713		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
15714	}
15715	if vcrc.Name != nil {
15716		objectMap["name"] = vcrc.Name
15717	}
15718	if vcrc.Etag != nil {
15719		objectMap["etag"] = vcrc.Etag
15720	}
15721	if vcrc.ID != nil {
15722		objectMap["id"] = vcrc.ID
15723	}
15724	return json.Marshal(objectMap)
15725}
15726
15727// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
15728func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
15729	var m map[string]*json.RawMessage
15730	err := json.Unmarshal(body, &m)
15731	if err != nil {
15732		return err
15733	}
15734	for k, v := range m {
15735		switch k {
15736		case "properties":
15737			if v != nil {
15738				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
15739				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
15740				if err != nil {
15741					return err
15742				}
15743				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
15744			}
15745		case "name":
15746			if v != nil {
15747				var name string
15748				err = json.Unmarshal(*v, &name)
15749				if err != nil {
15750					return err
15751				}
15752				vcrc.Name = &name
15753			}
15754		case "etag":
15755			if v != nil {
15756				var etag string
15757				err = json.Unmarshal(*v, &etag)
15758				if err != nil {
15759					return err
15760				}
15761				vcrc.Etag = &etag
15762			}
15763		case "id":
15764			if v != nil {
15765				var ID string
15766				err = json.Unmarshal(*v, &ID)
15767				if err != nil {
15768					return err
15769				}
15770				vcrc.ID = &ID
15771			}
15772		}
15773	}
15774
15775	return nil
15776}
15777
15778// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
15779// network gateway.
15780type VpnClientRevokedCertificatePropertiesFormat struct {
15781	// Thumbprint - The revoked VPN client certificate thumbprint.
15782	Thumbprint *string `json:"thumbprint,omitempty"`
15783	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15784	ProvisioningState *string `json:"provisioningState,omitempty"`
15785}
15786
15787// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
15788func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
15789	objectMap := make(map[string]interface{})
15790	if vcrcpf.Thumbprint != nil {
15791		objectMap["thumbprint"] = vcrcpf.Thumbprint
15792	}
15793	return json.Marshal(objectMap)
15794}
15795
15796// VpnClientRootCertificate VPN client root certificate of virtual network gateway
15797type VpnClientRootCertificate struct {
15798	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
15799	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
15800	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15801	Name *string `json:"name,omitempty"`
15802	// Etag - A unique read-only string that changes whenever the resource is updated.
15803	Etag *string `json:"etag,omitempty"`
15804	// ID - Resource ID.
15805	ID *string `json:"id,omitempty"`
15806}
15807
15808// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
15809func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
15810	objectMap := make(map[string]interface{})
15811	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
15812		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
15813	}
15814	if vcrc.Name != nil {
15815		objectMap["name"] = vcrc.Name
15816	}
15817	if vcrc.Etag != nil {
15818		objectMap["etag"] = vcrc.Etag
15819	}
15820	if vcrc.ID != nil {
15821		objectMap["id"] = vcrc.ID
15822	}
15823	return json.Marshal(objectMap)
15824}
15825
15826// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
15827func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
15828	var m map[string]*json.RawMessage
15829	err := json.Unmarshal(body, &m)
15830	if err != nil {
15831		return err
15832	}
15833	for k, v := range m {
15834		switch k {
15835		case "properties":
15836			if v != nil {
15837				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
15838				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
15839				if err != nil {
15840					return err
15841				}
15842				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
15843			}
15844		case "name":
15845			if v != nil {
15846				var name string
15847				err = json.Unmarshal(*v, &name)
15848				if err != nil {
15849					return err
15850				}
15851				vcrc.Name = &name
15852			}
15853		case "etag":
15854			if v != nil {
15855				var etag string
15856				err = json.Unmarshal(*v, &etag)
15857				if err != nil {
15858					return err
15859				}
15860				vcrc.Etag = &etag
15861			}
15862		case "id":
15863			if v != nil {
15864				var ID string
15865				err = json.Unmarshal(*v, &ID)
15866				if err != nil {
15867					return err
15868				}
15869				vcrc.ID = &ID
15870			}
15871		}
15872	}
15873
15874	return nil
15875}
15876
15877// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
15878type VpnClientRootCertificatePropertiesFormat struct {
15879	// PublicCertData - The certificate public data.
15880	PublicCertData *string `json:"publicCertData,omitempty"`
15881	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15882	ProvisioningState *string `json:"provisioningState,omitempty"`
15883}
15884
15885// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
15886func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
15887	objectMap := make(map[string]interface{})
15888	if vcrcpf.PublicCertData != nil {
15889		objectMap["publicCertData"] = vcrcpf.PublicCertData
15890	}
15891	return json.Marshal(objectMap)
15892}
15893
15894// Watcher network watcher in a resource group.
15895type Watcher struct {
15896	autorest.Response `json:"-"`
15897	// Etag - A unique read-only string that changes whenever the resource is updated.
15898	Etag                     *string `json:"etag,omitempty"`
15899	*WatcherPropertiesFormat `json:"properties,omitempty"`
15900	// ID - Resource ID.
15901	ID *string `json:"id,omitempty"`
15902	// Name - READ-ONLY; Resource name.
15903	Name *string `json:"name,omitempty"`
15904	// Type - READ-ONLY; Resource type.
15905	Type *string `json:"type,omitempty"`
15906	// Location - Resource location.
15907	Location *string `json:"location,omitempty"`
15908	// Tags - Resource tags.
15909	Tags map[string]*string `json:"tags"`
15910}
15911
15912// MarshalJSON is the custom marshaler for Watcher.
15913func (w Watcher) MarshalJSON() ([]byte, error) {
15914	objectMap := make(map[string]interface{})
15915	if w.Etag != nil {
15916		objectMap["etag"] = w.Etag
15917	}
15918	if w.WatcherPropertiesFormat != nil {
15919		objectMap["properties"] = w.WatcherPropertiesFormat
15920	}
15921	if w.ID != nil {
15922		objectMap["id"] = w.ID
15923	}
15924	if w.Location != nil {
15925		objectMap["location"] = w.Location
15926	}
15927	if w.Tags != nil {
15928		objectMap["tags"] = w.Tags
15929	}
15930	return json.Marshal(objectMap)
15931}
15932
15933// UnmarshalJSON is the custom unmarshaler for Watcher struct.
15934func (w *Watcher) UnmarshalJSON(body []byte) error {
15935	var m map[string]*json.RawMessage
15936	err := json.Unmarshal(body, &m)
15937	if err != nil {
15938		return err
15939	}
15940	for k, v := range m {
15941		switch k {
15942		case "etag":
15943			if v != nil {
15944				var etag string
15945				err = json.Unmarshal(*v, &etag)
15946				if err != nil {
15947					return err
15948				}
15949				w.Etag = &etag
15950			}
15951		case "properties":
15952			if v != nil {
15953				var watcherPropertiesFormat WatcherPropertiesFormat
15954				err = json.Unmarshal(*v, &watcherPropertiesFormat)
15955				if err != nil {
15956					return err
15957				}
15958				w.WatcherPropertiesFormat = &watcherPropertiesFormat
15959			}
15960		case "id":
15961			if v != nil {
15962				var ID string
15963				err = json.Unmarshal(*v, &ID)
15964				if err != nil {
15965					return err
15966				}
15967				w.ID = &ID
15968			}
15969		case "name":
15970			if v != nil {
15971				var name string
15972				err = json.Unmarshal(*v, &name)
15973				if err != nil {
15974					return err
15975				}
15976				w.Name = &name
15977			}
15978		case "type":
15979			if v != nil {
15980				var typeVar string
15981				err = json.Unmarshal(*v, &typeVar)
15982				if err != nil {
15983					return err
15984				}
15985				w.Type = &typeVar
15986			}
15987		case "location":
15988			if v != nil {
15989				var location string
15990				err = json.Unmarshal(*v, &location)
15991				if err != nil {
15992					return err
15993				}
15994				w.Location = &location
15995			}
15996		case "tags":
15997			if v != nil {
15998				var tags map[string]*string
15999				err = json.Unmarshal(*v, &tags)
16000				if err != nil {
16001					return err
16002				}
16003				w.Tags = tags
16004			}
16005		}
16006	}
16007
16008	return nil
16009}
16010
16011// WatcherListResult list of network watcher resources.
16012type WatcherListResult struct {
16013	autorest.Response `json:"-"`
16014	Value             *[]Watcher `json:"value,omitempty"`
16015}
16016
16017// WatcherPropertiesFormat the network watcher properties.
16018type WatcherPropertiesFormat struct {
16019	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
16020	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16021}
16022
16023// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
16024func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
16025	objectMap := make(map[string]interface{})
16026	return json.Marshal(objectMap)
16027}
16028
16029// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
16030// long-running operation.
16031type WatchersCheckConnectivityFuture struct {
16032	azure.FutureAPI
16033	// Result returns the result of the asynchronous operation.
16034	// If the operation has not completed it will return an error.
16035	Result func(WatchersClient) (ConnectivityInformation, error)
16036}
16037
16038// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16039func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
16040	var azFuture azure.Future
16041	if err := json.Unmarshal(body, &azFuture); err != nil {
16042		return err
16043	}
16044	future.FutureAPI = &azFuture
16045	future.Result = future.result
16046	return nil
16047}
16048
16049// result is the default implementation for WatchersCheckConnectivityFuture.Result.
16050func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
16051	var done bool
16052	done, err = future.DoneWithContext(context.Background(), client)
16053	if err != nil {
16054		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
16055		return
16056	}
16057	if !done {
16058		ci.Response.Response = future.Response()
16059		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
16060		return
16061	}
16062	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16063	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
16064		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
16065		if err != nil {
16066			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
16067		}
16068	}
16069	return
16070}
16071
16072// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16073// operation.
16074type WatchersDeleteFuture struct {
16075	azure.FutureAPI
16076	// Result returns the result of the asynchronous operation.
16077	// If the operation has not completed it will return an error.
16078	Result func(WatchersClient) (autorest.Response, error)
16079}
16080
16081// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16082func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
16083	var azFuture azure.Future
16084	if err := json.Unmarshal(body, &azFuture); err != nil {
16085		return err
16086	}
16087	future.FutureAPI = &azFuture
16088	future.Result = future.result
16089	return nil
16090}
16091
16092// result is the default implementation for WatchersDeleteFuture.Result.
16093func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
16094	var done bool
16095	done, err = future.DoneWithContext(context.Background(), client)
16096	if err != nil {
16097		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
16098		return
16099	}
16100	if !done {
16101		ar.Response = future.Response()
16102		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
16103		return
16104	}
16105	ar.Response = future.Response()
16106	return
16107}
16108
16109// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
16110// long-running operation.
16111type WatchersGetFlowLogStatusFuture struct {
16112	azure.FutureAPI
16113	// Result returns the result of the asynchronous operation.
16114	// If the operation has not completed it will return an error.
16115	Result func(WatchersClient) (FlowLogInformation, error)
16116}
16117
16118// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16119func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
16120	var azFuture azure.Future
16121	if err := json.Unmarshal(body, &azFuture); err != nil {
16122		return err
16123	}
16124	future.FutureAPI = &azFuture
16125	future.Result = future.result
16126	return nil
16127}
16128
16129// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
16130func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
16131	var done bool
16132	done, err = future.DoneWithContext(context.Background(), client)
16133	if err != nil {
16134		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
16135		return
16136	}
16137	if !done {
16138		fli.Response.Response = future.Response()
16139		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
16140		return
16141	}
16142	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16143	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
16144		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
16145		if err != nil {
16146			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
16147		}
16148	}
16149	return
16150}
16151
16152// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
16153// operation.
16154type WatchersGetNextHopFuture struct {
16155	azure.FutureAPI
16156	// Result returns the result of the asynchronous operation.
16157	// If the operation has not completed it will return an error.
16158	Result func(WatchersClient) (NextHopResult, error)
16159}
16160
16161// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16162func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
16163	var azFuture azure.Future
16164	if err := json.Unmarshal(body, &azFuture); err != nil {
16165		return err
16166	}
16167	future.FutureAPI = &azFuture
16168	future.Result = future.result
16169	return nil
16170}
16171
16172// result is the default implementation for WatchersGetNextHopFuture.Result.
16173func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
16174	var done bool
16175	done, err = future.DoneWithContext(context.Background(), client)
16176	if err != nil {
16177		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
16178		return
16179	}
16180	if !done {
16181		nhr.Response.Response = future.Response()
16182		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
16183		return
16184	}
16185	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16186	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
16187		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
16188		if err != nil {
16189			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
16190		}
16191	}
16192	return
16193}
16194
16195// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
16196// long-running operation.
16197type WatchersGetTroubleshootingFuture struct {
16198	azure.FutureAPI
16199	// Result returns the result of the asynchronous operation.
16200	// If the operation has not completed it will return an error.
16201	Result func(WatchersClient) (TroubleshootingResult, error)
16202}
16203
16204// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16205func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
16206	var azFuture azure.Future
16207	if err := json.Unmarshal(body, &azFuture); err != nil {
16208		return err
16209	}
16210	future.FutureAPI = &azFuture
16211	future.Result = future.result
16212	return nil
16213}
16214
16215// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
16216func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
16217	var done bool
16218	done, err = future.DoneWithContext(context.Background(), client)
16219	if err != nil {
16220		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
16221		return
16222	}
16223	if !done {
16224		tr.Response.Response = future.Response()
16225		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
16226		return
16227	}
16228	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16229	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
16230		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
16231		if err != nil {
16232			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
16233		}
16234	}
16235	return
16236}
16237
16238// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
16239// long-running operation.
16240type WatchersGetTroubleshootingResultFuture struct {
16241	azure.FutureAPI
16242	// Result returns the result of the asynchronous operation.
16243	// If the operation has not completed it will return an error.
16244	Result func(WatchersClient) (TroubleshootingResult, error)
16245}
16246
16247// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16248func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
16249	var azFuture azure.Future
16250	if err := json.Unmarshal(body, &azFuture); err != nil {
16251		return err
16252	}
16253	future.FutureAPI = &azFuture
16254	future.Result = future.result
16255	return nil
16256}
16257
16258// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
16259func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
16260	var done bool
16261	done, err = future.DoneWithContext(context.Background(), client)
16262	if err != nil {
16263		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
16264		return
16265	}
16266	if !done {
16267		tr.Response.Response = future.Response()
16268		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
16269		return
16270	}
16271	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16272	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
16273		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
16274		if err != nil {
16275			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
16276		}
16277	}
16278	return
16279}
16280
16281// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
16282// long-running operation.
16283type WatchersGetVMSecurityRulesFuture struct {
16284	azure.FutureAPI
16285	// Result returns the result of the asynchronous operation.
16286	// If the operation has not completed it will return an error.
16287	Result func(WatchersClient) (SecurityGroupViewResult, error)
16288}
16289
16290// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16291func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
16292	var azFuture azure.Future
16293	if err := json.Unmarshal(body, &azFuture); err != nil {
16294		return err
16295	}
16296	future.FutureAPI = &azFuture
16297	future.Result = future.result
16298	return nil
16299}
16300
16301// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
16302func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
16303	var done bool
16304	done, err = future.DoneWithContext(context.Background(), client)
16305	if err != nil {
16306		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
16307		return
16308	}
16309	if !done {
16310		sgvr.Response.Response = future.Response()
16311		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
16312		return
16313	}
16314	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16315	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
16316		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
16317		if err != nil {
16318			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
16319		}
16320	}
16321	return
16322}
16323
16324// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
16325// long-running operation.
16326type WatchersSetFlowLogConfigurationFuture struct {
16327	azure.FutureAPI
16328	// Result returns the result of the asynchronous operation.
16329	// If the operation has not completed it will return an error.
16330	Result func(WatchersClient) (FlowLogInformation, error)
16331}
16332
16333// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16334func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
16335	var azFuture azure.Future
16336	if err := json.Unmarshal(body, &azFuture); err != nil {
16337		return err
16338	}
16339	future.FutureAPI = &azFuture
16340	future.Result = future.result
16341	return nil
16342}
16343
16344// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
16345func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
16346	var done bool
16347	done, err = future.DoneWithContext(context.Background(), client)
16348	if err != nil {
16349		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
16350		return
16351	}
16352	if !done {
16353		fli.Response.Response = future.Response()
16354		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
16355		return
16356	}
16357	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16358	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
16359		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
16360		if err != nil {
16361			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
16362		}
16363	}
16364	return
16365}
16366
16367// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
16368// operation.
16369type WatchersVerifyIPFlowFuture struct {
16370	azure.FutureAPI
16371	// Result returns the result of the asynchronous operation.
16372	// If the operation has not completed it will return an error.
16373	Result func(WatchersClient) (VerificationIPFlowResult, error)
16374}
16375
16376// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16377func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
16378	var azFuture azure.Future
16379	if err := json.Unmarshal(body, &azFuture); err != nil {
16380		return err
16381	}
16382	future.FutureAPI = &azFuture
16383	future.Result = future.result
16384	return nil
16385}
16386
16387// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
16388func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
16389	var done bool
16390	done, err = future.DoneWithContext(context.Background(), client)
16391	if err != nil {
16392		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
16393		return
16394	}
16395	if !done {
16396		vifr.Response.Response = future.Response()
16397		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
16398		return
16399	}
16400	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16401	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
16402		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
16403		if err != nil {
16404			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
16405		}
16406	}
16407	return
16408}
16409