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-10-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response                   `json:"-"`
33	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
34	// Etag - A unique read-only string that changes whenever the resource is updated.
35	Etag *string `json:"etag,omitempty"`
36	// ID - Resource ID.
37	ID *string `json:"id,omitempty"`
38	// Name - READ-ONLY; Resource name.
39	Name *string `json:"name,omitempty"`
40	// Type - READ-ONLY; Resource type.
41	Type *string `json:"type,omitempty"`
42	// Location - Resource location.
43	Location *string `json:"location,omitempty"`
44	// Tags - Resource tags.
45	Tags map[string]*string `json:"tags"`
46}
47
48// MarshalJSON is the custom marshaler for ApplicationGateway.
49func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
50	objectMap := make(map[string]interface{})
51	if ag.ApplicationGatewayPropertiesFormat != nil {
52		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
53	}
54	if ag.Etag != nil {
55		objectMap["etag"] = ag.Etag
56	}
57	if ag.ID != nil {
58		objectMap["id"] = ag.ID
59	}
60	if ag.Location != nil {
61		objectMap["location"] = ag.Location
62	}
63	if ag.Tags != nil {
64		objectMap["tags"] = ag.Tags
65	}
66	return json.Marshal(objectMap)
67}
68
69// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
70func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
71	var m map[string]*json.RawMessage
72	err := json.Unmarshal(body, &m)
73	if err != nil {
74		return err
75	}
76	for k, v := range m {
77		switch k {
78		case "properties":
79			if v != nil {
80				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
81				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
82				if err != nil {
83					return err
84				}
85				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
86			}
87		case "etag":
88			if v != nil {
89				var etag string
90				err = json.Unmarshal(*v, &etag)
91				if err != nil {
92					return err
93				}
94				ag.Etag = &etag
95			}
96		case "id":
97			if v != nil {
98				var ID string
99				err = json.Unmarshal(*v, &ID)
100				if err != nil {
101					return err
102				}
103				ag.ID = &ID
104			}
105		case "name":
106			if v != nil {
107				var name string
108				err = json.Unmarshal(*v, &name)
109				if err != nil {
110					return err
111				}
112				ag.Name = &name
113			}
114		case "type":
115			if v != nil {
116				var typeVar string
117				err = json.Unmarshal(*v, &typeVar)
118				if err != nil {
119					return err
120				}
121				ag.Type = &typeVar
122			}
123		case "location":
124			if v != nil {
125				var location string
126				err = json.Unmarshal(*v, &location)
127				if err != nil {
128					return err
129				}
130				ag.Location = &location
131			}
132		case "tags":
133			if v != nil {
134				var tags map[string]*string
135				err = json.Unmarshal(*v, &tags)
136				if err != nil {
137					return err
138				}
139				ag.Tags = tags
140			}
141		}
142	}
143
144	return nil
145}
146
147// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
148type ApplicationGatewayAuthenticationCertificate struct {
149	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
150	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
151	Name *string `json:"name,omitempty"`
152	// Etag - A unique read-only string that changes whenever the resource is updated.
153	Etag *string `json:"etag,omitempty"`
154	// Type - Type of the resource.
155	Type *string `json:"type,omitempty"`
156	// ID - Resource ID.
157	ID *string `json:"id,omitempty"`
158}
159
160// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
161func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
162	objectMap := make(map[string]interface{})
163	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
164		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
165	}
166	if agac.Name != nil {
167		objectMap["name"] = agac.Name
168	}
169	if agac.Etag != nil {
170		objectMap["etag"] = agac.Etag
171	}
172	if agac.Type != nil {
173		objectMap["type"] = agac.Type
174	}
175	if agac.ID != nil {
176		objectMap["id"] = agac.ID
177	}
178	return json.Marshal(objectMap)
179}
180
181// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
182func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
183	var m map[string]*json.RawMessage
184	err := json.Unmarshal(body, &m)
185	if err != nil {
186		return err
187	}
188	for k, v := range m {
189		switch k {
190		case "properties":
191			if v != nil {
192				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
193				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
194				if err != nil {
195					return err
196				}
197				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
198			}
199		case "name":
200			if v != nil {
201				var name string
202				err = json.Unmarshal(*v, &name)
203				if err != nil {
204					return err
205				}
206				agac.Name = &name
207			}
208		case "etag":
209			if v != nil {
210				var etag string
211				err = json.Unmarshal(*v, &etag)
212				if err != nil {
213					return err
214				}
215				agac.Etag = &etag
216			}
217		case "type":
218			if v != nil {
219				var typeVar string
220				err = json.Unmarshal(*v, &typeVar)
221				if err != nil {
222					return err
223				}
224				agac.Type = &typeVar
225			}
226		case "id":
227			if v != nil {
228				var ID string
229				err = json.Unmarshal(*v, &ID)
230				if err != nil {
231					return err
232				}
233				agac.ID = &ID
234			}
235		}
236	}
237
238	return nil
239}
240
241// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
242// application gateway.
243type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
244	// Data - Certificate public data.
245	Data *string `json:"data,omitempty"`
246	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
247	ProvisioningState *string `json:"provisioningState,omitempty"`
248}
249
250// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
251// call.
252type ApplicationGatewayAvailableSslOptions struct {
253	autorest.Response                                      `json:"-"`
254	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
255	// ID - Resource ID.
256	ID *string `json:"id,omitempty"`
257	// Name - READ-ONLY; Resource name.
258	Name *string `json:"name,omitempty"`
259	// Type - READ-ONLY; Resource type.
260	Type *string `json:"type,omitempty"`
261	// Location - Resource location.
262	Location *string `json:"location,omitempty"`
263	// Tags - Resource tags.
264	Tags map[string]*string `json:"tags"`
265}
266
267// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
268func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
269	objectMap := make(map[string]interface{})
270	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
271		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
272	}
273	if agaso.ID != nil {
274		objectMap["id"] = agaso.ID
275	}
276	if agaso.Location != nil {
277		objectMap["location"] = agaso.Location
278	}
279	if agaso.Tags != nil {
280		objectMap["tags"] = agaso.Tags
281	}
282	return json.Marshal(objectMap)
283}
284
285// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
286func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
287	var m map[string]*json.RawMessage
288	err := json.Unmarshal(body, &m)
289	if err != nil {
290		return err
291	}
292	for k, v := range m {
293		switch k {
294		case "properties":
295			if v != nil {
296				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
297				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
298				if err != nil {
299					return err
300				}
301				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
302			}
303		case "id":
304			if v != nil {
305				var ID string
306				err = json.Unmarshal(*v, &ID)
307				if err != nil {
308					return err
309				}
310				agaso.ID = &ID
311			}
312		case "name":
313			if v != nil {
314				var name string
315				err = json.Unmarshal(*v, &name)
316				if err != nil {
317					return err
318				}
319				agaso.Name = &name
320			}
321		case "type":
322			if v != nil {
323				var typeVar string
324				err = json.Unmarshal(*v, &typeVar)
325				if err != nil {
326					return err
327				}
328				agaso.Type = &typeVar
329			}
330		case "location":
331			if v != nil {
332				var location string
333				err = json.Unmarshal(*v, &location)
334				if err != nil {
335					return err
336				}
337				agaso.Location = &location
338			}
339		case "tags":
340			if v != nil {
341				var tags map[string]*string
342				err = json.Unmarshal(*v, &tags)
343				if err != nil {
344					return err
345				}
346				agaso.Tags = tags
347			}
348		}
349	}
350
351	return nil
352}
353
354// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
355// ApplicationGatewayAvailableSslOptions
356type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
357	// PredefinedPolicies - List of available Ssl predefined policy.
358	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
359	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
360	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
361	// AvailableCipherSuites - List of available Ssl cipher suites.
362	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
363	// AvailableProtocols - List of available Ssl protocols.
364	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
365}
366
367// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
368// service call.
369type ApplicationGatewayAvailableSslPredefinedPolicies struct {
370	autorest.Response `json:"-"`
371	// Value - List of available Ssl predefined policy.
372	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
373	// NextLink - URL to get the next set of results.
374	NextLink *string `json:"nextLink,omitempty"`
375}
376
377// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
378// ApplicationGatewaySslPredefinedPolicy values.
379type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
380	i    int
381	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
382}
383
384// NextWithContext advances to the next value.  If there was an error making
385// the request the iterator does not advance and the error is returned.
386func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
387	if tracing.IsEnabled() {
388		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
389		defer func() {
390			sc := -1
391			if iter.Response().Response.Response != nil {
392				sc = iter.Response().Response.Response.StatusCode
393			}
394			tracing.EndSpan(ctx, sc, err)
395		}()
396	}
397	iter.i++
398	if iter.i < len(iter.page.Values()) {
399		return nil
400	}
401	err = iter.page.NextWithContext(ctx)
402	if err != nil {
403		iter.i--
404		return err
405	}
406	iter.i = 0
407	return nil
408}
409
410// Next advances to the next value.  If there was an error making
411// the request the iterator does not advance and the error is returned.
412// Deprecated: Use NextWithContext() instead.
413func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
414	return iter.NextWithContext(context.Background())
415}
416
417// NotDone returns true if the enumeration should be started or is not yet complete.
418func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
420}
421
422// Response returns the raw server response from the last page request.
423func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
424	return iter.page.Response()
425}
426
427// Value returns the current value or a zero-initialized value if the
428// iterator has advanced beyond the end of the collection.
429func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
430	if !iter.page.NotDone() {
431		return ApplicationGatewaySslPredefinedPolicy{}
432	}
433	return iter.page.Values()[iter.i]
434}
435
436// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
437func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
438	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
439}
440
441// IsEmpty returns true if the ListResult contains no values.
442func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
443	return agaspp.Value == nil || len(*agaspp.Value) == 0
444}
445
446// hasNextLink returns true if the NextLink is not empty.
447func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
448	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
449}
450
451// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
452// It returns nil if no more results exist.
453func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
454	if !agaspp.hasNextLink() {
455		return nil, nil
456	}
457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
458		autorest.AsJSON(),
459		autorest.AsGet(),
460		autorest.WithBaseURL(to.String(agaspp.NextLink)))
461}
462
463// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
464// ApplicationGatewaySslPredefinedPolicy values.
465type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
466	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
467	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
468}
469
470// NextWithContext advances to the next page of values.  If there was an error making
471// the request the page does not advance and the error is returned.
472func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
473	if tracing.IsEnabled() {
474		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
475		defer func() {
476			sc := -1
477			if page.Response().Response.Response != nil {
478				sc = page.Response().Response.Response.StatusCode
479			}
480			tracing.EndSpan(ctx, sc, err)
481		}()
482	}
483	for {
484		next, err := page.fn(ctx, page.agaspp)
485		if err != nil {
486			return err
487		}
488		page.agaspp = next
489		if !next.hasNextLink() || !next.IsEmpty() {
490			break
491		}
492	}
493	return nil
494}
495
496// Next advances to the next page of values.  If there was an error making
497// the request the page does not advance and the error is returned.
498// Deprecated: Use NextWithContext() instead.
499func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
500	return page.NextWithContext(context.Background())
501}
502
503// NotDone returns true if the page enumeration should be started or is not yet complete.
504func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
505	return !page.agaspp.IsEmpty()
506}
507
508// Response returns the raw server response from the last page request.
509func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
510	return page.agaspp
511}
512
513// Values returns the slice of values for the current page or nil if there are no values.
514func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
515	if page.agaspp.IsEmpty() {
516		return nil
517	}
518	return *page.agaspp.Value
519}
520
521// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
522func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
523	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
524		fn:     getNextPage,
525		agaspp: cur,
526	}
527}
528
529// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
530// service call.
531type ApplicationGatewayAvailableWafRuleSetsResult struct {
532	autorest.Response `json:"-"`
533	// Value - The list of application gateway rule sets.
534	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
535}
536
537// ApplicationGatewayBackendAddress backend address of an application gateway.
538type ApplicationGatewayBackendAddress struct {
539	// Fqdn - Fully qualified domain name (FQDN).
540	Fqdn *string `json:"fqdn,omitempty"`
541	// IPAddress - IP address
542	IPAddress *string `json:"ipAddress,omitempty"`
543}
544
545// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
546type ApplicationGatewayBackendAddressPool struct {
547	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
548	// Name - Resource that is unique within a resource group. This name can be used to access the resource.
549	Name *string `json:"name,omitempty"`
550	// Etag - A unique read-only string that changes whenever the resource is updated.
551	Etag *string `json:"etag,omitempty"`
552	// Type - Type of the resource.
553	Type *string `json:"type,omitempty"`
554	// ID - Resource ID.
555	ID *string `json:"id,omitempty"`
556}
557
558// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
559func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
560	objectMap := make(map[string]interface{})
561	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
562		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
563	}
564	if agbap.Name != nil {
565		objectMap["name"] = agbap.Name
566	}
567	if agbap.Etag != nil {
568		objectMap["etag"] = agbap.Etag
569	}
570	if agbap.Type != nil {
571		objectMap["type"] = agbap.Type
572	}
573	if agbap.ID != nil {
574		objectMap["id"] = agbap.ID
575	}
576	return json.Marshal(objectMap)
577}
578
579// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
580func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
581	var m map[string]*json.RawMessage
582	err := json.Unmarshal(body, &m)
583	if err != nil {
584		return err
585	}
586	for k, v := range m {
587		switch k {
588		case "properties":
589			if v != nil {
590				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
591				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
592				if err != nil {
593					return err
594				}
595				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
596			}
597		case "name":
598			if v != nil {
599				var name string
600				err = json.Unmarshal(*v, &name)
601				if err != nil {
602					return err
603				}
604				agbap.Name = &name
605			}
606		case "etag":
607			if v != nil {
608				var etag string
609				err = json.Unmarshal(*v, &etag)
610				if err != nil {
611					return err
612				}
613				agbap.Etag = &etag
614			}
615		case "type":
616			if v != nil {
617				var typeVar string
618				err = json.Unmarshal(*v, &typeVar)
619				if err != nil {
620					return err
621				}
622				agbap.Type = &typeVar
623			}
624		case "id":
625			if v != nil {
626				var ID string
627				err = json.Unmarshal(*v, &ID)
628				if err != nil {
629					return err
630				}
631				agbap.ID = &ID
632			}
633		}
634	}
635
636	return nil
637}
638
639// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
640// application gateway.
641type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
642	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
643	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
644	// BackendAddresses - Backend addresses
645	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
646	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
647	ProvisioningState *string `json:"provisioningState,omitempty"`
648}
649
650// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
651type ApplicationGatewayBackendHealth struct {
652	autorest.Response   `json:"-"`
653	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
654}
655
656// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
657type ApplicationGatewayBackendHealthHTTPSettings struct {
658	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
659	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
660	// Servers - List of ApplicationGatewayBackendHealthServer resources.
661	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
662}
663
664// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
665type ApplicationGatewayBackendHealthPool struct {
666	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
667	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
668	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
669	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
670}
671
672// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
673type ApplicationGatewayBackendHealthServer struct {
674	// Address - IP address or FQDN of backend server.
675	Address *string `json:"address,omitempty"`
676	// IPConfiguration - Reference of IP configuration of backend server.
677	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
678	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
679	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
680}
681
682// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
683type ApplicationGatewayBackendHTTPSettings struct {
684	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
685	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
686	Name *string `json:"name,omitempty"`
687	// Etag - A unique read-only string that changes whenever the resource is updated.
688	Etag *string `json:"etag,omitempty"`
689	// Type - Type of the resource.
690	Type *string `json:"type,omitempty"`
691	// ID - Resource ID.
692	ID *string `json:"id,omitempty"`
693}
694
695// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
696func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
697	objectMap := make(map[string]interface{})
698	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
699		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
700	}
701	if agbhs.Name != nil {
702		objectMap["name"] = agbhs.Name
703	}
704	if agbhs.Etag != nil {
705		objectMap["etag"] = agbhs.Etag
706	}
707	if agbhs.Type != nil {
708		objectMap["type"] = agbhs.Type
709	}
710	if agbhs.ID != nil {
711		objectMap["id"] = agbhs.ID
712	}
713	return json.Marshal(objectMap)
714}
715
716// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
717func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
718	var m map[string]*json.RawMessage
719	err := json.Unmarshal(body, &m)
720	if err != nil {
721		return err
722	}
723	for k, v := range m {
724		switch k {
725		case "properties":
726			if v != nil {
727				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
728				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
729				if err != nil {
730					return err
731				}
732				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
733			}
734		case "name":
735			if v != nil {
736				var name string
737				err = json.Unmarshal(*v, &name)
738				if err != nil {
739					return err
740				}
741				agbhs.Name = &name
742			}
743		case "etag":
744			if v != nil {
745				var etag string
746				err = json.Unmarshal(*v, &etag)
747				if err != nil {
748					return err
749				}
750				agbhs.Etag = &etag
751			}
752		case "type":
753			if v != nil {
754				var typeVar string
755				err = json.Unmarshal(*v, &typeVar)
756				if err != nil {
757					return err
758				}
759				agbhs.Type = &typeVar
760			}
761		case "id":
762			if v != nil {
763				var ID string
764				err = json.Unmarshal(*v, &ID)
765				if err != nil {
766					return err
767				}
768				agbhs.ID = &ID
769			}
770		}
771	}
772
773	return nil
774}
775
776// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
777// application gateway.
778type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
779	// Port - Port
780	Port *int32 `json:"port,omitempty"`
781	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
782	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
783	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
784	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
785	// RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
786	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
787	// Probe - Probe resource of an application gateway.
788	Probe *SubResource `json:"probe,omitempty"`
789	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
790	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
791	// ConnectionDraining - Connection draining of the backend http settings resource.
792	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
793	// HostName - Host header to be sent to the backend servers.
794	HostName *string `json:"hostName,omitempty"`
795	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
796	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
797	// AffinityCookieName - Cookie name to use for the affinity cookie.
798	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
799	// ProbeEnabled - Whether the probe is enabled. Default value is false.
800	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
801	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
802	Path *string `json:"path,omitempty"`
803	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
804	ProvisioningState *string `json:"provisioningState,omitempty"`
805}
806
807// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
808// be active for a specified time after the backend server got removed from the configuration.
809type ApplicationGatewayConnectionDraining struct {
810	// Enabled - Whether connection draining is enabled or not.
811	Enabled *bool `json:"enabled,omitempty"`
812	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
813	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
814}
815
816// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
817// rule group.
818type ApplicationGatewayFirewallDisabledRuleGroup struct {
819	// RuleGroupName - The name of the rule group that will be disabled.
820	RuleGroupName *string `json:"ruleGroupName,omitempty"`
821	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
822	Rules *[]int32 `json:"rules,omitempty"`
823}
824
825// ApplicationGatewayFirewallRule a web application firewall rule.
826type ApplicationGatewayFirewallRule struct {
827	// RuleID - The identifier of the web application firewall rule.
828	RuleID *int32 `json:"ruleId,omitempty"`
829	// Description - The description of the web application firewall rule.
830	Description *string `json:"description,omitempty"`
831}
832
833// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
834type ApplicationGatewayFirewallRuleGroup struct {
835	// RuleGroupName - The name of the web application firewall rule group.
836	RuleGroupName *string `json:"ruleGroupName,omitempty"`
837	// Description - The description of the web application firewall rule group.
838	Description *string `json:"description,omitempty"`
839	// Rules - The rules of the web application firewall rule group.
840	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
841}
842
843// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
844type ApplicationGatewayFirewallRuleSet struct {
845	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
846	// ID - Resource ID.
847	ID *string `json:"id,omitempty"`
848	// Name - READ-ONLY; Resource name.
849	Name *string `json:"name,omitempty"`
850	// Type - READ-ONLY; Resource type.
851	Type *string `json:"type,omitempty"`
852	// Location - Resource location.
853	Location *string `json:"location,omitempty"`
854	// Tags - Resource tags.
855	Tags map[string]*string `json:"tags"`
856}
857
858// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
859func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
860	objectMap := make(map[string]interface{})
861	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
862		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
863	}
864	if agfrs.ID != nil {
865		objectMap["id"] = agfrs.ID
866	}
867	if agfrs.Location != nil {
868		objectMap["location"] = agfrs.Location
869	}
870	if agfrs.Tags != nil {
871		objectMap["tags"] = agfrs.Tags
872	}
873	return json.Marshal(objectMap)
874}
875
876// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
877func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
878	var m map[string]*json.RawMessage
879	err := json.Unmarshal(body, &m)
880	if err != nil {
881		return err
882	}
883	for k, v := range m {
884		switch k {
885		case "properties":
886			if v != nil {
887				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
888				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
889				if err != nil {
890					return err
891				}
892				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
893			}
894		case "id":
895			if v != nil {
896				var ID string
897				err = json.Unmarshal(*v, &ID)
898				if err != nil {
899					return err
900				}
901				agfrs.ID = &ID
902			}
903		case "name":
904			if v != nil {
905				var name string
906				err = json.Unmarshal(*v, &name)
907				if err != nil {
908					return err
909				}
910				agfrs.Name = &name
911			}
912		case "type":
913			if v != nil {
914				var typeVar string
915				err = json.Unmarshal(*v, &typeVar)
916				if err != nil {
917					return err
918				}
919				agfrs.Type = &typeVar
920			}
921		case "location":
922			if v != nil {
923				var location string
924				err = json.Unmarshal(*v, &location)
925				if err != nil {
926					return err
927				}
928				agfrs.Location = &location
929			}
930		case "tags":
931			if v != nil {
932				var tags map[string]*string
933				err = json.Unmarshal(*v, &tags)
934				if err != nil {
935					return err
936				}
937				agfrs.Tags = tags
938			}
939		}
940	}
941
942	return nil
943}
944
945// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
946type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
947	// ProvisioningState - The provisioning state of the web application firewall rule set.
948	ProvisioningState *string `json:"provisioningState,omitempty"`
949	// RuleSetType - The type of the web application firewall rule set.
950	RuleSetType *string `json:"ruleSetType,omitempty"`
951	// RuleSetVersion - The version of the web application firewall rule set type.
952	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
953	// RuleGroups - The rule groups of the web application firewall rule set.
954	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
955}
956
957// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
958type ApplicationGatewayFrontendIPConfiguration struct {
959	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
960	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
961	Name *string `json:"name,omitempty"`
962	// Etag - A unique read-only string that changes whenever the resource is updated.
963	Etag *string `json:"etag,omitempty"`
964	// Type - Type of the resource.
965	Type *string `json:"type,omitempty"`
966	// ID - Resource ID.
967	ID *string `json:"id,omitempty"`
968}
969
970// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
971func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
972	objectMap := make(map[string]interface{})
973	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
974		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
975	}
976	if agfic.Name != nil {
977		objectMap["name"] = agfic.Name
978	}
979	if agfic.Etag != nil {
980		objectMap["etag"] = agfic.Etag
981	}
982	if agfic.Type != nil {
983		objectMap["type"] = agfic.Type
984	}
985	if agfic.ID != nil {
986		objectMap["id"] = agfic.ID
987	}
988	return json.Marshal(objectMap)
989}
990
991// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
992func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
993	var m map[string]*json.RawMessage
994	err := json.Unmarshal(body, &m)
995	if err != nil {
996		return err
997	}
998	for k, v := range m {
999		switch k {
1000		case "properties":
1001			if v != nil {
1002				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1003				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1004				if err != nil {
1005					return err
1006				}
1007				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1008			}
1009		case "name":
1010			if v != nil {
1011				var name string
1012				err = json.Unmarshal(*v, &name)
1013				if err != nil {
1014					return err
1015				}
1016				agfic.Name = &name
1017			}
1018		case "etag":
1019			if v != nil {
1020				var etag string
1021				err = json.Unmarshal(*v, &etag)
1022				if err != nil {
1023					return err
1024				}
1025				agfic.Etag = &etag
1026			}
1027		case "type":
1028			if v != nil {
1029				var typeVar string
1030				err = json.Unmarshal(*v, &typeVar)
1031				if err != nil {
1032					return err
1033				}
1034				agfic.Type = &typeVar
1035			}
1036		case "id":
1037			if v != nil {
1038				var ID string
1039				err = json.Unmarshal(*v, &ID)
1040				if err != nil {
1041					return err
1042				}
1043				agfic.ID = &ID
1044			}
1045		}
1046	}
1047
1048	return nil
1049}
1050
1051// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1052// application gateway.
1053type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1054	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1055	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1056	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1057	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1058	// Subnet - Reference of the subnet resource.
1059	Subnet *SubResource `json:"subnet,omitempty"`
1060	// PublicIPAddress - Reference of the PublicIP resource.
1061	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1062	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1063	ProvisioningState *string `json:"provisioningState,omitempty"`
1064}
1065
1066// ApplicationGatewayFrontendPort frontend port of an application gateway.
1067type ApplicationGatewayFrontendPort struct {
1068	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1069	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1070	Name *string `json:"name,omitempty"`
1071	// Etag - A unique read-only string that changes whenever the resource is updated.
1072	Etag *string `json:"etag,omitempty"`
1073	// Type - Type of the resource.
1074	Type *string `json:"type,omitempty"`
1075	// ID - Resource ID.
1076	ID *string `json:"id,omitempty"`
1077}
1078
1079// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1080func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1081	objectMap := make(map[string]interface{})
1082	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1083		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1084	}
1085	if agfp.Name != nil {
1086		objectMap["name"] = agfp.Name
1087	}
1088	if agfp.Etag != nil {
1089		objectMap["etag"] = agfp.Etag
1090	}
1091	if agfp.Type != nil {
1092		objectMap["type"] = agfp.Type
1093	}
1094	if agfp.ID != nil {
1095		objectMap["id"] = agfp.ID
1096	}
1097	return json.Marshal(objectMap)
1098}
1099
1100// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1101func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1102	var m map[string]*json.RawMessage
1103	err := json.Unmarshal(body, &m)
1104	if err != nil {
1105		return err
1106	}
1107	for k, v := range m {
1108		switch k {
1109		case "properties":
1110			if v != nil {
1111				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1112				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1113				if err != nil {
1114					return err
1115				}
1116				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1117			}
1118		case "name":
1119			if v != nil {
1120				var name string
1121				err = json.Unmarshal(*v, &name)
1122				if err != nil {
1123					return err
1124				}
1125				agfp.Name = &name
1126			}
1127		case "etag":
1128			if v != nil {
1129				var etag string
1130				err = json.Unmarshal(*v, &etag)
1131				if err != nil {
1132					return err
1133				}
1134				agfp.Etag = &etag
1135			}
1136		case "type":
1137			if v != nil {
1138				var typeVar string
1139				err = json.Unmarshal(*v, &typeVar)
1140				if err != nil {
1141					return err
1142				}
1143				agfp.Type = &typeVar
1144			}
1145		case "id":
1146			if v != nil {
1147				var ID string
1148				err = json.Unmarshal(*v, &ID)
1149				if err != nil {
1150					return err
1151				}
1152				agfp.ID = &ID
1153			}
1154		}
1155	}
1156
1157	return nil
1158}
1159
1160// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1161type ApplicationGatewayFrontendPortPropertiesFormat struct {
1162	// Port - Frontend port
1163	Port *int32 `json:"port,omitempty"`
1164	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1165	ProvisioningState *string `json:"provisioningState,omitempty"`
1166}
1167
1168// ApplicationGatewayHTTPListener http listener of an application gateway.
1169type ApplicationGatewayHTTPListener struct {
1170	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1171	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1172	Name *string `json:"name,omitempty"`
1173	// Etag - A unique read-only string that changes whenever the resource is updated.
1174	Etag *string `json:"etag,omitempty"`
1175	// Type - Type of the resource.
1176	Type *string `json:"type,omitempty"`
1177	// ID - Resource ID.
1178	ID *string `json:"id,omitempty"`
1179}
1180
1181// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1182func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1183	objectMap := make(map[string]interface{})
1184	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1185		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1186	}
1187	if aghl.Name != nil {
1188		objectMap["name"] = aghl.Name
1189	}
1190	if aghl.Etag != nil {
1191		objectMap["etag"] = aghl.Etag
1192	}
1193	if aghl.Type != nil {
1194		objectMap["type"] = aghl.Type
1195	}
1196	if aghl.ID != nil {
1197		objectMap["id"] = aghl.ID
1198	}
1199	return json.Marshal(objectMap)
1200}
1201
1202// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1203func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1204	var m map[string]*json.RawMessage
1205	err := json.Unmarshal(body, &m)
1206	if err != nil {
1207		return err
1208	}
1209	for k, v := range m {
1210		switch k {
1211		case "properties":
1212			if v != nil {
1213				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1214				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1215				if err != nil {
1216					return err
1217				}
1218				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1219			}
1220		case "name":
1221			if v != nil {
1222				var name string
1223				err = json.Unmarshal(*v, &name)
1224				if err != nil {
1225					return err
1226				}
1227				aghl.Name = &name
1228			}
1229		case "etag":
1230			if v != nil {
1231				var etag string
1232				err = json.Unmarshal(*v, &etag)
1233				if err != nil {
1234					return err
1235				}
1236				aghl.Etag = &etag
1237			}
1238		case "type":
1239			if v != nil {
1240				var typeVar string
1241				err = json.Unmarshal(*v, &typeVar)
1242				if err != nil {
1243					return err
1244				}
1245				aghl.Type = &typeVar
1246			}
1247		case "id":
1248			if v != nil {
1249				var ID string
1250				err = json.Unmarshal(*v, &ID)
1251				if err != nil {
1252					return err
1253				}
1254				aghl.ID = &ID
1255			}
1256		}
1257	}
1258
1259	return nil
1260}
1261
1262// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1263type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1264	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1265	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1266	// FrontendPort - Frontend port resource of an application gateway.
1267	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1268	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1269	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1270	// HostName - Host name of HTTP listener.
1271	HostName *string `json:"hostName,omitempty"`
1272	// SslCertificate - SSL certificate resource of an application gateway.
1273	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1274	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1275	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1276	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1277	ProvisioningState *string `json:"provisioningState,omitempty"`
1278}
1279
1280// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1281// private IP configuration is allowed.
1282type ApplicationGatewayIPConfiguration struct {
1283	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1284	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1285	Name *string `json:"name,omitempty"`
1286	// Etag - A unique read-only string that changes whenever the resource is updated.
1287	Etag *string `json:"etag,omitempty"`
1288	// Type - Type of the resource.
1289	Type *string `json:"type,omitempty"`
1290	// ID - Resource ID.
1291	ID *string `json:"id,omitempty"`
1292}
1293
1294// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1295func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1296	objectMap := make(map[string]interface{})
1297	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1298		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1299	}
1300	if agic.Name != nil {
1301		objectMap["name"] = agic.Name
1302	}
1303	if agic.Etag != nil {
1304		objectMap["etag"] = agic.Etag
1305	}
1306	if agic.Type != nil {
1307		objectMap["type"] = agic.Type
1308	}
1309	if agic.ID != nil {
1310		objectMap["id"] = agic.ID
1311	}
1312	return json.Marshal(objectMap)
1313}
1314
1315// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1316func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1317	var m map[string]*json.RawMessage
1318	err := json.Unmarshal(body, &m)
1319	if err != nil {
1320		return err
1321	}
1322	for k, v := range m {
1323		switch k {
1324		case "properties":
1325			if v != nil {
1326				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1327				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1328				if err != nil {
1329					return err
1330				}
1331				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1332			}
1333		case "name":
1334			if v != nil {
1335				var name string
1336				err = json.Unmarshal(*v, &name)
1337				if err != nil {
1338					return err
1339				}
1340				agic.Name = &name
1341			}
1342		case "etag":
1343			if v != nil {
1344				var etag string
1345				err = json.Unmarshal(*v, &etag)
1346				if err != nil {
1347					return err
1348				}
1349				agic.Etag = &etag
1350			}
1351		case "type":
1352			if v != nil {
1353				var typeVar string
1354				err = json.Unmarshal(*v, &typeVar)
1355				if err != nil {
1356					return err
1357				}
1358				agic.Type = &typeVar
1359			}
1360		case "id":
1361			if v != nil {
1362				var ID string
1363				err = json.Unmarshal(*v, &ID)
1364				if err != nil {
1365					return err
1366				}
1367				agic.ID = &ID
1368			}
1369		}
1370	}
1371
1372	return nil
1373}
1374
1375// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1376// gateway.
1377type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1378	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1379	Subnet *SubResource `json:"subnet,omitempty"`
1380	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1381	ProvisioningState *string `json:"provisioningState,omitempty"`
1382}
1383
1384// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1385type ApplicationGatewayListResult struct {
1386	autorest.Response `json:"-"`
1387	// Value - List of an application gateways in a resource group.
1388	Value *[]ApplicationGateway `json:"value,omitempty"`
1389	// NextLink - URL to get the next set of results.
1390	NextLink *string `json:"nextLink,omitempty"`
1391}
1392
1393// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1394type ApplicationGatewayListResultIterator struct {
1395	i    int
1396	page ApplicationGatewayListResultPage
1397}
1398
1399// NextWithContext advances to the next value.  If there was an error making
1400// the request the iterator does not advance and the error is returned.
1401func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1402	if tracing.IsEnabled() {
1403		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1404		defer func() {
1405			sc := -1
1406			if iter.Response().Response.Response != nil {
1407				sc = iter.Response().Response.Response.StatusCode
1408			}
1409			tracing.EndSpan(ctx, sc, err)
1410		}()
1411	}
1412	iter.i++
1413	if iter.i < len(iter.page.Values()) {
1414		return nil
1415	}
1416	err = iter.page.NextWithContext(ctx)
1417	if err != nil {
1418		iter.i--
1419		return err
1420	}
1421	iter.i = 0
1422	return nil
1423}
1424
1425// Next advances to the next value.  If there was an error making
1426// the request the iterator does not advance and the error is returned.
1427// Deprecated: Use NextWithContext() instead.
1428func (iter *ApplicationGatewayListResultIterator) Next() error {
1429	return iter.NextWithContext(context.Background())
1430}
1431
1432// NotDone returns true if the enumeration should be started or is not yet complete.
1433func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1434	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1435}
1436
1437// Response returns the raw server response from the last page request.
1438func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1439	return iter.page.Response()
1440}
1441
1442// Value returns the current value or a zero-initialized value if the
1443// iterator has advanced beyond the end of the collection.
1444func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1445	if !iter.page.NotDone() {
1446		return ApplicationGateway{}
1447	}
1448	return iter.page.Values()[iter.i]
1449}
1450
1451// Creates a new instance of the ApplicationGatewayListResultIterator type.
1452func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1453	return ApplicationGatewayListResultIterator{page: page}
1454}
1455
1456// IsEmpty returns true if the ListResult contains no values.
1457func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1458	return aglr.Value == nil || len(*aglr.Value) == 0
1459}
1460
1461// hasNextLink returns true if the NextLink is not empty.
1462func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1463	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1464}
1465
1466// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1467// It returns nil if no more results exist.
1468func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1469	if !aglr.hasNextLink() {
1470		return nil, nil
1471	}
1472	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1473		autorest.AsJSON(),
1474		autorest.AsGet(),
1475		autorest.WithBaseURL(to.String(aglr.NextLink)))
1476}
1477
1478// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1479type ApplicationGatewayListResultPage struct {
1480	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1481	aglr ApplicationGatewayListResult
1482}
1483
1484// NextWithContext advances to the next page of values.  If there was an error making
1485// the request the page does not advance and the error is returned.
1486func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1487	if tracing.IsEnabled() {
1488		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1489		defer func() {
1490			sc := -1
1491			if page.Response().Response.Response != nil {
1492				sc = page.Response().Response.Response.StatusCode
1493			}
1494			tracing.EndSpan(ctx, sc, err)
1495		}()
1496	}
1497	for {
1498		next, err := page.fn(ctx, page.aglr)
1499		if err != nil {
1500			return err
1501		}
1502		page.aglr = next
1503		if !next.hasNextLink() || !next.IsEmpty() {
1504			break
1505		}
1506	}
1507	return nil
1508}
1509
1510// Next advances to the next page of values.  If there was an error making
1511// the request the page does not advance and the error is returned.
1512// Deprecated: Use NextWithContext() instead.
1513func (page *ApplicationGatewayListResultPage) Next() error {
1514	return page.NextWithContext(context.Background())
1515}
1516
1517// NotDone returns true if the page enumeration should be started or is not yet complete.
1518func (page ApplicationGatewayListResultPage) NotDone() bool {
1519	return !page.aglr.IsEmpty()
1520}
1521
1522// Response returns the raw server response from the last page request.
1523func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1524	return page.aglr
1525}
1526
1527// Values returns the slice of values for the current page or nil if there are no values.
1528func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1529	if page.aglr.IsEmpty() {
1530		return nil
1531	}
1532	return *page.aglr.Value
1533}
1534
1535// Creates a new instance of the ApplicationGatewayListResultPage type.
1536func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1537	return ApplicationGatewayListResultPage{
1538		fn:   getNextPage,
1539		aglr: cur,
1540	}
1541}
1542
1543// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1544type ApplicationGatewayPathRule struct {
1545	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1546	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1547	Name *string `json:"name,omitempty"`
1548	// Etag - A unique read-only string that changes whenever the resource is updated.
1549	Etag *string `json:"etag,omitempty"`
1550	// Type - Type of the resource.
1551	Type *string `json:"type,omitempty"`
1552	// ID - Resource ID.
1553	ID *string `json:"id,omitempty"`
1554}
1555
1556// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1557func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1558	objectMap := make(map[string]interface{})
1559	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1560		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1561	}
1562	if agpr.Name != nil {
1563		objectMap["name"] = agpr.Name
1564	}
1565	if agpr.Etag != nil {
1566		objectMap["etag"] = agpr.Etag
1567	}
1568	if agpr.Type != nil {
1569		objectMap["type"] = agpr.Type
1570	}
1571	if agpr.ID != nil {
1572		objectMap["id"] = agpr.ID
1573	}
1574	return json.Marshal(objectMap)
1575}
1576
1577// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1578func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1579	var m map[string]*json.RawMessage
1580	err := json.Unmarshal(body, &m)
1581	if err != nil {
1582		return err
1583	}
1584	for k, v := range m {
1585		switch k {
1586		case "properties":
1587			if v != nil {
1588				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1589				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1590				if err != nil {
1591					return err
1592				}
1593				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1594			}
1595		case "name":
1596			if v != nil {
1597				var name string
1598				err = json.Unmarshal(*v, &name)
1599				if err != nil {
1600					return err
1601				}
1602				agpr.Name = &name
1603			}
1604		case "etag":
1605			if v != nil {
1606				var etag string
1607				err = json.Unmarshal(*v, &etag)
1608				if err != nil {
1609					return err
1610				}
1611				agpr.Etag = &etag
1612			}
1613		case "type":
1614			if v != nil {
1615				var typeVar string
1616				err = json.Unmarshal(*v, &typeVar)
1617				if err != nil {
1618					return err
1619				}
1620				agpr.Type = &typeVar
1621			}
1622		case "id":
1623			if v != nil {
1624				var ID string
1625				err = json.Unmarshal(*v, &ID)
1626				if err != nil {
1627					return err
1628				}
1629				agpr.ID = &ID
1630			}
1631		}
1632	}
1633
1634	return nil
1635}
1636
1637// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1638type ApplicationGatewayPathRulePropertiesFormat struct {
1639	// Paths - Path rules of URL path map.
1640	Paths *[]string `json:"paths,omitempty"`
1641	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1642	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1643	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1644	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1645	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1646	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1647	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1648	ProvisioningState *string `json:"provisioningState,omitempty"`
1649}
1650
1651// ApplicationGatewayProbe probe of the application gateway.
1652type ApplicationGatewayProbe struct {
1653	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1654	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1655	Name *string `json:"name,omitempty"`
1656	// Etag - A unique read-only string that changes whenever the resource is updated.
1657	Etag *string `json:"etag,omitempty"`
1658	// Type - Type of the resource.
1659	Type *string `json:"type,omitempty"`
1660	// ID - Resource ID.
1661	ID *string `json:"id,omitempty"`
1662}
1663
1664// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1665func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1666	objectMap := make(map[string]interface{})
1667	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1668		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1669	}
1670	if agp.Name != nil {
1671		objectMap["name"] = agp.Name
1672	}
1673	if agp.Etag != nil {
1674		objectMap["etag"] = agp.Etag
1675	}
1676	if agp.Type != nil {
1677		objectMap["type"] = agp.Type
1678	}
1679	if agp.ID != nil {
1680		objectMap["id"] = agp.ID
1681	}
1682	return json.Marshal(objectMap)
1683}
1684
1685// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1686func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1687	var m map[string]*json.RawMessage
1688	err := json.Unmarshal(body, &m)
1689	if err != nil {
1690		return err
1691	}
1692	for k, v := range m {
1693		switch k {
1694		case "properties":
1695			if v != nil {
1696				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1697				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1698				if err != nil {
1699					return err
1700				}
1701				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1702			}
1703		case "name":
1704			if v != nil {
1705				var name string
1706				err = json.Unmarshal(*v, &name)
1707				if err != nil {
1708					return err
1709				}
1710				agp.Name = &name
1711			}
1712		case "etag":
1713			if v != nil {
1714				var etag string
1715				err = json.Unmarshal(*v, &etag)
1716				if err != nil {
1717					return err
1718				}
1719				agp.Etag = &etag
1720			}
1721		case "type":
1722			if v != nil {
1723				var typeVar string
1724				err = json.Unmarshal(*v, &typeVar)
1725				if err != nil {
1726					return err
1727				}
1728				agp.Type = &typeVar
1729			}
1730		case "id":
1731			if v != nil {
1732				var ID string
1733				err = json.Unmarshal(*v, &ID)
1734				if err != nil {
1735					return err
1736				}
1737				agp.ID = &ID
1738			}
1739		}
1740	}
1741
1742	return nil
1743}
1744
1745// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1746type ApplicationGatewayProbeHealthResponseMatch struct {
1747	// Body - Body that must be contained in the health response. Default value is empty.
1748	Body *string `json:"body,omitempty"`
1749	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1750	StatusCodes *[]string `json:"statusCodes,omitempty"`
1751}
1752
1753// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1754type ApplicationGatewayProbePropertiesFormat struct {
1755	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1756	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1757	// Host - Host name to send the probe to.
1758	Host *string `json:"host,omitempty"`
1759	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1760	Path *string `json:"path,omitempty"`
1761	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1762	Interval *int32 `json:"interval,omitempty"`
1763	// Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
1764	Timeout *int32 `json:"timeout,omitempty"`
1765	// UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
1766	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1767	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1768	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1769	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1770	MinServers *int32 `json:"minServers,omitempty"`
1771	// Match - Criterion for classifying a healthy probe response.
1772	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1773	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1774	ProvisioningState *string `json:"provisioningState,omitempty"`
1775}
1776
1777// ApplicationGatewayPropertiesFormat properties of the application gateway.
1778type ApplicationGatewayPropertiesFormat struct {
1779	// Sku - SKU of the application gateway resource.
1780	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1781	// SslPolicy - SSL policy of the application gateway resource.
1782	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1783	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1784	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1785	// GatewayIPConfigurations - Subnets of application the gateway resource.
1786	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1787	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1788	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1789	// SslCertificates - SSL certificates of the application gateway resource.
1790	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1791	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1792	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1793	// FrontendPorts - Frontend ports of the application gateway resource.
1794	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1795	// Probes - Probes of the application gateway resource.
1796	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1797	// BackendAddressPools - Backend address pool of the application gateway resource.
1798	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1799	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1800	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1801	// HTTPListeners - Http listeners of the application gateway resource.
1802	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1803	// URLPathMaps - URL path map of the application gateway resource.
1804	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1805	// RequestRoutingRules - Request routing rules of the application gateway resource.
1806	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1807	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1808	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1809	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1810	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1811	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1812	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1813	// ResourceGUID - Resource GUID property of the application gateway resource.
1814	ResourceGUID *string `json:"resourceGuid,omitempty"`
1815	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1816	ProvisioningState *string `json:"provisioningState,omitempty"`
1817}
1818
1819// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1820func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1821	objectMap := make(map[string]interface{})
1822	if agpf.Sku != nil {
1823		objectMap["sku"] = agpf.Sku
1824	}
1825	if agpf.SslPolicy != nil {
1826		objectMap["sslPolicy"] = agpf.SslPolicy
1827	}
1828	if agpf.GatewayIPConfigurations != nil {
1829		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1830	}
1831	if agpf.AuthenticationCertificates != nil {
1832		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1833	}
1834	if agpf.SslCertificates != nil {
1835		objectMap["sslCertificates"] = agpf.SslCertificates
1836	}
1837	if agpf.FrontendIPConfigurations != nil {
1838		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1839	}
1840	if agpf.FrontendPorts != nil {
1841		objectMap["frontendPorts"] = agpf.FrontendPorts
1842	}
1843	if agpf.Probes != nil {
1844		objectMap["probes"] = agpf.Probes
1845	}
1846	if agpf.BackendAddressPools != nil {
1847		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1848	}
1849	if agpf.BackendHTTPSettingsCollection != nil {
1850		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1851	}
1852	if agpf.HTTPListeners != nil {
1853		objectMap["httpListeners"] = agpf.HTTPListeners
1854	}
1855	if agpf.URLPathMaps != nil {
1856		objectMap["urlPathMaps"] = agpf.URLPathMaps
1857	}
1858	if agpf.RequestRoutingRules != nil {
1859		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1860	}
1861	if agpf.RedirectConfigurations != nil {
1862		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1863	}
1864	if agpf.WebApplicationFirewallConfiguration != nil {
1865		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1866	}
1867	if agpf.EnableHTTP2 != nil {
1868		objectMap["enableHttp2"] = agpf.EnableHTTP2
1869	}
1870	if agpf.ResourceGUID != nil {
1871		objectMap["resourceGuid"] = agpf.ResourceGUID
1872	}
1873	if agpf.ProvisioningState != nil {
1874		objectMap["provisioningState"] = agpf.ProvisioningState
1875	}
1876	return json.Marshal(objectMap)
1877}
1878
1879// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1880type ApplicationGatewayRedirectConfiguration struct {
1881	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1882	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1883	Name *string `json:"name,omitempty"`
1884	// Etag - A unique read-only string that changes whenever the resource is updated.
1885	Etag *string `json:"etag,omitempty"`
1886	// Type - Type of the resource.
1887	Type *string `json:"type,omitempty"`
1888	// ID - Resource ID.
1889	ID *string `json:"id,omitempty"`
1890}
1891
1892// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1893func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1894	objectMap := make(map[string]interface{})
1895	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1896		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1897	}
1898	if agrc.Name != nil {
1899		objectMap["name"] = agrc.Name
1900	}
1901	if agrc.Etag != nil {
1902		objectMap["etag"] = agrc.Etag
1903	}
1904	if agrc.Type != nil {
1905		objectMap["type"] = agrc.Type
1906	}
1907	if agrc.ID != nil {
1908		objectMap["id"] = agrc.ID
1909	}
1910	return json.Marshal(objectMap)
1911}
1912
1913// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1914func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1915	var m map[string]*json.RawMessage
1916	err := json.Unmarshal(body, &m)
1917	if err != nil {
1918		return err
1919	}
1920	for k, v := range m {
1921		switch k {
1922		case "properties":
1923			if v != nil {
1924				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1925				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1926				if err != nil {
1927					return err
1928				}
1929				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1930			}
1931		case "name":
1932			if v != nil {
1933				var name string
1934				err = json.Unmarshal(*v, &name)
1935				if err != nil {
1936					return err
1937				}
1938				agrc.Name = &name
1939			}
1940		case "etag":
1941			if v != nil {
1942				var etag string
1943				err = json.Unmarshal(*v, &etag)
1944				if err != nil {
1945					return err
1946				}
1947				agrc.Etag = &etag
1948			}
1949		case "type":
1950			if v != nil {
1951				var typeVar string
1952				err = json.Unmarshal(*v, &typeVar)
1953				if err != nil {
1954					return err
1955				}
1956				agrc.Type = &typeVar
1957			}
1958		case "id":
1959			if v != nil {
1960				var ID string
1961				err = json.Unmarshal(*v, &ID)
1962				if err != nil {
1963					return err
1964				}
1965				agrc.ID = &ID
1966			}
1967		}
1968	}
1969
1970	return nil
1971}
1972
1973// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1974// application gateway.
1975type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1976	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1977	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1978	// TargetListener - Reference to a listener to redirect the request to.
1979	TargetListener *SubResource `json:"targetListener,omitempty"`
1980	// TargetURL - Url to redirect the request to.
1981	TargetURL *string `json:"targetUrl,omitempty"`
1982	// IncludePath - Include path in the redirected url.
1983	IncludePath *bool `json:"includePath,omitempty"`
1984	// IncludeQueryString - Include query string in the redirected url.
1985	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1986	// RequestRoutingRules - Request routing specifying redirect configuration.
1987	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1988	// URLPathMaps - Url path maps specifying default redirect configuration.
1989	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
1990	// PathRules - Path rules specifying redirect configuration.
1991	PathRules *[]SubResource `json:"pathRules,omitempty"`
1992}
1993
1994// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
1995type ApplicationGatewayRequestRoutingRule struct {
1996	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
1997	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1998	Name *string `json:"name,omitempty"`
1999	// Etag - A unique read-only string that changes whenever the resource is updated.
2000	Etag *string `json:"etag,omitempty"`
2001	// Type - Type of the resource.
2002	Type *string `json:"type,omitempty"`
2003	// ID - Resource ID.
2004	ID *string `json:"id,omitempty"`
2005}
2006
2007// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2008func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2009	objectMap := make(map[string]interface{})
2010	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2011		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2012	}
2013	if agrrr.Name != nil {
2014		objectMap["name"] = agrrr.Name
2015	}
2016	if agrrr.Etag != nil {
2017		objectMap["etag"] = agrrr.Etag
2018	}
2019	if agrrr.Type != nil {
2020		objectMap["type"] = agrrr.Type
2021	}
2022	if agrrr.ID != nil {
2023		objectMap["id"] = agrrr.ID
2024	}
2025	return json.Marshal(objectMap)
2026}
2027
2028// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2029func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2030	var m map[string]*json.RawMessage
2031	err := json.Unmarshal(body, &m)
2032	if err != nil {
2033		return err
2034	}
2035	for k, v := range m {
2036		switch k {
2037		case "properties":
2038			if v != nil {
2039				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2040				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2041				if err != nil {
2042					return err
2043				}
2044				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2045			}
2046		case "name":
2047			if v != nil {
2048				var name string
2049				err = json.Unmarshal(*v, &name)
2050				if err != nil {
2051					return err
2052				}
2053				agrrr.Name = &name
2054			}
2055		case "etag":
2056			if v != nil {
2057				var etag string
2058				err = json.Unmarshal(*v, &etag)
2059				if err != nil {
2060					return err
2061				}
2062				agrrr.Etag = &etag
2063			}
2064		case "type":
2065			if v != nil {
2066				var typeVar string
2067				err = json.Unmarshal(*v, &typeVar)
2068				if err != nil {
2069					return err
2070				}
2071				agrrr.Type = &typeVar
2072			}
2073		case "id":
2074			if v != nil {
2075				var ID string
2076				err = json.Unmarshal(*v, &ID)
2077				if err != nil {
2078					return err
2079				}
2080				agrrr.ID = &ID
2081			}
2082		}
2083	}
2084
2085	return nil
2086}
2087
2088// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2089// application gateway.
2090type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2091	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2092	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2093	// BackendAddressPool - Backend address pool resource of the application gateway.
2094	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2095	// BackendHTTPSettings - Frontend port resource of the application gateway.
2096	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2097	// HTTPListener - Http listener resource of the application gateway.
2098	HTTPListener *SubResource `json:"httpListener,omitempty"`
2099	// URLPathMap - URL path map resource of the application gateway.
2100	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2101	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2102	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2103	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2104	ProvisioningState *string `json:"provisioningState,omitempty"`
2105}
2106
2107// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2108// long-running operation.
2109type ApplicationGatewaysBackendHealthFuture struct {
2110	azure.FutureAPI
2111	// Result returns the result of the asynchronous operation.
2112	// If the operation has not completed it will return an error.
2113	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2114}
2115
2116// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2117func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2118	var azFuture azure.Future
2119	if err := json.Unmarshal(body, &azFuture); err != nil {
2120		return err
2121	}
2122	future.FutureAPI = &azFuture
2123	future.Result = future.result
2124	return nil
2125}
2126
2127// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2128func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2129	var done bool
2130	done, err = future.DoneWithContext(context.Background(), client)
2131	if err != nil {
2132		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2133		return
2134	}
2135	if !done {
2136		agbh.Response.Response = future.Response()
2137		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2138		return
2139	}
2140	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2141	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2142		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2143		if err != nil {
2144			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2145		}
2146	}
2147	return
2148}
2149
2150// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2151// long-running operation.
2152type ApplicationGatewaysCreateOrUpdateFuture struct {
2153	azure.FutureAPI
2154	// Result returns the result of the asynchronous operation.
2155	// If the operation has not completed it will return an error.
2156	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2157}
2158
2159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2160func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2161	var azFuture azure.Future
2162	if err := json.Unmarshal(body, &azFuture); err != nil {
2163		return err
2164	}
2165	future.FutureAPI = &azFuture
2166	future.Result = future.result
2167	return nil
2168}
2169
2170// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2171func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2172	var done bool
2173	done, err = future.DoneWithContext(context.Background(), client)
2174	if err != nil {
2175		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2176		return
2177	}
2178	if !done {
2179		ag.Response.Response = future.Response()
2180		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2181		return
2182	}
2183	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2184	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2185		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2186		if err != nil {
2187			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2188		}
2189	}
2190	return
2191}
2192
2193// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2194// long-running operation.
2195type ApplicationGatewaysDeleteFuture struct {
2196	azure.FutureAPI
2197	// Result returns the result of the asynchronous operation.
2198	// If the operation has not completed it will return an error.
2199	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2200}
2201
2202// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2203func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2204	var azFuture azure.Future
2205	if err := json.Unmarshal(body, &azFuture); err != nil {
2206		return err
2207	}
2208	future.FutureAPI = &azFuture
2209	future.Result = future.result
2210	return nil
2211}
2212
2213// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2214func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2215	var done bool
2216	done, err = future.DoneWithContext(context.Background(), client)
2217	if err != nil {
2218		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2219		return
2220	}
2221	if !done {
2222		ar.Response = future.Response()
2223		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2224		return
2225	}
2226	ar.Response = future.Response()
2227	return
2228}
2229
2230// ApplicationGatewaySku SKU of an application gateway
2231type ApplicationGatewaySku struct {
2232	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2233	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2234	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2235	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2236	// Capacity - Capacity (instance count) of an application gateway.
2237	Capacity *int32 `json:"capacity,omitempty"`
2238}
2239
2240// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2241type ApplicationGatewaySslCertificate struct {
2242	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2243	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2244	Name *string `json:"name,omitempty"`
2245	// Etag - A unique read-only string that changes whenever the resource is updated.
2246	Etag *string `json:"etag,omitempty"`
2247	// Type - Type of the resource.
2248	Type *string `json:"type,omitempty"`
2249	// ID - Resource ID.
2250	ID *string `json:"id,omitempty"`
2251}
2252
2253// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2254func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2255	objectMap := make(map[string]interface{})
2256	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2257		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2258	}
2259	if agsc.Name != nil {
2260		objectMap["name"] = agsc.Name
2261	}
2262	if agsc.Etag != nil {
2263		objectMap["etag"] = agsc.Etag
2264	}
2265	if agsc.Type != nil {
2266		objectMap["type"] = agsc.Type
2267	}
2268	if agsc.ID != nil {
2269		objectMap["id"] = agsc.ID
2270	}
2271	return json.Marshal(objectMap)
2272}
2273
2274// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2275func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2276	var m map[string]*json.RawMessage
2277	err := json.Unmarshal(body, &m)
2278	if err != nil {
2279		return err
2280	}
2281	for k, v := range m {
2282		switch k {
2283		case "properties":
2284			if v != nil {
2285				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2286				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2287				if err != nil {
2288					return err
2289				}
2290				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2291			}
2292		case "name":
2293			if v != nil {
2294				var name string
2295				err = json.Unmarshal(*v, &name)
2296				if err != nil {
2297					return err
2298				}
2299				agsc.Name = &name
2300			}
2301		case "etag":
2302			if v != nil {
2303				var etag string
2304				err = json.Unmarshal(*v, &etag)
2305				if err != nil {
2306					return err
2307				}
2308				agsc.Etag = &etag
2309			}
2310		case "type":
2311			if v != nil {
2312				var typeVar string
2313				err = json.Unmarshal(*v, &typeVar)
2314				if err != nil {
2315					return err
2316				}
2317				agsc.Type = &typeVar
2318			}
2319		case "id":
2320			if v != nil {
2321				var ID string
2322				err = json.Unmarshal(*v, &ID)
2323				if err != nil {
2324					return err
2325				}
2326				agsc.ID = &ID
2327			}
2328		}
2329	}
2330
2331	return nil
2332}
2333
2334// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2335// gateway.
2336type ApplicationGatewaySslCertificatePropertiesFormat struct {
2337	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2338	Data *string `json:"data,omitempty"`
2339	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2340	Password *string `json:"password,omitempty"`
2341	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2342	PublicCertData *string `json:"publicCertData,omitempty"`
2343	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2344	ProvisioningState *string `json:"provisioningState,omitempty"`
2345}
2346
2347// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2348type ApplicationGatewaySslPolicy struct {
2349	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2350	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2351	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2352	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2353	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2354	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2355	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2356	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2357	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2358	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2359}
2360
2361// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2362type ApplicationGatewaySslPredefinedPolicy struct {
2363	autorest.Response `json:"-"`
2364	// Name - Name of Ssl predefined policy.
2365	Name                                                   *string `json:"name,omitempty"`
2366	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2367	// ID - Resource ID.
2368	ID *string `json:"id,omitempty"`
2369}
2370
2371// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2372func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2373	objectMap := make(map[string]interface{})
2374	if agspp.Name != nil {
2375		objectMap["name"] = agspp.Name
2376	}
2377	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2378		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2379	}
2380	if agspp.ID != nil {
2381		objectMap["id"] = agspp.ID
2382	}
2383	return json.Marshal(objectMap)
2384}
2385
2386// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2387func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2388	var m map[string]*json.RawMessage
2389	err := json.Unmarshal(body, &m)
2390	if err != nil {
2391		return err
2392	}
2393	for k, v := range m {
2394		switch k {
2395		case "name":
2396			if v != nil {
2397				var name string
2398				err = json.Unmarshal(*v, &name)
2399				if err != nil {
2400					return err
2401				}
2402				agspp.Name = &name
2403			}
2404		case "properties":
2405			if v != nil {
2406				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2407				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2408				if err != nil {
2409					return err
2410				}
2411				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2412			}
2413		case "id":
2414			if v != nil {
2415				var ID string
2416				err = json.Unmarshal(*v, &ID)
2417				if err != nil {
2418					return err
2419				}
2420				agspp.ID = &ID
2421			}
2422		}
2423	}
2424
2425	return nil
2426}
2427
2428// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2429// ApplicationGatewaySslPredefinedPolicy
2430type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2431	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2432	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2433	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2434	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2435}
2436
2437// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2438// long-running operation.
2439type ApplicationGatewaysStartFuture struct {
2440	azure.FutureAPI
2441	// Result returns the result of the asynchronous operation.
2442	// If the operation has not completed it will return an error.
2443	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2444}
2445
2446// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2447func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2448	var azFuture azure.Future
2449	if err := json.Unmarshal(body, &azFuture); err != nil {
2450		return err
2451	}
2452	future.FutureAPI = &azFuture
2453	future.Result = future.result
2454	return nil
2455}
2456
2457// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2458func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2459	var done bool
2460	done, err = future.DoneWithContext(context.Background(), client)
2461	if err != nil {
2462		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2463		return
2464	}
2465	if !done {
2466		ar.Response = future.Response()
2467		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2468		return
2469	}
2470	ar.Response = future.Response()
2471	return
2472}
2473
2474// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2475// operation.
2476type ApplicationGatewaysStopFuture struct {
2477	azure.FutureAPI
2478	// Result returns the result of the asynchronous operation.
2479	// If the operation has not completed it will return an error.
2480	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2481}
2482
2483// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2484func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2485	var azFuture azure.Future
2486	if err := json.Unmarshal(body, &azFuture); err != nil {
2487		return err
2488	}
2489	future.FutureAPI = &azFuture
2490	future.Result = future.result
2491	return nil
2492}
2493
2494// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2495func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2496	var done bool
2497	done, err = future.DoneWithContext(context.Background(), client)
2498	if err != nil {
2499		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2500		return
2501	}
2502	if !done {
2503		ar.Response = future.Response()
2504		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2505		return
2506	}
2507	ar.Response = future.Response()
2508	return
2509}
2510
2511// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2512// long-running operation.
2513type ApplicationGatewaysUpdateTagsFuture struct {
2514	azure.FutureAPI
2515	// Result returns the result of the asynchronous operation.
2516	// If the operation has not completed it will return an error.
2517	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2518}
2519
2520// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2521func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2522	var azFuture azure.Future
2523	if err := json.Unmarshal(body, &azFuture); err != nil {
2524		return err
2525	}
2526	future.FutureAPI = &azFuture
2527	future.Result = future.result
2528	return nil
2529}
2530
2531// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2532func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2533	var done bool
2534	done, err = future.DoneWithContext(context.Background(), client)
2535	if err != nil {
2536		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2537		return
2538	}
2539	if !done {
2540		ag.Response.Response = future.Response()
2541		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2542		return
2543	}
2544	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2545	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2546		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2547		if err != nil {
2548			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2549		}
2550	}
2551	return
2552}
2553
2554// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2555// PathBasedRouting.
2556type ApplicationGatewayURLPathMap struct {
2557	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2558	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2559	Name *string `json:"name,omitempty"`
2560	// Etag - A unique read-only string that changes whenever the resource is updated.
2561	Etag *string `json:"etag,omitempty"`
2562	// Type - Type of the resource.
2563	Type *string `json:"type,omitempty"`
2564	// ID - Resource ID.
2565	ID *string `json:"id,omitempty"`
2566}
2567
2568// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2569func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2570	objectMap := make(map[string]interface{})
2571	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2572		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2573	}
2574	if agupm.Name != nil {
2575		objectMap["name"] = agupm.Name
2576	}
2577	if agupm.Etag != nil {
2578		objectMap["etag"] = agupm.Etag
2579	}
2580	if agupm.Type != nil {
2581		objectMap["type"] = agupm.Type
2582	}
2583	if agupm.ID != nil {
2584		objectMap["id"] = agupm.ID
2585	}
2586	return json.Marshal(objectMap)
2587}
2588
2589// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2590func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2591	var m map[string]*json.RawMessage
2592	err := json.Unmarshal(body, &m)
2593	if err != nil {
2594		return err
2595	}
2596	for k, v := range m {
2597		switch k {
2598		case "properties":
2599			if v != nil {
2600				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2601				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2602				if err != nil {
2603					return err
2604				}
2605				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2606			}
2607		case "name":
2608			if v != nil {
2609				var name string
2610				err = json.Unmarshal(*v, &name)
2611				if err != nil {
2612					return err
2613				}
2614				agupm.Name = &name
2615			}
2616		case "etag":
2617			if v != nil {
2618				var etag string
2619				err = json.Unmarshal(*v, &etag)
2620				if err != nil {
2621					return err
2622				}
2623				agupm.Etag = &etag
2624			}
2625		case "type":
2626			if v != nil {
2627				var typeVar string
2628				err = json.Unmarshal(*v, &typeVar)
2629				if err != nil {
2630					return err
2631				}
2632				agupm.Type = &typeVar
2633			}
2634		case "id":
2635			if v != nil {
2636				var ID string
2637				err = json.Unmarshal(*v, &ID)
2638				if err != nil {
2639					return err
2640				}
2641				agupm.ID = &ID
2642			}
2643		}
2644	}
2645
2646	return nil
2647}
2648
2649// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2650type ApplicationGatewayURLPathMapPropertiesFormat struct {
2651	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2652	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2653	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2654	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2655	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2656	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2657	// PathRules - Path rule of URL path map resource.
2658	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2659	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2660	ProvisioningState *string `json:"provisioningState,omitempty"`
2661}
2662
2663// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2664// configuration.
2665type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2666	// Enabled - Whether the web application firewall is enabled or not.
2667	Enabled *bool `json:"enabled,omitempty"`
2668	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2669	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2670	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2671	RuleSetType *string `json:"ruleSetType,omitempty"`
2672	// RuleSetVersion - The version of the rule set type.
2673	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2674	// DisabledRuleGroups - The disabled rule groups.
2675	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2676}
2677
2678// ApplicationSecurityGroup an application security group in a resource group.
2679type ApplicationSecurityGroup struct {
2680	autorest.Response `json:"-"`
2681	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2682	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2683	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2684	Etag *string `json:"etag,omitempty"`
2685	// ID - Resource ID.
2686	ID *string `json:"id,omitempty"`
2687	// Name - READ-ONLY; Resource name.
2688	Name *string `json:"name,omitempty"`
2689	// Type - READ-ONLY; Resource type.
2690	Type *string `json:"type,omitempty"`
2691	// Location - Resource location.
2692	Location *string `json:"location,omitempty"`
2693	// Tags - Resource tags.
2694	Tags map[string]*string `json:"tags"`
2695}
2696
2697// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2698func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2699	objectMap := make(map[string]interface{})
2700	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2701		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2702	}
2703	if asg.ID != nil {
2704		objectMap["id"] = asg.ID
2705	}
2706	if asg.Location != nil {
2707		objectMap["location"] = asg.Location
2708	}
2709	if asg.Tags != nil {
2710		objectMap["tags"] = asg.Tags
2711	}
2712	return json.Marshal(objectMap)
2713}
2714
2715// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2716func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2717	var m map[string]*json.RawMessage
2718	err := json.Unmarshal(body, &m)
2719	if err != nil {
2720		return err
2721	}
2722	for k, v := range m {
2723		switch k {
2724		case "properties":
2725			if v != nil {
2726				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2727				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2728				if err != nil {
2729					return err
2730				}
2731				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2732			}
2733		case "etag":
2734			if v != nil {
2735				var etag string
2736				err = json.Unmarshal(*v, &etag)
2737				if err != nil {
2738					return err
2739				}
2740				asg.Etag = &etag
2741			}
2742		case "id":
2743			if v != nil {
2744				var ID string
2745				err = json.Unmarshal(*v, &ID)
2746				if err != nil {
2747					return err
2748				}
2749				asg.ID = &ID
2750			}
2751		case "name":
2752			if v != nil {
2753				var name string
2754				err = json.Unmarshal(*v, &name)
2755				if err != nil {
2756					return err
2757				}
2758				asg.Name = &name
2759			}
2760		case "type":
2761			if v != nil {
2762				var typeVar string
2763				err = json.Unmarshal(*v, &typeVar)
2764				if err != nil {
2765					return err
2766				}
2767				asg.Type = &typeVar
2768			}
2769		case "location":
2770			if v != nil {
2771				var location string
2772				err = json.Unmarshal(*v, &location)
2773				if err != nil {
2774					return err
2775				}
2776				asg.Location = &location
2777			}
2778		case "tags":
2779			if v != nil {
2780				var tags map[string]*string
2781				err = json.Unmarshal(*v, &tags)
2782				if err != nil {
2783					return err
2784				}
2785				asg.Tags = tags
2786			}
2787		}
2788	}
2789
2790	return nil
2791}
2792
2793// ApplicationSecurityGroupListResult a list of application security groups.
2794type ApplicationSecurityGroupListResult struct {
2795	autorest.Response `json:"-"`
2796	// Value - A list of application security groups.
2797	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2798	// NextLink - READ-ONLY; The URL to get the next set of results.
2799	NextLink *string `json:"nextLink,omitempty"`
2800}
2801
2802// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2803func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2804	objectMap := make(map[string]interface{})
2805	if asglr.Value != nil {
2806		objectMap["value"] = asglr.Value
2807	}
2808	return json.Marshal(objectMap)
2809}
2810
2811// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2812// ApplicationSecurityGroup values.
2813type ApplicationSecurityGroupListResultIterator struct {
2814	i    int
2815	page ApplicationSecurityGroupListResultPage
2816}
2817
2818// NextWithContext advances to the next value.  If there was an error making
2819// the request the iterator does not advance and the error is returned.
2820func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2821	if tracing.IsEnabled() {
2822		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2823		defer func() {
2824			sc := -1
2825			if iter.Response().Response.Response != nil {
2826				sc = iter.Response().Response.Response.StatusCode
2827			}
2828			tracing.EndSpan(ctx, sc, err)
2829		}()
2830	}
2831	iter.i++
2832	if iter.i < len(iter.page.Values()) {
2833		return nil
2834	}
2835	err = iter.page.NextWithContext(ctx)
2836	if err != nil {
2837		iter.i--
2838		return err
2839	}
2840	iter.i = 0
2841	return nil
2842}
2843
2844// Next advances to the next value.  If there was an error making
2845// the request the iterator does not advance and the error is returned.
2846// Deprecated: Use NextWithContext() instead.
2847func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2848	return iter.NextWithContext(context.Background())
2849}
2850
2851// NotDone returns true if the enumeration should be started or is not yet complete.
2852func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2854}
2855
2856// Response returns the raw server response from the last page request.
2857func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2858	return iter.page.Response()
2859}
2860
2861// Value returns the current value or a zero-initialized value if the
2862// iterator has advanced beyond the end of the collection.
2863func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2864	if !iter.page.NotDone() {
2865		return ApplicationSecurityGroup{}
2866	}
2867	return iter.page.Values()[iter.i]
2868}
2869
2870// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2871func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2872	return ApplicationSecurityGroupListResultIterator{page: page}
2873}
2874
2875// IsEmpty returns true if the ListResult contains no values.
2876func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2877	return asglr.Value == nil || len(*asglr.Value) == 0
2878}
2879
2880// hasNextLink returns true if the NextLink is not empty.
2881func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2882	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2883}
2884
2885// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2886// It returns nil if no more results exist.
2887func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2888	if !asglr.hasNextLink() {
2889		return nil, nil
2890	}
2891	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2892		autorest.AsJSON(),
2893		autorest.AsGet(),
2894		autorest.WithBaseURL(to.String(asglr.NextLink)))
2895}
2896
2897// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2898type ApplicationSecurityGroupListResultPage struct {
2899	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2900	asglr ApplicationSecurityGroupListResult
2901}
2902
2903// NextWithContext advances to the next page of values.  If there was an error making
2904// the request the page does not advance and the error is returned.
2905func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2906	if tracing.IsEnabled() {
2907		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2908		defer func() {
2909			sc := -1
2910			if page.Response().Response.Response != nil {
2911				sc = page.Response().Response.Response.StatusCode
2912			}
2913			tracing.EndSpan(ctx, sc, err)
2914		}()
2915	}
2916	for {
2917		next, err := page.fn(ctx, page.asglr)
2918		if err != nil {
2919			return err
2920		}
2921		page.asglr = next
2922		if !next.hasNextLink() || !next.IsEmpty() {
2923			break
2924		}
2925	}
2926	return nil
2927}
2928
2929// Next advances to the next page of values.  If there was an error making
2930// the request the page does not advance and the error is returned.
2931// Deprecated: Use NextWithContext() instead.
2932func (page *ApplicationSecurityGroupListResultPage) Next() error {
2933	return page.NextWithContext(context.Background())
2934}
2935
2936// NotDone returns true if the page enumeration should be started or is not yet complete.
2937func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2938	return !page.asglr.IsEmpty()
2939}
2940
2941// Response returns the raw server response from the last page request.
2942func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2943	return page.asglr
2944}
2945
2946// Values returns the slice of values for the current page or nil if there are no values.
2947func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2948	if page.asglr.IsEmpty() {
2949		return nil
2950	}
2951	return *page.asglr.Value
2952}
2953
2954// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2955func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2956	return ApplicationSecurityGroupListResultPage{
2957		fn:    getNextPage,
2958		asglr: cur,
2959	}
2960}
2961
2962// ApplicationSecurityGroupPropertiesFormat application security group properties.
2963type ApplicationSecurityGroupPropertiesFormat struct {
2964	// ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
2965	ResourceGUID *string `json:"resourceGuid,omitempty"`
2966	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2967	ProvisioningState *string `json:"provisioningState,omitempty"`
2968}
2969
2970// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
2971func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
2972	objectMap := make(map[string]interface{})
2973	return json.Marshal(objectMap)
2974}
2975
2976// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2977// of a long-running operation.
2978type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2979	azure.FutureAPI
2980	// Result returns the result of the asynchronous operation.
2981	// If the operation has not completed it will return an error.
2982	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2983}
2984
2985// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2986func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2987	var azFuture azure.Future
2988	if err := json.Unmarshal(body, &azFuture); err != nil {
2989		return err
2990	}
2991	future.FutureAPI = &azFuture
2992	future.Result = future.result
2993	return nil
2994}
2995
2996// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
2997func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
2998	var done bool
2999	done, err = future.DoneWithContext(context.Background(), client)
3000	if err != nil {
3001		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3002		return
3003	}
3004	if !done {
3005		asg.Response.Response = future.Response()
3006		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3007		return
3008	}
3009	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3010	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3011		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3012		if err != nil {
3013			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3014		}
3015	}
3016	return
3017}
3018
3019// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3020// long-running operation.
3021type ApplicationSecurityGroupsDeleteFuture struct {
3022	azure.FutureAPI
3023	// Result returns the result of the asynchronous operation.
3024	// If the operation has not completed it will return an error.
3025	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3026}
3027
3028// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3029func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3030	var azFuture azure.Future
3031	if err := json.Unmarshal(body, &azFuture); err != nil {
3032		return err
3033	}
3034	future.FutureAPI = &azFuture
3035	future.Result = future.result
3036	return nil
3037}
3038
3039// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3040func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3041	var done bool
3042	done, err = future.DoneWithContext(context.Background(), client)
3043	if err != nil {
3044		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3045		return
3046	}
3047	if !done {
3048		ar.Response = future.Response()
3049		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3050		return
3051	}
3052	ar.Response = future.Response()
3053	return
3054}
3055
3056// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3057// that belongs to an ExpressRouteCircuit.
3058type AuthorizationListResult struct {
3059	autorest.Response `json:"-"`
3060	// Value - The authorizations in an ExpressRoute Circuit.
3061	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3062	// NextLink - The URL to get the next set of results.
3063	NextLink *string `json:"nextLink,omitempty"`
3064}
3065
3066// AuthorizationListResultIterator provides access to a complete listing of
3067// ExpressRouteCircuitAuthorization values.
3068type AuthorizationListResultIterator struct {
3069	i    int
3070	page AuthorizationListResultPage
3071}
3072
3073// NextWithContext advances to the next value.  If there was an error making
3074// the request the iterator does not advance and the error is returned.
3075func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3076	if tracing.IsEnabled() {
3077		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3078		defer func() {
3079			sc := -1
3080			if iter.Response().Response.Response != nil {
3081				sc = iter.Response().Response.Response.StatusCode
3082			}
3083			tracing.EndSpan(ctx, sc, err)
3084		}()
3085	}
3086	iter.i++
3087	if iter.i < len(iter.page.Values()) {
3088		return nil
3089	}
3090	err = iter.page.NextWithContext(ctx)
3091	if err != nil {
3092		iter.i--
3093		return err
3094	}
3095	iter.i = 0
3096	return nil
3097}
3098
3099// Next advances to the next value.  If there was an error making
3100// the request the iterator does not advance and the error is returned.
3101// Deprecated: Use NextWithContext() instead.
3102func (iter *AuthorizationListResultIterator) Next() error {
3103	return iter.NextWithContext(context.Background())
3104}
3105
3106// NotDone returns true if the enumeration should be started or is not yet complete.
3107func (iter AuthorizationListResultIterator) NotDone() bool {
3108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3109}
3110
3111// Response returns the raw server response from the last page request.
3112func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3113	return iter.page.Response()
3114}
3115
3116// Value returns the current value or a zero-initialized value if the
3117// iterator has advanced beyond the end of the collection.
3118func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3119	if !iter.page.NotDone() {
3120		return ExpressRouteCircuitAuthorization{}
3121	}
3122	return iter.page.Values()[iter.i]
3123}
3124
3125// Creates a new instance of the AuthorizationListResultIterator type.
3126func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3127	return AuthorizationListResultIterator{page: page}
3128}
3129
3130// IsEmpty returns true if the ListResult contains no values.
3131func (alr AuthorizationListResult) IsEmpty() bool {
3132	return alr.Value == nil || len(*alr.Value) == 0
3133}
3134
3135// hasNextLink returns true if the NextLink is not empty.
3136func (alr AuthorizationListResult) hasNextLink() bool {
3137	return alr.NextLink != nil && len(*alr.NextLink) != 0
3138}
3139
3140// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3141// It returns nil if no more results exist.
3142func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3143	if !alr.hasNextLink() {
3144		return nil, nil
3145	}
3146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3147		autorest.AsJSON(),
3148		autorest.AsGet(),
3149		autorest.WithBaseURL(to.String(alr.NextLink)))
3150}
3151
3152// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3153type AuthorizationListResultPage struct {
3154	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3155	alr AuthorizationListResult
3156}
3157
3158// NextWithContext advances to the next page of values.  If there was an error making
3159// the request the page does not advance and the error is returned.
3160func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3161	if tracing.IsEnabled() {
3162		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3163		defer func() {
3164			sc := -1
3165			if page.Response().Response.Response != nil {
3166				sc = page.Response().Response.Response.StatusCode
3167			}
3168			tracing.EndSpan(ctx, sc, err)
3169		}()
3170	}
3171	for {
3172		next, err := page.fn(ctx, page.alr)
3173		if err != nil {
3174			return err
3175		}
3176		page.alr = next
3177		if !next.hasNextLink() || !next.IsEmpty() {
3178			break
3179		}
3180	}
3181	return nil
3182}
3183
3184// Next advances to the next page of values.  If there was an error making
3185// the request the page does not advance and the error is returned.
3186// Deprecated: Use NextWithContext() instead.
3187func (page *AuthorizationListResultPage) Next() error {
3188	return page.NextWithContext(context.Background())
3189}
3190
3191// NotDone returns true if the page enumeration should be started or is not yet complete.
3192func (page AuthorizationListResultPage) NotDone() bool {
3193	return !page.alr.IsEmpty()
3194}
3195
3196// Response returns the raw server response from the last page request.
3197func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3198	return page.alr
3199}
3200
3201// Values returns the slice of values for the current page or nil if there are no values.
3202func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3203	if page.alr.IsEmpty() {
3204		return nil
3205	}
3206	return *page.alr.Value
3207}
3208
3209// Creates a new instance of the AuthorizationListResultPage type.
3210func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3211	return AuthorizationListResultPage{
3212		fn:  getNextPage,
3213		alr: cur,
3214	}
3215}
3216
3217// AuthorizationPropertiesFormat ...
3218type AuthorizationPropertiesFormat struct {
3219	// AuthorizationKey - The authorization key.
3220	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3221	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3222	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3223	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3224	ProvisioningState *string `json:"provisioningState,omitempty"`
3225}
3226
3227// Availability availability of the metric.
3228type Availability struct {
3229	// TimeGrain - The time grain of the availability.
3230	TimeGrain *string `json:"timeGrain,omitempty"`
3231	// Retention - The retention of the availability.
3232	Retention *string `json:"retention,omitempty"`
3233	// BlobDuration - Duration of the availability blob.
3234	BlobDuration *string `json:"blobDuration,omitempty"`
3235}
3236
3237// AvailableProvidersList list of available countries with details.
3238type AvailableProvidersList struct {
3239	autorest.Response `json:"-"`
3240	// Countries - List of available countries.
3241	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3242}
3243
3244// AvailableProvidersListCity city or town details.
3245type AvailableProvidersListCity struct {
3246	// CityName - The city or town name.
3247	CityName *string `json:"cityName,omitempty"`
3248	// Providers - A list of Internet service providers.
3249	Providers *[]string `json:"providers,omitempty"`
3250}
3251
3252// AvailableProvidersListCountry country details.
3253type AvailableProvidersListCountry struct {
3254	// CountryName - The country name.
3255	CountryName *string `json:"countryName,omitempty"`
3256	// Providers - A list of Internet service providers.
3257	Providers *[]string `json:"providers,omitempty"`
3258	// States - List of available states in the country.
3259	States *[]AvailableProvidersListState `json:"states,omitempty"`
3260}
3261
3262// AvailableProvidersListParameters constraints that determine the list of available Internet service
3263// providers.
3264type AvailableProvidersListParameters struct {
3265	// AzureLocations - A list of Azure regions.
3266	AzureLocations *[]string `json:"azureLocations,omitempty"`
3267	// Country - The country for available providers list.
3268	Country *string `json:"country,omitempty"`
3269	// State - The state for available providers list.
3270	State *string `json:"state,omitempty"`
3271	// City - The city or town for available providers list.
3272	City *string `json:"city,omitempty"`
3273}
3274
3275// AvailableProvidersListState state details.
3276type AvailableProvidersListState struct {
3277	// StateName - The state name.
3278	StateName *string `json:"stateName,omitempty"`
3279	// Providers - A list of Internet service providers.
3280	Providers *[]string `json:"providers,omitempty"`
3281	// Cities - List of available cities or towns in the state.
3282	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3283}
3284
3285// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3286// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3287// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3288// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3289// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3290// and error information regarding the failure.
3291type AzureAsyncOperationResult struct {
3292	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3293	Status OperationStatus `json:"status,omitempty"`
3294	Error  *Error          `json:"error,omitempty"`
3295}
3296
3297// AzureReachabilityReport azure reachability report details.
3298type AzureReachabilityReport struct {
3299	autorest.Response `json:"-"`
3300	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3301	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3302	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3303	// ReachabilityReport - List of Azure reachability report items.
3304	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3305}
3306
3307// AzureReachabilityReportItem azure reachability report details for a given provider location.
3308type AzureReachabilityReportItem struct {
3309	// Provider - The Internet service provider.
3310	Provider *string `json:"provider,omitempty"`
3311	// AzureLocation - The Azure region.
3312	AzureLocation *string `json:"azureLocation,omitempty"`
3313	// Latencies - List of latency details for each of the time series.
3314	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3315}
3316
3317// AzureReachabilityReportLatencyInfo details on latency for a time series.
3318type AzureReachabilityReportLatencyInfo struct {
3319	// TimeStamp - The time stamp.
3320	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3321	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3322	Score *int32 `json:"score,omitempty"`
3323}
3324
3325// AzureReachabilityReportLocation parameters that define a geographic location.
3326type AzureReachabilityReportLocation struct {
3327	// Country - The name of the country.
3328	Country *string `json:"country,omitempty"`
3329	// State - The name of the state.
3330	State *string `json:"state,omitempty"`
3331	// City - The name of the city or town.
3332	City *string `json:"city,omitempty"`
3333}
3334
3335// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3336type AzureReachabilityReportParameters struct {
3337	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3338	// Providers - List of Internet service providers.
3339	Providers *[]string `json:"providers,omitempty"`
3340	// AzureLocations - Optional Azure regions to scope the query to.
3341	AzureLocations *[]string `json:"azureLocations,omitempty"`
3342	// StartTime - The start time for the Azure reachability report.
3343	StartTime *date.Time `json:"startTime,omitempty"`
3344	// EndTime - The end time for the Azure reachability report.
3345	EndTime *date.Time `json:"endTime,omitempty"`
3346}
3347
3348// BackendAddressPool pool of backend IP addresses.
3349type BackendAddressPool struct {
3350	autorest.Response `json:"-"`
3351	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3352	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3353	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3354	Name *string `json:"name,omitempty"`
3355	// Etag - A unique read-only string that changes whenever the resource is updated.
3356	Etag *string `json:"etag,omitempty"`
3357	// ID - Resource ID.
3358	ID *string `json:"id,omitempty"`
3359}
3360
3361// MarshalJSON is the custom marshaler for BackendAddressPool.
3362func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3363	objectMap := make(map[string]interface{})
3364	if bap.BackendAddressPoolPropertiesFormat != nil {
3365		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3366	}
3367	if bap.Name != nil {
3368		objectMap["name"] = bap.Name
3369	}
3370	if bap.Etag != nil {
3371		objectMap["etag"] = bap.Etag
3372	}
3373	if bap.ID != nil {
3374		objectMap["id"] = bap.ID
3375	}
3376	return json.Marshal(objectMap)
3377}
3378
3379// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3380func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3381	var m map[string]*json.RawMessage
3382	err := json.Unmarshal(body, &m)
3383	if err != nil {
3384		return err
3385	}
3386	for k, v := range m {
3387		switch k {
3388		case "properties":
3389			if v != nil {
3390				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3391				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3392				if err != nil {
3393					return err
3394				}
3395				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3396			}
3397		case "name":
3398			if v != nil {
3399				var name string
3400				err = json.Unmarshal(*v, &name)
3401				if err != nil {
3402					return err
3403				}
3404				bap.Name = &name
3405			}
3406		case "etag":
3407			if v != nil {
3408				var etag string
3409				err = json.Unmarshal(*v, &etag)
3410				if err != nil {
3411					return err
3412				}
3413				bap.Etag = &etag
3414			}
3415		case "id":
3416			if v != nil {
3417				var ID string
3418				err = json.Unmarshal(*v, &ID)
3419				if err != nil {
3420					return err
3421				}
3422				bap.ID = &ID
3423			}
3424		}
3425	}
3426
3427	return nil
3428}
3429
3430// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3431type BackendAddressPoolPropertiesFormat struct {
3432	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3433	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3434	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3435	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3436	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3437	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3438	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3439	ProvisioningState *string `json:"provisioningState,omitempty"`
3440}
3441
3442// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3443func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3444	objectMap := make(map[string]interface{})
3445	if bappf.ProvisioningState != nil {
3446		objectMap["provisioningState"] = bappf.ProvisioningState
3447	}
3448	return json.Marshal(objectMap)
3449}
3450
3451// BGPCommunity contains bgp community information offered in Service Community resources.
3452type BGPCommunity struct {
3453	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3454	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3455	// CommunityName - The name of the bgp community. e.g. Skype.
3456	CommunityName *string `json:"communityName,omitempty"`
3457	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3458	CommunityValue *string `json:"communityValue,omitempty"`
3459	// CommunityPrefixes - The prefixes that the bgp community contains.
3460	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3461	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3462	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3463	// ServiceGroup - The service group of the bgp community contains.
3464	ServiceGroup *string `json:"serviceGroup,omitempty"`
3465}
3466
3467// BgpPeerStatus BGP peer status details
3468type BgpPeerStatus struct {
3469	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3470	LocalAddress *string `json:"localAddress,omitempty"`
3471	// Neighbor - READ-ONLY; The remote BGP peer
3472	Neighbor *string `json:"neighbor,omitempty"`
3473	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3474	Asn *int32 `json:"asn,omitempty"`
3475	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3476	State BgpPeerState `json:"state,omitempty"`
3477	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3478	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3479	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3480	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3481	// MessagesSent - READ-ONLY; The number of BGP messages sent
3482	MessagesSent *int64 `json:"messagesSent,omitempty"`
3483	// MessagesReceived - READ-ONLY; The number of BGP messages received
3484	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3485}
3486
3487// MarshalJSON is the custom marshaler for BgpPeerStatus.
3488func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
3489	objectMap := make(map[string]interface{})
3490	return json.Marshal(objectMap)
3491}
3492
3493// BgpPeerStatusListResult response for list BGP peer status API service call
3494type BgpPeerStatusListResult struct {
3495	autorest.Response `json:"-"`
3496	// Value - List of BGP peers
3497	Value *[]BgpPeerStatus `json:"value,omitempty"`
3498}
3499
3500// BgpServiceCommunity service Community Properties.
3501type BgpServiceCommunity struct {
3502	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3503	// ID - Resource ID.
3504	ID *string `json:"id,omitempty"`
3505	// Name - READ-ONLY; Resource name.
3506	Name *string `json:"name,omitempty"`
3507	// Type - READ-ONLY; Resource type.
3508	Type *string `json:"type,omitempty"`
3509	// Location - Resource location.
3510	Location *string `json:"location,omitempty"`
3511	// Tags - Resource tags.
3512	Tags map[string]*string `json:"tags"`
3513}
3514
3515// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3516func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3517	objectMap := make(map[string]interface{})
3518	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3519		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3520	}
3521	if bsc.ID != nil {
3522		objectMap["id"] = bsc.ID
3523	}
3524	if bsc.Location != nil {
3525		objectMap["location"] = bsc.Location
3526	}
3527	if bsc.Tags != nil {
3528		objectMap["tags"] = bsc.Tags
3529	}
3530	return json.Marshal(objectMap)
3531}
3532
3533// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3534func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3535	var m map[string]*json.RawMessage
3536	err := json.Unmarshal(body, &m)
3537	if err != nil {
3538		return err
3539	}
3540	for k, v := range m {
3541		switch k {
3542		case "properties":
3543			if v != nil {
3544				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3545				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3546				if err != nil {
3547					return err
3548				}
3549				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3550			}
3551		case "id":
3552			if v != nil {
3553				var ID string
3554				err = json.Unmarshal(*v, &ID)
3555				if err != nil {
3556					return err
3557				}
3558				bsc.ID = &ID
3559			}
3560		case "name":
3561			if v != nil {
3562				var name string
3563				err = json.Unmarshal(*v, &name)
3564				if err != nil {
3565					return err
3566				}
3567				bsc.Name = &name
3568			}
3569		case "type":
3570			if v != nil {
3571				var typeVar string
3572				err = json.Unmarshal(*v, &typeVar)
3573				if err != nil {
3574					return err
3575				}
3576				bsc.Type = &typeVar
3577			}
3578		case "location":
3579			if v != nil {
3580				var location string
3581				err = json.Unmarshal(*v, &location)
3582				if err != nil {
3583					return err
3584				}
3585				bsc.Location = &location
3586			}
3587		case "tags":
3588			if v != nil {
3589				var tags map[string]*string
3590				err = json.Unmarshal(*v, &tags)
3591				if err != nil {
3592					return err
3593				}
3594				bsc.Tags = tags
3595			}
3596		}
3597	}
3598
3599	return nil
3600}
3601
3602// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3603type BgpServiceCommunityListResult struct {
3604	autorest.Response `json:"-"`
3605	// Value - A list of service community resources.
3606	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3607	// NextLink - The URL to get the next set of results.
3608	NextLink *string `json:"nextLink,omitempty"`
3609}
3610
3611// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3612// values.
3613type BgpServiceCommunityListResultIterator struct {
3614	i    int
3615	page BgpServiceCommunityListResultPage
3616}
3617
3618// NextWithContext advances to the next value.  If there was an error making
3619// the request the iterator does not advance and the error is returned.
3620func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3621	if tracing.IsEnabled() {
3622		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3623		defer func() {
3624			sc := -1
3625			if iter.Response().Response.Response != nil {
3626				sc = iter.Response().Response.Response.StatusCode
3627			}
3628			tracing.EndSpan(ctx, sc, err)
3629		}()
3630	}
3631	iter.i++
3632	if iter.i < len(iter.page.Values()) {
3633		return nil
3634	}
3635	err = iter.page.NextWithContext(ctx)
3636	if err != nil {
3637		iter.i--
3638		return err
3639	}
3640	iter.i = 0
3641	return nil
3642}
3643
3644// Next advances to the next value.  If there was an error making
3645// the request the iterator does not advance and the error is returned.
3646// Deprecated: Use NextWithContext() instead.
3647func (iter *BgpServiceCommunityListResultIterator) Next() error {
3648	return iter.NextWithContext(context.Background())
3649}
3650
3651// NotDone returns true if the enumeration should be started or is not yet complete.
3652func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3653	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3654}
3655
3656// Response returns the raw server response from the last page request.
3657func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3658	return iter.page.Response()
3659}
3660
3661// Value returns the current value or a zero-initialized value if the
3662// iterator has advanced beyond the end of the collection.
3663func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3664	if !iter.page.NotDone() {
3665		return BgpServiceCommunity{}
3666	}
3667	return iter.page.Values()[iter.i]
3668}
3669
3670// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3671func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3672	return BgpServiceCommunityListResultIterator{page: page}
3673}
3674
3675// IsEmpty returns true if the ListResult contains no values.
3676func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3677	return bsclr.Value == nil || len(*bsclr.Value) == 0
3678}
3679
3680// hasNextLink returns true if the NextLink is not empty.
3681func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3682	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3683}
3684
3685// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3686// It returns nil if no more results exist.
3687func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3688	if !bsclr.hasNextLink() {
3689		return nil, nil
3690	}
3691	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3692		autorest.AsJSON(),
3693		autorest.AsGet(),
3694		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3695}
3696
3697// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3698type BgpServiceCommunityListResultPage struct {
3699	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3700	bsclr BgpServiceCommunityListResult
3701}
3702
3703// NextWithContext advances to the next page of values.  If there was an error making
3704// the request the page does not advance and the error is returned.
3705func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3706	if tracing.IsEnabled() {
3707		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3708		defer func() {
3709			sc := -1
3710			if page.Response().Response.Response != nil {
3711				sc = page.Response().Response.Response.StatusCode
3712			}
3713			tracing.EndSpan(ctx, sc, err)
3714		}()
3715	}
3716	for {
3717		next, err := page.fn(ctx, page.bsclr)
3718		if err != nil {
3719			return err
3720		}
3721		page.bsclr = next
3722		if !next.hasNextLink() || !next.IsEmpty() {
3723			break
3724		}
3725	}
3726	return nil
3727}
3728
3729// Next advances to the next page of values.  If there was an error making
3730// the request the page does not advance and the error is returned.
3731// Deprecated: Use NextWithContext() instead.
3732func (page *BgpServiceCommunityListResultPage) Next() error {
3733	return page.NextWithContext(context.Background())
3734}
3735
3736// NotDone returns true if the page enumeration should be started or is not yet complete.
3737func (page BgpServiceCommunityListResultPage) NotDone() bool {
3738	return !page.bsclr.IsEmpty()
3739}
3740
3741// Response returns the raw server response from the last page request.
3742func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3743	return page.bsclr
3744}
3745
3746// Values returns the slice of values for the current page or nil if there are no values.
3747func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3748	if page.bsclr.IsEmpty() {
3749		return nil
3750	}
3751	return *page.bsclr.Value
3752}
3753
3754// Creates a new instance of the BgpServiceCommunityListResultPage type.
3755func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3756	return BgpServiceCommunityListResultPage{
3757		fn:    getNextPage,
3758		bsclr: cur,
3759	}
3760}
3761
3762// BgpServiceCommunityPropertiesFormat properties of Service Community.
3763type BgpServiceCommunityPropertiesFormat struct {
3764	// ServiceName - The name of the bgp community. e.g. Skype.
3765	ServiceName *string `json:"serviceName,omitempty"`
3766	// BgpCommunities - Get a list of bgp communities.
3767	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3768}
3769
3770// BgpSettings BGP settings details
3771type BgpSettings struct {
3772	// Asn - The BGP speaker's ASN.
3773	Asn *int64 `json:"asn,omitempty"`
3774	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3775	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3776	// PeerWeight - The weight added to routes learned from this BGP speaker.
3777	PeerWeight *int32 `json:"peerWeight,omitempty"`
3778}
3779
3780// ConnectionMonitor parameters that define the operation to create a connection monitor.
3781type ConnectionMonitor struct {
3782	// Location - Connection monitor location.
3783	Location *string `json:"location,omitempty"`
3784	// Tags - Connection monitor tags.
3785	Tags                         map[string]*string `json:"tags"`
3786	*ConnectionMonitorParameters `json:"properties,omitempty"`
3787}
3788
3789// MarshalJSON is the custom marshaler for ConnectionMonitor.
3790func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
3791	objectMap := make(map[string]interface{})
3792	if cm.Location != nil {
3793		objectMap["location"] = cm.Location
3794	}
3795	if cm.Tags != nil {
3796		objectMap["tags"] = cm.Tags
3797	}
3798	if cm.ConnectionMonitorParameters != nil {
3799		objectMap["properties"] = cm.ConnectionMonitorParameters
3800	}
3801	return json.Marshal(objectMap)
3802}
3803
3804// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
3805func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
3806	var m map[string]*json.RawMessage
3807	err := json.Unmarshal(body, &m)
3808	if err != nil {
3809		return err
3810	}
3811	for k, v := range m {
3812		switch k {
3813		case "location":
3814			if v != nil {
3815				var location string
3816				err = json.Unmarshal(*v, &location)
3817				if err != nil {
3818					return err
3819				}
3820				cm.Location = &location
3821			}
3822		case "tags":
3823			if v != nil {
3824				var tags map[string]*string
3825				err = json.Unmarshal(*v, &tags)
3826				if err != nil {
3827					return err
3828				}
3829				cm.Tags = tags
3830			}
3831		case "properties":
3832			if v != nil {
3833				var connectionMonitorParameters ConnectionMonitorParameters
3834				err = json.Unmarshal(*v, &connectionMonitorParameters)
3835				if err != nil {
3836					return err
3837				}
3838				cm.ConnectionMonitorParameters = &connectionMonitorParameters
3839			}
3840		}
3841	}
3842
3843	return nil
3844}
3845
3846// ConnectionMonitorDestination describes the destination of connection monitor.
3847type ConnectionMonitorDestination struct {
3848	// ResourceID - The ID of the resource used as the destination by connection monitor.
3849	ResourceID *string `json:"resourceId,omitempty"`
3850	// Address - Address of the connection monitor destination (IP or domain name).
3851	Address *string `json:"address,omitempty"`
3852	// Port - The destination port used by connection monitor.
3853	Port *int32 `json:"port,omitempty"`
3854}
3855
3856// ConnectionMonitorListResult list of connection monitors.
3857type ConnectionMonitorListResult struct {
3858	autorest.Response `json:"-"`
3859	// Value - Information about connection monitors.
3860	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
3861}
3862
3863// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
3864type ConnectionMonitorParameters struct {
3865	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
3866	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
3867	// AutoStart - Determines if the connection monitor will start automatically once created.
3868	AutoStart *bool `json:"autoStart,omitempty"`
3869	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3870	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3871}
3872
3873// ConnectionMonitorQueryResult list of connection states snapshots.
3874type ConnectionMonitorQueryResult struct {
3875	autorest.Response `json:"-"`
3876	// States - Information about connection states.
3877	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
3878}
3879
3880// ConnectionMonitorResult information about the connection monitor.
3881type ConnectionMonitorResult struct {
3882	autorest.Response `json:"-"`
3883	// Name - READ-ONLY; Name of the connection monitor.
3884	Name *string `json:"name,omitempty"`
3885	// ID - READ-ONLY; ID of the connection monitor.
3886	ID   *string `json:"id,omitempty"`
3887	Etag *string `json:"etag,omitempty"`
3888	// Type - READ-ONLY; Connection monitor type.
3889	Type *string `json:"type,omitempty"`
3890	// Location - Connection monitor location.
3891	Location *string `json:"location,omitempty"`
3892	// Tags - Connection monitor tags.
3893	Tags                               map[string]*string `json:"tags"`
3894	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
3895}
3896
3897// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
3898func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
3899	objectMap := make(map[string]interface{})
3900	if cmr.Etag != nil {
3901		objectMap["etag"] = cmr.Etag
3902	}
3903	if cmr.Location != nil {
3904		objectMap["location"] = cmr.Location
3905	}
3906	if cmr.Tags != nil {
3907		objectMap["tags"] = cmr.Tags
3908	}
3909	if cmr.ConnectionMonitorResultProperties != nil {
3910		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
3911	}
3912	return json.Marshal(objectMap)
3913}
3914
3915// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
3916func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
3917	var m map[string]*json.RawMessage
3918	err := json.Unmarshal(body, &m)
3919	if err != nil {
3920		return err
3921	}
3922	for k, v := range m {
3923		switch k {
3924		case "name":
3925			if v != nil {
3926				var name string
3927				err = json.Unmarshal(*v, &name)
3928				if err != nil {
3929					return err
3930				}
3931				cmr.Name = &name
3932			}
3933		case "id":
3934			if v != nil {
3935				var ID string
3936				err = json.Unmarshal(*v, &ID)
3937				if err != nil {
3938					return err
3939				}
3940				cmr.ID = &ID
3941			}
3942		case "etag":
3943			if v != nil {
3944				var etag string
3945				err = json.Unmarshal(*v, &etag)
3946				if err != nil {
3947					return err
3948				}
3949				cmr.Etag = &etag
3950			}
3951		case "type":
3952			if v != nil {
3953				var typeVar string
3954				err = json.Unmarshal(*v, &typeVar)
3955				if err != nil {
3956					return err
3957				}
3958				cmr.Type = &typeVar
3959			}
3960		case "location":
3961			if v != nil {
3962				var location string
3963				err = json.Unmarshal(*v, &location)
3964				if err != nil {
3965					return err
3966				}
3967				cmr.Location = &location
3968			}
3969		case "tags":
3970			if v != nil {
3971				var tags map[string]*string
3972				err = json.Unmarshal(*v, &tags)
3973				if err != nil {
3974					return err
3975				}
3976				cmr.Tags = tags
3977			}
3978		case "properties":
3979			if v != nil {
3980				var connectionMonitorResultProperties ConnectionMonitorResultProperties
3981				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
3982				if err != nil {
3983					return err
3984				}
3985				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
3986			}
3987		}
3988	}
3989
3990	return nil
3991}
3992
3993// ConnectionMonitorResultProperties describes the properties of a connection monitor.
3994type ConnectionMonitorResultProperties struct {
3995	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3996	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3997	// StartTime - The date and time when the connection monitor was started.
3998	StartTime *date.Time `json:"startTime,omitempty"`
3999	// MonitoringStatus - The monitoring status of the connection monitor.
4000	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4001	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4002	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4003	// AutoStart - Determines if the connection monitor will start automatically once created.
4004	AutoStart *bool `json:"autoStart,omitempty"`
4005	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4006	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4007}
4008
4009// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4010// long-running operation.
4011type ConnectionMonitorsCreateOrUpdateFuture struct {
4012	azure.FutureAPI
4013	// Result returns the result of the asynchronous operation.
4014	// If the operation has not completed it will return an error.
4015	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4016}
4017
4018// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4019func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4020	var azFuture azure.Future
4021	if err := json.Unmarshal(body, &azFuture); err != nil {
4022		return err
4023	}
4024	future.FutureAPI = &azFuture
4025	future.Result = future.result
4026	return nil
4027}
4028
4029// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
4030func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
4031	var done bool
4032	done, err = future.DoneWithContext(context.Background(), client)
4033	if err != nil {
4034		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4035		return
4036	}
4037	if !done {
4038		cmr.Response.Response = future.Response()
4039		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
4040		return
4041	}
4042	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4043	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
4044		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
4045		if err != nil {
4046			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
4047		}
4048	}
4049	return
4050}
4051
4052// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4053// long-running operation.
4054type ConnectionMonitorsDeleteFuture struct {
4055	azure.FutureAPI
4056	// Result returns the result of the asynchronous operation.
4057	// If the operation has not completed it will return an error.
4058	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4059}
4060
4061// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4062func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
4063	var azFuture azure.Future
4064	if err := json.Unmarshal(body, &azFuture); err != nil {
4065		return err
4066	}
4067	future.FutureAPI = &azFuture
4068	future.Result = future.result
4069	return nil
4070}
4071
4072// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
4073func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4074	var done bool
4075	done, err = future.DoneWithContext(context.Background(), client)
4076	if err != nil {
4077		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
4078		return
4079	}
4080	if !done {
4081		ar.Response = future.Response()
4082		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
4083		return
4084	}
4085	ar.Response = future.Response()
4086	return
4087}
4088
4089// ConnectionMonitorSource describes the source of connection monitor.
4090type ConnectionMonitorSource struct {
4091	// ResourceID - The ID of the resource used as the source by connection monitor.
4092	ResourceID *string `json:"resourceId,omitempty"`
4093	// Port - The source port used by connection monitor.
4094	Port *int32 `json:"port,omitempty"`
4095}
4096
4097// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4098// operation.
4099type ConnectionMonitorsQueryFuture struct {
4100	azure.FutureAPI
4101	// Result returns the result of the asynchronous operation.
4102	// If the operation has not completed it will return an error.
4103	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4104}
4105
4106// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4107func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
4108	var azFuture azure.Future
4109	if err := json.Unmarshal(body, &azFuture); err != nil {
4110		return err
4111	}
4112	future.FutureAPI = &azFuture
4113	future.Result = future.result
4114	return nil
4115}
4116
4117// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
4118func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
4119	var done bool
4120	done, err = future.DoneWithContext(context.Background(), client)
4121	if err != nil {
4122		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
4123		return
4124	}
4125	if !done {
4126		cmqr.Response.Response = future.Response()
4127		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
4128		return
4129	}
4130	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4131	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
4132		cmqr, err = client.QueryResponder(cmqr.Response.Response)
4133		if err != nil {
4134			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
4135		}
4136	}
4137	return
4138}
4139
4140// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4141// operation.
4142type ConnectionMonitorsStartFuture struct {
4143	azure.FutureAPI
4144	// Result returns the result of the asynchronous operation.
4145	// If the operation has not completed it will return an error.
4146	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4147}
4148
4149// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4150func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
4151	var azFuture azure.Future
4152	if err := json.Unmarshal(body, &azFuture); err != nil {
4153		return err
4154	}
4155	future.FutureAPI = &azFuture
4156	future.Result = future.result
4157	return nil
4158}
4159
4160// result is the default implementation for ConnectionMonitorsStartFuture.Result.
4161func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4162	var done bool
4163	done, err = future.DoneWithContext(context.Background(), client)
4164	if err != nil {
4165		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
4166		return
4167	}
4168	if !done {
4169		ar.Response = future.Response()
4170		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
4171		return
4172	}
4173	ar.Response = future.Response()
4174	return
4175}
4176
4177// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4178// operation.
4179type ConnectionMonitorsStopFuture struct {
4180	azure.FutureAPI
4181	// Result returns the result of the asynchronous operation.
4182	// If the operation has not completed it will return an error.
4183	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4184}
4185
4186// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4187func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
4188	var azFuture azure.Future
4189	if err := json.Unmarshal(body, &azFuture); err != nil {
4190		return err
4191	}
4192	future.FutureAPI = &azFuture
4193	future.Result = future.result
4194	return nil
4195}
4196
4197// result is the default implementation for ConnectionMonitorsStopFuture.Result.
4198func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4199	var done bool
4200	done, err = future.DoneWithContext(context.Background(), client)
4201	if err != nil {
4202		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
4203		return
4204	}
4205	if !done {
4206		ar.Response = future.Response()
4207		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
4208		return
4209	}
4210	ar.Response = future.Response()
4211	return
4212}
4213
4214// ConnectionResetSharedKey the virtual network connection reset shared key
4215type ConnectionResetSharedKey struct {
4216	autorest.Response `json:"-"`
4217	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4218	KeyLength *int32 `json:"keyLength,omitempty"`
4219}
4220
4221// ConnectionSharedKey response for GetConnectionSharedKey API service call
4222type ConnectionSharedKey struct {
4223	autorest.Response `json:"-"`
4224	// Value - The virtual network connection shared key value.
4225	Value *string `json:"value,omitempty"`
4226}
4227
4228// ConnectionStateSnapshot connection state snapshot.
4229type ConnectionStateSnapshot struct {
4230	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4231	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4232	// StartTime - The start time of the connection snapshot.
4233	StartTime *date.Time `json:"startTime,omitempty"`
4234	// EndTime - The end time of the connection snapshot.
4235	EndTime *date.Time `json:"endTime,omitempty"`
4236	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4237	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4238	// Hops - READ-ONLY; List of hops between the source and the destination.
4239	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4240}
4241
4242// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
4243func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
4244	objectMap := make(map[string]interface{})
4245	if CSS.ConnectionState != "" {
4246		objectMap["connectionState"] = CSS.ConnectionState
4247	}
4248	if CSS.StartTime != nil {
4249		objectMap["startTime"] = CSS.StartTime
4250	}
4251	if CSS.EndTime != nil {
4252		objectMap["endTime"] = CSS.EndTime
4253	}
4254	if CSS.EvaluationState != "" {
4255		objectMap["evaluationState"] = CSS.EvaluationState
4256	}
4257	return json.Marshal(objectMap)
4258}
4259
4260// ConnectivityDestination parameters that define destination of connection.
4261type ConnectivityDestination struct {
4262	// ResourceID - The ID of the resource to which a connection attempt will be made.
4263	ResourceID *string `json:"resourceId,omitempty"`
4264	// Address - The IP address or URI the resource to which a connection attempt will be made.
4265	Address *string `json:"address,omitempty"`
4266	// Port - Port on which check connectivity will be performed.
4267	Port *int32 `json:"port,omitempty"`
4268}
4269
4270// ConnectivityHop information about a hop between the source and the destination.
4271type ConnectivityHop struct {
4272	// Type - READ-ONLY; The type of the hop.
4273	Type *string `json:"type,omitempty"`
4274	// ID - READ-ONLY; The ID of the hop.
4275	ID *string `json:"id,omitempty"`
4276	// Address - READ-ONLY; The IP address of the hop.
4277	Address *string `json:"address,omitempty"`
4278	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
4279	ResourceID *string `json:"resourceId,omitempty"`
4280	// NextHopIds - READ-ONLY; List of next hop identifiers.
4281	NextHopIds *[]string `json:"nextHopIds,omitempty"`
4282	// Issues - READ-ONLY; List of issues.
4283	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
4284}
4285
4286// MarshalJSON is the custom marshaler for ConnectivityHop.
4287func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
4288	objectMap := make(map[string]interface{})
4289	return json.Marshal(objectMap)
4290}
4291
4292// ConnectivityInformation information on the connectivity status.
4293type ConnectivityInformation struct {
4294	autorest.Response `json:"-"`
4295	// Hops - READ-ONLY; List of hops between the source and the destination.
4296	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4297	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
4298	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
4299	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
4300	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4301	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
4302	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4303	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
4304	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4305	// ProbesSent - READ-ONLY; Total number of probes sent.
4306	ProbesSent *int32 `json:"probesSent,omitempty"`
4307	// ProbesFailed - READ-ONLY; Number of failed probes.
4308	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4309}
4310
4311// MarshalJSON is the custom marshaler for ConnectivityInformation.
4312func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
4313	objectMap := make(map[string]interface{})
4314	return json.Marshal(objectMap)
4315}
4316
4317// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
4318type ConnectivityIssue struct {
4319	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
4320	Origin Origin `json:"origin,omitempty"`
4321	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
4322	Severity Severity `json:"severity,omitempty"`
4323	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
4324	Type IssueType `json:"type,omitempty"`
4325	// Context - READ-ONLY; Provides additional context on the issue.
4326	Context *[]map[string]*string `json:"context,omitempty"`
4327}
4328
4329// MarshalJSON is the custom marshaler for ConnectivityIssue.
4330func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
4331	objectMap := make(map[string]interface{})
4332	return json.Marshal(objectMap)
4333}
4334
4335// ConnectivityParameters parameters that determine how the connectivity check will be performed.
4336type ConnectivityParameters struct {
4337	Source      *ConnectivitySource      `json:"source,omitempty"`
4338	Destination *ConnectivityDestination `json:"destination,omitempty"`
4339}
4340
4341// ConnectivitySource parameters that define the source of the connection.
4342type ConnectivitySource struct {
4343	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
4344	ResourceID *string `json:"resourceId,omitempty"`
4345	// Port - The source port from which a connectivity check will be performed.
4346	Port *int32 `json:"port,omitempty"`
4347}
4348
4349// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
4350// network. Standard DHCP option for a subnet overrides VNET DHCP options.
4351type DhcpOptions struct {
4352	// DNSServers - The list of DNS servers IP addresses.
4353	DNSServers *[]string `json:"dnsServers,omitempty"`
4354}
4355
4356// Dimension dimension of the metric.
4357type Dimension struct {
4358	// Name - The name of the dimension.
4359	Name *string `json:"name,omitempty"`
4360	// DisplayName - The display name of the dimension.
4361	DisplayName *string `json:"displayName,omitempty"`
4362	// InternalName - The internal name of the dimension.
4363	InternalName *string `json:"internalName,omitempty"`
4364}
4365
4366// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
4367type DNSNameAvailabilityResult struct {
4368	autorest.Response `json:"-"`
4369	// Available - Domain availability (True/False).
4370	Available *bool `json:"available,omitempty"`
4371}
4372
4373// EffectiveNetworkSecurityGroup effective network security group.
4374type EffectiveNetworkSecurityGroup struct {
4375	// NetworkSecurityGroup - The ID of network security group that is applied.
4376	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
4377	// Association - Associated resources.
4378	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
4379	// EffectiveSecurityRules - A collection of effective security rules.
4380	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
4381	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
4382	TagMap map[string][]string `json:"tagMap"`
4383}
4384
4385// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
4386func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
4387	objectMap := make(map[string]interface{})
4388	if ensg.NetworkSecurityGroup != nil {
4389		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
4390	}
4391	if ensg.Association != nil {
4392		objectMap["association"] = ensg.Association
4393	}
4394	if ensg.EffectiveSecurityRules != nil {
4395		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
4396	}
4397	if ensg.TagMap != nil {
4398		objectMap["tagMap"] = ensg.TagMap
4399	}
4400	return json.Marshal(objectMap)
4401}
4402
4403// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
4404type EffectiveNetworkSecurityGroupAssociation struct {
4405	// Subnet - The ID of the subnet if assigned.
4406	Subnet *SubResource `json:"subnet,omitempty"`
4407	// NetworkInterface - The ID of the network interface if assigned.
4408	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
4409}
4410
4411// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
4412// call.
4413type EffectiveNetworkSecurityGroupListResult struct {
4414	autorest.Response `json:"-"`
4415	// Value - A list of effective network security groups.
4416	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
4417	// NextLink - READ-ONLY; The URL to get the next set of results.
4418	NextLink *string `json:"nextLink,omitempty"`
4419}
4420
4421// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
4422func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4423	objectMap := make(map[string]interface{})
4424	if ensglr.Value != nil {
4425		objectMap["value"] = ensglr.Value
4426	}
4427	return json.Marshal(objectMap)
4428}
4429
4430// EffectiveNetworkSecurityRule effective network security rules.
4431type EffectiveNetworkSecurityRule struct {
4432	// Name - The name of the security rule specified by the user (if created by the user).
4433	Name *string `json:"name,omitempty"`
4434	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
4435	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
4436	// SourcePortRange - The source port or range.
4437	SourcePortRange *string `json:"sourcePortRange,omitempty"`
4438	// DestinationPortRange - The destination port or range.
4439	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
4440	// SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
4441	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
4442	// DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
4443	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
4444	// SourceAddressPrefix - The source address prefix.
4445	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
4446	// DestinationAddressPrefix - The destination address prefix.
4447	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
4448	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4449	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
4450	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4451	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
4452	// ExpandedSourceAddressPrefix - The expanded source address prefix.
4453	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
4454	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
4455	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
4456	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
4457	Access SecurityRuleAccess `json:"access,omitempty"`
4458	// Priority - The priority of the rule.
4459	Priority *int32 `json:"priority,omitempty"`
4460	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
4461	Direction SecurityRuleDirection `json:"direction,omitempty"`
4462}
4463
4464// EffectiveRoute effective Route
4465type EffectiveRoute struct {
4466	// Name - The name of the user defined route. This is optional.
4467	Name *string `json:"name,omitempty"`
4468	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
4469	Source EffectiveRouteSource `json:"source,omitempty"`
4470	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
4471	State EffectiveRouteState `json:"state,omitempty"`
4472	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
4473	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
4474	// NextHopIPAddress - The IP address of the next hop of the effective route.
4475	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
4476	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
4477	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
4478}
4479
4480// EffectiveRouteListResult response for list effective route API service call.
4481type EffectiveRouteListResult struct {
4482	autorest.Response `json:"-"`
4483	// Value - A list of effective routes.
4484	Value *[]EffectiveRoute `json:"value,omitempty"`
4485	// NextLink - READ-ONLY; The URL to get the next set of results.
4486	NextLink *string `json:"nextLink,omitempty"`
4487}
4488
4489// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
4490func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
4491	objectMap := make(map[string]interface{})
4492	if erlr.Value != nil {
4493		objectMap["value"] = erlr.Value
4494	}
4495	return json.Marshal(objectMap)
4496}
4497
4498// EndpointServiceResult endpoint service.
4499type EndpointServiceResult struct {
4500	// Name - READ-ONLY; Name of the endpoint service.
4501	Name *string `json:"name,omitempty"`
4502	// Type - READ-ONLY; Type of the endpoint service.
4503	Type *string `json:"type,omitempty"`
4504	// ID - Resource ID.
4505	ID *string `json:"id,omitempty"`
4506}
4507
4508// MarshalJSON is the custom marshaler for EndpointServiceResult.
4509func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
4510	objectMap := make(map[string]interface{})
4511	if esr.ID != nil {
4512		objectMap["id"] = esr.ID
4513	}
4514	return json.Marshal(objectMap)
4515}
4516
4517// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
4518type EndpointServicesListResult struct {
4519	autorest.Response `json:"-"`
4520	// Value - List of available endpoint services in a region.
4521	Value *[]EndpointServiceResult `json:"value,omitempty"`
4522	// NextLink - The URL to get the next set of results.
4523	NextLink *string `json:"nextLink,omitempty"`
4524}
4525
4526// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
4527// values.
4528type EndpointServicesListResultIterator struct {
4529	i    int
4530	page EndpointServicesListResultPage
4531}
4532
4533// NextWithContext advances to the next value.  If there was an error making
4534// the request the iterator does not advance and the error is returned.
4535func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
4536	if tracing.IsEnabled() {
4537		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
4538		defer func() {
4539			sc := -1
4540			if iter.Response().Response.Response != nil {
4541				sc = iter.Response().Response.Response.StatusCode
4542			}
4543			tracing.EndSpan(ctx, sc, err)
4544		}()
4545	}
4546	iter.i++
4547	if iter.i < len(iter.page.Values()) {
4548		return nil
4549	}
4550	err = iter.page.NextWithContext(ctx)
4551	if err != nil {
4552		iter.i--
4553		return err
4554	}
4555	iter.i = 0
4556	return nil
4557}
4558
4559// Next advances to the next value.  If there was an error making
4560// the request the iterator does not advance and the error is returned.
4561// Deprecated: Use NextWithContext() instead.
4562func (iter *EndpointServicesListResultIterator) Next() error {
4563	return iter.NextWithContext(context.Background())
4564}
4565
4566// NotDone returns true if the enumeration should be started or is not yet complete.
4567func (iter EndpointServicesListResultIterator) NotDone() bool {
4568	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4569}
4570
4571// Response returns the raw server response from the last page request.
4572func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
4573	return iter.page.Response()
4574}
4575
4576// Value returns the current value or a zero-initialized value if the
4577// iterator has advanced beyond the end of the collection.
4578func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
4579	if !iter.page.NotDone() {
4580		return EndpointServiceResult{}
4581	}
4582	return iter.page.Values()[iter.i]
4583}
4584
4585// Creates a new instance of the EndpointServicesListResultIterator type.
4586func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
4587	return EndpointServicesListResultIterator{page: page}
4588}
4589
4590// IsEmpty returns true if the ListResult contains no values.
4591func (eslr EndpointServicesListResult) IsEmpty() bool {
4592	return eslr.Value == nil || len(*eslr.Value) == 0
4593}
4594
4595// hasNextLink returns true if the NextLink is not empty.
4596func (eslr EndpointServicesListResult) hasNextLink() bool {
4597	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
4598}
4599
4600// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
4601// It returns nil if no more results exist.
4602func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
4603	if !eslr.hasNextLink() {
4604		return nil, nil
4605	}
4606	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4607		autorest.AsJSON(),
4608		autorest.AsGet(),
4609		autorest.WithBaseURL(to.String(eslr.NextLink)))
4610}
4611
4612// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
4613type EndpointServicesListResultPage struct {
4614	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
4615	eslr EndpointServicesListResult
4616}
4617
4618// NextWithContext advances to the next page of values.  If there was an error making
4619// the request the page does not advance and the error is returned.
4620func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
4621	if tracing.IsEnabled() {
4622		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
4623		defer func() {
4624			sc := -1
4625			if page.Response().Response.Response != nil {
4626				sc = page.Response().Response.Response.StatusCode
4627			}
4628			tracing.EndSpan(ctx, sc, err)
4629		}()
4630	}
4631	for {
4632		next, err := page.fn(ctx, page.eslr)
4633		if err != nil {
4634			return err
4635		}
4636		page.eslr = next
4637		if !next.hasNextLink() || !next.IsEmpty() {
4638			break
4639		}
4640	}
4641	return nil
4642}
4643
4644// Next advances to the next page of values.  If there was an error making
4645// the request the page does not advance and the error is returned.
4646// Deprecated: Use NextWithContext() instead.
4647func (page *EndpointServicesListResultPage) Next() error {
4648	return page.NextWithContext(context.Background())
4649}
4650
4651// NotDone returns true if the page enumeration should be started or is not yet complete.
4652func (page EndpointServicesListResultPage) NotDone() bool {
4653	return !page.eslr.IsEmpty()
4654}
4655
4656// Response returns the raw server response from the last page request.
4657func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
4658	return page.eslr
4659}
4660
4661// Values returns the slice of values for the current page or nil if there are no values.
4662func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
4663	if page.eslr.IsEmpty() {
4664		return nil
4665	}
4666	return *page.eslr.Value
4667}
4668
4669// Creates a new instance of the EndpointServicesListResultPage type.
4670func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
4671	return EndpointServicesListResultPage{
4672		fn:   getNextPage,
4673		eslr: cur,
4674	}
4675}
4676
4677// Error ...
4678type Error struct {
4679	Code       *string         `json:"code,omitempty"`
4680	Message    *string         `json:"message,omitempty"`
4681	Target     *string         `json:"target,omitempty"`
4682	Details    *[]ErrorDetails `json:"details,omitempty"`
4683	InnerError *string         `json:"innerError,omitempty"`
4684}
4685
4686// ErrorDetails ...
4687type ErrorDetails struct {
4688	Code    *string `json:"code,omitempty"`
4689	Target  *string `json:"target,omitempty"`
4690	Message *string `json:"message,omitempty"`
4691}
4692
4693// ExpressRouteCircuit expressRouteCircuit resource
4694type ExpressRouteCircuit struct {
4695	autorest.Response `json:"-"`
4696	// Sku - The SKU.
4697	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
4698	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
4699	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4700	Etag *string `json:"etag,omitempty"`
4701	// ID - Resource ID.
4702	ID *string `json:"id,omitempty"`
4703	// Name - READ-ONLY; Resource name.
4704	Name *string `json:"name,omitempty"`
4705	// Type - READ-ONLY; Resource type.
4706	Type *string `json:"type,omitempty"`
4707	// Location - Resource location.
4708	Location *string `json:"location,omitempty"`
4709	// Tags - Resource tags.
4710	Tags map[string]*string `json:"tags"`
4711}
4712
4713// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
4714func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
4715	objectMap := make(map[string]interface{})
4716	if erc.Sku != nil {
4717		objectMap["sku"] = erc.Sku
4718	}
4719	if erc.ExpressRouteCircuitPropertiesFormat != nil {
4720		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
4721	}
4722	if erc.ID != nil {
4723		objectMap["id"] = erc.ID
4724	}
4725	if erc.Location != nil {
4726		objectMap["location"] = erc.Location
4727	}
4728	if erc.Tags != nil {
4729		objectMap["tags"] = erc.Tags
4730	}
4731	return json.Marshal(objectMap)
4732}
4733
4734// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
4735func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
4736	var m map[string]*json.RawMessage
4737	err := json.Unmarshal(body, &m)
4738	if err != nil {
4739		return err
4740	}
4741	for k, v := range m {
4742		switch k {
4743		case "sku":
4744			if v != nil {
4745				var sku ExpressRouteCircuitSku
4746				err = json.Unmarshal(*v, &sku)
4747				if err != nil {
4748					return err
4749				}
4750				erc.Sku = &sku
4751			}
4752		case "properties":
4753			if v != nil {
4754				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
4755				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
4756				if err != nil {
4757					return err
4758				}
4759				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
4760			}
4761		case "etag":
4762			if v != nil {
4763				var etag string
4764				err = json.Unmarshal(*v, &etag)
4765				if err != nil {
4766					return err
4767				}
4768				erc.Etag = &etag
4769			}
4770		case "id":
4771			if v != nil {
4772				var ID string
4773				err = json.Unmarshal(*v, &ID)
4774				if err != nil {
4775					return err
4776				}
4777				erc.ID = &ID
4778			}
4779		case "name":
4780			if v != nil {
4781				var name string
4782				err = json.Unmarshal(*v, &name)
4783				if err != nil {
4784					return err
4785				}
4786				erc.Name = &name
4787			}
4788		case "type":
4789			if v != nil {
4790				var typeVar string
4791				err = json.Unmarshal(*v, &typeVar)
4792				if err != nil {
4793					return err
4794				}
4795				erc.Type = &typeVar
4796			}
4797		case "location":
4798			if v != nil {
4799				var location string
4800				err = json.Unmarshal(*v, &location)
4801				if err != nil {
4802					return err
4803				}
4804				erc.Location = &location
4805			}
4806		case "tags":
4807			if v != nil {
4808				var tags map[string]*string
4809				err = json.Unmarshal(*v, &tags)
4810				if err != nil {
4811					return err
4812				}
4813				erc.Tags = tags
4814			}
4815		}
4816	}
4817
4818	return nil
4819}
4820
4821// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
4822type ExpressRouteCircuitArpTable struct {
4823	// Age - Age
4824	Age *int32 `json:"age,omitempty"`
4825	// Interface - Interface
4826	Interface *string `json:"interface,omitempty"`
4827	// IPAddress - The IP address.
4828	IPAddress *string `json:"ipAddress,omitempty"`
4829	// MacAddress - The MAC address.
4830	MacAddress *string `json:"macAddress,omitempty"`
4831}
4832
4833// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
4834type ExpressRouteCircuitAuthorization struct {
4835	autorest.Response              `json:"-"`
4836	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
4837	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4838	Name *string `json:"name,omitempty"`
4839	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4840	Etag *string `json:"etag,omitempty"`
4841	// ID - Resource ID.
4842	ID *string `json:"id,omitempty"`
4843}
4844
4845// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
4846func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
4847	objectMap := make(map[string]interface{})
4848	if erca.AuthorizationPropertiesFormat != nil {
4849		objectMap["properties"] = erca.AuthorizationPropertiesFormat
4850	}
4851	if erca.Name != nil {
4852		objectMap["name"] = erca.Name
4853	}
4854	if erca.ID != nil {
4855		objectMap["id"] = erca.ID
4856	}
4857	return json.Marshal(objectMap)
4858}
4859
4860// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
4861func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
4862	var m map[string]*json.RawMessage
4863	err := json.Unmarshal(body, &m)
4864	if err != nil {
4865		return err
4866	}
4867	for k, v := range m {
4868		switch k {
4869		case "properties":
4870			if v != nil {
4871				var authorizationPropertiesFormat AuthorizationPropertiesFormat
4872				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
4873				if err != nil {
4874					return err
4875				}
4876				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
4877			}
4878		case "name":
4879			if v != nil {
4880				var name string
4881				err = json.Unmarshal(*v, &name)
4882				if err != nil {
4883					return err
4884				}
4885				erca.Name = &name
4886			}
4887		case "etag":
4888			if v != nil {
4889				var etag string
4890				err = json.Unmarshal(*v, &etag)
4891				if err != nil {
4892					return err
4893				}
4894				erca.Etag = &etag
4895			}
4896		case "id":
4897			if v != nil {
4898				var ID string
4899				err = json.Unmarshal(*v, &ID)
4900				if err != nil {
4901					return err
4902				}
4903				erca.ID = &ID
4904			}
4905		}
4906	}
4907
4908	return nil
4909}
4910
4911// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
4912// results of a long-running operation.
4913type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
4914	azure.FutureAPI
4915	// Result returns the result of the asynchronous operation.
4916	// If the operation has not completed it will return an error.
4917	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
4918}
4919
4920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4921func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4922	var azFuture azure.Future
4923	if err := json.Unmarshal(body, &azFuture); err != nil {
4924		return err
4925	}
4926	future.FutureAPI = &azFuture
4927	future.Result = future.result
4928	return nil
4929}
4930
4931// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
4932func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
4933	var done bool
4934	done, err = future.DoneWithContext(context.Background(), client)
4935	if err != nil {
4936		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4937		return
4938	}
4939	if !done {
4940		erca.Response.Response = future.Response()
4941		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
4942		return
4943	}
4944	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4945	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
4946		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
4947		if err != nil {
4948			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
4949		}
4950	}
4951	return
4952}
4953
4954// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
4955// of a long-running operation.
4956type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
4957	azure.FutureAPI
4958	// Result returns the result of the asynchronous operation.
4959	// If the operation has not completed it will return an error.
4960	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
4961}
4962
4963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4964func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
4965	var azFuture azure.Future
4966	if err := json.Unmarshal(body, &azFuture); err != nil {
4967		return err
4968	}
4969	future.FutureAPI = &azFuture
4970	future.Result = future.result
4971	return nil
4972}
4973
4974// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
4975func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
4976	var done bool
4977	done, err = future.DoneWithContext(context.Background(), client)
4978	if err != nil {
4979		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
4980		return
4981	}
4982	if !done {
4983		ar.Response = future.Response()
4984		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
4985		return
4986	}
4987	ar.Response = future.Response()
4988	return
4989}
4990
4991// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
4992type ExpressRouteCircuitListResult struct {
4993	autorest.Response `json:"-"`
4994	// Value - A list of ExpressRouteCircuits in a resource group.
4995	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
4996	// NextLink - The URL to get the next set of results.
4997	NextLink *string `json:"nextLink,omitempty"`
4998}
4999
5000// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
5001// values.
5002type ExpressRouteCircuitListResultIterator struct {
5003	i    int
5004	page ExpressRouteCircuitListResultPage
5005}
5006
5007// NextWithContext advances to the next value.  If there was an error making
5008// the request the iterator does not advance and the error is returned.
5009func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
5010	if tracing.IsEnabled() {
5011		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
5012		defer func() {
5013			sc := -1
5014			if iter.Response().Response.Response != nil {
5015				sc = iter.Response().Response.Response.StatusCode
5016			}
5017			tracing.EndSpan(ctx, sc, err)
5018		}()
5019	}
5020	iter.i++
5021	if iter.i < len(iter.page.Values()) {
5022		return nil
5023	}
5024	err = iter.page.NextWithContext(ctx)
5025	if err != nil {
5026		iter.i--
5027		return err
5028	}
5029	iter.i = 0
5030	return nil
5031}
5032
5033// Next advances to the next value.  If there was an error making
5034// the request the iterator does not advance and the error is returned.
5035// Deprecated: Use NextWithContext() instead.
5036func (iter *ExpressRouteCircuitListResultIterator) Next() error {
5037	return iter.NextWithContext(context.Background())
5038}
5039
5040// NotDone returns true if the enumeration should be started or is not yet complete.
5041func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
5042	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5043}
5044
5045// Response returns the raw server response from the last page request.
5046func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
5047	return iter.page.Response()
5048}
5049
5050// Value returns the current value or a zero-initialized value if the
5051// iterator has advanced beyond the end of the collection.
5052func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
5053	if !iter.page.NotDone() {
5054		return ExpressRouteCircuit{}
5055	}
5056	return iter.page.Values()[iter.i]
5057}
5058
5059// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
5060func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
5061	return ExpressRouteCircuitListResultIterator{page: page}
5062}
5063
5064// IsEmpty returns true if the ListResult contains no values.
5065func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
5066	return erclr.Value == nil || len(*erclr.Value) == 0
5067}
5068
5069// hasNextLink returns true if the NextLink is not empty.
5070func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
5071	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
5072}
5073
5074// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
5075// It returns nil if no more results exist.
5076func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
5077	if !erclr.hasNextLink() {
5078		return nil, nil
5079	}
5080	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5081		autorest.AsJSON(),
5082		autorest.AsGet(),
5083		autorest.WithBaseURL(to.String(erclr.NextLink)))
5084}
5085
5086// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
5087type ExpressRouteCircuitListResultPage struct {
5088	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
5089	erclr ExpressRouteCircuitListResult
5090}
5091
5092// NextWithContext advances to the next page of values.  If there was an error making
5093// the request the page does not advance and the error is returned.
5094func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
5095	if tracing.IsEnabled() {
5096		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
5097		defer func() {
5098			sc := -1
5099			if page.Response().Response.Response != nil {
5100				sc = page.Response().Response.Response.StatusCode
5101			}
5102			tracing.EndSpan(ctx, sc, err)
5103		}()
5104	}
5105	for {
5106		next, err := page.fn(ctx, page.erclr)
5107		if err != nil {
5108			return err
5109		}
5110		page.erclr = next
5111		if !next.hasNextLink() || !next.IsEmpty() {
5112			break
5113		}
5114	}
5115	return nil
5116}
5117
5118// Next advances to the next page of values.  If there was an error making
5119// the request the page does not advance and the error is returned.
5120// Deprecated: Use NextWithContext() instead.
5121func (page *ExpressRouteCircuitListResultPage) Next() error {
5122	return page.NextWithContext(context.Background())
5123}
5124
5125// NotDone returns true if the page enumeration should be started or is not yet complete.
5126func (page ExpressRouteCircuitListResultPage) NotDone() bool {
5127	return !page.erclr.IsEmpty()
5128}
5129
5130// Response returns the raw server response from the last page request.
5131func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
5132	return page.erclr
5133}
5134
5135// Values returns the slice of values for the current page or nil if there are no values.
5136func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
5137	if page.erclr.IsEmpty() {
5138		return nil
5139	}
5140	return *page.erclr.Value
5141}
5142
5143// Creates a new instance of the ExpressRouteCircuitListResultPage type.
5144func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
5145	return ExpressRouteCircuitListResultPage{
5146		fn:    getNextPage,
5147		erclr: cur,
5148	}
5149}
5150
5151// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
5152type ExpressRouteCircuitPeering struct {
5153	autorest.Response                           `json:"-"`
5154	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
5155	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5156	Name *string `json:"name,omitempty"`
5157	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5158	Etag *string `json:"etag,omitempty"`
5159	// ID - Resource ID.
5160	ID *string `json:"id,omitempty"`
5161}
5162
5163// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
5164func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
5165	objectMap := make(map[string]interface{})
5166	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
5167		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
5168	}
5169	if ercp.Name != nil {
5170		objectMap["name"] = ercp.Name
5171	}
5172	if ercp.ID != nil {
5173		objectMap["id"] = ercp.ID
5174	}
5175	return json.Marshal(objectMap)
5176}
5177
5178// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
5179func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
5180	var m map[string]*json.RawMessage
5181	err := json.Unmarshal(body, &m)
5182	if err != nil {
5183		return err
5184	}
5185	for k, v := range m {
5186		switch k {
5187		case "properties":
5188			if v != nil {
5189				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
5190				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
5191				if err != nil {
5192					return err
5193				}
5194				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
5195			}
5196		case "name":
5197			if v != nil {
5198				var name string
5199				err = json.Unmarshal(*v, &name)
5200				if err != nil {
5201					return err
5202				}
5203				ercp.Name = &name
5204			}
5205		case "etag":
5206			if v != nil {
5207				var etag string
5208				err = json.Unmarshal(*v, &etag)
5209				if err != nil {
5210					return err
5211				}
5212				ercp.Etag = &etag
5213			}
5214		case "id":
5215			if v != nil {
5216				var ID string
5217				err = json.Unmarshal(*v, &ID)
5218				if err != nil {
5219					return err
5220				}
5221				ercp.ID = &ID
5222			}
5223		}
5224	}
5225
5226	return nil
5227}
5228
5229// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
5230type ExpressRouteCircuitPeeringConfig struct {
5231	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
5232	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
5233	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
5234	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
5235	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
5236	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
5237	// LegacyMode - The legacy mode of the peering.
5238	LegacyMode *int32 `json:"legacyMode,omitempty"`
5239	// CustomerASN - The CustomerASN of the peering.
5240	CustomerASN *int32 `json:"customerASN,omitempty"`
5241	// RoutingRegistryName - The RoutingRegistryName of the configuration.
5242	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
5243}
5244
5245// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
5246// that belong to an ExpressRouteCircuit.
5247type ExpressRouteCircuitPeeringListResult struct {
5248	autorest.Response `json:"-"`
5249	// Value - The peerings in an express route circuit.
5250	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
5251	// NextLink - The URL to get the next set of results.
5252	NextLink *string `json:"nextLink,omitempty"`
5253}
5254
5255// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
5256// ExpressRouteCircuitPeering values.
5257type ExpressRouteCircuitPeeringListResultIterator struct {
5258	i    int
5259	page ExpressRouteCircuitPeeringListResultPage
5260}
5261
5262// NextWithContext advances to the next value.  If there was an error making
5263// the request the iterator does not advance and the error is returned.
5264func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
5265	if tracing.IsEnabled() {
5266		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
5267		defer func() {
5268			sc := -1
5269			if iter.Response().Response.Response != nil {
5270				sc = iter.Response().Response.Response.StatusCode
5271			}
5272			tracing.EndSpan(ctx, sc, err)
5273		}()
5274	}
5275	iter.i++
5276	if iter.i < len(iter.page.Values()) {
5277		return nil
5278	}
5279	err = iter.page.NextWithContext(ctx)
5280	if err != nil {
5281		iter.i--
5282		return err
5283	}
5284	iter.i = 0
5285	return nil
5286}
5287
5288// Next advances to the next value.  If there was an error making
5289// the request the iterator does not advance and the error is returned.
5290// Deprecated: Use NextWithContext() instead.
5291func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
5292	return iter.NextWithContext(context.Background())
5293}
5294
5295// NotDone returns true if the enumeration should be started or is not yet complete.
5296func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
5297	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5298}
5299
5300// Response returns the raw server response from the last page request.
5301func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
5302	return iter.page.Response()
5303}
5304
5305// Value returns the current value or a zero-initialized value if the
5306// iterator has advanced beyond the end of the collection.
5307func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
5308	if !iter.page.NotDone() {
5309		return ExpressRouteCircuitPeering{}
5310	}
5311	return iter.page.Values()[iter.i]
5312}
5313
5314// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
5315func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
5316	return ExpressRouteCircuitPeeringListResultIterator{page: page}
5317}
5318
5319// IsEmpty returns true if the ListResult contains no values.
5320func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
5321	return ercplr.Value == nil || len(*ercplr.Value) == 0
5322}
5323
5324// hasNextLink returns true if the NextLink is not empty.
5325func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
5326	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
5327}
5328
5329// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
5330// It returns nil if no more results exist.
5331func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
5332	if !ercplr.hasNextLink() {
5333		return nil, nil
5334	}
5335	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5336		autorest.AsJSON(),
5337		autorest.AsGet(),
5338		autorest.WithBaseURL(to.String(ercplr.NextLink)))
5339}
5340
5341// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
5342type ExpressRouteCircuitPeeringListResultPage struct {
5343	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
5344	ercplr ExpressRouteCircuitPeeringListResult
5345}
5346
5347// NextWithContext advances to the next page of values.  If there was an error making
5348// the request the page does not advance and the error is returned.
5349func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
5350	if tracing.IsEnabled() {
5351		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
5352		defer func() {
5353			sc := -1
5354			if page.Response().Response.Response != nil {
5355				sc = page.Response().Response.Response.StatusCode
5356			}
5357			tracing.EndSpan(ctx, sc, err)
5358		}()
5359	}
5360	for {
5361		next, err := page.fn(ctx, page.ercplr)
5362		if err != nil {
5363			return err
5364		}
5365		page.ercplr = next
5366		if !next.hasNextLink() || !next.IsEmpty() {
5367			break
5368		}
5369	}
5370	return nil
5371}
5372
5373// Next advances to the next page of values.  If there was an error making
5374// the request the page does not advance and the error is returned.
5375// Deprecated: Use NextWithContext() instead.
5376func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
5377	return page.NextWithContext(context.Background())
5378}
5379
5380// NotDone returns true if the page enumeration should be started or is not yet complete.
5381func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
5382	return !page.ercplr.IsEmpty()
5383}
5384
5385// Response returns the raw server response from the last page request.
5386func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
5387	return page.ercplr
5388}
5389
5390// Values returns the slice of values for the current page or nil if there are no values.
5391func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
5392	if page.ercplr.IsEmpty() {
5393		return nil
5394	}
5395	return *page.ercplr.Value
5396}
5397
5398// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
5399func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
5400	return ExpressRouteCircuitPeeringListResultPage{
5401		fn:     getNextPage,
5402		ercplr: cur,
5403	}
5404}
5405
5406// ExpressRouteCircuitPeeringPropertiesFormat ...
5407type ExpressRouteCircuitPeeringPropertiesFormat struct {
5408	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
5409	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
5410	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
5411	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
5412	// AzureASN - The Azure ASN.
5413	AzureASN *int32 `json:"azureASN,omitempty"`
5414	// PeerASN - The peer ASN.
5415	PeerASN *int64 `json:"peerASN,omitempty"`
5416	// PrimaryPeerAddressPrefix - The primary address prefix.
5417	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
5418	// SecondaryPeerAddressPrefix - The secondary address prefix.
5419	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
5420	// PrimaryAzurePort - The primary port.
5421	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
5422	// SecondaryAzurePort - The secondary port.
5423	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
5424	// SharedKey - The shared key.
5425	SharedKey *string `json:"sharedKey,omitempty"`
5426	// VlanID - The VLAN ID.
5427	VlanID *int32 `json:"vlanId,omitempty"`
5428	// MicrosoftPeeringConfig - The Microsoft peering configuration.
5429	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
5430	// Stats - Gets peering stats.
5431	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
5432	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5433	ProvisioningState *string `json:"provisioningState,omitempty"`
5434	// GatewayManagerEtag - The GatewayManager Etag.
5435	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5436	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
5437	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
5438	// RouteFilter - The reference of the RouteFilter resource.
5439	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
5440	// Ipv6PeeringConfig - The IPv6 peering configuration.
5441	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
5442}
5443
5444// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
5445// of a long-running operation.
5446type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
5447	azure.FutureAPI
5448	// Result returns the result of the asynchronous operation.
5449	// If the operation has not completed it will return an error.
5450	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
5451}
5452
5453// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5454func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5455	var azFuture azure.Future
5456	if err := json.Unmarshal(body, &azFuture); err != nil {
5457		return err
5458	}
5459	future.FutureAPI = &azFuture
5460	future.Result = future.result
5461	return nil
5462}
5463
5464// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
5465func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
5466	var done bool
5467	done, err = future.DoneWithContext(context.Background(), client)
5468	if err != nil {
5469		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5470		return
5471	}
5472	if !done {
5473		ercp.Response.Response = future.Response()
5474		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
5475		return
5476	}
5477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5478	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
5479		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
5480		if err != nil {
5481			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
5482		}
5483	}
5484	return
5485}
5486
5487// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
5488// long-running operation.
5489type ExpressRouteCircuitPeeringsDeleteFuture struct {
5490	azure.FutureAPI
5491	// Result returns the result of the asynchronous operation.
5492	// If the operation has not completed it will return an error.
5493	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
5494}
5495
5496// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5497func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
5498	var azFuture azure.Future
5499	if err := json.Unmarshal(body, &azFuture); err != nil {
5500		return err
5501	}
5502	future.FutureAPI = &azFuture
5503	future.Result = future.result
5504	return nil
5505}
5506
5507// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
5508func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
5509	var done bool
5510	done, err = future.DoneWithContext(context.Background(), client)
5511	if err != nil {
5512		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
5513		return
5514	}
5515	if !done {
5516		ar.Response = future.Response()
5517		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
5518		return
5519	}
5520	ar.Response = future.Response()
5521	return
5522}
5523
5524// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
5525type ExpressRouteCircuitPropertiesFormat struct {
5526	// AllowClassicOperations - Allow classic operations
5527	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
5528	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
5529	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
5530	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
5531	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
5532	// Authorizations - The list of authorizations.
5533	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
5534	// Peerings - The list of peerings.
5535	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
5536	// ServiceKey - The ServiceKey.
5537	ServiceKey *string `json:"serviceKey,omitempty"`
5538	// ServiceProviderNotes - The ServiceProviderNotes.
5539	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
5540	// ServiceProviderProperties - The ServiceProviderProperties.
5541	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
5542	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5543	ProvisioningState *string `json:"provisioningState,omitempty"`
5544	// GatewayManagerEtag - The GatewayManager Etag.
5545	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5546}
5547
5548// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
5549type ExpressRouteCircuitRoutesTable struct {
5550	// NetworkProperty - network
5551	NetworkProperty *string `json:"network,omitempty"`
5552	// NextHop - nextHop
5553	NextHop *string `json:"nextHop,omitempty"`
5554	// LocPrf - locPrf
5555	LocPrf *string `json:"locPrf,omitempty"`
5556	// Weight - weight.
5557	Weight *int32 `json:"weight,omitempty"`
5558	// Path - path
5559	Path *string `json:"path,omitempty"`
5560}
5561
5562// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
5563type ExpressRouteCircuitRoutesTableSummary struct {
5564	// Neighbor - Neighbor
5565	Neighbor *string `json:"neighbor,omitempty"`
5566	// V - BGP version number spoken to the neighbor.
5567	V *int32 `json:"v,omitempty"`
5568	// As - Autonomous system number.
5569	As *int32 `json:"as,omitempty"`
5570	// UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
5571	UpDown *string `json:"upDown,omitempty"`
5572	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
5573	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
5574}
5575
5576// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
5577// Circuits API.
5578type ExpressRouteCircuitsArpTableListResult struct {
5579	autorest.Response `json:"-"`
5580	// Value - Gets list of the ARP table.
5581	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
5582	// NextLink - The URL to get the next set of results.
5583	NextLink *string `json:"nextLink,omitempty"`
5584}
5585
5586// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5587// long-running operation.
5588type ExpressRouteCircuitsCreateOrUpdateFuture struct {
5589	azure.FutureAPI
5590	// Result returns the result of the asynchronous operation.
5591	// If the operation has not completed it will return an error.
5592	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5593}
5594
5595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5596func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5597	var azFuture azure.Future
5598	if err := json.Unmarshal(body, &azFuture); err != nil {
5599		return err
5600	}
5601	future.FutureAPI = &azFuture
5602	future.Result = future.result
5603	return nil
5604}
5605
5606// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
5607func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5608	var done bool
5609	done, err = future.DoneWithContext(context.Background(), client)
5610	if err != nil {
5611		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5612		return
5613	}
5614	if !done {
5615		erc.Response.Response = future.Response()
5616		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
5617		return
5618	}
5619	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5620	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5621		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
5622		if err != nil {
5623			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
5624		}
5625	}
5626	return
5627}
5628
5629// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
5630// long-running operation.
5631type ExpressRouteCircuitsDeleteFuture struct {
5632	azure.FutureAPI
5633	// Result returns the result of the asynchronous operation.
5634	// If the operation has not completed it will return an error.
5635	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
5636}
5637
5638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5639func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
5640	var azFuture azure.Future
5641	if err := json.Unmarshal(body, &azFuture); err != nil {
5642		return err
5643	}
5644	future.FutureAPI = &azFuture
5645	future.Result = future.result
5646	return nil
5647}
5648
5649// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
5650func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
5651	var done bool
5652	done, err = future.DoneWithContext(context.Background(), client)
5653	if err != nil {
5654		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
5655		return
5656	}
5657	if !done {
5658		ar.Response = future.Response()
5659		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
5660		return
5661	}
5662	ar.Response = future.Response()
5663	return
5664}
5665
5666// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
5667// ExpressRouteCircuit.
5668type ExpressRouteCircuitServiceProviderProperties struct {
5669	// ServiceProviderName - The serviceProviderName.
5670	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
5671	// PeeringLocation - The peering location.
5672	PeeringLocation *string `json:"peeringLocation,omitempty"`
5673	// BandwidthInMbps - The BandwidthInMbps.
5674	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
5675}
5676
5677// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
5678type ExpressRouteCircuitSku struct {
5679	// Name - The name of the SKU.
5680	Name *string `json:"name,omitempty"`
5681	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
5682	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
5683	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
5684	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
5685}
5686
5687// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
5688// long-running operation.
5689type ExpressRouteCircuitsListArpTableFuture struct {
5690	azure.FutureAPI
5691	// Result returns the result of the asynchronous operation.
5692	// If the operation has not completed it will return an error.
5693	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
5694}
5695
5696// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5697func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
5698	var azFuture azure.Future
5699	if err := json.Unmarshal(body, &azFuture); err != nil {
5700		return err
5701	}
5702	future.FutureAPI = &azFuture
5703	future.Result = future.result
5704	return nil
5705}
5706
5707// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
5708func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
5709	var done bool
5710	done, err = future.DoneWithContext(context.Background(), client)
5711	if err != nil {
5712		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
5713		return
5714	}
5715	if !done {
5716		ercatlr.Response.Response = future.Response()
5717		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
5718		return
5719	}
5720	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5721	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
5722		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
5723		if err != nil {
5724			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
5725		}
5726	}
5727	return
5728}
5729
5730// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
5731// long-running operation.
5732type ExpressRouteCircuitsListRoutesTableFuture struct {
5733	azure.FutureAPI
5734	// Result returns the result of the asynchronous operation.
5735	// If the operation has not completed it will return an error.
5736	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
5737}
5738
5739// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5740func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
5741	var azFuture azure.Future
5742	if err := json.Unmarshal(body, &azFuture); err != nil {
5743		return err
5744	}
5745	future.FutureAPI = &azFuture
5746	future.Result = future.result
5747	return nil
5748}
5749
5750// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
5751func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
5752	var done bool
5753	done, err = future.DoneWithContext(context.Background(), client)
5754	if err != nil {
5755		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
5756		return
5757	}
5758	if !done {
5759		ercrtlr.Response.Response = future.Response()
5760		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
5761		return
5762	}
5763	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5764	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
5765		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
5766		if err != nil {
5767			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
5768		}
5769	}
5770	return
5771}
5772
5773// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
5774// results of a long-running operation.
5775type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
5776	azure.FutureAPI
5777	// Result returns the result of the asynchronous operation.
5778	// If the operation has not completed it will return an error.
5779	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
5780}
5781
5782// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5783func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
5784	var azFuture azure.Future
5785	if err := json.Unmarshal(body, &azFuture); err != nil {
5786		return err
5787	}
5788	future.FutureAPI = &azFuture
5789	future.Result = future.result
5790	return nil
5791}
5792
5793// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
5794func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
5795	var done bool
5796	done, err = future.DoneWithContext(context.Background(), client)
5797	if err != nil {
5798		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
5799		return
5800	}
5801	if !done {
5802		ercrtslr.Response.Response = future.Response()
5803		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
5804		return
5805	}
5806	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5807	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
5808		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
5809		if err != nil {
5810			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
5811		}
5812	}
5813	return
5814}
5815
5816// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
5817// Circuits API.
5818type ExpressRouteCircuitsRoutesTableListResult struct {
5819	autorest.Response `json:"-"`
5820	// Value - The list of routes table.
5821	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
5822	// NextLink - The URL to get the next set of results.
5823	NextLink *string `json:"nextLink,omitempty"`
5824}
5825
5826// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
5827// Express Route Circuits API.
5828type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
5829	autorest.Response `json:"-"`
5830	// Value - A list of the routes table.
5831	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
5832	// NextLink - The URL to get the next set of results.
5833	NextLink *string `json:"nextLink,omitempty"`
5834}
5835
5836// ExpressRouteCircuitStats contains stats associated with the peering.
5837type ExpressRouteCircuitStats struct {
5838	autorest.Response `json:"-"`
5839	// PrimarybytesIn - Gets BytesIn of the peering.
5840	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
5841	// PrimarybytesOut - Gets BytesOut of the peering.
5842	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
5843	// SecondarybytesIn - Gets BytesIn of the peering.
5844	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
5845	// SecondarybytesOut - Gets BytesOut of the peering.
5846	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
5847}
5848
5849// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5850// long-running operation.
5851type ExpressRouteCircuitsUpdateTagsFuture struct {
5852	azure.FutureAPI
5853	// Result returns the result of the asynchronous operation.
5854	// If the operation has not completed it will return an error.
5855	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5856}
5857
5858// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5859func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
5860	var azFuture azure.Future
5861	if err := json.Unmarshal(body, &azFuture); err != nil {
5862		return err
5863	}
5864	future.FutureAPI = &azFuture
5865	future.Result = future.result
5866	return nil
5867}
5868
5869// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
5870func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
5871	var done bool
5872	done, err = future.DoneWithContext(context.Background(), client)
5873	if err != nil {
5874		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
5875		return
5876	}
5877	if !done {
5878		erc.Response.Response = future.Response()
5879		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
5880		return
5881	}
5882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5883	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
5884		erc, err = client.UpdateTagsResponder(erc.Response.Response)
5885		if err != nil {
5886			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
5887		}
5888	}
5889	return
5890}
5891
5892// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
5893type ExpressRouteServiceProvider struct {
5894	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
5895	// ID - Resource ID.
5896	ID *string `json:"id,omitempty"`
5897	// Name - READ-ONLY; Resource name.
5898	Name *string `json:"name,omitempty"`
5899	// Type - READ-ONLY; Resource type.
5900	Type *string `json:"type,omitempty"`
5901	// Location - Resource location.
5902	Location *string `json:"location,omitempty"`
5903	// Tags - Resource tags.
5904	Tags map[string]*string `json:"tags"`
5905}
5906
5907// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
5908func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
5909	objectMap := make(map[string]interface{})
5910	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
5911		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
5912	}
5913	if ersp.ID != nil {
5914		objectMap["id"] = ersp.ID
5915	}
5916	if ersp.Location != nil {
5917		objectMap["location"] = ersp.Location
5918	}
5919	if ersp.Tags != nil {
5920		objectMap["tags"] = ersp.Tags
5921	}
5922	return json.Marshal(objectMap)
5923}
5924
5925// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
5926func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
5927	var m map[string]*json.RawMessage
5928	err := json.Unmarshal(body, &m)
5929	if err != nil {
5930		return err
5931	}
5932	for k, v := range m {
5933		switch k {
5934		case "properties":
5935			if v != nil {
5936				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
5937				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
5938				if err != nil {
5939					return err
5940				}
5941				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
5942			}
5943		case "id":
5944			if v != nil {
5945				var ID string
5946				err = json.Unmarshal(*v, &ID)
5947				if err != nil {
5948					return err
5949				}
5950				ersp.ID = &ID
5951			}
5952		case "name":
5953			if v != nil {
5954				var name string
5955				err = json.Unmarshal(*v, &name)
5956				if err != nil {
5957					return err
5958				}
5959				ersp.Name = &name
5960			}
5961		case "type":
5962			if v != nil {
5963				var typeVar string
5964				err = json.Unmarshal(*v, &typeVar)
5965				if err != nil {
5966					return err
5967				}
5968				ersp.Type = &typeVar
5969			}
5970		case "location":
5971			if v != nil {
5972				var location string
5973				err = json.Unmarshal(*v, &location)
5974				if err != nil {
5975					return err
5976				}
5977				ersp.Location = &location
5978			}
5979		case "tags":
5980			if v != nil {
5981				var tags map[string]*string
5982				err = json.Unmarshal(*v, &tags)
5983				if err != nil {
5984					return err
5985				}
5986				ersp.Tags = tags
5987			}
5988		}
5989	}
5990
5991	return nil
5992}
5993
5994// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
5995// resources.
5996type ExpressRouteServiceProviderBandwidthsOffered struct {
5997	// OfferName - The OfferName.
5998	OfferName *string `json:"offerName,omitempty"`
5999	// ValueInMbps - The ValueInMbps.
6000	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
6001}
6002
6003// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
6004type ExpressRouteServiceProviderListResult struct {
6005	autorest.Response `json:"-"`
6006	// Value - A list of ExpressRouteResourceProvider resources.
6007	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
6008	// NextLink - The URL to get the next set of results.
6009	NextLink *string `json:"nextLink,omitempty"`
6010}
6011
6012// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
6013// ExpressRouteServiceProvider values.
6014type ExpressRouteServiceProviderListResultIterator struct {
6015	i    int
6016	page ExpressRouteServiceProviderListResultPage
6017}
6018
6019// NextWithContext advances to the next value.  If there was an error making
6020// the request the iterator does not advance and the error is returned.
6021func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
6022	if tracing.IsEnabled() {
6023		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
6024		defer func() {
6025			sc := -1
6026			if iter.Response().Response.Response != nil {
6027				sc = iter.Response().Response.Response.StatusCode
6028			}
6029			tracing.EndSpan(ctx, sc, err)
6030		}()
6031	}
6032	iter.i++
6033	if iter.i < len(iter.page.Values()) {
6034		return nil
6035	}
6036	err = iter.page.NextWithContext(ctx)
6037	if err != nil {
6038		iter.i--
6039		return err
6040	}
6041	iter.i = 0
6042	return nil
6043}
6044
6045// Next advances to the next value.  If there was an error making
6046// the request the iterator does not advance and the error is returned.
6047// Deprecated: Use NextWithContext() instead.
6048func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
6049	return iter.NextWithContext(context.Background())
6050}
6051
6052// NotDone returns true if the enumeration should be started or is not yet complete.
6053func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
6054	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6055}
6056
6057// Response returns the raw server response from the last page request.
6058func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
6059	return iter.page.Response()
6060}
6061
6062// Value returns the current value or a zero-initialized value if the
6063// iterator has advanced beyond the end of the collection.
6064func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
6065	if !iter.page.NotDone() {
6066		return ExpressRouteServiceProvider{}
6067	}
6068	return iter.page.Values()[iter.i]
6069}
6070
6071// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
6072func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
6073	return ExpressRouteServiceProviderListResultIterator{page: page}
6074}
6075
6076// IsEmpty returns true if the ListResult contains no values.
6077func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
6078	return ersplr.Value == nil || len(*ersplr.Value) == 0
6079}
6080
6081// hasNextLink returns true if the NextLink is not empty.
6082func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
6083	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
6084}
6085
6086// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
6087// It returns nil if no more results exist.
6088func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
6089	if !ersplr.hasNextLink() {
6090		return nil, nil
6091	}
6092	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6093		autorest.AsJSON(),
6094		autorest.AsGet(),
6095		autorest.WithBaseURL(to.String(ersplr.NextLink)))
6096}
6097
6098// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
6099type ExpressRouteServiceProviderListResultPage struct {
6100	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
6101	ersplr ExpressRouteServiceProviderListResult
6102}
6103
6104// NextWithContext advances to the next page of values.  If there was an error making
6105// the request the page does not advance and the error is returned.
6106func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
6107	if tracing.IsEnabled() {
6108		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
6109		defer func() {
6110			sc := -1
6111			if page.Response().Response.Response != nil {
6112				sc = page.Response().Response.Response.StatusCode
6113			}
6114			tracing.EndSpan(ctx, sc, err)
6115		}()
6116	}
6117	for {
6118		next, err := page.fn(ctx, page.ersplr)
6119		if err != nil {
6120			return err
6121		}
6122		page.ersplr = next
6123		if !next.hasNextLink() || !next.IsEmpty() {
6124			break
6125		}
6126	}
6127	return nil
6128}
6129
6130// Next advances to the next page of values.  If there was an error making
6131// the request the page does not advance and the error is returned.
6132// Deprecated: Use NextWithContext() instead.
6133func (page *ExpressRouteServiceProviderListResultPage) Next() error {
6134	return page.NextWithContext(context.Background())
6135}
6136
6137// NotDone returns true if the page enumeration should be started or is not yet complete.
6138func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
6139	return !page.ersplr.IsEmpty()
6140}
6141
6142// Response returns the raw server response from the last page request.
6143func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
6144	return page.ersplr
6145}
6146
6147// Values returns the slice of values for the current page or nil if there are no values.
6148func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
6149	if page.ersplr.IsEmpty() {
6150		return nil
6151	}
6152	return *page.ersplr.Value
6153}
6154
6155// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
6156func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
6157	return ExpressRouteServiceProviderListResultPage{
6158		fn:     getNextPage,
6159		ersplr: cur,
6160	}
6161}
6162
6163// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
6164type ExpressRouteServiceProviderPropertiesFormat struct {
6165	// PeeringLocations - Get a list of peering locations.
6166	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
6167	// BandwidthsOffered - Gets bandwidths offered.
6168	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
6169	// ProvisioningState - Gets the provisioning state of the resource.
6170	ProvisioningState *string `json:"provisioningState,omitempty"`
6171}
6172
6173// FlowLogInformation information on the configuration of flow log.
6174type FlowLogInformation struct {
6175	autorest.Response `json:"-"`
6176	// TargetResourceID - The ID of the resource to configure for flow logging.
6177	TargetResourceID   *string `json:"targetResourceId,omitempty"`
6178	*FlowLogProperties `json:"properties,omitempty"`
6179}
6180
6181// MarshalJSON is the custom marshaler for FlowLogInformation.
6182func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
6183	objectMap := make(map[string]interface{})
6184	if fli.TargetResourceID != nil {
6185		objectMap["targetResourceId"] = fli.TargetResourceID
6186	}
6187	if fli.FlowLogProperties != nil {
6188		objectMap["properties"] = fli.FlowLogProperties
6189	}
6190	return json.Marshal(objectMap)
6191}
6192
6193// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
6194func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
6195	var m map[string]*json.RawMessage
6196	err := json.Unmarshal(body, &m)
6197	if err != nil {
6198		return err
6199	}
6200	for k, v := range m {
6201		switch k {
6202		case "targetResourceId":
6203			if v != nil {
6204				var targetResourceID string
6205				err = json.Unmarshal(*v, &targetResourceID)
6206				if err != nil {
6207					return err
6208				}
6209				fli.TargetResourceID = &targetResourceID
6210			}
6211		case "properties":
6212			if v != nil {
6213				var flowLogProperties FlowLogProperties
6214				err = json.Unmarshal(*v, &flowLogProperties)
6215				if err != nil {
6216					return err
6217				}
6218				fli.FlowLogProperties = &flowLogProperties
6219			}
6220		}
6221	}
6222
6223	return nil
6224}
6225
6226// FlowLogProperties parameters that define the configuration of flow log.
6227type FlowLogProperties struct {
6228	// StorageID - ID of the storage account which is used to store the flow log.
6229	StorageID *string `json:"storageId,omitempty"`
6230	// Enabled - Flag to enable/disable flow logging.
6231	Enabled         *bool                      `json:"enabled,omitempty"`
6232	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
6233}
6234
6235// FlowLogStatusParameters parameters that define a resource to query flow log status.
6236type FlowLogStatusParameters struct {
6237	// TargetResourceID - The target resource where getting the flow logging status.
6238	TargetResourceID *string `json:"targetResourceId,omitempty"`
6239}
6240
6241// FrontendIPConfiguration frontend IP address of the load balancer.
6242type FrontendIPConfiguration struct {
6243	autorest.Response `json:"-"`
6244	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
6245	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6246	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6247	Name *string `json:"name,omitempty"`
6248	// Etag - A unique read-only string that changes whenever the resource is updated.
6249	Etag *string `json:"etag,omitempty"`
6250	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
6251	Zones *[]string `json:"zones,omitempty"`
6252	// ID - Resource ID.
6253	ID *string `json:"id,omitempty"`
6254}
6255
6256// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
6257func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
6258	objectMap := make(map[string]interface{})
6259	if fic.FrontendIPConfigurationPropertiesFormat != nil {
6260		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
6261	}
6262	if fic.Name != nil {
6263		objectMap["name"] = fic.Name
6264	}
6265	if fic.Etag != nil {
6266		objectMap["etag"] = fic.Etag
6267	}
6268	if fic.Zones != nil {
6269		objectMap["zones"] = fic.Zones
6270	}
6271	if fic.ID != nil {
6272		objectMap["id"] = fic.ID
6273	}
6274	return json.Marshal(objectMap)
6275}
6276
6277// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
6278func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
6279	var m map[string]*json.RawMessage
6280	err := json.Unmarshal(body, &m)
6281	if err != nil {
6282		return err
6283	}
6284	for k, v := range m {
6285		switch k {
6286		case "properties":
6287			if v != nil {
6288				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
6289				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
6290				if err != nil {
6291					return err
6292				}
6293				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
6294			}
6295		case "name":
6296			if v != nil {
6297				var name string
6298				err = json.Unmarshal(*v, &name)
6299				if err != nil {
6300					return err
6301				}
6302				fic.Name = &name
6303			}
6304		case "etag":
6305			if v != nil {
6306				var etag string
6307				err = json.Unmarshal(*v, &etag)
6308				if err != nil {
6309					return err
6310				}
6311				fic.Etag = &etag
6312			}
6313		case "zones":
6314			if v != nil {
6315				var zones []string
6316				err = json.Unmarshal(*v, &zones)
6317				if err != nil {
6318					return err
6319				}
6320				fic.Zones = &zones
6321			}
6322		case "id":
6323			if v != nil {
6324				var ID string
6325				err = json.Unmarshal(*v, &ID)
6326				if err != nil {
6327					return err
6328				}
6329				fic.ID = &ID
6330			}
6331		}
6332	}
6333
6334	return nil
6335}
6336
6337// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
6338type FrontendIPConfigurationPropertiesFormat struct {
6339	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
6340	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
6341	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
6342	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
6343	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
6344	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
6345	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
6346	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
6347	// PrivateIPAddress - The private IP address of the IP configuration.
6348	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6349	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6350	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6351	// Subnet - The reference of the subnet resource.
6352	Subnet *Subnet `json:"subnet,omitempty"`
6353	// PublicIPAddress - The reference of the Public IP resource.
6354	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6355	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6356	ProvisioningState *string `json:"provisioningState,omitempty"`
6357}
6358
6359// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
6360func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6361	objectMap := make(map[string]interface{})
6362	if ficpf.PrivateIPAddress != nil {
6363		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
6364	}
6365	if ficpf.PrivateIPAllocationMethod != "" {
6366		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
6367	}
6368	if ficpf.Subnet != nil {
6369		objectMap["subnet"] = ficpf.Subnet
6370	}
6371	if ficpf.PublicIPAddress != nil {
6372		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
6373	}
6374	if ficpf.ProvisioningState != nil {
6375		objectMap["provisioningState"] = ficpf.ProvisioningState
6376	}
6377	return json.Marshal(objectMap)
6378}
6379
6380// GatewayRoute gateway routing details
6381type GatewayRoute struct {
6382	// LocalAddress - READ-ONLY; The gateway's local address
6383	LocalAddress *string `json:"localAddress,omitempty"`
6384	// NetworkProperty - READ-ONLY; The route's network prefix
6385	NetworkProperty *string `json:"network,omitempty"`
6386	// NextHop - READ-ONLY; The route's next hop
6387	NextHop *string `json:"nextHop,omitempty"`
6388	// SourcePeer - READ-ONLY; The peer this route was learned from
6389	SourcePeer *string `json:"sourcePeer,omitempty"`
6390	// Origin - READ-ONLY; The source this route was learned from
6391	Origin *string `json:"origin,omitempty"`
6392	// AsPath - READ-ONLY; The route's AS path sequence
6393	AsPath *string `json:"asPath,omitempty"`
6394	// Weight - READ-ONLY; The route's weight
6395	Weight *int32 `json:"weight,omitempty"`
6396}
6397
6398// MarshalJSON is the custom marshaler for GatewayRoute.
6399func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
6400	objectMap := make(map[string]interface{})
6401	return json.Marshal(objectMap)
6402}
6403
6404// GatewayRouteListResult list of virtual network gateway routes
6405type GatewayRouteListResult struct {
6406	autorest.Response `json:"-"`
6407	// Value - List of gateway routes
6408	Value *[]GatewayRoute `json:"value,omitempty"`
6409}
6410
6411// InboundNatPool inbound NAT pool of the load balancer.
6412type InboundNatPool struct {
6413	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
6414	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
6415	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6416	Name *string `json:"name,omitempty"`
6417	// Etag - A unique read-only string that changes whenever the resource is updated.
6418	Etag *string `json:"etag,omitempty"`
6419	// ID - Resource ID.
6420	ID *string `json:"id,omitempty"`
6421}
6422
6423// MarshalJSON is the custom marshaler for InboundNatPool.
6424func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
6425	objectMap := make(map[string]interface{})
6426	if inp.InboundNatPoolPropertiesFormat != nil {
6427		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
6428	}
6429	if inp.Name != nil {
6430		objectMap["name"] = inp.Name
6431	}
6432	if inp.Etag != nil {
6433		objectMap["etag"] = inp.Etag
6434	}
6435	if inp.ID != nil {
6436		objectMap["id"] = inp.ID
6437	}
6438	return json.Marshal(objectMap)
6439}
6440
6441// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
6442func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
6443	var m map[string]*json.RawMessage
6444	err := json.Unmarshal(body, &m)
6445	if err != nil {
6446		return err
6447	}
6448	for k, v := range m {
6449		switch k {
6450		case "properties":
6451			if v != nil {
6452				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
6453				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
6454				if err != nil {
6455					return err
6456				}
6457				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
6458			}
6459		case "name":
6460			if v != nil {
6461				var name string
6462				err = json.Unmarshal(*v, &name)
6463				if err != nil {
6464					return err
6465				}
6466				inp.Name = &name
6467			}
6468		case "etag":
6469			if v != nil {
6470				var etag string
6471				err = json.Unmarshal(*v, &etag)
6472				if err != nil {
6473					return err
6474				}
6475				inp.Etag = &etag
6476			}
6477		case "id":
6478			if v != nil {
6479				var ID string
6480				err = json.Unmarshal(*v, &ID)
6481				if err != nil {
6482					return err
6483				}
6484				inp.ID = &ID
6485			}
6486		}
6487	}
6488
6489	return nil
6490}
6491
6492// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
6493type InboundNatPoolPropertiesFormat struct {
6494	// FrontendIPConfiguration - A reference to frontend IP addresses.
6495	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6496	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6497	Protocol TransportProtocol `json:"protocol,omitempty"`
6498	// FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
6499	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
6500	// FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
6501	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
6502	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
6503	BackendPort *int32 `json:"backendPort,omitempty"`
6504	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6505	ProvisioningState *string `json:"provisioningState,omitempty"`
6506}
6507
6508// InboundNatRule inbound NAT rule of the load balancer.
6509type InboundNatRule struct {
6510	autorest.Response `json:"-"`
6511	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
6512	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
6513	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6514	Name *string `json:"name,omitempty"`
6515	// Etag - A unique read-only string that changes whenever the resource is updated.
6516	Etag *string `json:"etag,omitempty"`
6517	// ID - Resource ID.
6518	ID *string `json:"id,omitempty"`
6519}
6520
6521// MarshalJSON is the custom marshaler for InboundNatRule.
6522func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
6523	objectMap := make(map[string]interface{})
6524	if inr.InboundNatRulePropertiesFormat != nil {
6525		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
6526	}
6527	if inr.Name != nil {
6528		objectMap["name"] = inr.Name
6529	}
6530	if inr.Etag != nil {
6531		objectMap["etag"] = inr.Etag
6532	}
6533	if inr.ID != nil {
6534		objectMap["id"] = inr.ID
6535	}
6536	return json.Marshal(objectMap)
6537}
6538
6539// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
6540func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
6541	var m map[string]*json.RawMessage
6542	err := json.Unmarshal(body, &m)
6543	if err != nil {
6544		return err
6545	}
6546	for k, v := range m {
6547		switch k {
6548		case "properties":
6549			if v != nil {
6550				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
6551				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
6552				if err != nil {
6553					return err
6554				}
6555				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
6556			}
6557		case "name":
6558			if v != nil {
6559				var name string
6560				err = json.Unmarshal(*v, &name)
6561				if err != nil {
6562					return err
6563				}
6564				inr.Name = &name
6565			}
6566		case "etag":
6567			if v != nil {
6568				var etag string
6569				err = json.Unmarshal(*v, &etag)
6570				if err != nil {
6571					return err
6572				}
6573				inr.Etag = &etag
6574			}
6575		case "id":
6576			if v != nil {
6577				var ID string
6578				err = json.Unmarshal(*v, &ID)
6579				if err != nil {
6580					return err
6581				}
6582				inr.ID = &ID
6583			}
6584		}
6585	}
6586
6587	return nil
6588}
6589
6590// InboundNatRuleListResult response for ListInboundNatRule API service call.
6591type InboundNatRuleListResult struct {
6592	autorest.Response `json:"-"`
6593	// Value - A list of inbound nat rules in a load balancer.
6594	Value *[]InboundNatRule `json:"value,omitempty"`
6595	// NextLink - READ-ONLY; The URL to get the next set of results.
6596	NextLink *string `json:"nextLink,omitempty"`
6597}
6598
6599// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
6600func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
6601	objectMap := make(map[string]interface{})
6602	if inrlr.Value != nil {
6603		objectMap["value"] = inrlr.Value
6604	}
6605	return json.Marshal(objectMap)
6606}
6607
6608// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
6609type InboundNatRuleListResultIterator struct {
6610	i    int
6611	page InboundNatRuleListResultPage
6612}
6613
6614// NextWithContext advances to the next value.  If there was an error making
6615// the request the iterator does not advance and the error is returned.
6616func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
6617	if tracing.IsEnabled() {
6618		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
6619		defer func() {
6620			sc := -1
6621			if iter.Response().Response.Response != nil {
6622				sc = iter.Response().Response.Response.StatusCode
6623			}
6624			tracing.EndSpan(ctx, sc, err)
6625		}()
6626	}
6627	iter.i++
6628	if iter.i < len(iter.page.Values()) {
6629		return nil
6630	}
6631	err = iter.page.NextWithContext(ctx)
6632	if err != nil {
6633		iter.i--
6634		return err
6635	}
6636	iter.i = 0
6637	return nil
6638}
6639
6640// Next advances to the next value.  If there was an error making
6641// the request the iterator does not advance and the error is returned.
6642// Deprecated: Use NextWithContext() instead.
6643func (iter *InboundNatRuleListResultIterator) Next() error {
6644	return iter.NextWithContext(context.Background())
6645}
6646
6647// NotDone returns true if the enumeration should be started or is not yet complete.
6648func (iter InboundNatRuleListResultIterator) NotDone() bool {
6649	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6650}
6651
6652// Response returns the raw server response from the last page request.
6653func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
6654	return iter.page.Response()
6655}
6656
6657// Value returns the current value or a zero-initialized value if the
6658// iterator has advanced beyond the end of the collection.
6659func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
6660	if !iter.page.NotDone() {
6661		return InboundNatRule{}
6662	}
6663	return iter.page.Values()[iter.i]
6664}
6665
6666// Creates a new instance of the InboundNatRuleListResultIterator type.
6667func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
6668	return InboundNatRuleListResultIterator{page: page}
6669}
6670
6671// IsEmpty returns true if the ListResult contains no values.
6672func (inrlr InboundNatRuleListResult) IsEmpty() bool {
6673	return inrlr.Value == nil || len(*inrlr.Value) == 0
6674}
6675
6676// hasNextLink returns true if the NextLink is not empty.
6677func (inrlr InboundNatRuleListResult) hasNextLink() bool {
6678	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
6679}
6680
6681// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
6682// It returns nil if no more results exist.
6683func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
6684	if !inrlr.hasNextLink() {
6685		return nil, nil
6686	}
6687	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6688		autorest.AsJSON(),
6689		autorest.AsGet(),
6690		autorest.WithBaseURL(to.String(inrlr.NextLink)))
6691}
6692
6693// InboundNatRuleListResultPage contains a page of InboundNatRule values.
6694type InboundNatRuleListResultPage struct {
6695	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
6696	inrlr InboundNatRuleListResult
6697}
6698
6699// NextWithContext advances to the next page of values.  If there was an error making
6700// the request the page does not advance and the error is returned.
6701func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
6702	if tracing.IsEnabled() {
6703		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
6704		defer func() {
6705			sc := -1
6706			if page.Response().Response.Response != nil {
6707				sc = page.Response().Response.Response.StatusCode
6708			}
6709			tracing.EndSpan(ctx, sc, err)
6710		}()
6711	}
6712	for {
6713		next, err := page.fn(ctx, page.inrlr)
6714		if err != nil {
6715			return err
6716		}
6717		page.inrlr = next
6718		if !next.hasNextLink() || !next.IsEmpty() {
6719			break
6720		}
6721	}
6722	return nil
6723}
6724
6725// Next advances to the next page of values.  If there was an error making
6726// the request the page does not advance and the error is returned.
6727// Deprecated: Use NextWithContext() instead.
6728func (page *InboundNatRuleListResultPage) Next() error {
6729	return page.NextWithContext(context.Background())
6730}
6731
6732// NotDone returns true if the page enumeration should be started or is not yet complete.
6733func (page InboundNatRuleListResultPage) NotDone() bool {
6734	return !page.inrlr.IsEmpty()
6735}
6736
6737// Response returns the raw server response from the last page request.
6738func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
6739	return page.inrlr
6740}
6741
6742// Values returns the slice of values for the current page or nil if there are no values.
6743func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
6744	if page.inrlr.IsEmpty() {
6745		return nil
6746	}
6747	return *page.inrlr.Value
6748}
6749
6750// Creates a new instance of the InboundNatRuleListResultPage type.
6751func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
6752	return InboundNatRuleListResultPage{
6753		fn:    getNextPage,
6754		inrlr: cur,
6755	}
6756}
6757
6758// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
6759type InboundNatRulePropertiesFormat struct {
6760	// FrontendIPConfiguration - A reference to frontend IP addresses.
6761	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6762	// 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.
6763	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
6764	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6765	Protocol TransportProtocol `json:"protocol,omitempty"`
6766	// 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.
6767	FrontendPort *int32 `json:"frontendPort,omitempty"`
6768	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
6769	BackendPort *int32 `json:"backendPort,omitempty"`
6770	// 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.
6771	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6772	// 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.
6773	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6774	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6775	ProvisioningState *string `json:"provisioningState,omitempty"`
6776}
6777
6778// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
6779func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
6780	objectMap := make(map[string]interface{})
6781	if inrpf.FrontendIPConfiguration != nil {
6782		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
6783	}
6784	if inrpf.Protocol != "" {
6785		objectMap["protocol"] = inrpf.Protocol
6786	}
6787	if inrpf.FrontendPort != nil {
6788		objectMap["frontendPort"] = inrpf.FrontendPort
6789	}
6790	if inrpf.BackendPort != nil {
6791		objectMap["backendPort"] = inrpf.BackendPort
6792	}
6793	if inrpf.IdleTimeoutInMinutes != nil {
6794		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
6795	}
6796	if inrpf.EnableFloatingIP != nil {
6797		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
6798	}
6799	if inrpf.ProvisioningState != nil {
6800		objectMap["provisioningState"] = inrpf.ProvisioningState
6801	}
6802	return json.Marshal(objectMap)
6803}
6804
6805// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6806// long-running operation.
6807type InboundNatRulesCreateOrUpdateFuture struct {
6808	azure.FutureAPI
6809	// Result returns the result of the asynchronous operation.
6810	// If the operation has not completed it will return an error.
6811	Result func(InboundNatRulesClient) (InboundNatRule, error)
6812}
6813
6814// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6815func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6816	var azFuture azure.Future
6817	if err := json.Unmarshal(body, &azFuture); err != nil {
6818		return err
6819	}
6820	future.FutureAPI = &azFuture
6821	future.Result = future.result
6822	return nil
6823}
6824
6825// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
6826func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
6827	var done bool
6828	done, err = future.DoneWithContext(context.Background(), client)
6829	if err != nil {
6830		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6831		return
6832	}
6833	if !done {
6834		inr.Response.Response = future.Response()
6835		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
6836		return
6837	}
6838	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6839	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
6840		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
6841		if err != nil {
6842			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
6843		}
6844	}
6845	return
6846}
6847
6848// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6849// operation.
6850type InboundNatRulesDeleteFuture struct {
6851	azure.FutureAPI
6852	// Result returns the result of the asynchronous operation.
6853	// If the operation has not completed it will return an error.
6854	Result func(InboundNatRulesClient) (autorest.Response, error)
6855}
6856
6857// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6858func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
6859	var azFuture azure.Future
6860	if err := json.Unmarshal(body, &azFuture); err != nil {
6861		return err
6862	}
6863	future.FutureAPI = &azFuture
6864	future.Result = future.result
6865	return nil
6866}
6867
6868// result is the default implementation for InboundNatRulesDeleteFuture.Result.
6869func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
6870	var done bool
6871	done, err = future.DoneWithContext(context.Background(), client)
6872	if err != nil {
6873		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
6874		return
6875	}
6876	if !done {
6877		ar.Response = future.Response()
6878		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
6879		return
6880	}
6881	ar.Response = future.Response()
6882	return
6883}
6884
6885// Interface a network interface in a resource group.
6886type Interface struct {
6887	autorest.Response `json:"-"`
6888	// InterfacePropertiesFormat - Properties of the network interface.
6889	*InterfacePropertiesFormat `json:"properties,omitempty"`
6890	// Etag - A unique read-only string that changes whenever the resource is updated.
6891	Etag *string `json:"etag,omitempty"`
6892	// ID - Resource ID.
6893	ID *string `json:"id,omitempty"`
6894	// Name - READ-ONLY; Resource name.
6895	Name *string `json:"name,omitempty"`
6896	// Type - READ-ONLY; Resource type.
6897	Type *string `json:"type,omitempty"`
6898	// Location - Resource location.
6899	Location *string `json:"location,omitempty"`
6900	// Tags - Resource tags.
6901	Tags map[string]*string `json:"tags"`
6902}
6903
6904// MarshalJSON is the custom marshaler for Interface.
6905func (i Interface) MarshalJSON() ([]byte, error) {
6906	objectMap := make(map[string]interface{})
6907	if i.InterfacePropertiesFormat != nil {
6908		objectMap["properties"] = i.InterfacePropertiesFormat
6909	}
6910	if i.Etag != nil {
6911		objectMap["etag"] = i.Etag
6912	}
6913	if i.ID != nil {
6914		objectMap["id"] = i.ID
6915	}
6916	if i.Location != nil {
6917		objectMap["location"] = i.Location
6918	}
6919	if i.Tags != nil {
6920		objectMap["tags"] = i.Tags
6921	}
6922	return json.Marshal(objectMap)
6923}
6924
6925// UnmarshalJSON is the custom unmarshaler for Interface struct.
6926func (i *Interface) UnmarshalJSON(body []byte) error {
6927	var m map[string]*json.RawMessage
6928	err := json.Unmarshal(body, &m)
6929	if err != nil {
6930		return err
6931	}
6932	for k, v := range m {
6933		switch k {
6934		case "properties":
6935			if v != nil {
6936				var interfacePropertiesFormat InterfacePropertiesFormat
6937				err = json.Unmarshal(*v, &interfacePropertiesFormat)
6938				if err != nil {
6939					return err
6940				}
6941				i.InterfacePropertiesFormat = &interfacePropertiesFormat
6942			}
6943		case "etag":
6944			if v != nil {
6945				var etag string
6946				err = json.Unmarshal(*v, &etag)
6947				if err != nil {
6948					return err
6949				}
6950				i.Etag = &etag
6951			}
6952		case "id":
6953			if v != nil {
6954				var ID string
6955				err = json.Unmarshal(*v, &ID)
6956				if err != nil {
6957					return err
6958				}
6959				i.ID = &ID
6960			}
6961		case "name":
6962			if v != nil {
6963				var name string
6964				err = json.Unmarshal(*v, &name)
6965				if err != nil {
6966					return err
6967				}
6968				i.Name = &name
6969			}
6970		case "type":
6971			if v != nil {
6972				var typeVar string
6973				err = json.Unmarshal(*v, &typeVar)
6974				if err != nil {
6975					return err
6976				}
6977				i.Type = &typeVar
6978			}
6979		case "location":
6980			if v != nil {
6981				var location string
6982				err = json.Unmarshal(*v, &location)
6983				if err != nil {
6984					return err
6985				}
6986				i.Location = &location
6987			}
6988		case "tags":
6989			if v != nil {
6990				var tags map[string]*string
6991				err = json.Unmarshal(*v, &tags)
6992				if err != nil {
6993					return err
6994				}
6995				i.Tags = tags
6996			}
6997		}
6998	}
6999
7000	return nil
7001}
7002
7003// InterfaceAssociation network interface and its custom security rules.
7004type InterfaceAssociation struct {
7005	// ID - READ-ONLY; Network interface ID.
7006	ID *string `json:"id,omitempty"`
7007	// SecurityRules - Collection of custom security rules.
7008	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
7009}
7010
7011// MarshalJSON is the custom marshaler for InterfaceAssociation.
7012func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
7013	objectMap := make(map[string]interface{})
7014	if ia.SecurityRules != nil {
7015		objectMap["securityRules"] = ia.SecurityRules
7016	}
7017	return json.Marshal(objectMap)
7018}
7019
7020// InterfaceDNSSettings DNS settings of a network interface.
7021type InterfaceDNSSettings struct {
7022	// 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.
7023	DNSServers *[]string `json:"dnsServers,omitempty"`
7024	// 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.
7025	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
7026	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
7027	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
7028	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
7029	InternalFqdn *string `json:"internalFqdn,omitempty"`
7030	// 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.
7031	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
7032}
7033
7034// InterfaceIPConfiguration iPConfiguration in a network interface.
7035type InterfaceIPConfiguration struct {
7036	autorest.Response `json:"-"`
7037	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
7038	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7039	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7040	Name *string `json:"name,omitempty"`
7041	// Etag - A unique read-only string that changes whenever the resource is updated.
7042	Etag *string `json:"etag,omitempty"`
7043	// ID - Resource ID.
7044	ID *string `json:"id,omitempty"`
7045}
7046
7047// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
7048func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7049	objectMap := make(map[string]interface{})
7050	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
7051		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
7052	}
7053	if iic.Name != nil {
7054		objectMap["name"] = iic.Name
7055	}
7056	if iic.Etag != nil {
7057		objectMap["etag"] = iic.Etag
7058	}
7059	if iic.ID != nil {
7060		objectMap["id"] = iic.ID
7061	}
7062	return json.Marshal(objectMap)
7063}
7064
7065// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
7066func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7067	var m map[string]*json.RawMessage
7068	err := json.Unmarshal(body, &m)
7069	if err != nil {
7070		return err
7071	}
7072	for k, v := range m {
7073		switch k {
7074		case "properties":
7075			if v != nil {
7076				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
7077				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
7078				if err != nil {
7079					return err
7080				}
7081				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
7082			}
7083		case "name":
7084			if v != nil {
7085				var name string
7086				err = json.Unmarshal(*v, &name)
7087				if err != nil {
7088					return err
7089				}
7090				iic.Name = &name
7091			}
7092		case "etag":
7093			if v != nil {
7094				var etag string
7095				err = json.Unmarshal(*v, &etag)
7096				if err != nil {
7097					return err
7098				}
7099				iic.Etag = &etag
7100			}
7101		case "id":
7102			if v != nil {
7103				var ID string
7104				err = json.Unmarshal(*v, &ID)
7105				if err != nil {
7106					return err
7107				}
7108				iic.ID = &ID
7109			}
7110		}
7111	}
7112
7113	return nil
7114}
7115
7116// InterfaceIPConfigurationListResult response for list ip configurations API service call.
7117type InterfaceIPConfigurationListResult struct {
7118	autorest.Response `json:"-"`
7119	// Value - A list of ip configurations.
7120	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
7121	// NextLink - READ-ONLY; The URL to get the next set of results.
7122	NextLink *string `json:"nextLink,omitempty"`
7123}
7124
7125// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
7126func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
7127	objectMap := make(map[string]interface{})
7128	if iiclr.Value != nil {
7129		objectMap["value"] = iiclr.Value
7130	}
7131	return json.Marshal(objectMap)
7132}
7133
7134// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
7135// InterfaceIPConfiguration values.
7136type InterfaceIPConfigurationListResultIterator struct {
7137	i    int
7138	page InterfaceIPConfigurationListResultPage
7139}
7140
7141// NextWithContext advances to the next value.  If there was an error making
7142// the request the iterator does not advance and the error is returned.
7143func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
7144	if tracing.IsEnabled() {
7145		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
7146		defer func() {
7147			sc := -1
7148			if iter.Response().Response.Response != nil {
7149				sc = iter.Response().Response.Response.StatusCode
7150			}
7151			tracing.EndSpan(ctx, sc, err)
7152		}()
7153	}
7154	iter.i++
7155	if iter.i < len(iter.page.Values()) {
7156		return nil
7157	}
7158	err = iter.page.NextWithContext(ctx)
7159	if err != nil {
7160		iter.i--
7161		return err
7162	}
7163	iter.i = 0
7164	return nil
7165}
7166
7167// Next advances to the next value.  If there was an error making
7168// the request the iterator does not advance and the error is returned.
7169// Deprecated: Use NextWithContext() instead.
7170func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
7171	return iter.NextWithContext(context.Background())
7172}
7173
7174// NotDone returns true if the enumeration should be started or is not yet complete.
7175func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
7176	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7177}
7178
7179// Response returns the raw server response from the last page request.
7180func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
7181	return iter.page.Response()
7182}
7183
7184// Value returns the current value or a zero-initialized value if the
7185// iterator has advanced beyond the end of the collection.
7186func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
7187	if !iter.page.NotDone() {
7188		return InterfaceIPConfiguration{}
7189	}
7190	return iter.page.Values()[iter.i]
7191}
7192
7193// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
7194func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
7195	return InterfaceIPConfigurationListResultIterator{page: page}
7196}
7197
7198// IsEmpty returns true if the ListResult contains no values.
7199func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
7200	return iiclr.Value == nil || len(*iiclr.Value) == 0
7201}
7202
7203// hasNextLink returns true if the NextLink is not empty.
7204func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
7205	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
7206}
7207
7208// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
7209// It returns nil if no more results exist.
7210func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
7211	if !iiclr.hasNextLink() {
7212		return nil, nil
7213	}
7214	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7215		autorest.AsJSON(),
7216		autorest.AsGet(),
7217		autorest.WithBaseURL(to.String(iiclr.NextLink)))
7218}
7219
7220// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
7221type InterfaceIPConfigurationListResultPage struct {
7222	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
7223	iiclr InterfaceIPConfigurationListResult
7224}
7225
7226// NextWithContext advances to the next page of values.  If there was an error making
7227// the request the page does not advance and the error is returned.
7228func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
7229	if tracing.IsEnabled() {
7230		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
7231		defer func() {
7232			sc := -1
7233			if page.Response().Response.Response != nil {
7234				sc = page.Response().Response.Response.StatusCode
7235			}
7236			tracing.EndSpan(ctx, sc, err)
7237		}()
7238	}
7239	for {
7240		next, err := page.fn(ctx, page.iiclr)
7241		if err != nil {
7242			return err
7243		}
7244		page.iiclr = next
7245		if !next.hasNextLink() || !next.IsEmpty() {
7246			break
7247		}
7248	}
7249	return nil
7250}
7251
7252// Next advances to the next page of values.  If there was an error making
7253// the request the page does not advance and the error is returned.
7254// Deprecated: Use NextWithContext() instead.
7255func (page *InterfaceIPConfigurationListResultPage) Next() error {
7256	return page.NextWithContext(context.Background())
7257}
7258
7259// NotDone returns true if the page enumeration should be started or is not yet complete.
7260func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
7261	return !page.iiclr.IsEmpty()
7262}
7263
7264// Response returns the raw server response from the last page request.
7265func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
7266	return page.iiclr
7267}
7268
7269// Values returns the slice of values for the current page or nil if there are no values.
7270func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
7271	if page.iiclr.IsEmpty() {
7272		return nil
7273	}
7274	return *page.iiclr.Value
7275}
7276
7277// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
7278func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
7279	return InterfaceIPConfigurationListResultPage{
7280		fn:    getNextPage,
7281		iiclr: cur,
7282	}
7283}
7284
7285// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
7286type InterfaceIPConfigurationPropertiesFormat struct {
7287	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
7288	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
7289	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
7290	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
7291	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
7292	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
7293	// PrivateIPAddress - Private IP address of the IP configuration.
7294	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7295	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7296	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7297	// 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'
7298	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
7299	// Subnet - Subnet bound to the IP configuration.
7300	Subnet *Subnet `json:"subnet,omitempty"`
7301	// Primary - Gets whether this is a primary customer address on the network interface.
7302	Primary *bool `json:"primary,omitempty"`
7303	// PublicIPAddress - Public IP address bound to the IP configuration.
7304	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7305	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
7306	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
7307	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7308	ProvisioningState *string `json:"provisioningState,omitempty"`
7309}
7310
7311// InterfaceListResult response for the ListNetworkInterface API service call.
7312type InterfaceListResult struct {
7313	autorest.Response `json:"-"`
7314	// Value - A list of network interfaces in a resource group.
7315	Value *[]Interface `json:"value,omitempty"`
7316	// NextLink - READ-ONLY; The URL to get the next set of results.
7317	NextLink *string `json:"nextLink,omitempty"`
7318}
7319
7320// MarshalJSON is the custom marshaler for InterfaceListResult.
7321func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
7322	objectMap := make(map[string]interface{})
7323	if ilr.Value != nil {
7324		objectMap["value"] = ilr.Value
7325	}
7326	return json.Marshal(objectMap)
7327}
7328
7329// InterfaceListResultIterator provides access to a complete listing of Interface values.
7330type InterfaceListResultIterator struct {
7331	i    int
7332	page InterfaceListResultPage
7333}
7334
7335// NextWithContext advances to the next value.  If there was an error making
7336// the request the iterator does not advance and the error is returned.
7337func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
7338	if tracing.IsEnabled() {
7339		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
7340		defer func() {
7341			sc := -1
7342			if iter.Response().Response.Response != nil {
7343				sc = iter.Response().Response.Response.StatusCode
7344			}
7345			tracing.EndSpan(ctx, sc, err)
7346		}()
7347	}
7348	iter.i++
7349	if iter.i < len(iter.page.Values()) {
7350		return nil
7351	}
7352	err = iter.page.NextWithContext(ctx)
7353	if err != nil {
7354		iter.i--
7355		return err
7356	}
7357	iter.i = 0
7358	return nil
7359}
7360
7361// Next advances to the next value.  If there was an error making
7362// the request the iterator does not advance and the error is returned.
7363// Deprecated: Use NextWithContext() instead.
7364func (iter *InterfaceListResultIterator) Next() error {
7365	return iter.NextWithContext(context.Background())
7366}
7367
7368// NotDone returns true if the enumeration should be started or is not yet complete.
7369func (iter InterfaceListResultIterator) NotDone() bool {
7370	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7371}
7372
7373// Response returns the raw server response from the last page request.
7374func (iter InterfaceListResultIterator) Response() InterfaceListResult {
7375	return iter.page.Response()
7376}
7377
7378// Value returns the current value or a zero-initialized value if the
7379// iterator has advanced beyond the end of the collection.
7380func (iter InterfaceListResultIterator) Value() Interface {
7381	if !iter.page.NotDone() {
7382		return Interface{}
7383	}
7384	return iter.page.Values()[iter.i]
7385}
7386
7387// Creates a new instance of the InterfaceListResultIterator type.
7388func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
7389	return InterfaceListResultIterator{page: page}
7390}
7391
7392// IsEmpty returns true if the ListResult contains no values.
7393func (ilr InterfaceListResult) IsEmpty() bool {
7394	return ilr.Value == nil || len(*ilr.Value) == 0
7395}
7396
7397// hasNextLink returns true if the NextLink is not empty.
7398func (ilr InterfaceListResult) hasNextLink() bool {
7399	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
7400}
7401
7402// interfaceListResultPreparer prepares a request to retrieve the next set of results.
7403// It returns nil if no more results exist.
7404func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
7405	if !ilr.hasNextLink() {
7406		return nil, nil
7407	}
7408	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7409		autorest.AsJSON(),
7410		autorest.AsGet(),
7411		autorest.WithBaseURL(to.String(ilr.NextLink)))
7412}
7413
7414// InterfaceListResultPage contains a page of Interface values.
7415type InterfaceListResultPage struct {
7416	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
7417	ilr InterfaceListResult
7418}
7419
7420// NextWithContext advances to the next page of values.  If there was an error making
7421// the request the page does not advance and the error is returned.
7422func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
7423	if tracing.IsEnabled() {
7424		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
7425		defer func() {
7426			sc := -1
7427			if page.Response().Response.Response != nil {
7428				sc = page.Response().Response.Response.StatusCode
7429			}
7430			tracing.EndSpan(ctx, sc, err)
7431		}()
7432	}
7433	for {
7434		next, err := page.fn(ctx, page.ilr)
7435		if err != nil {
7436			return err
7437		}
7438		page.ilr = next
7439		if !next.hasNextLink() || !next.IsEmpty() {
7440			break
7441		}
7442	}
7443	return nil
7444}
7445
7446// Next advances to the next page of values.  If there was an error making
7447// the request the page does not advance and the error is returned.
7448// Deprecated: Use NextWithContext() instead.
7449func (page *InterfaceListResultPage) Next() error {
7450	return page.NextWithContext(context.Background())
7451}
7452
7453// NotDone returns true if the page enumeration should be started or is not yet complete.
7454func (page InterfaceListResultPage) NotDone() bool {
7455	return !page.ilr.IsEmpty()
7456}
7457
7458// Response returns the raw server response from the last page request.
7459func (page InterfaceListResultPage) Response() InterfaceListResult {
7460	return page.ilr
7461}
7462
7463// Values returns the slice of values for the current page or nil if there are no values.
7464func (page InterfaceListResultPage) Values() []Interface {
7465	if page.ilr.IsEmpty() {
7466		return nil
7467	}
7468	return *page.ilr.Value
7469}
7470
7471// Creates a new instance of the InterfaceListResultPage type.
7472func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
7473	return InterfaceListResultPage{
7474		fn:  getNextPage,
7475		ilr: cur,
7476	}
7477}
7478
7479// InterfaceLoadBalancerListResult response for list ip configurations API service call.
7480type InterfaceLoadBalancerListResult struct {
7481	autorest.Response `json:"-"`
7482	// Value - A list of load balancers.
7483	Value *[]LoadBalancer `json:"value,omitempty"`
7484	// NextLink - READ-ONLY; The URL to get the next set of results.
7485	NextLink *string `json:"nextLink,omitempty"`
7486}
7487
7488// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
7489func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
7490	objectMap := make(map[string]interface{})
7491	if ilblr.Value != nil {
7492		objectMap["value"] = ilblr.Value
7493	}
7494	return json.Marshal(objectMap)
7495}
7496
7497// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
7498type InterfaceLoadBalancerListResultIterator struct {
7499	i    int
7500	page InterfaceLoadBalancerListResultPage
7501}
7502
7503// NextWithContext advances to the next value.  If there was an error making
7504// the request the iterator does not advance and the error is returned.
7505func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
7506	if tracing.IsEnabled() {
7507		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
7508		defer func() {
7509			sc := -1
7510			if iter.Response().Response.Response != nil {
7511				sc = iter.Response().Response.Response.StatusCode
7512			}
7513			tracing.EndSpan(ctx, sc, err)
7514		}()
7515	}
7516	iter.i++
7517	if iter.i < len(iter.page.Values()) {
7518		return nil
7519	}
7520	err = iter.page.NextWithContext(ctx)
7521	if err != nil {
7522		iter.i--
7523		return err
7524	}
7525	iter.i = 0
7526	return nil
7527}
7528
7529// Next advances to the next value.  If there was an error making
7530// the request the iterator does not advance and the error is returned.
7531// Deprecated: Use NextWithContext() instead.
7532func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
7533	return iter.NextWithContext(context.Background())
7534}
7535
7536// NotDone returns true if the enumeration should be started or is not yet complete.
7537func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
7538	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7539}
7540
7541// Response returns the raw server response from the last page request.
7542func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
7543	return iter.page.Response()
7544}
7545
7546// Value returns the current value or a zero-initialized value if the
7547// iterator has advanced beyond the end of the collection.
7548func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
7549	if !iter.page.NotDone() {
7550		return LoadBalancer{}
7551	}
7552	return iter.page.Values()[iter.i]
7553}
7554
7555// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
7556func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
7557	return InterfaceLoadBalancerListResultIterator{page: page}
7558}
7559
7560// IsEmpty returns true if the ListResult contains no values.
7561func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
7562	return ilblr.Value == nil || len(*ilblr.Value) == 0
7563}
7564
7565// hasNextLink returns true if the NextLink is not empty.
7566func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
7567	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
7568}
7569
7570// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
7571// It returns nil if no more results exist.
7572func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
7573	if !ilblr.hasNextLink() {
7574		return nil, nil
7575	}
7576	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7577		autorest.AsJSON(),
7578		autorest.AsGet(),
7579		autorest.WithBaseURL(to.String(ilblr.NextLink)))
7580}
7581
7582// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
7583type InterfaceLoadBalancerListResultPage struct {
7584	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
7585	ilblr InterfaceLoadBalancerListResult
7586}
7587
7588// NextWithContext advances to the next page of values.  If there was an error making
7589// the request the page does not advance and the error is returned.
7590func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
7591	if tracing.IsEnabled() {
7592		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
7593		defer func() {
7594			sc := -1
7595			if page.Response().Response.Response != nil {
7596				sc = page.Response().Response.Response.StatusCode
7597			}
7598			tracing.EndSpan(ctx, sc, err)
7599		}()
7600	}
7601	for {
7602		next, err := page.fn(ctx, page.ilblr)
7603		if err != nil {
7604			return err
7605		}
7606		page.ilblr = next
7607		if !next.hasNextLink() || !next.IsEmpty() {
7608			break
7609		}
7610	}
7611	return nil
7612}
7613
7614// Next advances to the next page of values.  If there was an error making
7615// the request the page does not advance and the error is returned.
7616// Deprecated: Use NextWithContext() instead.
7617func (page *InterfaceLoadBalancerListResultPage) Next() error {
7618	return page.NextWithContext(context.Background())
7619}
7620
7621// NotDone returns true if the page enumeration should be started or is not yet complete.
7622func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
7623	return !page.ilblr.IsEmpty()
7624}
7625
7626// Response returns the raw server response from the last page request.
7627func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
7628	return page.ilblr
7629}
7630
7631// Values returns the slice of values for the current page or nil if there are no values.
7632func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
7633	if page.ilblr.IsEmpty() {
7634		return nil
7635	}
7636	return *page.ilblr.Value
7637}
7638
7639// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
7640func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
7641	return InterfaceLoadBalancerListResultPage{
7642		fn:    getNextPage,
7643		ilblr: cur,
7644	}
7645}
7646
7647// InterfacePropertiesFormat networkInterface properties.
7648type InterfacePropertiesFormat struct {
7649	// VirtualMachine - The reference of a virtual machine.
7650	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
7651	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
7652	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
7653	// IPConfigurations - A list of IPConfigurations of the network interface.
7654	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7655	// DNSSettings - The DNS settings in network interface.
7656	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
7657	// MacAddress - The MAC address of the network interface.
7658	MacAddress *string `json:"macAddress,omitempty"`
7659	// Primary - Gets whether this is a primary network interface on a virtual machine.
7660	Primary *bool `json:"primary,omitempty"`
7661	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
7662	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
7663	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
7664	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
7665	// ResourceGUID - The resource GUID property of the network interface resource.
7666	ResourceGUID *string `json:"resourceGuid,omitempty"`
7667	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7668	ProvisioningState *string `json:"provisioningState,omitempty"`
7669}
7670
7671// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7672// long-running operation.
7673type InterfacesCreateOrUpdateFuture struct {
7674	azure.FutureAPI
7675	// Result returns the result of the asynchronous operation.
7676	// If the operation has not completed it will return an error.
7677	Result func(InterfacesClient) (Interface, error)
7678}
7679
7680// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7681func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7682	var azFuture azure.Future
7683	if err := json.Unmarshal(body, &azFuture); err != nil {
7684		return err
7685	}
7686	future.FutureAPI = &azFuture
7687	future.Result = future.result
7688	return nil
7689}
7690
7691// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
7692func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
7693	var done bool
7694	done, err = future.DoneWithContext(context.Background(), client)
7695	if err != nil {
7696		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7697		return
7698	}
7699	if !done {
7700		i.Response.Response = future.Response()
7701		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
7702		return
7703	}
7704	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7705	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7706		i, err = client.CreateOrUpdateResponder(i.Response.Response)
7707		if err != nil {
7708			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
7709		}
7710	}
7711	return
7712}
7713
7714// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7715// operation.
7716type InterfacesDeleteFuture struct {
7717	azure.FutureAPI
7718	// Result returns the result of the asynchronous operation.
7719	// If the operation has not completed it will return an error.
7720	Result func(InterfacesClient) (autorest.Response, error)
7721}
7722
7723// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7724func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
7725	var azFuture azure.Future
7726	if err := json.Unmarshal(body, &azFuture); err != nil {
7727		return err
7728	}
7729	future.FutureAPI = &azFuture
7730	future.Result = future.result
7731	return nil
7732}
7733
7734// result is the default implementation for InterfacesDeleteFuture.Result.
7735func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
7736	var done bool
7737	done, err = future.DoneWithContext(context.Background(), client)
7738	if err != nil {
7739		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
7740		return
7741	}
7742	if !done {
7743		ar.Response = future.Response()
7744		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
7745		return
7746	}
7747	ar.Response = future.Response()
7748	return
7749}
7750
7751// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
7752// long-running operation.
7753type InterfacesGetEffectiveRouteTableFuture struct {
7754	azure.FutureAPI
7755	// Result returns the result of the asynchronous operation.
7756	// If the operation has not completed it will return an error.
7757	Result func(InterfacesClient) (EffectiveRouteListResult, error)
7758}
7759
7760// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7761func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
7762	var azFuture azure.Future
7763	if err := json.Unmarshal(body, &azFuture); err != nil {
7764		return err
7765	}
7766	future.FutureAPI = &azFuture
7767	future.Result = future.result
7768	return nil
7769}
7770
7771// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
7772func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
7773	var done bool
7774	done, err = future.DoneWithContext(context.Background(), client)
7775	if err != nil {
7776		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
7777		return
7778	}
7779	if !done {
7780		erlr.Response.Response = future.Response()
7781		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
7782		return
7783	}
7784	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7785	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
7786		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
7787		if err != nil {
7788			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
7789		}
7790	}
7791	return
7792}
7793
7794// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
7795// results of a long-running operation.
7796type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
7797	azure.FutureAPI
7798	// Result returns the result of the asynchronous operation.
7799	// If the operation has not completed it will return an error.
7800	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
7801}
7802
7803// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7804func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
7805	var azFuture azure.Future
7806	if err := json.Unmarshal(body, &azFuture); err != nil {
7807		return err
7808	}
7809	future.FutureAPI = &azFuture
7810	future.Result = future.result
7811	return nil
7812}
7813
7814// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
7815func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
7816	var done bool
7817	done, err = future.DoneWithContext(context.Background(), client)
7818	if err != nil {
7819		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
7820		return
7821	}
7822	if !done {
7823		ensglr.Response.Response = future.Response()
7824		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
7825		return
7826	}
7827	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7828	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
7829		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
7830		if err != nil {
7831			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
7832		}
7833	}
7834	return
7835}
7836
7837// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
7838// operation.
7839type InterfacesUpdateTagsFuture struct {
7840	azure.FutureAPI
7841	// Result returns the result of the asynchronous operation.
7842	// If the operation has not completed it will return an error.
7843	Result func(InterfacesClient) (Interface, error)
7844}
7845
7846// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7847func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7848	var azFuture azure.Future
7849	if err := json.Unmarshal(body, &azFuture); err != nil {
7850		return err
7851	}
7852	future.FutureAPI = &azFuture
7853	future.Result = future.result
7854	return nil
7855}
7856
7857// result is the default implementation for InterfacesUpdateTagsFuture.Result.
7858func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
7859	var done bool
7860	done, err = future.DoneWithContext(context.Background(), client)
7861	if err != nil {
7862		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7863		return
7864	}
7865	if !done {
7866		i.Response.Response = future.Response()
7867		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
7868		return
7869	}
7870	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7871	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
7872		i, err = client.UpdateTagsResponder(i.Response.Response)
7873		if err != nil {
7874			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
7875		}
7876	}
7877	return
7878}
7879
7880// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
7881type IPAddressAvailabilityResult struct {
7882	autorest.Response `json:"-"`
7883	// Available - Private IP address availability.
7884	Available *bool `json:"available,omitempty"`
7885	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
7886	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
7887}
7888
7889// IPConfiguration IP configuration
7890type IPConfiguration struct {
7891	// IPConfigurationPropertiesFormat - Properties of the IP configuration
7892	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
7893	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7894	Name *string `json:"name,omitempty"`
7895	// Etag - A unique read-only string that changes whenever the resource is updated.
7896	Etag *string `json:"etag,omitempty"`
7897	// ID - Resource ID.
7898	ID *string `json:"id,omitempty"`
7899}
7900
7901// MarshalJSON is the custom marshaler for IPConfiguration.
7902func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
7903	objectMap := make(map[string]interface{})
7904	if ic.IPConfigurationPropertiesFormat != nil {
7905		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
7906	}
7907	if ic.Name != nil {
7908		objectMap["name"] = ic.Name
7909	}
7910	if ic.Etag != nil {
7911		objectMap["etag"] = ic.Etag
7912	}
7913	if ic.ID != nil {
7914		objectMap["id"] = ic.ID
7915	}
7916	return json.Marshal(objectMap)
7917}
7918
7919// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
7920func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
7921	var m map[string]*json.RawMessage
7922	err := json.Unmarshal(body, &m)
7923	if err != nil {
7924		return err
7925	}
7926	for k, v := range m {
7927		switch k {
7928		case "properties":
7929			if v != nil {
7930				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
7931				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
7932				if err != nil {
7933					return err
7934				}
7935				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
7936			}
7937		case "name":
7938			if v != nil {
7939				var name string
7940				err = json.Unmarshal(*v, &name)
7941				if err != nil {
7942					return err
7943				}
7944				ic.Name = &name
7945			}
7946		case "etag":
7947			if v != nil {
7948				var etag string
7949				err = json.Unmarshal(*v, &etag)
7950				if err != nil {
7951					return err
7952				}
7953				ic.Etag = &etag
7954			}
7955		case "id":
7956			if v != nil {
7957				var ID string
7958				err = json.Unmarshal(*v, &ID)
7959				if err != nil {
7960					return err
7961				}
7962				ic.ID = &ID
7963			}
7964		}
7965	}
7966
7967	return nil
7968}
7969
7970// IPConfigurationPropertiesFormat properties of IP configuration.
7971type IPConfigurationPropertiesFormat struct {
7972	// PrivateIPAddress - The private IP address of the IP configuration.
7973	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7974	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7975	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7976	// Subnet - The reference of the subnet resource.
7977	Subnet *Subnet `json:"subnet,omitempty"`
7978	// PublicIPAddress - The reference of the public IP resource.
7979	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7980	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7981	ProvisioningState *string `json:"provisioningState,omitempty"`
7982}
7983
7984// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
7985type IpsecPolicy struct {
7986	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
7987	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
7988	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
7989	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
7990	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
7991	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
7992	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
7993	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
7994	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
7995	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
7996	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
7997	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
7998	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
7999	DhGroup DhGroup `json:"dhGroup,omitempty"`
8000	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
8001	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
8002}
8003
8004// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
8005type Ipv6ExpressRouteCircuitPeeringConfig struct {
8006	// PrimaryPeerAddressPrefix - The primary address prefix.
8007	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8008	// SecondaryPeerAddressPrefix - The secondary address prefix.
8009	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8010	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8011	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8012	// RouteFilter - The reference of the RouteFilter resource.
8013	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8014	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
8015	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
8016}
8017
8018// LoadBalancer loadBalancer resource
8019type LoadBalancer struct {
8020	autorest.Response `json:"-"`
8021	// Sku - The load balancer SKU.
8022	Sku *LoadBalancerSku `json:"sku,omitempty"`
8023	// LoadBalancerPropertiesFormat - Properties of load balancer.
8024	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
8025	// Etag - A unique read-only string that changes whenever the resource is updated.
8026	Etag *string `json:"etag,omitempty"`
8027	// ID - Resource ID.
8028	ID *string `json:"id,omitempty"`
8029	// Name - READ-ONLY; Resource name.
8030	Name *string `json:"name,omitempty"`
8031	// Type - READ-ONLY; Resource type.
8032	Type *string `json:"type,omitempty"`
8033	// Location - Resource location.
8034	Location *string `json:"location,omitempty"`
8035	// Tags - Resource tags.
8036	Tags map[string]*string `json:"tags"`
8037}
8038
8039// MarshalJSON is the custom marshaler for LoadBalancer.
8040func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
8041	objectMap := make(map[string]interface{})
8042	if lb.Sku != nil {
8043		objectMap["sku"] = lb.Sku
8044	}
8045	if lb.LoadBalancerPropertiesFormat != nil {
8046		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
8047	}
8048	if lb.Etag != nil {
8049		objectMap["etag"] = lb.Etag
8050	}
8051	if lb.ID != nil {
8052		objectMap["id"] = lb.ID
8053	}
8054	if lb.Location != nil {
8055		objectMap["location"] = lb.Location
8056	}
8057	if lb.Tags != nil {
8058		objectMap["tags"] = lb.Tags
8059	}
8060	return json.Marshal(objectMap)
8061}
8062
8063// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
8064func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
8065	var m map[string]*json.RawMessage
8066	err := json.Unmarshal(body, &m)
8067	if err != nil {
8068		return err
8069	}
8070	for k, v := range m {
8071		switch k {
8072		case "sku":
8073			if v != nil {
8074				var sku LoadBalancerSku
8075				err = json.Unmarshal(*v, &sku)
8076				if err != nil {
8077					return err
8078				}
8079				lb.Sku = &sku
8080			}
8081		case "properties":
8082			if v != nil {
8083				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
8084				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
8085				if err != nil {
8086					return err
8087				}
8088				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
8089			}
8090		case "etag":
8091			if v != nil {
8092				var etag string
8093				err = json.Unmarshal(*v, &etag)
8094				if err != nil {
8095					return err
8096				}
8097				lb.Etag = &etag
8098			}
8099		case "id":
8100			if v != nil {
8101				var ID string
8102				err = json.Unmarshal(*v, &ID)
8103				if err != nil {
8104					return err
8105				}
8106				lb.ID = &ID
8107			}
8108		case "name":
8109			if v != nil {
8110				var name string
8111				err = json.Unmarshal(*v, &name)
8112				if err != nil {
8113					return err
8114				}
8115				lb.Name = &name
8116			}
8117		case "type":
8118			if v != nil {
8119				var typeVar string
8120				err = json.Unmarshal(*v, &typeVar)
8121				if err != nil {
8122					return err
8123				}
8124				lb.Type = &typeVar
8125			}
8126		case "location":
8127			if v != nil {
8128				var location string
8129				err = json.Unmarshal(*v, &location)
8130				if err != nil {
8131					return err
8132				}
8133				lb.Location = &location
8134			}
8135		case "tags":
8136			if v != nil {
8137				var tags map[string]*string
8138				err = json.Unmarshal(*v, &tags)
8139				if err != nil {
8140					return err
8141				}
8142				lb.Tags = tags
8143			}
8144		}
8145	}
8146
8147	return nil
8148}
8149
8150// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
8151type LoadBalancerBackendAddressPoolListResult struct {
8152	autorest.Response `json:"-"`
8153	// Value - A list of backend address pools in a load balancer.
8154	Value *[]BackendAddressPool `json:"value,omitempty"`
8155	// NextLink - READ-ONLY; The URL to get the next set of results.
8156	NextLink *string `json:"nextLink,omitempty"`
8157}
8158
8159// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
8160func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
8161	objectMap := make(map[string]interface{})
8162	if lbbaplr.Value != nil {
8163		objectMap["value"] = lbbaplr.Value
8164	}
8165	return json.Marshal(objectMap)
8166}
8167
8168// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
8169// BackendAddressPool values.
8170type LoadBalancerBackendAddressPoolListResultIterator struct {
8171	i    int
8172	page LoadBalancerBackendAddressPoolListResultPage
8173}
8174
8175// NextWithContext advances to the next value.  If there was an error making
8176// the request the iterator does not advance and the error is returned.
8177func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
8178	if tracing.IsEnabled() {
8179		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
8180		defer func() {
8181			sc := -1
8182			if iter.Response().Response.Response != nil {
8183				sc = iter.Response().Response.Response.StatusCode
8184			}
8185			tracing.EndSpan(ctx, sc, err)
8186		}()
8187	}
8188	iter.i++
8189	if iter.i < len(iter.page.Values()) {
8190		return nil
8191	}
8192	err = iter.page.NextWithContext(ctx)
8193	if err != nil {
8194		iter.i--
8195		return err
8196	}
8197	iter.i = 0
8198	return nil
8199}
8200
8201// Next advances to the next value.  If there was an error making
8202// the request the iterator does not advance and the error is returned.
8203// Deprecated: Use NextWithContext() instead.
8204func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
8205	return iter.NextWithContext(context.Background())
8206}
8207
8208// NotDone returns true if the enumeration should be started or is not yet complete.
8209func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
8210	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8211}
8212
8213// Response returns the raw server response from the last page request.
8214func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
8215	return iter.page.Response()
8216}
8217
8218// Value returns the current value or a zero-initialized value if the
8219// iterator has advanced beyond the end of the collection.
8220func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
8221	if !iter.page.NotDone() {
8222		return BackendAddressPool{}
8223	}
8224	return iter.page.Values()[iter.i]
8225}
8226
8227// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
8228func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
8229	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
8230}
8231
8232// IsEmpty returns true if the ListResult contains no values.
8233func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
8234	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
8235}
8236
8237// hasNextLink returns true if the NextLink is not empty.
8238func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
8239	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
8240}
8241
8242// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
8243// It returns nil if no more results exist.
8244func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
8245	if !lbbaplr.hasNextLink() {
8246		return nil, nil
8247	}
8248	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8249		autorest.AsJSON(),
8250		autorest.AsGet(),
8251		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
8252}
8253
8254// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
8255type LoadBalancerBackendAddressPoolListResultPage struct {
8256	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
8257	lbbaplr LoadBalancerBackendAddressPoolListResult
8258}
8259
8260// NextWithContext advances to the next page of values.  If there was an error making
8261// the request the page does not advance and the error is returned.
8262func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
8263	if tracing.IsEnabled() {
8264		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
8265		defer func() {
8266			sc := -1
8267			if page.Response().Response.Response != nil {
8268				sc = page.Response().Response.Response.StatusCode
8269			}
8270			tracing.EndSpan(ctx, sc, err)
8271		}()
8272	}
8273	for {
8274		next, err := page.fn(ctx, page.lbbaplr)
8275		if err != nil {
8276			return err
8277		}
8278		page.lbbaplr = next
8279		if !next.hasNextLink() || !next.IsEmpty() {
8280			break
8281		}
8282	}
8283	return nil
8284}
8285
8286// Next advances to the next page of values.  If there was an error making
8287// the request the page does not advance and the error is returned.
8288// Deprecated: Use NextWithContext() instead.
8289func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
8290	return page.NextWithContext(context.Background())
8291}
8292
8293// NotDone returns true if the page enumeration should be started or is not yet complete.
8294func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
8295	return !page.lbbaplr.IsEmpty()
8296}
8297
8298// Response returns the raw server response from the last page request.
8299func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
8300	return page.lbbaplr
8301}
8302
8303// Values returns the slice of values for the current page or nil if there are no values.
8304func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
8305	if page.lbbaplr.IsEmpty() {
8306		return nil
8307	}
8308	return *page.lbbaplr.Value
8309}
8310
8311// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
8312func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
8313	return LoadBalancerBackendAddressPoolListResultPage{
8314		fn:      getNextPage,
8315		lbbaplr: cur,
8316	}
8317}
8318
8319// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
8320type LoadBalancerFrontendIPConfigurationListResult struct {
8321	autorest.Response `json:"-"`
8322	// Value - A list of frontend IP configurations in a load balancer.
8323	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
8324	// NextLink - READ-ONLY; The URL to get the next set of results.
8325	NextLink *string `json:"nextLink,omitempty"`
8326}
8327
8328// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
8329func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
8330	objectMap := make(map[string]interface{})
8331	if lbficlr.Value != nil {
8332		objectMap["value"] = lbficlr.Value
8333	}
8334	return json.Marshal(objectMap)
8335}
8336
8337// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
8338// FrontendIPConfiguration values.
8339type LoadBalancerFrontendIPConfigurationListResultIterator struct {
8340	i    int
8341	page LoadBalancerFrontendIPConfigurationListResultPage
8342}
8343
8344// NextWithContext advances to the next value.  If there was an error making
8345// the request the iterator does not advance and the error is returned.
8346func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8347	if tracing.IsEnabled() {
8348		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
8349		defer func() {
8350			sc := -1
8351			if iter.Response().Response.Response != nil {
8352				sc = iter.Response().Response.Response.StatusCode
8353			}
8354			tracing.EndSpan(ctx, sc, err)
8355		}()
8356	}
8357	iter.i++
8358	if iter.i < len(iter.page.Values()) {
8359		return nil
8360	}
8361	err = iter.page.NextWithContext(ctx)
8362	if err != nil {
8363		iter.i--
8364		return err
8365	}
8366	iter.i = 0
8367	return nil
8368}
8369
8370// Next advances to the next value.  If there was an error making
8371// the request the iterator does not advance and the error is returned.
8372// Deprecated: Use NextWithContext() instead.
8373func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
8374	return iter.NextWithContext(context.Background())
8375}
8376
8377// NotDone returns true if the enumeration should be started or is not yet complete.
8378func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
8379	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8380}
8381
8382// Response returns the raw server response from the last page request.
8383func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
8384	return iter.page.Response()
8385}
8386
8387// Value returns the current value or a zero-initialized value if the
8388// iterator has advanced beyond the end of the collection.
8389func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
8390	if !iter.page.NotDone() {
8391		return FrontendIPConfiguration{}
8392	}
8393	return iter.page.Values()[iter.i]
8394}
8395
8396// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
8397func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
8398	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
8399}
8400
8401// IsEmpty returns true if the ListResult contains no values.
8402func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
8403	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
8404}
8405
8406// hasNextLink returns true if the NextLink is not empty.
8407func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
8408	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
8409}
8410
8411// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
8412// It returns nil if no more results exist.
8413func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
8414	if !lbficlr.hasNextLink() {
8415		return nil, nil
8416	}
8417	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8418		autorest.AsJSON(),
8419		autorest.AsGet(),
8420		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
8421}
8422
8423// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
8424type LoadBalancerFrontendIPConfigurationListResultPage struct {
8425	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
8426	lbficlr LoadBalancerFrontendIPConfigurationListResult
8427}
8428
8429// NextWithContext advances to the next page of values.  If there was an error making
8430// the request the page does not advance and the error is returned.
8431func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
8432	if tracing.IsEnabled() {
8433		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
8434		defer func() {
8435			sc := -1
8436			if page.Response().Response.Response != nil {
8437				sc = page.Response().Response.Response.StatusCode
8438			}
8439			tracing.EndSpan(ctx, sc, err)
8440		}()
8441	}
8442	for {
8443		next, err := page.fn(ctx, page.lbficlr)
8444		if err != nil {
8445			return err
8446		}
8447		page.lbficlr = next
8448		if !next.hasNextLink() || !next.IsEmpty() {
8449			break
8450		}
8451	}
8452	return nil
8453}
8454
8455// Next advances to the next page of values.  If there was an error making
8456// the request the page does not advance and the error is returned.
8457// Deprecated: Use NextWithContext() instead.
8458func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
8459	return page.NextWithContext(context.Background())
8460}
8461
8462// NotDone returns true if the page enumeration should be started or is not yet complete.
8463func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
8464	return !page.lbficlr.IsEmpty()
8465}
8466
8467// Response returns the raw server response from the last page request.
8468func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
8469	return page.lbficlr
8470}
8471
8472// Values returns the slice of values for the current page or nil if there are no values.
8473func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
8474	if page.lbficlr.IsEmpty() {
8475		return nil
8476	}
8477	return *page.lbficlr.Value
8478}
8479
8480// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
8481func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
8482	return LoadBalancerFrontendIPConfigurationListResultPage{
8483		fn:      getNextPage,
8484		lbficlr: cur,
8485	}
8486}
8487
8488// LoadBalancerListResult response for ListLoadBalancers API service call.
8489type LoadBalancerListResult struct {
8490	autorest.Response `json:"-"`
8491	// Value - A list of load balancers in a resource group.
8492	Value *[]LoadBalancer `json:"value,omitempty"`
8493	// NextLink - READ-ONLY; The URL to get the next set of results.
8494	NextLink *string `json:"nextLink,omitempty"`
8495}
8496
8497// MarshalJSON is the custom marshaler for LoadBalancerListResult.
8498func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
8499	objectMap := make(map[string]interface{})
8500	if lblr.Value != nil {
8501		objectMap["value"] = lblr.Value
8502	}
8503	return json.Marshal(objectMap)
8504}
8505
8506// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
8507type LoadBalancerListResultIterator struct {
8508	i    int
8509	page LoadBalancerListResultPage
8510}
8511
8512// NextWithContext advances to the next value.  If there was an error making
8513// the request the iterator does not advance and the error is returned.
8514func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
8515	if tracing.IsEnabled() {
8516		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
8517		defer func() {
8518			sc := -1
8519			if iter.Response().Response.Response != nil {
8520				sc = iter.Response().Response.Response.StatusCode
8521			}
8522			tracing.EndSpan(ctx, sc, err)
8523		}()
8524	}
8525	iter.i++
8526	if iter.i < len(iter.page.Values()) {
8527		return nil
8528	}
8529	err = iter.page.NextWithContext(ctx)
8530	if err != nil {
8531		iter.i--
8532		return err
8533	}
8534	iter.i = 0
8535	return nil
8536}
8537
8538// Next advances to the next value.  If there was an error making
8539// the request the iterator does not advance and the error is returned.
8540// Deprecated: Use NextWithContext() instead.
8541func (iter *LoadBalancerListResultIterator) Next() error {
8542	return iter.NextWithContext(context.Background())
8543}
8544
8545// NotDone returns true if the enumeration should be started or is not yet complete.
8546func (iter LoadBalancerListResultIterator) NotDone() bool {
8547	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8548}
8549
8550// Response returns the raw server response from the last page request.
8551func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
8552	return iter.page.Response()
8553}
8554
8555// Value returns the current value or a zero-initialized value if the
8556// iterator has advanced beyond the end of the collection.
8557func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
8558	if !iter.page.NotDone() {
8559		return LoadBalancer{}
8560	}
8561	return iter.page.Values()[iter.i]
8562}
8563
8564// Creates a new instance of the LoadBalancerListResultIterator type.
8565func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
8566	return LoadBalancerListResultIterator{page: page}
8567}
8568
8569// IsEmpty returns true if the ListResult contains no values.
8570func (lblr LoadBalancerListResult) IsEmpty() bool {
8571	return lblr.Value == nil || len(*lblr.Value) == 0
8572}
8573
8574// hasNextLink returns true if the NextLink is not empty.
8575func (lblr LoadBalancerListResult) hasNextLink() bool {
8576	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
8577}
8578
8579// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
8580// It returns nil if no more results exist.
8581func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
8582	if !lblr.hasNextLink() {
8583		return nil, nil
8584	}
8585	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8586		autorest.AsJSON(),
8587		autorest.AsGet(),
8588		autorest.WithBaseURL(to.String(lblr.NextLink)))
8589}
8590
8591// LoadBalancerListResultPage contains a page of LoadBalancer values.
8592type LoadBalancerListResultPage struct {
8593	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
8594	lblr LoadBalancerListResult
8595}
8596
8597// NextWithContext advances to the next page of values.  If there was an error making
8598// the request the page does not advance and the error is returned.
8599func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
8600	if tracing.IsEnabled() {
8601		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
8602		defer func() {
8603			sc := -1
8604			if page.Response().Response.Response != nil {
8605				sc = page.Response().Response.Response.StatusCode
8606			}
8607			tracing.EndSpan(ctx, sc, err)
8608		}()
8609	}
8610	for {
8611		next, err := page.fn(ctx, page.lblr)
8612		if err != nil {
8613			return err
8614		}
8615		page.lblr = next
8616		if !next.hasNextLink() || !next.IsEmpty() {
8617			break
8618		}
8619	}
8620	return nil
8621}
8622
8623// Next advances to the next page of values.  If there was an error making
8624// the request the page does not advance and the error is returned.
8625// Deprecated: Use NextWithContext() instead.
8626func (page *LoadBalancerListResultPage) Next() error {
8627	return page.NextWithContext(context.Background())
8628}
8629
8630// NotDone returns true if the page enumeration should be started or is not yet complete.
8631func (page LoadBalancerListResultPage) NotDone() bool {
8632	return !page.lblr.IsEmpty()
8633}
8634
8635// Response returns the raw server response from the last page request.
8636func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
8637	return page.lblr
8638}
8639
8640// Values returns the slice of values for the current page or nil if there are no values.
8641func (page LoadBalancerListResultPage) Values() []LoadBalancer {
8642	if page.lblr.IsEmpty() {
8643		return nil
8644	}
8645	return *page.lblr.Value
8646}
8647
8648// Creates a new instance of the LoadBalancerListResultPage type.
8649func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
8650	return LoadBalancerListResultPage{
8651		fn:   getNextPage,
8652		lblr: cur,
8653	}
8654}
8655
8656// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
8657type LoadBalancerLoadBalancingRuleListResult struct {
8658	autorest.Response `json:"-"`
8659	// Value - A list of load balancing rules in a load balancer.
8660	Value *[]LoadBalancingRule `json:"value,omitempty"`
8661	// NextLink - READ-ONLY; The URL to get the next set of results.
8662	NextLink *string `json:"nextLink,omitempty"`
8663}
8664
8665// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
8666func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
8667	objectMap := make(map[string]interface{})
8668	if lblbrlr.Value != nil {
8669		objectMap["value"] = lblbrlr.Value
8670	}
8671	return json.Marshal(objectMap)
8672}
8673
8674// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
8675// LoadBalancingRule values.
8676type LoadBalancerLoadBalancingRuleListResultIterator struct {
8677	i    int
8678	page LoadBalancerLoadBalancingRuleListResultPage
8679}
8680
8681// NextWithContext advances to the next value.  If there was an error making
8682// the request the iterator does not advance and the error is returned.
8683func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
8684	if tracing.IsEnabled() {
8685		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
8686		defer func() {
8687			sc := -1
8688			if iter.Response().Response.Response != nil {
8689				sc = iter.Response().Response.Response.StatusCode
8690			}
8691			tracing.EndSpan(ctx, sc, err)
8692		}()
8693	}
8694	iter.i++
8695	if iter.i < len(iter.page.Values()) {
8696		return nil
8697	}
8698	err = iter.page.NextWithContext(ctx)
8699	if err != nil {
8700		iter.i--
8701		return err
8702	}
8703	iter.i = 0
8704	return nil
8705}
8706
8707// Next advances to the next value.  If there was an error making
8708// the request the iterator does not advance and the error is returned.
8709// Deprecated: Use NextWithContext() instead.
8710func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
8711	return iter.NextWithContext(context.Background())
8712}
8713
8714// NotDone returns true if the enumeration should be started or is not yet complete.
8715func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
8716	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8717}
8718
8719// Response returns the raw server response from the last page request.
8720func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
8721	return iter.page.Response()
8722}
8723
8724// Value returns the current value or a zero-initialized value if the
8725// iterator has advanced beyond the end of the collection.
8726func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
8727	if !iter.page.NotDone() {
8728		return LoadBalancingRule{}
8729	}
8730	return iter.page.Values()[iter.i]
8731}
8732
8733// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
8734func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
8735	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
8736}
8737
8738// IsEmpty returns true if the ListResult contains no values.
8739func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
8740	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
8741}
8742
8743// hasNextLink returns true if the NextLink is not empty.
8744func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
8745	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
8746}
8747
8748// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
8749// It returns nil if no more results exist.
8750func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
8751	if !lblbrlr.hasNextLink() {
8752		return nil, nil
8753	}
8754	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8755		autorest.AsJSON(),
8756		autorest.AsGet(),
8757		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
8758}
8759
8760// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
8761type LoadBalancerLoadBalancingRuleListResultPage struct {
8762	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
8763	lblbrlr LoadBalancerLoadBalancingRuleListResult
8764}
8765
8766// NextWithContext advances to the next page of values.  If there was an error making
8767// the request the page does not advance and the error is returned.
8768func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
8769	if tracing.IsEnabled() {
8770		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
8771		defer func() {
8772			sc := -1
8773			if page.Response().Response.Response != nil {
8774				sc = page.Response().Response.Response.StatusCode
8775			}
8776			tracing.EndSpan(ctx, sc, err)
8777		}()
8778	}
8779	for {
8780		next, err := page.fn(ctx, page.lblbrlr)
8781		if err != nil {
8782			return err
8783		}
8784		page.lblbrlr = next
8785		if !next.hasNextLink() || !next.IsEmpty() {
8786			break
8787		}
8788	}
8789	return nil
8790}
8791
8792// Next advances to the next page of values.  If there was an error making
8793// the request the page does not advance and the error is returned.
8794// Deprecated: Use NextWithContext() instead.
8795func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
8796	return page.NextWithContext(context.Background())
8797}
8798
8799// NotDone returns true if the page enumeration should be started or is not yet complete.
8800func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
8801	return !page.lblbrlr.IsEmpty()
8802}
8803
8804// Response returns the raw server response from the last page request.
8805func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
8806	return page.lblbrlr
8807}
8808
8809// Values returns the slice of values for the current page or nil if there are no values.
8810func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
8811	if page.lblbrlr.IsEmpty() {
8812		return nil
8813	}
8814	return *page.lblbrlr.Value
8815}
8816
8817// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
8818func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
8819	return LoadBalancerLoadBalancingRuleListResultPage{
8820		fn:      getNextPage,
8821		lblbrlr: cur,
8822	}
8823}
8824
8825// LoadBalancerProbeListResult response for ListProbe API service call.
8826type LoadBalancerProbeListResult struct {
8827	autorest.Response `json:"-"`
8828	// Value - A list of probes in a load balancer.
8829	Value *[]Probe `json:"value,omitempty"`
8830	// NextLink - READ-ONLY; The URL to get the next set of results.
8831	NextLink *string `json:"nextLink,omitempty"`
8832}
8833
8834// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
8835func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
8836	objectMap := make(map[string]interface{})
8837	if lbplr.Value != nil {
8838		objectMap["value"] = lbplr.Value
8839	}
8840	return json.Marshal(objectMap)
8841}
8842
8843// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
8844type LoadBalancerProbeListResultIterator struct {
8845	i    int
8846	page LoadBalancerProbeListResultPage
8847}
8848
8849// NextWithContext advances to the next value.  If there was an error making
8850// the request the iterator does not advance and the error is returned.
8851func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
8852	if tracing.IsEnabled() {
8853		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
8854		defer func() {
8855			sc := -1
8856			if iter.Response().Response.Response != nil {
8857				sc = iter.Response().Response.Response.StatusCode
8858			}
8859			tracing.EndSpan(ctx, sc, err)
8860		}()
8861	}
8862	iter.i++
8863	if iter.i < len(iter.page.Values()) {
8864		return nil
8865	}
8866	err = iter.page.NextWithContext(ctx)
8867	if err != nil {
8868		iter.i--
8869		return err
8870	}
8871	iter.i = 0
8872	return nil
8873}
8874
8875// Next advances to the next value.  If there was an error making
8876// the request the iterator does not advance and the error is returned.
8877// Deprecated: Use NextWithContext() instead.
8878func (iter *LoadBalancerProbeListResultIterator) Next() error {
8879	return iter.NextWithContext(context.Background())
8880}
8881
8882// NotDone returns true if the enumeration should be started or is not yet complete.
8883func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
8884	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8885}
8886
8887// Response returns the raw server response from the last page request.
8888func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
8889	return iter.page.Response()
8890}
8891
8892// Value returns the current value or a zero-initialized value if the
8893// iterator has advanced beyond the end of the collection.
8894func (iter LoadBalancerProbeListResultIterator) Value() Probe {
8895	if !iter.page.NotDone() {
8896		return Probe{}
8897	}
8898	return iter.page.Values()[iter.i]
8899}
8900
8901// Creates a new instance of the LoadBalancerProbeListResultIterator type.
8902func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
8903	return LoadBalancerProbeListResultIterator{page: page}
8904}
8905
8906// IsEmpty returns true if the ListResult contains no values.
8907func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
8908	return lbplr.Value == nil || len(*lbplr.Value) == 0
8909}
8910
8911// hasNextLink returns true if the NextLink is not empty.
8912func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
8913	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
8914}
8915
8916// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
8917// It returns nil if no more results exist.
8918func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
8919	if !lbplr.hasNextLink() {
8920		return nil, nil
8921	}
8922	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8923		autorest.AsJSON(),
8924		autorest.AsGet(),
8925		autorest.WithBaseURL(to.String(lbplr.NextLink)))
8926}
8927
8928// LoadBalancerProbeListResultPage contains a page of Probe values.
8929type LoadBalancerProbeListResultPage struct {
8930	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
8931	lbplr LoadBalancerProbeListResult
8932}
8933
8934// NextWithContext advances to the next page of values.  If there was an error making
8935// the request the page does not advance and the error is returned.
8936func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
8937	if tracing.IsEnabled() {
8938		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
8939		defer func() {
8940			sc := -1
8941			if page.Response().Response.Response != nil {
8942				sc = page.Response().Response.Response.StatusCode
8943			}
8944			tracing.EndSpan(ctx, sc, err)
8945		}()
8946	}
8947	for {
8948		next, err := page.fn(ctx, page.lbplr)
8949		if err != nil {
8950			return err
8951		}
8952		page.lbplr = next
8953		if !next.hasNextLink() || !next.IsEmpty() {
8954			break
8955		}
8956	}
8957	return nil
8958}
8959
8960// Next advances to the next page of values.  If there was an error making
8961// the request the page does not advance and the error is returned.
8962// Deprecated: Use NextWithContext() instead.
8963func (page *LoadBalancerProbeListResultPage) Next() error {
8964	return page.NextWithContext(context.Background())
8965}
8966
8967// NotDone returns true if the page enumeration should be started or is not yet complete.
8968func (page LoadBalancerProbeListResultPage) NotDone() bool {
8969	return !page.lbplr.IsEmpty()
8970}
8971
8972// Response returns the raw server response from the last page request.
8973func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
8974	return page.lbplr
8975}
8976
8977// Values returns the slice of values for the current page or nil if there are no values.
8978func (page LoadBalancerProbeListResultPage) Values() []Probe {
8979	if page.lbplr.IsEmpty() {
8980		return nil
8981	}
8982	return *page.lbplr.Value
8983}
8984
8985// Creates a new instance of the LoadBalancerProbeListResultPage type.
8986func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
8987	return LoadBalancerProbeListResultPage{
8988		fn:    getNextPage,
8989		lbplr: cur,
8990	}
8991}
8992
8993// LoadBalancerPropertiesFormat properties of the load balancer.
8994type LoadBalancerPropertiesFormat struct {
8995	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
8996	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
8997	// BackendAddressPools - Collection of backend address pools used by a load balancer
8998	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
8999	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
9000	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
9001	// Probes - Collection of probe objects used in the load balancer
9002	Probes *[]Probe `json:"probes,omitempty"`
9003	// 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.
9004	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
9005	// 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.
9006	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
9007	// OutboundNatRules - The outbound NAT rules.
9008	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
9009	// ResourceGUID - The resource GUID property of the load balancer resource.
9010	ResourceGUID *string `json:"resourceGuid,omitempty"`
9011	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9012	ProvisioningState *string `json:"provisioningState,omitempty"`
9013}
9014
9015// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9016// long-running operation.
9017type LoadBalancersCreateOrUpdateFuture struct {
9018	azure.FutureAPI
9019	// Result returns the result of the asynchronous operation.
9020	// If the operation has not completed it will return an error.
9021	Result func(LoadBalancersClient) (LoadBalancer, error)
9022}
9023
9024// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9025func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9026	var azFuture azure.Future
9027	if err := json.Unmarshal(body, &azFuture); err != nil {
9028		return err
9029	}
9030	future.FutureAPI = &azFuture
9031	future.Result = future.result
9032	return nil
9033}
9034
9035// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
9036func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9037	var done bool
9038	done, err = future.DoneWithContext(context.Background(), client)
9039	if err != nil {
9040		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9041		return
9042	}
9043	if !done {
9044		lb.Response.Response = future.Response()
9045		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
9046		return
9047	}
9048	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9049	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9050		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
9051		if err != nil {
9052			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
9053		}
9054	}
9055	return
9056}
9057
9058// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9059// operation.
9060type LoadBalancersDeleteFuture struct {
9061	azure.FutureAPI
9062	// Result returns the result of the asynchronous operation.
9063	// If the operation has not completed it will return an error.
9064	Result func(LoadBalancersClient) (autorest.Response, error)
9065}
9066
9067// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9068func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
9069	var azFuture azure.Future
9070	if err := json.Unmarshal(body, &azFuture); err != nil {
9071		return err
9072	}
9073	future.FutureAPI = &azFuture
9074	future.Result = future.result
9075	return nil
9076}
9077
9078// result is the default implementation for LoadBalancersDeleteFuture.Result.
9079func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
9080	var done bool
9081	done, err = future.DoneWithContext(context.Background(), client)
9082	if err != nil {
9083		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
9084		return
9085	}
9086	if !done {
9087		ar.Response = future.Response()
9088		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
9089		return
9090	}
9091	ar.Response = future.Response()
9092	return
9093}
9094
9095// LoadBalancerSku SKU of a load balancer
9096type LoadBalancerSku struct {
9097	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
9098	Name LoadBalancerSkuName `json:"name,omitempty"`
9099}
9100
9101// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
9102// operation.
9103type LoadBalancersUpdateTagsFuture struct {
9104	azure.FutureAPI
9105	// Result returns the result of the asynchronous operation.
9106	// If the operation has not completed it will return an error.
9107	Result func(LoadBalancersClient) (LoadBalancer, error)
9108}
9109
9110// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9111func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9112	var azFuture azure.Future
9113	if err := json.Unmarshal(body, &azFuture); err != nil {
9114		return err
9115	}
9116	future.FutureAPI = &azFuture
9117	future.Result = future.result
9118	return nil
9119}
9120
9121// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
9122func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
9123	var done bool
9124	done, err = future.DoneWithContext(context.Background(), client)
9125	if err != nil {
9126		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9127		return
9128	}
9129	if !done {
9130		lb.Response.Response = future.Response()
9131		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
9132		return
9133	}
9134	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9135	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
9136		lb, err = client.UpdateTagsResponder(lb.Response.Response)
9137		if err != nil {
9138			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
9139		}
9140	}
9141	return
9142}
9143
9144// LoadBalancingRule a load balancing rule for a load balancer.
9145type LoadBalancingRule struct {
9146	autorest.Response `json:"-"`
9147	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
9148	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
9149	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9150	Name *string `json:"name,omitempty"`
9151	// Etag - A unique read-only string that changes whenever the resource is updated.
9152	Etag *string `json:"etag,omitempty"`
9153	// ID - Resource ID.
9154	ID *string `json:"id,omitempty"`
9155}
9156
9157// MarshalJSON is the custom marshaler for LoadBalancingRule.
9158func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
9159	objectMap := make(map[string]interface{})
9160	if lbr.LoadBalancingRulePropertiesFormat != nil {
9161		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
9162	}
9163	if lbr.Name != nil {
9164		objectMap["name"] = lbr.Name
9165	}
9166	if lbr.Etag != nil {
9167		objectMap["etag"] = lbr.Etag
9168	}
9169	if lbr.ID != nil {
9170		objectMap["id"] = lbr.ID
9171	}
9172	return json.Marshal(objectMap)
9173}
9174
9175// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
9176func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
9177	var m map[string]*json.RawMessage
9178	err := json.Unmarshal(body, &m)
9179	if err != nil {
9180		return err
9181	}
9182	for k, v := range m {
9183		switch k {
9184		case "properties":
9185			if v != nil {
9186				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
9187				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
9188				if err != nil {
9189					return err
9190				}
9191				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
9192			}
9193		case "name":
9194			if v != nil {
9195				var name string
9196				err = json.Unmarshal(*v, &name)
9197				if err != nil {
9198					return err
9199				}
9200				lbr.Name = &name
9201			}
9202		case "etag":
9203			if v != nil {
9204				var etag string
9205				err = json.Unmarshal(*v, &etag)
9206				if err != nil {
9207					return err
9208				}
9209				lbr.Etag = &etag
9210			}
9211		case "id":
9212			if v != nil {
9213				var ID string
9214				err = json.Unmarshal(*v, &ID)
9215				if err != nil {
9216					return err
9217				}
9218				lbr.ID = &ID
9219			}
9220		}
9221	}
9222
9223	return nil
9224}
9225
9226// LoadBalancingRulePropertiesFormat properties of the load balancer.
9227type LoadBalancingRulePropertiesFormat struct {
9228	// FrontendIPConfiguration - A reference to frontend IP addresses.
9229	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9230	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
9231	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
9232	// Probe - The reference of the load balancer probe used by the load balancing rule.
9233	Probe *SubResource `json:"probe,omitempty"`
9234	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9235	Protocol TransportProtocol `json:"protocol,omitempty"`
9236	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
9237	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
9238	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
9239	FrontendPort *int32 `json:"frontendPort,omitempty"`
9240	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
9241	BackendPort *int32 `json:"backendPort,omitempty"`
9242	// 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.
9243	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9244	// 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.
9245	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9246	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
9247	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
9248	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9249	ProvisioningState *string `json:"provisioningState,omitempty"`
9250}
9251
9252// LocalNetworkGateway a common class for general resource information
9253type LocalNetworkGateway struct {
9254	autorest.Response `json:"-"`
9255	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
9256	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
9257	// Etag - A unique read-only string that changes whenever the resource is updated.
9258	Etag *string `json:"etag,omitempty"`
9259	// ID - Resource ID.
9260	ID *string `json:"id,omitempty"`
9261	// Name - READ-ONLY; Resource name.
9262	Name *string `json:"name,omitempty"`
9263	// Type - READ-ONLY; Resource type.
9264	Type *string `json:"type,omitempty"`
9265	// Location - Resource location.
9266	Location *string `json:"location,omitempty"`
9267	// Tags - Resource tags.
9268	Tags map[string]*string `json:"tags"`
9269}
9270
9271// MarshalJSON is the custom marshaler for LocalNetworkGateway.
9272func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
9273	objectMap := make(map[string]interface{})
9274	if lng.LocalNetworkGatewayPropertiesFormat != nil {
9275		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
9276	}
9277	if lng.Etag != nil {
9278		objectMap["etag"] = lng.Etag
9279	}
9280	if lng.ID != nil {
9281		objectMap["id"] = lng.ID
9282	}
9283	if lng.Location != nil {
9284		objectMap["location"] = lng.Location
9285	}
9286	if lng.Tags != nil {
9287		objectMap["tags"] = lng.Tags
9288	}
9289	return json.Marshal(objectMap)
9290}
9291
9292// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
9293func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
9294	var m map[string]*json.RawMessage
9295	err := json.Unmarshal(body, &m)
9296	if err != nil {
9297		return err
9298	}
9299	for k, v := range m {
9300		switch k {
9301		case "properties":
9302			if v != nil {
9303				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
9304				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
9305				if err != nil {
9306					return err
9307				}
9308				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
9309			}
9310		case "etag":
9311			if v != nil {
9312				var etag string
9313				err = json.Unmarshal(*v, &etag)
9314				if err != nil {
9315					return err
9316				}
9317				lng.Etag = &etag
9318			}
9319		case "id":
9320			if v != nil {
9321				var ID string
9322				err = json.Unmarshal(*v, &ID)
9323				if err != nil {
9324					return err
9325				}
9326				lng.ID = &ID
9327			}
9328		case "name":
9329			if v != nil {
9330				var name string
9331				err = json.Unmarshal(*v, &name)
9332				if err != nil {
9333					return err
9334				}
9335				lng.Name = &name
9336			}
9337		case "type":
9338			if v != nil {
9339				var typeVar string
9340				err = json.Unmarshal(*v, &typeVar)
9341				if err != nil {
9342					return err
9343				}
9344				lng.Type = &typeVar
9345			}
9346		case "location":
9347			if v != nil {
9348				var location string
9349				err = json.Unmarshal(*v, &location)
9350				if err != nil {
9351					return err
9352				}
9353				lng.Location = &location
9354			}
9355		case "tags":
9356			if v != nil {
9357				var tags map[string]*string
9358				err = json.Unmarshal(*v, &tags)
9359				if err != nil {
9360					return err
9361				}
9362				lng.Tags = tags
9363			}
9364		}
9365	}
9366
9367	return nil
9368}
9369
9370// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
9371type LocalNetworkGatewayListResult struct {
9372	autorest.Response `json:"-"`
9373	// Value - A list of local network gateways that exists in a resource group.
9374	Value *[]LocalNetworkGateway `json:"value,omitempty"`
9375	// NextLink - READ-ONLY; The URL to get the next set of results.
9376	NextLink *string `json:"nextLink,omitempty"`
9377}
9378
9379// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
9380func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
9381	objectMap := make(map[string]interface{})
9382	if lnglr.Value != nil {
9383		objectMap["value"] = lnglr.Value
9384	}
9385	return json.Marshal(objectMap)
9386}
9387
9388// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
9389// values.
9390type LocalNetworkGatewayListResultIterator struct {
9391	i    int
9392	page LocalNetworkGatewayListResultPage
9393}
9394
9395// NextWithContext advances to the next value.  If there was an error making
9396// the request the iterator does not advance and the error is returned.
9397func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
9398	if tracing.IsEnabled() {
9399		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
9400		defer func() {
9401			sc := -1
9402			if iter.Response().Response.Response != nil {
9403				sc = iter.Response().Response.Response.StatusCode
9404			}
9405			tracing.EndSpan(ctx, sc, err)
9406		}()
9407	}
9408	iter.i++
9409	if iter.i < len(iter.page.Values()) {
9410		return nil
9411	}
9412	err = iter.page.NextWithContext(ctx)
9413	if err != nil {
9414		iter.i--
9415		return err
9416	}
9417	iter.i = 0
9418	return nil
9419}
9420
9421// Next advances to the next value.  If there was an error making
9422// the request the iterator does not advance and the error is returned.
9423// Deprecated: Use NextWithContext() instead.
9424func (iter *LocalNetworkGatewayListResultIterator) Next() error {
9425	return iter.NextWithContext(context.Background())
9426}
9427
9428// NotDone returns true if the enumeration should be started or is not yet complete.
9429func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
9430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9431}
9432
9433// Response returns the raw server response from the last page request.
9434func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
9435	return iter.page.Response()
9436}
9437
9438// Value returns the current value or a zero-initialized value if the
9439// iterator has advanced beyond the end of the collection.
9440func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
9441	if !iter.page.NotDone() {
9442		return LocalNetworkGateway{}
9443	}
9444	return iter.page.Values()[iter.i]
9445}
9446
9447// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
9448func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
9449	return LocalNetworkGatewayListResultIterator{page: page}
9450}
9451
9452// IsEmpty returns true if the ListResult contains no values.
9453func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
9454	return lnglr.Value == nil || len(*lnglr.Value) == 0
9455}
9456
9457// hasNextLink returns true if the NextLink is not empty.
9458func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
9459	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
9460}
9461
9462// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
9463// It returns nil if no more results exist.
9464func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
9465	if !lnglr.hasNextLink() {
9466		return nil, nil
9467	}
9468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9469		autorest.AsJSON(),
9470		autorest.AsGet(),
9471		autorest.WithBaseURL(to.String(lnglr.NextLink)))
9472}
9473
9474// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
9475type LocalNetworkGatewayListResultPage struct {
9476	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
9477	lnglr LocalNetworkGatewayListResult
9478}
9479
9480// NextWithContext advances to the next page of values.  If there was an error making
9481// the request the page does not advance and the error is returned.
9482func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
9483	if tracing.IsEnabled() {
9484		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
9485		defer func() {
9486			sc := -1
9487			if page.Response().Response.Response != nil {
9488				sc = page.Response().Response.Response.StatusCode
9489			}
9490			tracing.EndSpan(ctx, sc, err)
9491		}()
9492	}
9493	for {
9494		next, err := page.fn(ctx, page.lnglr)
9495		if err != nil {
9496			return err
9497		}
9498		page.lnglr = next
9499		if !next.hasNextLink() || !next.IsEmpty() {
9500			break
9501		}
9502	}
9503	return nil
9504}
9505
9506// Next advances to the next page of values.  If there was an error making
9507// the request the page does not advance and the error is returned.
9508// Deprecated: Use NextWithContext() instead.
9509func (page *LocalNetworkGatewayListResultPage) Next() error {
9510	return page.NextWithContext(context.Background())
9511}
9512
9513// NotDone returns true if the page enumeration should be started or is not yet complete.
9514func (page LocalNetworkGatewayListResultPage) NotDone() bool {
9515	return !page.lnglr.IsEmpty()
9516}
9517
9518// Response returns the raw server response from the last page request.
9519func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
9520	return page.lnglr
9521}
9522
9523// Values returns the slice of values for the current page or nil if there are no values.
9524func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
9525	if page.lnglr.IsEmpty() {
9526		return nil
9527	}
9528	return *page.lnglr.Value
9529}
9530
9531// Creates a new instance of the LocalNetworkGatewayListResultPage type.
9532func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
9533	return LocalNetworkGatewayListResultPage{
9534		fn:    getNextPage,
9535		lnglr: cur,
9536	}
9537}
9538
9539// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
9540type LocalNetworkGatewayPropertiesFormat struct {
9541	// LocalNetworkAddressSpace - Local network site address space.
9542	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
9543	// GatewayIPAddress - IP address of local network gateway.
9544	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
9545	// BgpSettings - Local network gateway's BGP speaker settings.
9546	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
9547	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
9548	ResourceGUID *string `json:"resourceGuid,omitempty"`
9549	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9550	ProvisioningState *string `json:"provisioningState,omitempty"`
9551}
9552
9553// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
9554func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
9555	objectMap := make(map[string]interface{})
9556	if lngpf.LocalNetworkAddressSpace != nil {
9557		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
9558	}
9559	if lngpf.GatewayIPAddress != nil {
9560		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
9561	}
9562	if lngpf.BgpSettings != nil {
9563		objectMap["bgpSettings"] = lngpf.BgpSettings
9564	}
9565	if lngpf.ResourceGUID != nil {
9566		objectMap["resourceGuid"] = lngpf.ResourceGUID
9567	}
9568	return json.Marshal(objectMap)
9569}
9570
9571// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9572// long-running operation.
9573type LocalNetworkGatewaysCreateOrUpdateFuture struct {
9574	azure.FutureAPI
9575	// Result returns the result of the asynchronous operation.
9576	// If the operation has not completed it will return an error.
9577	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9578}
9579
9580// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9581func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9582	var azFuture azure.Future
9583	if err := json.Unmarshal(body, &azFuture); err != nil {
9584		return err
9585	}
9586	future.FutureAPI = &azFuture
9587	future.Result = future.result
9588	return nil
9589}
9590
9591// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
9592func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9593	var done bool
9594	done, err = future.DoneWithContext(context.Background(), client)
9595	if err != nil {
9596		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9597		return
9598	}
9599	if !done {
9600		lng.Response.Response = future.Response()
9601		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
9602		return
9603	}
9604	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9605	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9606		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
9607		if err != nil {
9608			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
9609		}
9610	}
9611	return
9612}
9613
9614// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9615// long-running operation.
9616type LocalNetworkGatewaysDeleteFuture struct {
9617	azure.FutureAPI
9618	// Result returns the result of the asynchronous operation.
9619	// If the operation has not completed it will return an error.
9620	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
9621}
9622
9623// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9624func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
9625	var azFuture azure.Future
9626	if err := json.Unmarshal(body, &azFuture); err != nil {
9627		return err
9628	}
9629	future.FutureAPI = &azFuture
9630	future.Result = future.result
9631	return nil
9632}
9633
9634// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
9635func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
9636	var done bool
9637	done, err = future.DoneWithContext(context.Background(), client)
9638	if err != nil {
9639		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
9640		return
9641	}
9642	if !done {
9643		ar.Response = future.Response()
9644		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
9645		return
9646	}
9647	ar.Response = future.Response()
9648	return
9649}
9650
9651// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9652// long-running operation.
9653type LocalNetworkGatewaysUpdateTagsFuture struct {
9654	azure.FutureAPI
9655	// Result returns the result of the asynchronous operation.
9656	// If the operation has not completed it will return an error.
9657	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
9658}
9659
9660// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9661func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9662	var azFuture azure.Future
9663	if err := json.Unmarshal(body, &azFuture); err != nil {
9664		return err
9665	}
9666	future.FutureAPI = &azFuture
9667	future.Result = future.result
9668	return nil
9669}
9670
9671// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
9672func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
9673	var done bool
9674	done, err = future.DoneWithContext(context.Background(), client)
9675	if err != nil {
9676		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9677		return
9678	}
9679	if !done {
9680		lng.Response.Response = future.Response()
9681		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
9682		return
9683	}
9684	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9685	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
9686		lng, err = client.UpdateTagsResponder(lng.Response.Response)
9687		if err != nil {
9688			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
9689		}
9690	}
9691	return
9692}
9693
9694// LogSpecification description of logging specification.
9695type LogSpecification struct {
9696	// Name - The name of the specification.
9697	Name *string `json:"name,omitempty"`
9698	// DisplayName - The display name of the specification.
9699	DisplayName *string `json:"displayName,omitempty"`
9700	// BlobDuration - Duration of the blob.
9701	BlobDuration *string `json:"blobDuration,omitempty"`
9702}
9703
9704// MetricSpecification description of metrics specification.
9705type MetricSpecification struct {
9706	// Name - The name of the metric.
9707	Name *string `json:"name,omitempty"`
9708	// DisplayName - The display name of the metric.
9709	DisplayName *string `json:"displayName,omitempty"`
9710	// DisplayDescription - The description of the metric.
9711	DisplayDescription *string `json:"displayDescription,omitempty"`
9712	// Unit - Units the metric to be displayed in.
9713	Unit *string `json:"unit,omitempty"`
9714	// AggregationType - The aggregation type.
9715	AggregationType *string `json:"aggregationType,omitempty"`
9716	// Availabilities - List of availability.
9717	Availabilities *[]Availability `json:"availabilities,omitempty"`
9718	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
9719	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
9720	// FillGapWithZero - Whether gaps would be filled with zeros.
9721	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
9722	// MetricFilterPattern - Pattern for the filter of the metric.
9723	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
9724	// Dimensions - List of dimensions.
9725	Dimensions *[]Dimension `json:"dimensions,omitempty"`
9726	// IsInternal - Whether the metric is internal.
9727	IsInternal *bool `json:"isInternal,omitempty"`
9728	// SourceMdmAccount - The source MDM account.
9729	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
9730	// SourceMdmNamespace - The source MDM namespace.
9731	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
9732	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
9733	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
9734}
9735
9736// NextHopParameters parameters that define the source and destination endpoint.
9737type NextHopParameters struct {
9738	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
9739	TargetResourceID *string `json:"targetResourceId,omitempty"`
9740	// SourceIPAddress - The source IP address.
9741	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
9742	// DestinationIPAddress - The destination IP address.
9743	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
9744	// 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).
9745	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
9746}
9747
9748// NextHopResult the information about next hop from the specified VM.
9749type NextHopResult struct {
9750	autorest.Response `json:"-"`
9751	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
9752	NextHopType NextHopType `json:"nextHopType,omitempty"`
9753	// NextHopIPAddress - Next hop IP Address
9754	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
9755	// 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'.
9756	RouteTableID *string `json:"routeTableId,omitempty"`
9757}
9758
9759// Operation network REST API operation definition.
9760type Operation struct {
9761	// Name - Operation name: {provider}/{resource}/{operation}
9762	Name *string `json:"name,omitempty"`
9763	// Display - Display metadata associated with the operation.
9764	Display *OperationDisplay `json:"display,omitempty"`
9765	// Origin - Origin of the operation.
9766	Origin *string `json:"origin,omitempty"`
9767	// OperationPropertiesFormat - Operation properties format.
9768	*OperationPropertiesFormat `json:"properties,omitempty"`
9769}
9770
9771// MarshalJSON is the custom marshaler for Operation.
9772func (o Operation) MarshalJSON() ([]byte, error) {
9773	objectMap := make(map[string]interface{})
9774	if o.Name != nil {
9775		objectMap["name"] = o.Name
9776	}
9777	if o.Display != nil {
9778		objectMap["display"] = o.Display
9779	}
9780	if o.Origin != nil {
9781		objectMap["origin"] = o.Origin
9782	}
9783	if o.OperationPropertiesFormat != nil {
9784		objectMap["properties"] = o.OperationPropertiesFormat
9785	}
9786	return json.Marshal(objectMap)
9787}
9788
9789// UnmarshalJSON is the custom unmarshaler for Operation struct.
9790func (o *Operation) UnmarshalJSON(body []byte) error {
9791	var m map[string]*json.RawMessage
9792	err := json.Unmarshal(body, &m)
9793	if err != nil {
9794		return err
9795	}
9796	for k, v := range m {
9797		switch k {
9798		case "name":
9799			if v != nil {
9800				var name string
9801				err = json.Unmarshal(*v, &name)
9802				if err != nil {
9803					return err
9804				}
9805				o.Name = &name
9806			}
9807		case "display":
9808			if v != nil {
9809				var display OperationDisplay
9810				err = json.Unmarshal(*v, &display)
9811				if err != nil {
9812					return err
9813				}
9814				o.Display = &display
9815			}
9816		case "origin":
9817			if v != nil {
9818				var origin string
9819				err = json.Unmarshal(*v, &origin)
9820				if err != nil {
9821					return err
9822				}
9823				o.Origin = &origin
9824			}
9825		case "properties":
9826			if v != nil {
9827				var operationPropertiesFormat OperationPropertiesFormat
9828				err = json.Unmarshal(*v, &operationPropertiesFormat)
9829				if err != nil {
9830					return err
9831				}
9832				o.OperationPropertiesFormat = &operationPropertiesFormat
9833			}
9834		}
9835	}
9836
9837	return nil
9838}
9839
9840// OperationDisplay display metadata associated with the operation.
9841type OperationDisplay struct {
9842	// Provider - Service provider: Microsoft Network.
9843	Provider *string `json:"provider,omitempty"`
9844	// Resource - Resource on which the operation is performed.
9845	Resource *string `json:"resource,omitempty"`
9846	// Operation - Type of the operation: get, read, delete, etc.
9847	Operation *string `json:"operation,omitempty"`
9848	// Description - Description of the operation.
9849	Description *string `json:"description,omitempty"`
9850}
9851
9852// OperationListResult result of the request to list Network operations. It contains a list of operations
9853// and a URL link to get the next set of results.
9854type OperationListResult struct {
9855	autorest.Response `json:"-"`
9856	// Value - List of Network operations supported by the Network resource provider.
9857	Value *[]Operation `json:"value,omitempty"`
9858	// NextLink - URL to get the next set of operation list results if there are any.
9859	NextLink *string `json:"nextLink,omitempty"`
9860}
9861
9862// OperationListResultIterator provides access to a complete listing of Operation values.
9863type OperationListResultIterator struct {
9864	i    int
9865	page OperationListResultPage
9866}
9867
9868// NextWithContext advances to the next value.  If there was an error making
9869// the request the iterator does not advance and the error is returned.
9870func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9871	if tracing.IsEnabled() {
9872		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
9873		defer func() {
9874			sc := -1
9875			if iter.Response().Response.Response != nil {
9876				sc = iter.Response().Response.Response.StatusCode
9877			}
9878			tracing.EndSpan(ctx, sc, err)
9879		}()
9880	}
9881	iter.i++
9882	if iter.i < len(iter.page.Values()) {
9883		return nil
9884	}
9885	err = iter.page.NextWithContext(ctx)
9886	if err != nil {
9887		iter.i--
9888		return err
9889	}
9890	iter.i = 0
9891	return nil
9892}
9893
9894// Next advances to the next value.  If there was an error making
9895// the request the iterator does not advance and the error is returned.
9896// Deprecated: Use NextWithContext() instead.
9897func (iter *OperationListResultIterator) Next() error {
9898	return iter.NextWithContext(context.Background())
9899}
9900
9901// NotDone returns true if the enumeration should be started or is not yet complete.
9902func (iter OperationListResultIterator) NotDone() bool {
9903	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9904}
9905
9906// Response returns the raw server response from the last page request.
9907func (iter OperationListResultIterator) Response() OperationListResult {
9908	return iter.page.Response()
9909}
9910
9911// Value returns the current value or a zero-initialized value if the
9912// iterator has advanced beyond the end of the collection.
9913func (iter OperationListResultIterator) Value() Operation {
9914	if !iter.page.NotDone() {
9915		return Operation{}
9916	}
9917	return iter.page.Values()[iter.i]
9918}
9919
9920// Creates a new instance of the OperationListResultIterator type.
9921func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
9922	return OperationListResultIterator{page: page}
9923}
9924
9925// IsEmpty returns true if the ListResult contains no values.
9926func (olr OperationListResult) IsEmpty() bool {
9927	return olr.Value == nil || len(*olr.Value) == 0
9928}
9929
9930// hasNextLink returns true if the NextLink is not empty.
9931func (olr OperationListResult) hasNextLink() bool {
9932	return olr.NextLink != nil && len(*olr.NextLink) != 0
9933}
9934
9935// operationListResultPreparer prepares a request to retrieve the next set of results.
9936// It returns nil if no more results exist.
9937func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
9938	if !olr.hasNextLink() {
9939		return nil, nil
9940	}
9941	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9942		autorest.AsJSON(),
9943		autorest.AsGet(),
9944		autorest.WithBaseURL(to.String(olr.NextLink)))
9945}
9946
9947// OperationListResultPage contains a page of Operation values.
9948type OperationListResultPage struct {
9949	fn  func(context.Context, OperationListResult) (OperationListResult, error)
9950	olr OperationListResult
9951}
9952
9953// NextWithContext advances to the next page of values.  If there was an error making
9954// the request the page does not advance and the error is returned.
9955func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
9956	if tracing.IsEnabled() {
9957		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
9958		defer func() {
9959			sc := -1
9960			if page.Response().Response.Response != nil {
9961				sc = page.Response().Response.Response.StatusCode
9962			}
9963			tracing.EndSpan(ctx, sc, err)
9964		}()
9965	}
9966	for {
9967		next, err := page.fn(ctx, page.olr)
9968		if err != nil {
9969			return err
9970		}
9971		page.olr = next
9972		if !next.hasNextLink() || !next.IsEmpty() {
9973			break
9974		}
9975	}
9976	return nil
9977}
9978
9979// Next advances to the next page of values.  If there was an error making
9980// the request the page does not advance and the error is returned.
9981// Deprecated: Use NextWithContext() instead.
9982func (page *OperationListResultPage) Next() error {
9983	return page.NextWithContext(context.Background())
9984}
9985
9986// NotDone returns true if the page enumeration should be started or is not yet complete.
9987func (page OperationListResultPage) NotDone() bool {
9988	return !page.olr.IsEmpty()
9989}
9990
9991// Response returns the raw server response from the last page request.
9992func (page OperationListResultPage) Response() OperationListResult {
9993	return page.olr
9994}
9995
9996// Values returns the slice of values for the current page or nil if there are no values.
9997func (page OperationListResultPage) Values() []Operation {
9998	if page.olr.IsEmpty() {
9999		return nil
10000	}
10001	return *page.olr.Value
10002}
10003
10004// Creates a new instance of the OperationListResultPage type.
10005func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
10006	return OperationListResultPage{
10007		fn:  getNextPage,
10008		olr: cur,
10009	}
10010}
10011
10012// OperationPropertiesFormat description of operation properties format.
10013type OperationPropertiesFormat struct {
10014	// ServiceSpecification - Specification of the service.
10015	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
10016}
10017
10018// OperationPropertiesFormatServiceSpecification specification of the service.
10019type OperationPropertiesFormatServiceSpecification struct {
10020	// MetricSpecifications - Operation service specification.
10021	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
10022	// LogSpecifications - Operation log specification.
10023	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
10024}
10025
10026// OutboundNatRule outbound NAT pool of the load balancer.
10027type OutboundNatRule struct {
10028	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
10029	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
10030	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10031	Name *string `json:"name,omitempty"`
10032	// Etag - A unique read-only string that changes whenever the resource is updated.
10033	Etag *string `json:"etag,omitempty"`
10034	// ID - Resource ID.
10035	ID *string `json:"id,omitempty"`
10036}
10037
10038// MarshalJSON is the custom marshaler for OutboundNatRule.
10039func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
10040	objectMap := make(map[string]interface{})
10041	if onr.OutboundNatRulePropertiesFormat != nil {
10042		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
10043	}
10044	if onr.Name != nil {
10045		objectMap["name"] = onr.Name
10046	}
10047	if onr.Etag != nil {
10048		objectMap["etag"] = onr.Etag
10049	}
10050	if onr.ID != nil {
10051		objectMap["id"] = onr.ID
10052	}
10053	return json.Marshal(objectMap)
10054}
10055
10056// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
10057func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
10058	var m map[string]*json.RawMessage
10059	err := json.Unmarshal(body, &m)
10060	if err != nil {
10061		return err
10062	}
10063	for k, v := range m {
10064		switch k {
10065		case "properties":
10066			if v != nil {
10067				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
10068				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
10069				if err != nil {
10070					return err
10071				}
10072				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
10073			}
10074		case "name":
10075			if v != nil {
10076				var name string
10077				err = json.Unmarshal(*v, &name)
10078				if err != nil {
10079					return err
10080				}
10081				onr.Name = &name
10082			}
10083		case "etag":
10084			if v != nil {
10085				var etag string
10086				err = json.Unmarshal(*v, &etag)
10087				if err != nil {
10088					return err
10089				}
10090				onr.Etag = &etag
10091			}
10092		case "id":
10093			if v != nil {
10094				var ID string
10095				err = json.Unmarshal(*v, &ID)
10096				if err != nil {
10097					return err
10098				}
10099				onr.ID = &ID
10100			}
10101		}
10102	}
10103
10104	return nil
10105}
10106
10107// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
10108type OutboundNatRulePropertiesFormat struct {
10109	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
10110	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
10111	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
10112	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
10113	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
10114	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
10115	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10116	ProvisioningState *string `json:"provisioningState,omitempty"`
10117}
10118
10119// PacketCapture parameters that define the create packet capture operation.
10120type PacketCapture struct {
10121	*PacketCaptureParameters `json:"properties,omitempty"`
10122}
10123
10124// MarshalJSON is the custom marshaler for PacketCapture.
10125func (pc PacketCapture) MarshalJSON() ([]byte, error) {
10126	objectMap := make(map[string]interface{})
10127	if pc.PacketCaptureParameters != nil {
10128		objectMap["properties"] = pc.PacketCaptureParameters
10129	}
10130	return json.Marshal(objectMap)
10131}
10132
10133// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
10134func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
10135	var m map[string]*json.RawMessage
10136	err := json.Unmarshal(body, &m)
10137	if err != nil {
10138		return err
10139	}
10140	for k, v := range m {
10141		switch k {
10142		case "properties":
10143			if v != nil {
10144				var packetCaptureParameters PacketCaptureParameters
10145				err = json.Unmarshal(*v, &packetCaptureParameters)
10146				if err != nil {
10147					return err
10148				}
10149				pc.PacketCaptureParameters = &packetCaptureParameters
10150			}
10151		}
10152	}
10153
10154	return nil
10155}
10156
10157// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
10158type PacketCaptureFilter struct {
10159	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
10160	Protocol PcProtocol `json:"protocol,omitempty"`
10161	// 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.
10162	LocalIPAddress *string `json:"localIPAddress,omitempty"`
10163	// 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.
10164	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
10165	// 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.
10166	LocalPort *string `json:"localPort,omitempty"`
10167	// 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.
10168	RemotePort *string `json:"remotePort,omitempty"`
10169}
10170
10171// PacketCaptureListResult list of packet capture sessions.
10172type PacketCaptureListResult struct {
10173	autorest.Response `json:"-"`
10174	// Value - Information about packet capture sessions.
10175	Value *[]PacketCaptureResult `json:"value,omitempty"`
10176}
10177
10178// PacketCaptureParameters parameters that define the create packet capture operation.
10179type PacketCaptureParameters struct {
10180	// Target - The ID of the targeted resource, only VM is currently supported.
10181	Target *string `json:"target,omitempty"`
10182	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10183	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10184	// TotalBytesPerSession - Maximum size of the capture output.
10185	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10186	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10187	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10188	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10189	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10190}
10191
10192// PacketCaptureQueryStatusResult status of packet capture session.
10193type PacketCaptureQueryStatusResult struct {
10194	autorest.Response `json:"-"`
10195	// Name - The name of the packet capture resource.
10196	Name *string `json:"name,omitempty"`
10197	// ID - The ID of the packet capture resource.
10198	ID *string `json:"id,omitempty"`
10199	// CaptureStartTime - The start time of the packet capture session.
10200	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
10201	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
10202	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
10203	// StopReason - The reason the current packet capture session was stopped.
10204	StopReason *string `json:"stopReason,omitempty"`
10205	// PacketCaptureError - List of errors of packet capture session.
10206	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
10207}
10208
10209// PacketCaptureResult information about packet capture session.
10210type PacketCaptureResult struct {
10211	autorest.Response `json:"-"`
10212	// Name - READ-ONLY; Name of the packet capture session.
10213	Name *string `json:"name,omitempty"`
10214	// ID - READ-ONLY; ID of the packet capture operation.
10215	ID                             *string `json:"id,omitempty"`
10216	Etag                           *string `json:"etag,omitempty"`
10217	*PacketCaptureResultProperties `json:"properties,omitempty"`
10218}
10219
10220// MarshalJSON is the custom marshaler for PacketCaptureResult.
10221func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
10222	objectMap := make(map[string]interface{})
10223	if pcr.Etag != nil {
10224		objectMap["etag"] = pcr.Etag
10225	}
10226	if pcr.PacketCaptureResultProperties != nil {
10227		objectMap["properties"] = pcr.PacketCaptureResultProperties
10228	}
10229	return json.Marshal(objectMap)
10230}
10231
10232// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
10233func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
10234	var m map[string]*json.RawMessage
10235	err := json.Unmarshal(body, &m)
10236	if err != nil {
10237		return err
10238	}
10239	for k, v := range m {
10240		switch k {
10241		case "name":
10242			if v != nil {
10243				var name string
10244				err = json.Unmarshal(*v, &name)
10245				if err != nil {
10246					return err
10247				}
10248				pcr.Name = &name
10249			}
10250		case "id":
10251			if v != nil {
10252				var ID string
10253				err = json.Unmarshal(*v, &ID)
10254				if err != nil {
10255					return err
10256				}
10257				pcr.ID = &ID
10258			}
10259		case "etag":
10260			if v != nil {
10261				var etag string
10262				err = json.Unmarshal(*v, &etag)
10263				if err != nil {
10264					return err
10265				}
10266				pcr.Etag = &etag
10267			}
10268		case "properties":
10269			if v != nil {
10270				var packetCaptureResultProperties PacketCaptureResultProperties
10271				err = json.Unmarshal(*v, &packetCaptureResultProperties)
10272				if err != nil {
10273					return err
10274				}
10275				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
10276			}
10277		}
10278	}
10279
10280	return nil
10281}
10282
10283// PacketCaptureResultProperties describes the properties of a packet capture session.
10284type PacketCaptureResultProperties struct {
10285	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10286	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10287	// Target - The ID of the targeted resource, only VM is currently supported.
10288	Target *string `json:"target,omitempty"`
10289	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
10290	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
10291	// TotalBytesPerSession - Maximum size of the capture output.
10292	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
10293	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
10294	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
10295	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
10296	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
10297}
10298
10299// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
10300// operation.
10301type PacketCapturesCreateFuture struct {
10302	azure.FutureAPI
10303	// Result returns the result of the asynchronous operation.
10304	// If the operation has not completed it will return an error.
10305	Result func(PacketCapturesClient) (PacketCaptureResult, error)
10306}
10307
10308// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10309func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
10310	var azFuture azure.Future
10311	if err := json.Unmarshal(body, &azFuture); err != nil {
10312		return err
10313	}
10314	future.FutureAPI = &azFuture
10315	future.Result = future.result
10316	return nil
10317}
10318
10319// result is the default implementation for PacketCapturesCreateFuture.Result.
10320func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
10321	var done bool
10322	done, err = future.DoneWithContext(context.Background(), client)
10323	if err != nil {
10324		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
10325		return
10326	}
10327	if !done {
10328		pcr.Response.Response = future.Response()
10329		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
10330		return
10331	}
10332	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10333	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
10334		pcr, err = client.CreateResponder(pcr.Response.Response)
10335		if err != nil {
10336			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
10337		}
10338	}
10339	return
10340}
10341
10342// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10343// operation.
10344type PacketCapturesDeleteFuture struct {
10345	azure.FutureAPI
10346	// Result returns the result of the asynchronous operation.
10347	// If the operation has not completed it will return an error.
10348	Result func(PacketCapturesClient) (autorest.Response, error)
10349}
10350
10351// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10352func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
10353	var azFuture azure.Future
10354	if err := json.Unmarshal(body, &azFuture); err != nil {
10355		return err
10356	}
10357	future.FutureAPI = &azFuture
10358	future.Result = future.result
10359	return nil
10360}
10361
10362// result is the default implementation for PacketCapturesDeleteFuture.Result.
10363func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10364	var done bool
10365	done, err = future.DoneWithContext(context.Background(), client)
10366	if err != nil {
10367		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
10368		return
10369	}
10370	if !done {
10371		ar.Response = future.Response()
10372		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
10373		return
10374	}
10375	ar.Response = future.Response()
10376	return
10377}
10378
10379// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
10380// operation.
10381type PacketCapturesGetStatusFuture struct {
10382	azure.FutureAPI
10383	// Result returns the result of the asynchronous operation.
10384	// If the operation has not completed it will return an error.
10385	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
10386}
10387
10388// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10389func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
10390	var azFuture azure.Future
10391	if err := json.Unmarshal(body, &azFuture); err != nil {
10392		return err
10393	}
10394	future.FutureAPI = &azFuture
10395	future.Result = future.result
10396	return nil
10397}
10398
10399// result is the default implementation for PacketCapturesGetStatusFuture.Result.
10400func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
10401	var done bool
10402	done, err = future.DoneWithContext(context.Background(), client)
10403	if err != nil {
10404		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
10405		return
10406	}
10407	if !done {
10408		pcqsr.Response.Response = future.Response()
10409		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
10410		return
10411	}
10412	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10413	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
10414		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
10415		if err != nil {
10416			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
10417		}
10418	}
10419	return
10420}
10421
10422// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
10423// operation.
10424type PacketCapturesStopFuture struct {
10425	azure.FutureAPI
10426	// Result returns the result of the asynchronous operation.
10427	// If the operation has not completed it will return an error.
10428	Result func(PacketCapturesClient) (autorest.Response, error)
10429}
10430
10431// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10432func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
10433	var azFuture azure.Future
10434	if err := json.Unmarshal(body, &azFuture); err != nil {
10435		return err
10436	}
10437	future.FutureAPI = &azFuture
10438	future.Result = future.result
10439	return nil
10440}
10441
10442// result is the default implementation for PacketCapturesStopFuture.Result.
10443func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
10444	var done bool
10445	done, err = future.DoneWithContext(context.Background(), client)
10446	if err != nil {
10447		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
10448		return
10449	}
10450	if !done {
10451		ar.Response = future.Response()
10452		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
10453		return
10454	}
10455	ar.Response = future.Response()
10456	return
10457}
10458
10459// PacketCaptureStorageLocation describes the storage location for a packet capture session.
10460type PacketCaptureStorageLocation struct {
10461	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
10462	StorageID *string `json:"storageId,omitempty"`
10463	// 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.
10464	StoragePath *string `json:"storagePath,omitempty"`
10465	// 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.
10466	FilePath *string `json:"filePath,omitempty"`
10467}
10468
10469// PatchRouteFilter route Filter Resource.
10470type PatchRouteFilter struct {
10471	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
10472	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10473	Name *string `json:"name,omitempty"`
10474	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10475	Etag *string `json:"etag,omitempty"`
10476	// Type - READ-ONLY; Resource type.
10477	Type *string `json:"type,omitempty"`
10478	// Tags - Resource tags.
10479	Tags map[string]*string `json:"tags"`
10480	// ID - Resource ID.
10481	ID *string `json:"id,omitempty"`
10482}
10483
10484// MarshalJSON is the custom marshaler for PatchRouteFilter.
10485func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
10486	objectMap := make(map[string]interface{})
10487	if prf.RouteFilterPropertiesFormat != nil {
10488		objectMap["properties"] = prf.RouteFilterPropertiesFormat
10489	}
10490	if prf.Tags != nil {
10491		objectMap["tags"] = prf.Tags
10492	}
10493	if prf.ID != nil {
10494		objectMap["id"] = prf.ID
10495	}
10496	return json.Marshal(objectMap)
10497}
10498
10499// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
10500func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
10501	var m map[string]*json.RawMessage
10502	err := json.Unmarshal(body, &m)
10503	if err != nil {
10504		return err
10505	}
10506	for k, v := range m {
10507		switch k {
10508		case "properties":
10509			if v != nil {
10510				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
10511				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
10512				if err != nil {
10513					return err
10514				}
10515				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
10516			}
10517		case "name":
10518			if v != nil {
10519				var name string
10520				err = json.Unmarshal(*v, &name)
10521				if err != nil {
10522					return err
10523				}
10524				prf.Name = &name
10525			}
10526		case "etag":
10527			if v != nil {
10528				var etag string
10529				err = json.Unmarshal(*v, &etag)
10530				if err != nil {
10531					return err
10532				}
10533				prf.Etag = &etag
10534			}
10535		case "type":
10536			if v != nil {
10537				var typeVar string
10538				err = json.Unmarshal(*v, &typeVar)
10539				if err != nil {
10540					return err
10541				}
10542				prf.Type = &typeVar
10543			}
10544		case "tags":
10545			if v != nil {
10546				var tags map[string]*string
10547				err = json.Unmarshal(*v, &tags)
10548				if err != nil {
10549					return err
10550				}
10551				prf.Tags = tags
10552			}
10553		case "id":
10554			if v != nil {
10555				var ID string
10556				err = json.Unmarshal(*v, &ID)
10557				if err != nil {
10558					return err
10559				}
10560				prf.ID = &ID
10561			}
10562		}
10563	}
10564
10565	return nil
10566}
10567
10568// PatchRouteFilterRule route Filter Rule Resource
10569type PatchRouteFilterRule struct {
10570	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
10571	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
10572	Name *string `json:"name,omitempty"`
10573	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10574	Etag *string `json:"etag,omitempty"`
10575	// Tags - Resource tags.
10576	Tags map[string]*string `json:"tags"`
10577	// ID - Resource ID.
10578	ID *string `json:"id,omitempty"`
10579}
10580
10581// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
10582func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
10583	objectMap := make(map[string]interface{})
10584	if prfr.RouteFilterRulePropertiesFormat != nil {
10585		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
10586	}
10587	if prfr.Tags != nil {
10588		objectMap["tags"] = prfr.Tags
10589	}
10590	if prfr.ID != nil {
10591		objectMap["id"] = prfr.ID
10592	}
10593	return json.Marshal(objectMap)
10594}
10595
10596// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
10597func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
10598	var m map[string]*json.RawMessage
10599	err := json.Unmarshal(body, &m)
10600	if err != nil {
10601		return err
10602	}
10603	for k, v := range m {
10604		switch k {
10605		case "properties":
10606			if v != nil {
10607				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
10608				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
10609				if err != nil {
10610					return err
10611				}
10612				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
10613			}
10614		case "name":
10615			if v != nil {
10616				var name string
10617				err = json.Unmarshal(*v, &name)
10618				if err != nil {
10619					return err
10620				}
10621				prfr.Name = &name
10622			}
10623		case "etag":
10624			if v != nil {
10625				var etag string
10626				err = json.Unmarshal(*v, &etag)
10627				if err != nil {
10628					return err
10629				}
10630				prfr.Etag = &etag
10631			}
10632		case "tags":
10633			if v != nil {
10634				var tags map[string]*string
10635				err = json.Unmarshal(*v, &tags)
10636				if err != nil {
10637					return err
10638				}
10639				prfr.Tags = tags
10640			}
10641		case "id":
10642			if v != nil {
10643				var ID string
10644				err = json.Unmarshal(*v, &ID)
10645				if err != nil {
10646					return err
10647				}
10648				prfr.ID = &ID
10649			}
10650		}
10651	}
10652
10653	return nil
10654}
10655
10656// Probe a load balancer probe.
10657type Probe struct {
10658	autorest.Response `json:"-"`
10659	// ProbePropertiesFormat - Properties of load balancer probe.
10660	*ProbePropertiesFormat `json:"properties,omitempty"`
10661	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10662	Name *string `json:"name,omitempty"`
10663	// Etag - A unique read-only string that changes whenever the resource is updated.
10664	Etag *string `json:"etag,omitempty"`
10665	// ID - Resource ID.
10666	ID *string `json:"id,omitempty"`
10667}
10668
10669// MarshalJSON is the custom marshaler for Probe.
10670func (p Probe) MarshalJSON() ([]byte, error) {
10671	objectMap := make(map[string]interface{})
10672	if p.ProbePropertiesFormat != nil {
10673		objectMap["properties"] = p.ProbePropertiesFormat
10674	}
10675	if p.Name != nil {
10676		objectMap["name"] = p.Name
10677	}
10678	if p.Etag != nil {
10679		objectMap["etag"] = p.Etag
10680	}
10681	if p.ID != nil {
10682		objectMap["id"] = p.ID
10683	}
10684	return json.Marshal(objectMap)
10685}
10686
10687// UnmarshalJSON is the custom unmarshaler for Probe struct.
10688func (p *Probe) UnmarshalJSON(body []byte) error {
10689	var m map[string]*json.RawMessage
10690	err := json.Unmarshal(body, &m)
10691	if err != nil {
10692		return err
10693	}
10694	for k, v := range m {
10695		switch k {
10696		case "properties":
10697			if v != nil {
10698				var probePropertiesFormat ProbePropertiesFormat
10699				err = json.Unmarshal(*v, &probePropertiesFormat)
10700				if err != nil {
10701					return err
10702				}
10703				p.ProbePropertiesFormat = &probePropertiesFormat
10704			}
10705		case "name":
10706			if v != nil {
10707				var name string
10708				err = json.Unmarshal(*v, &name)
10709				if err != nil {
10710					return err
10711				}
10712				p.Name = &name
10713			}
10714		case "etag":
10715			if v != nil {
10716				var etag string
10717				err = json.Unmarshal(*v, &etag)
10718				if err != nil {
10719					return err
10720				}
10721				p.Etag = &etag
10722			}
10723		case "id":
10724			if v != nil {
10725				var ID string
10726				err = json.Unmarshal(*v, &ID)
10727				if err != nil {
10728					return err
10729				}
10730				p.ID = &ID
10731			}
10732		}
10733	}
10734
10735	return nil
10736}
10737
10738// ProbePropertiesFormat load balancer probe resource.
10739type ProbePropertiesFormat struct {
10740	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
10741	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
10742	// 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'
10743	Protocol ProbeProtocol `json:"protocol,omitempty"`
10744	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
10745	Port *int32 `json:"port,omitempty"`
10746	// 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.
10747	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
10748	// 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.
10749	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
10750	// 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.
10751	RequestPath *string `json:"requestPath,omitempty"`
10752	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10753	ProvisioningState *string `json:"provisioningState,omitempty"`
10754}
10755
10756// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
10757func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
10758	objectMap := make(map[string]interface{})
10759	if ppf.Protocol != "" {
10760		objectMap["protocol"] = ppf.Protocol
10761	}
10762	if ppf.Port != nil {
10763		objectMap["port"] = ppf.Port
10764	}
10765	if ppf.IntervalInSeconds != nil {
10766		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
10767	}
10768	if ppf.NumberOfProbes != nil {
10769		objectMap["numberOfProbes"] = ppf.NumberOfProbes
10770	}
10771	if ppf.RequestPath != nil {
10772		objectMap["requestPath"] = ppf.RequestPath
10773	}
10774	if ppf.ProvisioningState != nil {
10775		objectMap["provisioningState"] = ppf.ProvisioningState
10776	}
10777	return json.Marshal(objectMap)
10778}
10779
10780// PublicIPAddress public IP address resource.
10781type PublicIPAddress struct {
10782	autorest.Response `json:"-"`
10783	// Sku - The public IP address SKU.
10784	Sku *PublicIPAddressSku `json:"sku,omitempty"`
10785	// PublicIPAddressPropertiesFormat - Public IP address properties.
10786	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
10787	// Etag - A unique read-only string that changes whenever the resource is updated.
10788	Etag *string `json:"etag,omitempty"`
10789	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10790	Zones *[]string `json:"zones,omitempty"`
10791	// ID - Resource ID.
10792	ID *string `json:"id,omitempty"`
10793	// Name - READ-ONLY; Resource name.
10794	Name *string `json:"name,omitempty"`
10795	// Type - READ-ONLY; Resource type.
10796	Type *string `json:"type,omitempty"`
10797	// Location - Resource location.
10798	Location *string `json:"location,omitempty"`
10799	// Tags - Resource tags.
10800	Tags map[string]*string `json:"tags"`
10801}
10802
10803// MarshalJSON is the custom marshaler for PublicIPAddress.
10804func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
10805	objectMap := make(map[string]interface{})
10806	if pia.Sku != nil {
10807		objectMap["sku"] = pia.Sku
10808	}
10809	if pia.PublicIPAddressPropertiesFormat != nil {
10810		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
10811	}
10812	if pia.Etag != nil {
10813		objectMap["etag"] = pia.Etag
10814	}
10815	if pia.Zones != nil {
10816		objectMap["zones"] = pia.Zones
10817	}
10818	if pia.ID != nil {
10819		objectMap["id"] = pia.ID
10820	}
10821	if pia.Location != nil {
10822		objectMap["location"] = pia.Location
10823	}
10824	if pia.Tags != nil {
10825		objectMap["tags"] = pia.Tags
10826	}
10827	return json.Marshal(objectMap)
10828}
10829
10830// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
10831func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
10832	var m map[string]*json.RawMessage
10833	err := json.Unmarshal(body, &m)
10834	if err != nil {
10835		return err
10836	}
10837	for k, v := range m {
10838		switch k {
10839		case "sku":
10840			if v != nil {
10841				var sku PublicIPAddressSku
10842				err = json.Unmarshal(*v, &sku)
10843				if err != nil {
10844					return err
10845				}
10846				pia.Sku = &sku
10847			}
10848		case "properties":
10849			if v != nil {
10850				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
10851				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
10852				if err != nil {
10853					return err
10854				}
10855				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
10856			}
10857		case "etag":
10858			if v != nil {
10859				var etag string
10860				err = json.Unmarshal(*v, &etag)
10861				if err != nil {
10862					return err
10863				}
10864				pia.Etag = &etag
10865			}
10866		case "zones":
10867			if v != nil {
10868				var zones []string
10869				err = json.Unmarshal(*v, &zones)
10870				if err != nil {
10871					return err
10872				}
10873				pia.Zones = &zones
10874			}
10875		case "id":
10876			if v != nil {
10877				var ID string
10878				err = json.Unmarshal(*v, &ID)
10879				if err != nil {
10880					return err
10881				}
10882				pia.ID = &ID
10883			}
10884		case "name":
10885			if v != nil {
10886				var name string
10887				err = json.Unmarshal(*v, &name)
10888				if err != nil {
10889					return err
10890				}
10891				pia.Name = &name
10892			}
10893		case "type":
10894			if v != nil {
10895				var typeVar string
10896				err = json.Unmarshal(*v, &typeVar)
10897				if err != nil {
10898					return err
10899				}
10900				pia.Type = &typeVar
10901			}
10902		case "location":
10903			if v != nil {
10904				var location string
10905				err = json.Unmarshal(*v, &location)
10906				if err != nil {
10907					return err
10908				}
10909				pia.Location = &location
10910			}
10911		case "tags":
10912			if v != nil {
10913				var tags map[string]*string
10914				err = json.Unmarshal(*v, &tags)
10915				if err != nil {
10916					return err
10917				}
10918				pia.Tags = tags
10919			}
10920		}
10921	}
10922
10923	return nil
10924}
10925
10926// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
10927type PublicIPAddressDNSSettings struct {
10928	// 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.
10929	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
10930	// 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.
10931	Fqdn *string `json:"fqdn,omitempty"`
10932	// 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.
10933	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
10934}
10935
10936// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10937// long-running operation.
10938type PublicIPAddressesCreateOrUpdateFuture struct {
10939	azure.FutureAPI
10940	// Result returns the result of the asynchronous operation.
10941	// If the operation has not completed it will return an error.
10942	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
10943}
10944
10945// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10946func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10947	var azFuture azure.Future
10948	if err := json.Unmarshal(body, &azFuture); err != nil {
10949		return err
10950	}
10951	future.FutureAPI = &azFuture
10952	future.Result = future.result
10953	return nil
10954}
10955
10956// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
10957func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
10958	var done bool
10959	done, err = future.DoneWithContext(context.Background(), client)
10960	if err != nil {
10961		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10962		return
10963	}
10964	if !done {
10965		pia.Response.Response = future.Response()
10966		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
10967		return
10968	}
10969	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10970	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
10971		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
10972		if err != nil {
10973			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
10974		}
10975	}
10976	return
10977}
10978
10979// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10980// operation.
10981type PublicIPAddressesDeleteFuture struct {
10982	azure.FutureAPI
10983	// Result returns the result of the asynchronous operation.
10984	// If the operation has not completed it will return an error.
10985	Result func(PublicIPAddressesClient) (autorest.Response, error)
10986}
10987
10988// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10989func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
10990	var azFuture azure.Future
10991	if err := json.Unmarshal(body, &azFuture); err != nil {
10992		return err
10993	}
10994	future.FutureAPI = &azFuture
10995	future.Result = future.result
10996	return nil
10997}
10998
10999// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
11000func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
11001	var done bool
11002	done, err = future.DoneWithContext(context.Background(), client)
11003	if err != nil {
11004		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
11005		return
11006	}
11007	if !done {
11008		ar.Response = future.Response()
11009		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
11010		return
11011	}
11012	ar.Response = future.Response()
11013	return
11014}
11015
11016// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11017// long-running operation.
11018type PublicIPAddressesUpdateTagsFuture struct {
11019	azure.FutureAPI
11020	// Result returns the result of the asynchronous operation.
11021	// If the operation has not completed it will return an error.
11022	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
11023}
11024
11025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11026func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11027	var azFuture azure.Future
11028	if err := json.Unmarshal(body, &azFuture); err != nil {
11029		return err
11030	}
11031	future.FutureAPI = &azFuture
11032	future.Result = future.result
11033	return nil
11034}
11035
11036// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
11037func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
11038	var done bool
11039	done, err = future.DoneWithContext(context.Background(), client)
11040	if err != nil {
11041		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11042		return
11043	}
11044	if !done {
11045		pia.Response.Response = future.Response()
11046		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
11047		return
11048	}
11049	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11050	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
11051		pia, err = client.UpdateTagsResponder(pia.Response.Response)
11052		if err != nil {
11053			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
11054		}
11055	}
11056	return
11057}
11058
11059// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
11060type PublicIPAddressListResult struct {
11061	autorest.Response `json:"-"`
11062	// Value - A list of public IP addresses that exists in a resource group.
11063	Value *[]PublicIPAddress `json:"value,omitempty"`
11064	// NextLink - The URL to get the next set of results.
11065	NextLink *string `json:"nextLink,omitempty"`
11066}
11067
11068// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
11069type PublicIPAddressListResultIterator struct {
11070	i    int
11071	page PublicIPAddressListResultPage
11072}
11073
11074// NextWithContext advances to the next value.  If there was an error making
11075// the request the iterator does not advance and the error is returned.
11076func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
11077	if tracing.IsEnabled() {
11078		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
11079		defer func() {
11080			sc := -1
11081			if iter.Response().Response.Response != nil {
11082				sc = iter.Response().Response.Response.StatusCode
11083			}
11084			tracing.EndSpan(ctx, sc, err)
11085		}()
11086	}
11087	iter.i++
11088	if iter.i < len(iter.page.Values()) {
11089		return nil
11090	}
11091	err = iter.page.NextWithContext(ctx)
11092	if err != nil {
11093		iter.i--
11094		return err
11095	}
11096	iter.i = 0
11097	return nil
11098}
11099
11100// Next advances to the next value.  If there was an error making
11101// the request the iterator does not advance and the error is returned.
11102// Deprecated: Use NextWithContext() instead.
11103func (iter *PublicIPAddressListResultIterator) Next() error {
11104	return iter.NextWithContext(context.Background())
11105}
11106
11107// NotDone returns true if the enumeration should be started or is not yet complete.
11108func (iter PublicIPAddressListResultIterator) NotDone() bool {
11109	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11110}
11111
11112// Response returns the raw server response from the last page request.
11113func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
11114	return iter.page.Response()
11115}
11116
11117// Value returns the current value or a zero-initialized value if the
11118// iterator has advanced beyond the end of the collection.
11119func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
11120	if !iter.page.NotDone() {
11121		return PublicIPAddress{}
11122	}
11123	return iter.page.Values()[iter.i]
11124}
11125
11126// Creates a new instance of the PublicIPAddressListResultIterator type.
11127func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
11128	return PublicIPAddressListResultIterator{page: page}
11129}
11130
11131// IsEmpty returns true if the ListResult contains no values.
11132func (pialr PublicIPAddressListResult) IsEmpty() bool {
11133	return pialr.Value == nil || len(*pialr.Value) == 0
11134}
11135
11136// hasNextLink returns true if the NextLink is not empty.
11137func (pialr PublicIPAddressListResult) hasNextLink() bool {
11138	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
11139}
11140
11141// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
11142// It returns nil if no more results exist.
11143func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
11144	if !pialr.hasNextLink() {
11145		return nil, nil
11146	}
11147	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11148		autorest.AsJSON(),
11149		autorest.AsGet(),
11150		autorest.WithBaseURL(to.String(pialr.NextLink)))
11151}
11152
11153// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
11154type PublicIPAddressListResultPage struct {
11155	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
11156	pialr PublicIPAddressListResult
11157}
11158
11159// NextWithContext advances to the next page of values.  If there was an error making
11160// the request the page does not advance and the error is returned.
11161func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
11162	if tracing.IsEnabled() {
11163		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
11164		defer func() {
11165			sc := -1
11166			if page.Response().Response.Response != nil {
11167				sc = page.Response().Response.Response.StatusCode
11168			}
11169			tracing.EndSpan(ctx, sc, err)
11170		}()
11171	}
11172	for {
11173		next, err := page.fn(ctx, page.pialr)
11174		if err != nil {
11175			return err
11176		}
11177		page.pialr = next
11178		if !next.hasNextLink() || !next.IsEmpty() {
11179			break
11180		}
11181	}
11182	return nil
11183}
11184
11185// Next advances to the next page of values.  If there was an error making
11186// the request the page does not advance and the error is returned.
11187// Deprecated: Use NextWithContext() instead.
11188func (page *PublicIPAddressListResultPage) Next() error {
11189	return page.NextWithContext(context.Background())
11190}
11191
11192// NotDone returns true if the page enumeration should be started or is not yet complete.
11193func (page PublicIPAddressListResultPage) NotDone() bool {
11194	return !page.pialr.IsEmpty()
11195}
11196
11197// Response returns the raw server response from the last page request.
11198func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
11199	return page.pialr
11200}
11201
11202// Values returns the slice of values for the current page or nil if there are no values.
11203func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
11204	if page.pialr.IsEmpty() {
11205		return nil
11206	}
11207	return *page.pialr.Value
11208}
11209
11210// Creates a new instance of the PublicIPAddressListResultPage type.
11211func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
11212	return PublicIPAddressListResultPage{
11213		fn:    getNextPage,
11214		pialr: cur,
11215	}
11216}
11217
11218// PublicIPAddressPropertiesFormat public IP address properties.
11219type PublicIPAddressPropertiesFormat struct {
11220	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11221	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
11222	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
11223	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
11224	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
11225	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
11226	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
11227	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
11228	// IPAddress - The IP address associated with the public IP address resource.
11229	IPAddress *string `json:"ipAddress,omitempty"`
11230	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
11231	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11232	// ResourceGUID - The resource GUID property of the public IP resource.
11233	ResourceGUID *string `json:"resourceGuid,omitempty"`
11234	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11235	ProvisioningState *string `json:"provisioningState,omitempty"`
11236}
11237
11238// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
11239func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
11240	objectMap := make(map[string]interface{})
11241	if piapf.PublicIPAllocationMethod != "" {
11242		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
11243	}
11244	if piapf.PublicIPAddressVersion != "" {
11245		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
11246	}
11247	if piapf.DNSSettings != nil {
11248		objectMap["dnsSettings"] = piapf.DNSSettings
11249	}
11250	if piapf.IPAddress != nil {
11251		objectMap["ipAddress"] = piapf.IPAddress
11252	}
11253	if piapf.IdleTimeoutInMinutes != nil {
11254		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
11255	}
11256	if piapf.ResourceGUID != nil {
11257		objectMap["resourceGuid"] = piapf.ResourceGUID
11258	}
11259	if piapf.ProvisioningState != nil {
11260		objectMap["provisioningState"] = piapf.ProvisioningState
11261	}
11262	return json.Marshal(objectMap)
11263}
11264
11265// PublicIPAddressSku SKU of a public IP address
11266type PublicIPAddressSku struct {
11267	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
11268	Name PublicIPAddressSkuName `json:"name,omitempty"`
11269}
11270
11271// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
11272type QueryTroubleshootingParameters struct {
11273	// TargetResourceID - The target resource ID to query the troubleshooting result.
11274	TargetResourceID *string `json:"targetResourceId,omitempty"`
11275}
11276
11277// Resource common resource representation.
11278type Resource struct {
11279	// ID - Resource ID.
11280	ID *string `json:"id,omitempty"`
11281	// Name - READ-ONLY; Resource name.
11282	Name *string `json:"name,omitempty"`
11283	// Type - READ-ONLY; Resource type.
11284	Type *string `json:"type,omitempty"`
11285	// Location - Resource location.
11286	Location *string `json:"location,omitempty"`
11287	// Tags - Resource tags.
11288	Tags map[string]*string `json:"tags"`
11289}
11290
11291// MarshalJSON is the custom marshaler for Resource.
11292func (r Resource) MarshalJSON() ([]byte, error) {
11293	objectMap := make(map[string]interface{})
11294	if r.ID != nil {
11295		objectMap["id"] = r.ID
11296	}
11297	if r.Location != nil {
11298		objectMap["location"] = r.Location
11299	}
11300	if r.Tags != nil {
11301		objectMap["tags"] = r.Tags
11302	}
11303	return json.Marshal(objectMap)
11304}
11305
11306// ResourceNavigationLink resourceNavigationLink resource.
11307type ResourceNavigationLink struct {
11308	// ResourceNavigationLinkFormat - Resource navigation link properties format.
11309	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
11310	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
11311	Name *string `json:"name,omitempty"`
11312	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11313	Etag *string `json:"etag,omitempty"`
11314	// ID - Resource ID.
11315	ID *string `json:"id,omitempty"`
11316}
11317
11318// MarshalJSON is the custom marshaler for ResourceNavigationLink.
11319func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
11320	objectMap := make(map[string]interface{})
11321	if rnl.ResourceNavigationLinkFormat != nil {
11322		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
11323	}
11324	if rnl.Name != nil {
11325		objectMap["name"] = rnl.Name
11326	}
11327	if rnl.ID != nil {
11328		objectMap["id"] = rnl.ID
11329	}
11330	return json.Marshal(objectMap)
11331}
11332
11333// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
11334func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
11335	var m map[string]*json.RawMessage
11336	err := json.Unmarshal(body, &m)
11337	if err != nil {
11338		return err
11339	}
11340	for k, v := range m {
11341		switch k {
11342		case "properties":
11343			if v != nil {
11344				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
11345				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
11346				if err != nil {
11347					return err
11348				}
11349				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
11350			}
11351		case "name":
11352			if v != nil {
11353				var name string
11354				err = json.Unmarshal(*v, &name)
11355				if err != nil {
11356					return err
11357				}
11358				rnl.Name = &name
11359			}
11360		case "etag":
11361			if v != nil {
11362				var etag string
11363				err = json.Unmarshal(*v, &etag)
11364				if err != nil {
11365					return err
11366				}
11367				rnl.Etag = &etag
11368			}
11369		case "id":
11370			if v != nil {
11371				var ID string
11372				err = json.Unmarshal(*v, &ID)
11373				if err != nil {
11374					return err
11375				}
11376				rnl.ID = &ID
11377			}
11378		}
11379	}
11380
11381	return nil
11382}
11383
11384// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
11385type ResourceNavigationLinkFormat struct {
11386	// LinkedResourceType - Resource type of the linked resource.
11387	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
11388	// Link - Link to the external resource
11389	Link *string `json:"link,omitempty"`
11390	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
11391	ProvisioningState *string `json:"provisioningState,omitempty"`
11392}
11393
11394// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
11395func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
11396	objectMap := make(map[string]interface{})
11397	if rnlf.LinkedResourceType != nil {
11398		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
11399	}
11400	if rnlf.Link != nil {
11401		objectMap["link"] = rnlf.Link
11402	}
11403	return json.Marshal(objectMap)
11404}
11405
11406// RetentionPolicyParameters parameters that define the retention policy for flow log.
11407type RetentionPolicyParameters struct {
11408	// Days - Number of days to retain flow log records.
11409	Days *int32 `json:"days,omitempty"`
11410	// Enabled - Flag to enable/disable retention.
11411	Enabled *bool `json:"enabled,omitempty"`
11412}
11413
11414// Route route resource
11415type Route struct {
11416	autorest.Response `json:"-"`
11417	// RoutePropertiesFormat - Properties of the route.
11418	*RoutePropertiesFormat `json:"properties,omitempty"`
11419	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11420	Name *string `json:"name,omitempty"`
11421	// Etag - A unique read-only string that changes whenever the resource is updated.
11422	Etag *string `json:"etag,omitempty"`
11423	// ID - Resource ID.
11424	ID *string `json:"id,omitempty"`
11425}
11426
11427// MarshalJSON is the custom marshaler for Route.
11428func (r Route) MarshalJSON() ([]byte, error) {
11429	objectMap := make(map[string]interface{})
11430	if r.RoutePropertiesFormat != nil {
11431		objectMap["properties"] = r.RoutePropertiesFormat
11432	}
11433	if r.Name != nil {
11434		objectMap["name"] = r.Name
11435	}
11436	if r.Etag != nil {
11437		objectMap["etag"] = r.Etag
11438	}
11439	if r.ID != nil {
11440		objectMap["id"] = r.ID
11441	}
11442	return json.Marshal(objectMap)
11443}
11444
11445// UnmarshalJSON is the custom unmarshaler for Route struct.
11446func (r *Route) UnmarshalJSON(body []byte) error {
11447	var m map[string]*json.RawMessage
11448	err := json.Unmarshal(body, &m)
11449	if err != nil {
11450		return err
11451	}
11452	for k, v := range m {
11453		switch k {
11454		case "properties":
11455			if v != nil {
11456				var routePropertiesFormat RoutePropertiesFormat
11457				err = json.Unmarshal(*v, &routePropertiesFormat)
11458				if err != nil {
11459					return err
11460				}
11461				r.RoutePropertiesFormat = &routePropertiesFormat
11462			}
11463		case "name":
11464			if v != nil {
11465				var name string
11466				err = json.Unmarshal(*v, &name)
11467				if err != nil {
11468					return err
11469				}
11470				r.Name = &name
11471			}
11472		case "etag":
11473			if v != nil {
11474				var etag string
11475				err = json.Unmarshal(*v, &etag)
11476				if err != nil {
11477					return err
11478				}
11479				r.Etag = &etag
11480			}
11481		case "id":
11482			if v != nil {
11483				var ID string
11484				err = json.Unmarshal(*v, &ID)
11485				if err != nil {
11486					return err
11487				}
11488				r.ID = &ID
11489			}
11490		}
11491	}
11492
11493	return nil
11494}
11495
11496// RouteFilter route Filter Resource.
11497type RouteFilter struct {
11498	autorest.Response            `json:"-"`
11499	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
11500	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11501	Etag *string `json:"etag,omitempty"`
11502	// ID - Resource ID.
11503	ID *string `json:"id,omitempty"`
11504	// Name - READ-ONLY; Resource name.
11505	Name *string `json:"name,omitempty"`
11506	// Type - READ-ONLY; Resource type.
11507	Type *string `json:"type,omitempty"`
11508	// Location - Resource location.
11509	Location *string `json:"location,omitempty"`
11510	// Tags - Resource tags.
11511	Tags map[string]*string `json:"tags"`
11512}
11513
11514// MarshalJSON is the custom marshaler for RouteFilter.
11515func (rf RouteFilter) MarshalJSON() ([]byte, error) {
11516	objectMap := make(map[string]interface{})
11517	if rf.RouteFilterPropertiesFormat != nil {
11518		objectMap["properties"] = rf.RouteFilterPropertiesFormat
11519	}
11520	if rf.ID != nil {
11521		objectMap["id"] = rf.ID
11522	}
11523	if rf.Location != nil {
11524		objectMap["location"] = rf.Location
11525	}
11526	if rf.Tags != nil {
11527		objectMap["tags"] = rf.Tags
11528	}
11529	return json.Marshal(objectMap)
11530}
11531
11532// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
11533func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
11534	var m map[string]*json.RawMessage
11535	err := json.Unmarshal(body, &m)
11536	if err != nil {
11537		return err
11538	}
11539	for k, v := range m {
11540		switch k {
11541		case "properties":
11542			if v != nil {
11543				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
11544				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
11545				if err != nil {
11546					return err
11547				}
11548				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
11549			}
11550		case "etag":
11551			if v != nil {
11552				var etag string
11553				err = json.Unmarshal(*v, &etag)
11554				if err != nil {
11555					return err
11556				}
11557				rf.Etag = &etag
11558			}
11559		case "id":
11560			if v != nil {
11561				var ID string
11562				err = json.Unmarshal(*v, &ID)
11563				if err != nil {
11564					return err
11565				}
11566				rf.ID = &ID
11567			}
11568		case "name":
11569			if v != nil {
11570				var name string
11571				err = json.Unmarshal(*v, &name)
11572				if err != nil {
11573					return err
11574				}
11575				rf.Name = &name
11576			}
11577		case "type":
11578			if v != nil {
11579				var typeVar string
11580				err = json.Unmarshal(*v, &typeVar)
11581				if err != nil {
11582					return err
11583				}
11584				rf.Type = &typeVar
11585			}
11586		case "location":
11587			if v != nil {
11588				var location string
11589				err = json.Unmarshal(*v, &location)
11590				if err != nil {
11591					return err
11592				}
11593				rf.Location = &location
11594			}
11595		case "tags":
11596			if v != nil {
11597				var tags map[string]*string
11598				err = json.Unmarshal(*v, &tags)
11599				if err != nil {
11600					return err
11601				}
11602				rf.Tags = tags
11603			}
11604		}
11605	}
11606
11607	return nil
11608}
11609
11610// RouteFilterListResult response for the ListRouteFilters API service call.
11611type RouteFilterListResult struct {
11612	autorest.Response `json:"-"`
11613	// Value - Gets a list of route filters in a resource group.
11614	Value *[]RouteFilter `json:"value,omitempty"`
11615	// NextLink - The URL to get the next set of results.
11616	NextLink *string `json:"nextLink,omitempty"`
11617}
11618
11619// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
11620type RouteFilterListResultIterator struct {
11621	i    int
11622	page RouteFilterListResultPage
11623}
11624
11625// NextWithContext advances to the next value.  If there was an error making
11626// the request the iterator does not advance and the error is returned.
11627func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
11628	if tracing.IsEnabled() {
11629		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
11630		defer func() {
11631			sc := -1
11632			if iter.Response().Response.Response != nil {
11633				sc = iter.Response().Response.Response.StatusCode
11634			}
11635			tracing.EndSpan(ctx, sc, err)
11636		}()
11637	}
11638	iter.i++
11639	if iter.i < len(iter.page.Values()) {
11640		return nil
11641	}
11642	err = iter.page.NextWithContext(ctx)
11643	if err != nil {
11644		iter.i--
11645		return err
11646	}
11647	iter.i = 0
11648	return nil
11649}
11650
11651// Next advances to the next value.  If there was an error making
11652// the request the iterator does not advance and the error is returned.
11653// Deprecated: Use NextWithContext() instead.
11654func (iter *RouteFilterListResultIterator) Next() error {
11655	return iter.NextWithContext(context.Background())
11656}
11657
11658// NotDone returns true if the enumeration should be started or is not yet complete.
11659func (iter RouteFilterListResultIterator) NotDone() bool {
11660	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11661}
11662
11663// Response returns the raw server response from the last page request.
11664func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
11665	return iter.page.Response()
11666}
11667
11668// Value returns the current value or a zero-initialized value if the
11669// iterator has advanced beyond the end of the collection.
11670func (iter RouteFilterListResultIterator) Value() RouteFilter {
11671	if !iter.page.NotDone() {
11672		return RouteFilter{}
11673	}
11674	return iter.page.Values()[iter.i]
11675}
11676
11677// Creates a new instance of the RouteFilterListResultIterator type.
11678func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
11679	return RouteFilterListResultIterator{page: page}
11680}
11681
11682// IsEmpty returns true if the ListResult contains no values.
11683func (rflr RouteFilterListResult) IsEmpty() bool {
11684	return rflr.Value == nil || len(*rflr.Value) == 0
11685}
11686
11687// hasNextLink returns true if the NextLink is not empty.
11688func (rflr RouteFilterListResult) hasNextLink() bool {
11689	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
11690}
11691
11692// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
11693// It returns nil if no more results exist.
11694func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
11695	if !rflr.hasNextLink() {
11696		return nil, nil
11697	}
11698	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11699		autorest.AsJSON(),
11700		autorest.AsGet(),
11701		autorest.WithBaseURL(to.String(rflr.NextLink)))
11702}
11703
11704// RouteFilterListResultPage contains a page of RouteFilter values.
11705type RouteFilterListResultPage struct {
11706	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
11707	rflr RouteFilterListResult
11708}
11709
11710// NextWithContext advances to the next page of values.  If there was an error making
11711// the request the page does not advance and the error is returned.
11712func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
11713	if tracing.IsEnabled() {
11714		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
11715		defer func() {
11716			sc := -1
11717			if page.Response().Response.Response != nil {
11718				sc = page.Response().Response.Response.StatusCode
11719			}
11720			tracing.EndSpan(ctx, sc, err)
11721		}()
11722	}
11723	for {
11724		next, err := page.fn(ctx, page.rflr)
11725		if err != nil {
11726			return err
11727		}
11728		page.rflr = next
11729		if !next.hasNextLink() || !next.IsEmpty() {
11730			break
11731		}
11732	}
11733	return nil
11734}
11735
11736// Next advances to the next page of values.  If there was an error making
11737// the request the page does not advance and the error is returned.
11738// Deprecated: Use NextWithContext() instead.
11739func (page *RouteFilterListResultPage) Next() error {
11740	return page.NextWithContext(context.Background())
11741}
11742
11743// NotDone returns true if the page enumeration should be started or is not yet complete.
11744func (page RouteFilterListResultPage) NotDone() bool {
11745	return !page.rflr.IsEmpty()
11746}
11747
11748// Response returns the raw server response from the last page request.
11749func (page RouteFilterListResultPage) Response() RouteFilterListResult {
11750	return page.rflr
11751}
11752
11753// Values returns the slice of values for the current page or nil if there are no values.
11754func (page RouteFilterListResultPage) Values() []RouteFilter {
11755	if page.rflr.IsEmpty() {
11756		return nil
11757	}
11758	return *page.rflr.Value
11759}
11760
11761// Creates a new instance of the RouteFilterListResultPage type.
11762func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
11763	return RouteFilterListResultPage{
11764		fn:   getNextPage,
11765		rflr: cur,
11766	}
11767}
11768
11769// RouteFilterPropertiesFormat route Filter Resource
11770type RouteFilterPropertiesFormat struct {
11771	// Rules - Collection of RouteFilterRules contained within a route filter.
11772	Rules *[]RouteFilterRule `json:"rules,omitempty"`
11773	// Peerings - A collection of references to express route circuit peerings.
11774	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
11775	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
11776	ProvisioningState *string `json:"provisioningState,omitempty"`
11777}
11778
11779// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
11780func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
11781	objectMap := make(map[string]interface{})
11782	if rfpf.Rules != nil {
11783		objectMap["rules"] = rfpf.Rules
11784	}
11785	if rfpf.Peerings != nil {
11786		objectMap["peerings"] = rfpf.Peerings
11787	}
11788	return json.Marshal(objectMap)
11789}
11790
11791// RouteFilterRule route Filter Rule Resource
11792type RouteFilterRule struct {
11793	autorest.Response                `json:"-"`
11794	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
11795	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11796	Name *string `json:"name,omitempty"`
11797	// Location - Resource location.
11798	Location *string `json:"location,omitempty"`
11799	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11800	Etag *string `json:"etag,omitempty"`
11801	// Tags - Resource tags.
11802	Tags map[string]*string `json:"tags"`
11803	// ID - Resource ID.
11804	ID *string `json:"id,omitempty"`
11805}
11806
11807// MarshalJSON is the custom marshaler for RouteFilterRule.
11808func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
11809	objectMap := make(map[string]interface{})
11810	if rfr.RouteFilterRulePropertiesFormat != nil {
11811		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
11812	}
11813	if rfr.Name != nil {
11814		objectMap["name"] = rfr.Name
11815	}
11816	if rfr.Location != nil {
11817		objectMap["location"] = rfr.Location
11818	}
11819	if rfr.Tags != nil {
11820		objectMap["tags"] = rfr.Tags
11821	}
11822	if rfr.ID != nil {
11823		objectMap["id"] = rfr.ID
11824	}
11825	return json.Marshal(objectMap)
11826}
11827
11828// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
11829func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
11830	var m map[string]*json.RawMessage
11831	err := json.Unmarshal(body, &m)
11832	if err != nil {
11833		return err
11834	}
11835	for k, v := range m {
11836		switch k {
11837		case "properties":
11838			if v != nil {
11839				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
11840				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
11841				if err != nil {
11842					return err
11843				}
11844				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
11845			}
11846		case "name":
11847			if v != nil {
11848				var name string
11849				err = json.Unmarshal(*v, &name)
11850				if err != nil {
11851					return err
11852				}
11853				rfr.Name = &name
11854			}
11855		case "location":
11856			if v != nil {
11857				var location string
11858				err = json.Unmarshal(*v, &location)
11859				if err != nil {
11860					return err
11861				}
11862				rfr.Location = &location
11863			}
11864		case "etag":
11865			if v != nil {
11866				var etag string
11867				err = json.Unmarshal(*v, &etag)
11868				if err != nil {
11869					return err
11870				}
11871				rfr.Etag = &etag
11872			}
11873		case "tags":
11874			if v != nil {
11875				var tags map[string]*string
11876				err = json.Unmarshal(*v, &tags)
11877				if err != nil {
11878					return err
11879				}
11880				rfr.Tags = tags
11881			}
11882		case "id":
11883			if v != nil {
11884				var ID string
11885				err = json.Unmarshal(*v, &ID)
11886				if err != nil {
11887					return err
11888				}
11889				rfr.ID = &ID
11890			}
11891		}
11892	}
11893
11894	return nil
11895}
11896
11897// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
11898type RouteFilterRuleListResult struct {
11899	autorest.Response `json:"-"`
11900	// Value - Gets a list of RouteFilterRules in a resource group.
11901	Value *[]RouteFilterRule `json:"value,omitempty"`
11902	// NextLink - The URL to get the next set of results.
11903	NextLink *string `json:"nextLink,omitempty"`
11904}
11905
11906// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
11907type RouteFilterRuleListResultIterator struct {
11908	i    int
11909	page RouteFilterRuleListResultPage
11910}
11911
11912// NextWithContext advances to the next value.  If there was an error making
11913// the request the iterator does not advance and the error is returned.
11914func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11915	if tracing.IsEnabled() {
11916		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
11917		defer func() {
11918			sc := -1
11919			if iter.Response().Response.Response != nil {
11920				sc = iter.Response().Response.Response.StatusCode
11921			}
11922			tracing.EndSpan(ctx, sc, err)
11923		}()
11924	}
11925	iter.i++
11926	if iter.i < len(iter.page.Values()) {
11927		return nil
11928	}
11929	err = iter.page.NextWithContext(ctx)
11930	if err != nil {
11931		iter.i--
11932		return err
11933	}
11934	iter.i = 0
11935	return nil
11936}
11937
11938// Next advances to the next value.  If there was an error making
11939// the request the iterator does not advance and the error is returned.
11940// Deprecated: Use NextWithContext() instead.
11941func (iter *RouteFilterRuleListResultIterator) Next() error {
11942	return iter.NextWithContext(context.Background())
11943}
11944
11945// NotDone returns true if the enumeration should be started or is not yet complete.
11946func (iter RouteFilterRuleListResultIterator) NotDone() bool {
11947	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11948}
11949
11950// Response returns the raw server response from the last page request.
11951func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
11952	return iter.page.Response()
11953}
11954
11955// Value returns the current value or a zero-initialized value if the
11956// iterator has advanced beyond the end of the collection.
11957func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
11958	if !iter.page.NotDone() {
11959		return RouteFilterRule{}
11960	}
11961	return iter.page.Values()[iter.i]
11962}
11963
11964// Creates a new instance of the RouteFilterRuleListResultIterator type.
11965func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
11966	return RouteFilterRuleListResultIterator{page: page}
11967}
11968
11969// IsEmpty returns true if the ListResult contains no values.
11970func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
11971	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
11972}
11973
11974// hasNextLink returns true if the NextLink is not empty.
11975func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
11976	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
11977}
11978
11979// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
11980// It returns nil if no more results exist.
11981func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
11982	if !rfrlr.hasNextLink() {
11983		return nil, nil
11984	}
11985	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11986		autorest.AsJSON(),
11987		autorest.AsGet(),
11988		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
11989}
11990
11991// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
11992type RouteFilterRuleListResultPage struct {
11993	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
11994	rfrlr RouteFilterRuleListResult
11995}
11996
11997// NextWithContext advances to the next page of values.  If there was an error making
11998// the request the page does not advance and the error is returned.
11999func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12000	if tracing.IsEnabled() {
12001		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
12002		defer func() {
12003			sc := -1
12004			if page.Response().Response.Response != nil {
12005				sc = page.Response().Response.Response.StatusCode
12006			}
12007			tracing.EndSpan(ctx, sc, err)
12008		}()
12009	}
12010	for {
12011		next, err := page.fn(ctx, page.rfrlr)
12012		if err != nil {
12013			return err
12014		}
12015		page.rfrlr = next
12016		if !next.hasNextLink() || !next.IsEmpty() {
12017			break
12018		}
12019	}
12020	return nil
12021}
12022
12023// Next advances to the next page of values.  If there was an error making
12024// the request the page does not advance and the error is returned.
12025// Deprecated: Use NextWithContext() instead.
12026func (page *RouteFilterRuleListResultPage) Next() error {
12027	return page.NextWithContext(context.Background())
12028}
12029
12030// NotDone returns true if the page enumeration should be started or is not yet complete.
12031func (page RouteFilterRuleListResultPage) NotDone() bool {
12032	return !page.rfrlr.IsEmpty()
12033}
12034
12035// Response returns the raw server response from the last page request.
12036func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
12037	return page.rfrlr
12038}
12039
12040// Values returns the slice of values for the current page or nil if there are no values.
12041func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
12042	if page.rfrlr.IsEmpty() {
12043		return nil
12044	}
12045	return *page.rfrlr.Value
12046}
12047
12048// Creates a new instance of the RouteFilterRuleListResultPage type.
12049func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
12050	return RouteFilterRuleListResultPage{
12051		fn:    getNextPage,
12052		rfrlr: cur,
12053	}
12054}
12055
12056// RouteFilterRulePropertiesFormat route Filter Rule Resource
12057type RouteFilterRulePropertiesFormat struct {
12058	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
12059	Access Access `json:"access,omitempty"`
12060	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
12061	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
12062	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
12063	Communities *[]string `json:"communities,omitempty"`
12064	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
12065	ProvisioningState *string `json:"provisioningState,omitempty"`
12066}
12067
12068// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
12069func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12070	objectMap := make(map[string]interface{})
12071	if rfrpf.Access != "" {
12072		objectMap["access"] = rfrpf.Access
12073	}
12074	if rfrpf.RouteFilterRuleType != nil {
12075		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
12076	}
12077	if rfrpf.Communities != nil {
12078		objectMap["communities"] = rfrpf.Communities
12079	}
12080	return json.Marshal(objectMap)
12081}
12082
12083// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12084// long-running operation.
12085type RouteFilterRulesCreateOrUpdateFuture struct {
12086	azure.FutureAPI
12087	// Result returns the result of the asynchronous operation.
12088	// If the operation has not completed it will return an error.
12089	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12090}
12091
12092// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12093func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12094	var azFuture azure.Future
12095	if err := json.Unmarshal(body, &azFuture); err != nil {
12096		return err
12097	}
12098	future.FutureAPI = &azFuture
12099	future.Result = future.result
12100	return nil
12101}
12102
12103// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
12104func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12105	var done bool
12106	done, err = future.DoneWithContext(context.Background(), client)
12107	if err != nil {
12108		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12109		return
12110	}
12111	if !done {
12112		rfr.Response.Response = future.Response()
12113		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
12114		return
12115	}
12116	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12117	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12118		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
12119		if err != nil {
12120			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12121		}
12122	}
12123	return
12124}
12125
12126// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12127// operation.
12128type RouteFilterRulesDeleteFuture struct {
12129	azure.FutureAPI
12130	// Result returns the result of the asynchronous operation.
12131	// If the operation has not completed it will return an error.
12132	Result func(RouteFilterRulesClient) (autorest.Response, error)
12133}
12134
12135// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12136func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12137	var azFuture azure.Future
12138	if err := json.Unmarshal(body, &azFuture); err != nil {
12139		return err
12140	}
12141	future.FutureAPI = &azFuture
12142	future.Result = future.result
12143	return nil
12144}
12145
12146// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
12147func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
12148	var done bool
12149	done, err = future.DoneWithContext(context.Background(), client)
12150	if err != nil {
12151		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12152		return
12153	}
12154	if !done {
12155		ar.Response = future.Response()
12156		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
12157		return
12158	}
12159	ar.Response = future.Response()
12160	return
12161}
12162
12163// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12164// operation.
12165type RouteFilterRulesUpdateFuture struct {
12166	azure.FutureAPI
12167	// Result returns the result of the asynchronous operation.
12168	// If the operation has not completed it will return an error.
12169	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
12170}
12171
12172// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12173func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
12174	var azFuture azure.Future
12175	if err := json.Unmarshal(body, &azFuture); err != nil {
12176		return err
12177	}
12178	future.FutureAPI = &azFuture
12179	future.Result = future.result
12180	return nil
12181}
12182
12183// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
12184func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
12185	var done bool
12186	done, err = future.DoneWithContext(context.Background(), client)
12187	if err != nil {
12188		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
12189		return
12190	}
12191	if !done {
12192		rfr.Response.Response = future.Response()
12193		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
12194		return
12195	}
12196	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12197	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
12198		rfr, err = client.UpdateResponder(rfr.Response.Response)
12199		if err != nil {
12200			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
12201		}
12202	}
12203	return
12204}
12205
12206// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12207// long-running operation.
12208type RouteFiltersCreateOrUpdateFuture struct {
12209	azure.FutureAPI
12210	// Result returns the result of the asynchronous operation.
12211	// If the operation has not completed it will return an error.
12212	Result func(RouteFiltersClient) (RouteFilter, error)
12213}
12214
12215// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12216func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12217	var azFuture azure.Future
12218	if err := json.Unmarshal(body, &azFuture); err != nil {
12219		return err
12220	}
12221	future.FutureAPI = &azFuture
12222	future.Result = future.result
12223	return nil
12224}
12225
12226// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
12227func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12228	var done bool
12229	done, err = future.DoneWithContext(context.Background(), client)
12230	if err != nil {
12231		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12232		return
12233	}
12234	if !done {
12235		rf.Response.Response = future.Response()
12236		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
12237		return
12238	}
12239	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12240	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12241		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
12242		if err != nil {
12243			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12244		}
12245	}
12246	return
12247}
12248
12249// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12250// operation.
12251type RouteFiltersDeleteFuture struct {
12252	azure.FutureAPI
12253	// Result returns the result of the asynchronous operation.
12254	// If the operation has not completed it will return an error.
12255	Result func(RouteFiltersClient) (autorest.Response, error)
12256}
12257
12258// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12259func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
12260	var azFuture azure.Future
12261	if err := json.Unmarshal(body, &azFuture); err != nil {
12262		return err
12263	}
12264	future.FutureAPI = &azFuture
12265	future.Result = future.result
12266	return nil
12267}
12268
12269// result is the default implementation for RouteFiltersDeleteFuture.Result.
12270func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
12271	var done bool
12272	done, err = future.DoneWithContext(context.Background(), client)
12273	if err != nil {
12274		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
12275		return
12276	}
12277	if !done {
12278		ar.Response = future.Response()
12279		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
12280		return
12281	}
12282	ar.Response = future.Response()
12283	return
12284}
12285
12286// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12287// operation.
12288type RouteFiltersUpdateFuture struct {
12289	azure.FutureAPI
12290	// Result returns the result of the asynchronous operation.
12291	// If the operation has not completed it will return an error.
12292	Result func(RouteFiltersClient) (RouteFilter, error)
12293}
12294
12295// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12296func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
12297	var azFuture azure.Future
12298	if err := json.Unmarshal(body, &azFuture); err != nil {
12299		return err
12300	}
12301	future.FutureAPI = &azFuture
12302	future.Result = future.result
12303	return nil
12304}
12305
12306// result is the default implementation for RouteFiltersUpdateFuture.Result.
12307func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
12308	var done bool
12309	done, err = future.DoneWithContext(context.Background(), client)
12310	if err != nil {
12311		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
12312		return
12313	}
12314	if !done {
12315		rf.Response.Response = future.Response()
12316		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
12317		return
12318	}
12319	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12320	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
12321		rf, err = client.UpdateResponder(rf.Response.Response)
12322		if err != nil {
12323			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
12324		}
12325	}
12326	return
12327}
12328
12329// RouteListResult response for the ListRoute API service call
12330type RouteListResult struct {
12331	autorest.Response `json:"-"`
12332	// Value - Gets a list of routes in a resource group.
12333	Value *[]Route `json:"value,omitempty"`
12334	// NextLink - The URL to get the next set of results.
12335	NextLink *string `json:"nextLink,omitempty"`
12336}
12337
12338// RouteListResultIterator provides access to a complete listing of Route values.
12339type RouteListResultIterator struct {
12340	i    int
12341	page RouteListResultPage
12342}
12343
12344// NextWithContext advances to the next value.  If there was an error making
12345// the request the iterator does not advance and the error is returned.
12346func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
12347	if tracing.IsEnabled() {
12348		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
12349		defer func() {
12350			sc := -1
12351			if iter.Response().Response.Response != nil {
12352				sc = iter.Response().Response.Response.StatusCode
12353			}
12354			tracing.EndSpan(ctx, sc, err)
12355		}()
12356	}
12357	iter.i++
12358	if iter.i < len(iter.page.Values()) {
12359		return nil
12360	}
12361	err = iter.page.NextWithContext(ctx)
12362	if err != nil {
12363		iter.i--
12364		return err
12365	}
12366	iter.i = 0
12367	return nil
12368}
12369
12370// Next advances to the next value.  If there was an error making
12371// the request the iterator does not advance and the error is returned.
12372// Deprecated: Use NextWithContext() instead.
12373func (iter *RouteListResultIterator) Next() error {
12374	return iter.NextWithContext(context.Background())
12375}
12376
12377// NotDone returns true if the enumeration should be started or is not yet complete.
12378func (iter RouteListResultIterator) NotDone() bool {
12379	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12380}
12381
12382// Response returns the raw server response from the last page request.
12383func (iter RouteListResultIterator) Response() RouteListResult {
12384	return iter.page.Response()
12385}
12386
12387// Value returns the current value or a zero-initialized value if the
12388// iterator has advanced beyond the end of the collection.
12389func (iter RouteListResultIterator) Value() Route {
12390	if !iter.page.NotDone() {
12391		return Route{}
12392	}
12393	return iter.page.Values()[iter.i]
12394}
12395
12396// Creates a new instance of the RouteListResultIterator type.
12397func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
12398	return RouteListResultIterator{page: page}
12399}
12400
12401// IsEmpty returns true if the ListResult contains no values.
12402func (rlr RouteListResult) IsEmpty() bool {
12403	return rlr.Value == nil || len(*rlr.Value) == 0
12404}
12405
12406// hasNextLink returns true if the NextLink is not empty.
12407func (rlr RouteListResult) hasNextLink() bool {
12408	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
12409}
12410
12411// routeListResultPreparer prepares a request to retrieve the next set of results.
12412// It returns nil if no more results exist.
12413func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
12414	if !rlr.hasNextLink() {
12415		return nil, nil
12416	}
12417	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12418		autorest.AsJSON(),
12419		autorest.AsGet(),
12420		autorest.WithBaseURL(to.String(rlr.NextLink)))
12421}
12422
12423// RouteListResultPage contains a page of Route values.
12424type RouteListResultPage struct {
12425	fn  func(context.Context, RouteListResult) (RouteListResult, error)
12426	rlr RouteListResult
12427}
12428
12429// NextWithContext advances to the next page of values.  If there was an error making
12430// the request the page does not advance and the error is returned.
12431func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
12432	if tracing.IsEnabled() {
12433		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
12434		defer func() {
12435			sc := -1
12436			if page.Response().Response.Response != nil {
12437				sc = page.Response().Response.Response.StatusCode
12438			}
12439			tracing.EndSpan(ctx, sc, err)
12440		}()
12441	}
12442	for {
12443		next, err := page.fn(ctx, page.rlr)
12444		if err != nil {
12445			return err
12446		}
12447		page.rlr = next
12448		if !next.hasNextLink() || !next.IsEmpty() {
12449			break
12450		}
12451	}
12452	return nil
12453}
12454
12455// Next advances to the next page of values.  If there was an error making
12456// the request the page does not advance and the error is returned.
12457// Deprecated: Use NextWithContext() instead.
12458func (page *RouteListResultPage) Next() error {
12459	return page.NextWithContext(context.Background())
12460}
12461
12462// NotDone returns true if the page enumeration should be started or is not yet complete.
12463func (page RouteListResultPage) NotDone() bool {
12464	return !page.rlr.IsEmpty()
12465}
12466
12467// Response returns the raw server response from the last page request.
12468func (page RouteListResultPage) Response() RouteListResult {
12469	return page.rlr
12470}
12471
12472// Values returns the slice of values for the current page or nil if there are no values.
12473func (page RouteListResultPage) Values() []Route {
12474	if page.rlr.IsEmpty() {
12475		return nil
12476	}
12477	return *page.rlr.Value
12478}
12479
12480// Creates a new instance of the RouteListResultPage type.
12481func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
12482	return RouteListResultPage{
12483		fn:  getNextPage,
12484		rlr: cur,
12485	}
12486}
12487
12488// RoutePropertiesFormat route resource
12489type RoutePropertiesFormat struct {
12490	// AddressPrefix - The destination CIDR to which the route applies.
12491	AddressPrefix *string `json:"addressPrefix,omitempty"`
12492	// 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'
12493	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
12494	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
12495	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
12496	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12497	ProvisioningState *string `json:"provisioningState,omitempty"`
12498}
12499
12500// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12501// operation.
12502type RoutesCreateOrUpdateFuture struct {
12503	azure.FutureAPI
12504	// Result returns the result of the asynchronous operation.
12505	// If the operation has not completed it will return an error.
12506	Result func(RoutesClient) (Route, error)
12507}
12508
12509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12510func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12511	var azFuture azure.Future
12512	if err := json.Unmarshal(body, &azFuture); err != nil {
12513		return err
12514	}
12515	future.FutureAPI = &azFuture
12516	future.Result = future.result
12517	return nil
12518}
12519
12520// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
12521func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
12522	var done bool
12523	done, err = future.DoneWithContext(context.Background(), client)
12524	if err != nil {
12525		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12526		return
12527	}
12528	if !done {
12529		r.Response.Response = future.Response()
12530		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
12531		return
12532	}
12533	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12534	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
12535		r, err = client.CreateOrUpdateResponder(r.Response.Response)
12536		if err != nil {
12537			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
12538		}
12539	}
12540	return
12541}
12542
12543// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
12544type RoutesDeleteFuture struct {
12545	azure.FutureAPI
12546	// Result returns the result of the asynchronous operation.
12547	// If the operation has not completed it will return an error.
12548	Result func(RoutesClient) (autorest.Response, error)
12549}
12550
12551// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12552func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
12553	var azFuture azure.Future
12554	if err := json.Unmarshal(body, &azFuture); err != nil {
12555		return err
12556	}
12557	future.FutureAPI = &azFuture
12558	future.Result = future.result
12559	return nil
12560}
12561
12562// result is the default implementation for RoutesDeleteFuture.Result.
12563func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
12564	var done bool
12565	done, err = future.DoneWithContext(context.Background(), client)
12566	if err != nil {
12567		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
12568		return
12569	}
12570	if !done {
12571		ar.Response = future.Response()
12572		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
12573		return
12574	}
12575	ar.Response = future.Response()
12576	return
12577}
12578
12579// RouteTable route table resource.
12580type RouteTable struct {
12581	autorest.Response `json:"-"`
12582	// RouteTablePropertiesFormat - Properties of the route table.
12583	*RouteTablePropertiesFormat `json:"properties,omitempty"`
12584	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12585	Etag *string `json:"etag,omitempty"`
12586	// ID - Resource ID.
12587	ID *string `json:"id,omitempty"`
12588	// Name - READ-ONLY; Resource name.
12589	Name *string `json:"name,omitempty"`
12590	// Type - READ-ONLY; Resource type.
12591	Type *string `json:"type,omitempty"`
12592	// Location - Resource location.
12593	Location *string `json:"location,omitempty"`
12594	// Tags - Resource tags.
12595	Tags map[string]*string `json:"tags"`
12596}
12597
12598// MarshalJSON is the custom marshaler for RouteTable.
12599func (rt RouteTable) MarshalJSON() ([]byte, error) {
12600	objectMap := make(map[string]interface{})
12601	if rt.RouteTablePropertiesFormat != nil {
12602		objectMap["properties"] = rt.RouteTablePropertiesFormat
12603	}
12604	if rt.Etag != nil {
12605		objectMap["etag"] = rt.Etag
12606	}
12607	if rt.ID != nil {
12608		objectMap["id"] = rt.ID
12609	}
12610	if rt.Location != nil {
12611		objectMap["location"] = rt.Location
12612	}
12613	if rt.Tags != nil {
12614		objectMap["tags"] = rt.Tags
12615	}
12616	return json.Marshal(objectMap)
12617}
12618
12619// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
12620func (rt *RouteTable) UnmarshalJSON(body []byte) error {
12621	var m map[string]*json.RawMessage
12622	err := json.Unmarshal(body, &m)
12623	if err != nil {
12624		return err
12625	}
12626	for k, v := range m {
12627		switch k {
12628		case "properties":
12629			if v != nil {
12630				var routeTablePropertiesFormat RouteTablePropertiesFormat
12631				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
12632				if err != nil {
12633					return err
12634				}
12635				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
12636			}
12637		case "etag":
12638			if v != nil {
12639				var etag string
12640				err = json.Unmarshal(*v, &etag)
12641				if err != nil {
12642					return err
12643				}
12644				rt.Etag = &etag
12645			}
12646		case "id":
12647			if v != nil {
12648				var ID string
12649				err = json.Unmarshal(*v, &ID)
12650				if err != nil {
12651					return err
12652				}
12653				rt.ID = &ID
12654			}
12655		case "name":
12656			if v != nil {
12657				var name string
12658				err = json.Unmarshal(*v, &name)
12659				if err != nil {
12660					return err
12661				}
12662				rt.Name = &name
12663			}
12664		case "type":
12665			if v != nil {
12666				var typeVar string
12667				err = json.Unmarshal(*v, &typeVar)
12668				if err != nil {
12669					return err
12670				}
12671				rt.Type = &typeVar
12672			}
12673		case "location":
12674			if v != nil {
12675				var location string
12676				err = json.Unmarshal(*v, &location)
12677				if err != nil {
12678					return err
12679				}
12680				rt.Location = &location
12681			}
12682		case "tags":
12683			if v != nil {
12684				var tags map[string]*string
12685				err = json.Unmarshal(*v, &tags)
12686				if err != nil {
12687					return err
12688				}
12689				rt.Tags = tags
12690			}
12691		}
12692	}
12693
12694	return nil
12695}
12696
12697// RouteTableListResult response for the ListRouteTable API service call.
12698type RouteTableListResult struct {
12699	autorest.Response `json:"-"`
12700	// Value - Gets a list of route tables in a resource group.
12701	Value *[]RouteTable `json:"value,omitempty"`
12702	// NextLink - The URL to get the next set of results.
12703	NextLink *string `json:"nextLink,omitempty"`
12704}
12705
12706// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
12707type RouteTableListResultIterator struct {
12708	i    int
12709	page RouteTableListResultPage
12710}
12711
12712// NextWithContext advances to the next value.  If there was an error making
12713// the request the iterator does not advance and the error is returned.
12714func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
12715	if tracing.IsEnabled() {
12716		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
12717		defer func() {
12718			sc := -1
12719			if iter.Response().Response.Response != nil {
12720				sc = iter.Response().Response.Response.StatusCode
12721			}
12722			tracing.EndSpan(ctx, sc, err)
12723		}()
12724	}
12725	iter.i++
12726	if iter.i < len(iter.page.Values()) {
12727		return nil
12728	}
12729	err = iter.page.NextWithContext(ctx)
12730	if err != nil {
12731		iter.i--
12732		return err
12733	}
12734	iter.i = 0
12735	return nil
12736}
12737
12738// Next advances to the next value.  If there was an error making
12739// the request the iterator does not advance and the error is returned.
12740// Deprecated: Use NextWithContext() instead.
12741func (iter *RouteTableListResultIterator) Next() error {
12742	return iter.NextWithContext(context.Background())
12743}
12744
12745// NotDone returns true if the enumeration should be started or is not yet complete.
12746func (iter RouteTableListResultIterator) NotDone() bool {
12747	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12748}
12749
12750// Response returns the raw server response from the last page request.
12751func (iter RouteTableListResultIterator) Response() RouteTableListResult {
12752	return iter.page.Response()
12753}
12754
12755// Value returns the current value or a zero-initialized value if the
12756// iterator has advanced beyond the end of the collection.
12757func (iter RouteTableListResultIterator) Value() RouteTable {
12758	if !iter.page.NotDone() {
12759		return RouteTable{}
12760	}
12761	return iter.page.Values()[iter.i]
12762}
12763
12764// Creates a new instance of the RouteTableListResultIterator type.
12765func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
12766	return RouteTableListResultIterator{page: page}
12767}
12768
12769// IsEmpty returns true if the ListResult contains no values.
12770func (rtlr RouteTableListResult) IsEmpty() bool {
12771	return rtlr.Value == nil || len(*rtlr.Value) == 0
12772}
12773
12774// hasNextLink returns true if the NextLink is not empty.
12775func (rtlr RouteTableListResult) hasNextLink() bool {
12776	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
12777}
12778
12779// routeTableListResultPreparer prepares a request to retrieve the next set of results.
12780// It returns nil if no more results exist.
12781func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
12782	if !rtlr.hasNextLink() {
12783		return nil, nil
12784	}
12785	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12786		autorest.AsJSON(),
12787		autorest.AsGet(),
12788		autorest.WithBaseURL(to.String(rtlr.NextLink)))
12789}
12790
12791// RouteTableListResultPage contains a page of RouteTable values.
12792type RouteTableListResultPage struct {
12793	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
12794	rtlr RouteTableListResult
12795}
12796
12797// NextWithContext advances to the next page of values.  If there was an error making
12798// the request the page does not advance and the error is returned.
12799func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
12800	if tracing.IsEnabled() {
12801		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
12802		defer func() {
12803			sc := -1
12804			if page.Response().Response.Response != nil {
12805				sc = page.Response().Response.Response.StatusCode
12806			}
12807			tracing.EndSpan(ctx, sc, err)
12808		}()
12809	}
12810	for {
12811		next, err := page.fn(ctx, page.rtlr)
12812		if err != nil {
12813			return err
12814		}
12815		page.rtlr = next
12816		if !next.hasNextLink() || !next.IsEmpty() {
12817			break
12818		}
12819	}
12820	return nil
12821}
12822
12823// Next advances to the next page of values.  If there was an error making
12824// the request the page does not advance and the error is returned.
12825// Deprecated: Use NextWithContext() instead.
12826func (page *RouteTableListResultPage) Next() error {
12827	return page.NextWithContext(context.Background())
12828}
12829
12830// NotDone returns true if the page enumeration should be started or is not yet complete.
12831func (page RouteTableListResultPage) NotDone() bool {
12832	return !page.rtlr.IsEmpty()
12833}
12834
12835// Response returns the raw server response from the last page request.
12836func (page RouteTableListResultPage) Response() RouteTableListResult {
12837	return page.rtlr
12838}
12839
12840// Values returns the slice of values for the current page or nil if there are no values.
12841func (page RouteTableListResultPage) Values() []RouteTable {
12842	if page.rtlr.IsEmpty() {
12843		return nil
12844	}
12845	return *page.rtlr.Value
12846}
12847
12848// Creates a new instance of the RouteTableListResultPage type.
12849func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
12850	return RouteTableListResultPage{
12851		fn:   getNextPage,
12852		rtlr: cur,
12853	}
12854}
12855
12856// RouteTablePropertiesFormat route Table resource
12857type RouteTablePropertiesFormat struct {
12858	// Routes - Collection of routes contained within a route table.
12859	Routes *[]Route `json:"routes,omitempty"`
12860	// Subnets - READ-ONLY; A collection of references to subnets.
12861	Subnets *[]Subnet `json:"subnets,omitempty"`
12862	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
12863	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
12864	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12865	ProvisioningState *string `json:"provisioningState,omitempty"`
12866}
12867
12868// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
12869func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
12870	objectMap := make(map[string]interface{})
12871	if rtpf.Routes != nil {
12872		objectMap["routes"] = rtpf.Routes
12873	}
12874	if rtpf.DisableBgpRoutePropagation != nil {
12875		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
12876	}
12877	if rtpf.ProvisioningState != nil {
12878		objectMap["provisioningState"] = rtpf.ProvisioningState
12879	}
12880	return json.Marshal(objectMap)
12881}
12882
12883// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12884// long-running operation.
12885type RouteTablesCreateOrUpdateFuture struct {
12886	azure.FutureAPI
12887	// Result returns the result of the asynchronous operation.
12888	// If the operation has not completed it will return an error.
12889	Result func(RouteTablesClient) (RouteTable, error)
12890}
12891
12892// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12893func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12894	var azFuture azure.Future
12895	if err := json.Unmarshal(body, &azFuture); err != nil {
12896		return err
12897	}
12898	future.FutureAPI = &azFuture
12899	future.Result = future.result
12900	return nil
12901}
12902
12903// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
12904func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
12905	var done bool
12906	done, err = future.DoneWithContext(context.Background(), client)
12907	if err != nil {
12908		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12909		return
12910	}
12911	if !done {
12912		rt.Response.Response = future.Response()
12913		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
12914		return
12915	}
12916	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12917	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
12918		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
12919		if err != nil {
12920			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
12921		}
12922	}
12923	return
12924}
12925
12926// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12927// operation.
12928type RouteTablesDeleteFuture struct {
12929	azure.FutureAPI
12930	// Result returns the result of the asynchronous operation.
12931	// If the operation has not completed it will return an error.
12932	Result func(RouteTablesClient) (autorest.Response, error)
12933}
12934
12935// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12936func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
12937	var azFuture azure.Future
12938	if err := json.Unmarshal(body, &azFuture); err != nil {
12939		return err
12940	}
12941	future.FutureAPI = &azFuture
12942	future.Result = future.result
12943	return nil
12944}
12945
12946// result is the default implementation for RouteTablesDeleteFuture.Result.
12947func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
12948	var done bool
12949	done, err = future.DoneWithContext(context.Background(), client)
12950	if err != nil {
12951		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
12952		return
12953	}
12954	if !done {
12955		ar.Response = future.Response()
12956		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
12957		return
12958	}
12959	ar.Response = future.Response()
12960	return
12961}
12962
12963// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12964// operation.
12965type RouteTablesUpdateTagsFuture struct {
12966	azure.FutureAPI
12967	// Result returns the result of the asynchronous operation.
12968	// If the operation has not completed it will return an error.
12969	Result func(RouteTablesClient) (RouteTable, error)
12970}
12971
12972// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12973func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12974	var azFuture azure.Future
12975	if err := json.Unmarshal(body, &azFuture); err != nil {
12976		return err
12977	}
12978	future.FutureAPI = &azFuture
12979	future.Result = future.result
12980	return nil
12981}
12982
12983// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
12984func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
12985	var done bool
12986	done, err = future.DoneWithContext(context.Background(), client)
12987	if err != nil {
12988		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12989		return
12990	}
12991	if !done {
12992		rt.Response.Response = future.Response()
12993		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
12994		return
12995	}
12996	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12997	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
12998		rt, err = client.UpdateTagsResponder(rt.Response.Response)
12999		if err != nil {
13000			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
13001		}
13002	}
13003	return
13004}
13005
13006// SecurityGroup networkSecurityGroup resource.
13007type SecurityGroup struct {
13008	autorest.Response `json:"-"`
13009	// SecurityGroupPropertiesFormat - Properties of the network security group
13010	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
13011	// Etag - A unique read-only string that changes whenever the resource is updated.
13012	Etag *string `json:"etag,omitempty"`
13013	// ID - Resource ID.
13014	ID *string `json:"id,omitempty"`
13015	// Name - READ-ONLY; Resource name.
13016	Name *string `json:"name,omitempty"`
13017	// Type - READ-ONLY; Resource type.
13018	Type *string `json:"type,omitempty"`
13019	// Location - Resource location.
13020	Location *string `json:"location,omitempty"`
13021	// Tags - Resource tags.
13022	Tags map[string]*string `json:"tags"`
13023}
13024
13025// MarshalJSON is the custom marshaler for SecurityGroup.
13026func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
13027	objectMap := make(map[string]interface{})
13028	if sg.SecurityGroupPropertiesFormat != nil {
13029		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
13030	}
13031	if sg.Etag != nil {
13032		objectMap["etag"] = sg.Etag
13033	}
13034	if sg.ID != nil {
13035		objectMap["id"] = sg.ID
13036	}
13037	if sg.Location != nil {
13038		objectMap["location"] = sg.Location
13039	}
13040	if sg.Tags != nil {
13041		objectMap["tags"] = sg.Tags
13042	}
13043	return json.Marshal(objectMap)
13044}
13045
13046// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
13047func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
13048	var m map[string]*json.RawMessage
13049	err := json.Unmarshal(body, &m)
13050	if err != nil {
13051		return err
13052	}
13053	for k, v := range m {
13054		switch k {
13055		case "properties":
13056			if v != nil {
13057				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
13058				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
13059				if err != nil {
13060					return err
13061				}
13062				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
13063			}
13064		case "etag":
13065			if v != nil {
13066				var etag string
13067				err = json.Unmarshal(*v, &etag)
13068				if err != nil {
13069					return err
13070				}
13071				sg.Etag = &etag
13072			}
13073		case "id":
13074			if v != nil {
13075				var ID string
13076				err = json.Unmarshal(*v, &ID)
13077				if err != nil {
13078					return err
13079				}
13080				sg.ID = &ID
13081			}
13082		case "name":
13083			if v != nil {
13084				var name string
13085				err = json.Unmarshal(*v, &name)
13086				if err != nil {
13087					return err
13088				}
13089				sg.Name = &name
13090			}
13091		case "type":
13092			if v != nil {
13093				var typeVar string
13094				err = json.Unmarshal(*v, &typeVar)
13095				if err != nil {
13096					return err
13097				}
13098				sg.Type = &typeVar
13099			}
13100		case "location":
13101			if v != nil {
13102				var location string
13103				err = json.Unmarshal(*v, &location)
13104				if err != nil {
13105					return err
13106				}
13107				sg.Location = &location
13108			}
13109		case "tags":
13110			if v != nil {
13111				var tags map[string]*string
13112				err = json.Unmarshal(*v, &tags)
13113				if err != nil {
13114					return err
13115				}
13116				sg.Tags = tags
13117			}
13118		}
13119	}
13120
13121	return nil
13122}
13123
13124// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
13125type SecurityGroupListResult struct {
13126	autorest.Response `json:"-"`
13127	// Value - A list of NetworkSecurityGroup resources.
13128	Value *[]SecurityGroup `json:"value,omitempty"`
13129	// NextLink - The URL to get the next set of results.
13130	NextLink *string `json:"nextLink,omitempty"`
13131}
13132
13133// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
13134type SecurityGroupListResultIterator struct {
13135	i    int
13136	page SecurityGroupListResultPage
13137}
13138
13139// NextWithContext advances to the next value.  If there was an error making
13140// the request the iterator does not advance and the error is returned.
13141func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
13142	if tracing.IsEnabled() {
13143		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
13144		defer func() {
13145			sc := -1
13146			if iter.Response().Response.Response != nil {
13147				sc = iter.Response().Response.Response.StatusCode
13148			}
13149			tracing.EndSpan(ctx, sc, err)
13150		}()
13151	}
13152	iter.i++
13153	if iter.i < len(iter.page.Values()) {
13154		return nil
13155	}
13156	err = iter.page.NextWithContext(ctx)
13157	if err != nil {
13158		iter.i--
13159		return err
13160	}
13161	iter.i = 0
13162	return nil
13163}
13164
13165// Next advances to the next value.  If there was an error making
13166// the request the iterator does not advance and the error is returned.
13167// Deprecated: Use NextWithContext() instead.
13168func (iter *SecurityGroupListResultIterator) Next() error {
13169	return iter.NextWithContext(context.Background())
13170}
13171
13172// NotDone returns true if the enumeration should be started or is not yet complete.
13173func (iter SecurityGroupListResultIterator) NotDone() bool {
13174	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13175}
13176
13177// Response returns the raw server response from the last page request.
13178func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
13179	return iter.page.Response()
13180}
13181
13182// Value returns the current value or a zero-initialized value if the
13183// iterator has advanced beyond the end of the collection.
13184func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
13185	if !iter.page.NotDone() {
13186		return SecurityGroup{}
13187	}
13188	return iter.page.Values()[iter.i]
13189}
13190
13191// Creates a new instance of the SecurityGroupListResultIterator type.
13192func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
13193	return SecurityGroupListResultIterator{page: page}
13194}
13195
13196// IsEmpty returns true if the ListResult contains no values.
13197func (sglr SecurityGroupListResult) IsEmpty() bool {
13198	return sglr.Value == nil || len(*sglr.Value) == 0
13199}
13200
13201// hasNextLink returns true if the NextLink is not empty.
13202func (sglr SecurityGroupListResult) hasNextLink() bool {
13203	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
13204}
13205
13206// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
13207// It returns nil if no more results exist.
13208func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
13209	if !sglr.hasNextLink() {
13210		return nil, nil
13211	}
13212	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13213		autorest.AsJSON(),
13214		autorest.AsGet(),
13215		autorest.WithBaseURL(to.String(sglr.NextLink)))
13216}
13217
13218// SecurityGroupListResultPage contains a page of SecurityGroup values.
13219type SecurityGroupListResultPage struct {
13220	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
13221	sglr SecurityGroupListResult
13222}
13223
13224// NextWithContext advances to the next page of values.  If there was an error making
13225// the request the page does not advance and the error is returned.
13226func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
13227	if tracing.IsEnabled() {
13228		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
13229		defer func() {
13230			sc := -1
13231			if page.Response().Response.Response != nil {
13232				sc = page.Response().Response.Response.StatusCode
13233			}
13234			tracing.EndSpan(ctx, sc, err)
13235		}()
13236	}
13237	for {
13238		next, err := page.fn(ctx, page.sglr)
13239		if err != nil {
13240			return err
13241		}
13242		page.sglr = next
13243		if !next.hasNextLink() || !next.IsEmpty() {
13244			break
13245		}
13246	}
13247	return nil
13248}
13249
13250// Next advances to the next page of values.  If there was an error making
13251// the request the page does not advance and the error is returned.
13252// Deprecated: Use NextWithContext() instead.
13253func (page *SecurityGroupListResultPage) Next() error {
13254	return page.NextWithContext(context.Background())
13255}
13256
13257// NotDone returns true if the page enumeration should be started or is not yet complete.
13258func (page SecurityGroupListResultPage) NotDone() bool {
13259	return !page.sglr.IsEmpty()
13260}
13261
13262// Response returns the raw server response from the last page request.
13263func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
13264	return page.sglr
13265}
13266
13267// Values returns the slice of values for the current page or nil if there are no values.
13268func (page SecurityGroupListResultPage) Values() []SecurityGroup {
13269	if page.sglr.IsEmpty() {
13270		return nil
13271	}
13272	return *page.sglr.Value
13273}
13274
13275// Creates a new instance of the SecurityGroupListResultPage type.
13276func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
13277	return SecurityGroupListResultPage{
13278		fn:   getNextPage,
13279		sglr: cur,
13280	}
13281}
13282
13283// SecurityGroupNetworkInterface network interface and all its associated security rules.
13284type SecurityGroupNetworkInterface struct {
13285	// ID - ID of the network interface.
13286	ID                       *string                   `json:"id,omitempty"`
13287	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
13288}
13289
13290// SecurityGroupPropertiesFormat network Security Group resource.
13291type SecurityGroupPropertiesFormat struct {
13292	// SecurityRules - A collection of security rules of the network security group.
13293	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13294	// DefaultSecurityRules - The default security rules of network security group.
13295	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13296	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
13297	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13298	// Subnets - READ-ONLY; A collection of references to subnets.
13299	Subnets *[]Subnet `json:"subnets,omitempty"`
13300	// ResourceGUID - The resource GUID property of the network security group resource.
13301	ResourceGUID *string `json:"resourceGuid,omitempty"`
13302	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13303	ProvisioningState *string `json:"provisioningState,omitempty"`
13304}
13305
13306// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
13307func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
13308	objectMap := make(map[string]interface{})
13309	if sgpf.SecurityRules != nil {
13310		objectMap["securityRules"] = sgpf.SecurityRules
13311	}
13312	if sgpf.DefaultSecurityRules != nil {
13313		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
13314	}
13315	if sgpf.ResourceGUID != nil {
13316		objectMap["resourceGuid"] = sgpf.ResourceGUID
13317	}
13318	if sgpf.ProvisioningState != nil {
13319		objectMap["provisioningState"] = sgpf.ProvisioningState
13320	}
13321	return json.Marshal(objectMap)
13322}
13323
13324// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13325// long-running operation.
13326type SecurityGroupsCreateOrUpdateFuture struct {
13327	azure.FutureAPI
13328	// Result returns the result of the asynchronous operation.
13329	// If the operation has not completed it will return an error.
13330	Result func(SecurityGroupsClient) (SecurityGroup, error)
13331}
13332
13333// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13334func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13335	var azFuture azure.Future
13336	if err := json.Unmarshal(body, &azFuture); err != nil {
13337		return err
13338	}
13339	future.FutureAPI = &azFuture
13340	future.Result = future.result
13341	return nil
13342}
13343
13344// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
13345func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13346	var done bool
13347	done, err = future.DoneWithContext(context.Background(), client)
13348	if err != nil {
13349		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13350		return
13351	}
13352	if !done {
13353		sg.Response.Response = future.Response()
13354		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
13355		return
13356	}
13357	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13358	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13359		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
13360		if err != nil {
13361			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
13362		}
13363	}
13364	return
13365}
13366
13367// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13368// operation.
13369type SecurityGroupsDeleteFuture struct {
13370	azure.FutureAPI
13371	// Result returns the result of the asynchronous operation.
13372	// If the operation has not completed it will return an error.
13373	Result func(SecurityGroupsClient) (autorest.Response, error)
13374}
13375
13376// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13377func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
13378	var azFuture azure.Future
13379	if err := json.Unmarshal(body, &azFuture); err != nil {
13380		return err
13381	}
13382	future.FutureAPI = &azFuture
13383	future.Result = future.result
13384	return nil
13385}
13386
13387// result is the default implementation for SecurityGroupsDeleteFuture.Result.
13388func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
13389	var done bool
13390	done, err = future.DoneWithContext(context.Background(), client)
13391	if err != nil {
13392		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
13393		return
13394	}
13395	if !done {
13396		ar.Response = future.Response()
13397		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
13398		return
13399	}
13400	ar.Response = future.Response()
13401	return
13402}
13403
13404// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13405// long-running operation.
13406type SecurityGroupsUpdateTagsFuture struct {
13407	azure.FutureAPI
13408	// Result returns the result of the asynchronous operation.
13409	// If the operation has not completed it will return an error.
13410	Result func(SecurityGroupsClient) (SecurityGroup, error)
13411}
13412
13413// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13414func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13415	var azFuture azure.Future
13416	if err := json.Unmarshal(body, &azFuture); err != nil {
13417		return err
13418	}
13419	future.FutureAPI = &azFuture
13420	future.Result = future.result
13421	return nil
13422}
13423
13424// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
13425func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
13426	var done bool
13427	done, err = future.DoneWithContext(context.Background(), client)
13428	if err != nil {
13429		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13430		return
13431	}
13432	if !done {
13433		sg.Response.Response = future.Response()
13434		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
13435		return
13436	}
13437	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13438	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
13439		sg, err = client.UpdateTagsResponder(sg.Response.Response)
13440		if err != nil {
13441			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
13442		}
13443	}
13444	return
13445}
13446
13447// SecurityGroupViewParameters parameters that define the VM to check security groups for.
13448type SecurityGroupViewParameters struct {
13449	// TargetResourceID - ID of the target VM.
13450	TargetResourceID *string `json:"targetResourceId,omitempty"`
13451}
13452
13453// SecurityGroupViewResult the information about security rules applied to the specified VM.
13454type SecurityGroupViewResult struct {
13455	autorest.Response `json:"-"`
13456	// NetworkInterfaces - List of network interfaces on the specified VM.
13457	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
13458}
13459
13460// SecurityRule network security rule.
13461type SecurityRule struct {
13462	autorest.Response `json:"-"`
13463	// SecurityRulePropertiesFormat - Properties of the security rule
13464	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
13465	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13466	Name *string `json:"name,omitempty"`
13467	// Etag - A unique read-only string that changes whenever the resource is updated.
13468	Etag *string `json:"etag,omitempty"`
13469	// ID - Resource ID.
13470	ID *string `json:"id,omitempty"`
13471}
13472
13473// MarshalJSON is the custom marshaler for SecurityRule.
13474func (sr SecurityRule) MarshalJSON() ([]byte, error) {
13475	objectMap := make(map[string]interface{})
13476	if sr.SecurityRulePropertiesFormat != nil {
13477		objectMap["properties"] = sr.SecurityRulePropertiesFormat
13478	}
13479	if sr.Name != nil {
13480		objectMap["name"] = sr.Name
13481	}
13482	if sr.Etag != nil {
13483		objectMap["etag"] = sr.Etag
13484	}
13485	if sr.ID != nil {
13486		objectMap["id"] = sr.ID
13487	}
13488	return json.Marshal(objectMap)
13489}
13490
13491// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
13492func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
13493	var m map[string]*json.RawMessage
13494	err := json.Unmarshal(body, &m)
13495	if err != nil {
13496		return err
13497	}
13498	for k, v := range m {
13499		switch k {
13500		case "properties":
13501			if v != nil {
13502				var securityRulePropertiesFormat SecurityRulePropertiesFormat
13503				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
13504				if err != nil {
13505					return err
13506				}
13507				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
13508			}
13509		case "name":
13510			if v != nil {
13511				var name string
13512				err = json.Unmarshal(*v, &name)
13513				if err != nil {
13514					return err
13515				}
13516				sr.Name = &name
13517			}
13518		case "etag":
13519			if v != nil {
13520				var etag string
13521				err = json.Unmarshal(*v, &etag)
13522				if err != nil {
13523					return err
13524				}
13525				sr.Etag = &etag
13526			}
13527		case "id":
13528			if v != nil {
13529				var ID string
13530				err = json.Unmarshal(*v, &ID)
13531				if err != nil {
13532					return err
13533				}
13534				sr.ID = &ID
13535			}
13536		}
13537	}
13538
13539	return nil
13540}
13541
13542// SecurityRuleAssociations all security rules associated with the network interface.
13543type SecurityRuleAssociations struct {
13544	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
13545	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
13546	// DefaultSecurityRules - Collection of default security rules of the network security group.
13547	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
13548	// EffectiveSecurityRules - Collection of effective security rules.
13549	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
13550}
13551
13552// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
13553// belongs to a network security group.
13554type SecurityRuleListResult struct {
13555	autorest.Response `json:"-"`
13556	// Value - The security rules in a network security group.
13557	Value *[]SecurityRule `json:"value,omitempty"`
13558	// NextLink - The URL to get the next set of results.
13559	NextLink *string `json:"nextLink,omitempty"`
13560}
13561
13562// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
13563type SecurityRuleListResultIterator struct {
13564	i    int
13565	page SecurityRuleListResultPage
13566}
13567
13568// NextWithContext advances to the next value.  If there was an error making
13569// the request the iterator does not advance and the error is returned.
13570func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13571	if tracing.IsEnabled() {
13572		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
13573		defer func() {
13574			sc := -1
13575			if iter.Response().Response.Response != nil {
13576				sc = iter.Response().Response.Response.StatusCode
13577			}
13578			tracing.EndSpan(ctx, sc, err)
13579		}()
13580	}
13581	iter.i++
13582	if iter.i < len(iter.page.Values()) {
13583		return nil
13584	}
13585	err = iter.page.NextWithContext(ctx)
13586	if err != nil {
13587		iter.i--
13588		return err
13589	}
13590	iter.i = 0
13591	return nil
13592}
13593
13594// Next advances to the next value.  If there was an error making
13595// the request the iterator does not advance and the error is returned.
13596// Deprecated: Use NextWithContext() instead.
13597func (iter *SecurityRuleListResultIterator) Next() error {
13598	return iter.NextWithContext(context.Background())
13599}
13600
13601// NotDone returns true if the enumeration should be started or is not yet complete.
13602func (iter SecurityRuleListResultIterator) NotDone() bool {
13603	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13604}
13605
13606// Response returns the raw server response from the last page request.
13607func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
13608	return iter.page.Response()
13609}
13610
13611// Value returns the current value or a zero-initialized value if the
13612// iterator has advanced beyond the end of the collection.
13613func (iter SecurityRuleListResultIterator) Value() SecurityRule {
13614	if !iter.page.NotDone() {
13615		return SecurityRule{}
13616	}
13617	return iter.page.Values()[iter.i]
13618}
13619
13620// Creates a new instance of the SecurityRuleListResultIterator type.
13621func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
13622	return SecurityRuleListResultIterator{page: page}
13623}
13624
13625// IsEmpty returns true if the ListResult contains no values.
13626func (srlr SecurityRuleListResult) IsEmpty() bool {
13627	return srlr.Value == nil || len(*srlr.Value) == 0
13628}
13629
13630// hasNextLink returns true if the NextLink is not empty.
13631func (srlr SecurityRuleListResult) hasNextLink() bool {
13632	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
13633}
13634
13635// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
13636// It returns nil if no more results exist.
13637func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13638	if !srlr.hasNextLink() {
13639		return nil, nil
13640	}
13641	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13642		autorest.AsJSON(),
13643		autorest.AsGet(),
13644		autorest.WithBaseURL(to.String(srlr.NextLink)))
13645}
13646
13647// SecurityRuleListResultPage contains a page of SecurityRule values.
13648type SecurityRuleListResultPage struct {
13649	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
13650	srlr SecurityRuleListResult
13651}
13652
13653// NextWithContext advances to the next page of values.  If there was an error making
13654// the request the page does not advance and the error is returned.
13655func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13656	if tracing.IsEnabled() {
13657		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
13658		defer func() {
13659			sc := -1
13660			if page.Response().Response.Response != nil {
13661				sc = page.Response().Response.Response.StatusCode
13662			}
13663			tracing.EndSpan(ctx, sc, err)
13664		}()
13665	}
13666	for {
13667		next, err := page.fn(ctx, page.srlr)
13668		if err != nil {
13669			return err
13670		}
13671		page.srlr = next
13672		if !next.hasNextLink() || !next.IsEmpty() {
13673			break
13674		}
13675	}
13676	return nil
13677}
13678
13679// Next advances to the next page of values.  If there was an error making
13680// the request the page does not advance and the error is returned.
13681// Deprecated: Use NextWithContext() instead.
13682func (page *SecurityRuleListResultPage) Next() error {
13683	return page.NextWithContext(context.Background())
13684}
13685
13686// NotDone returns true if the page enumeration should be started or is not yet complete.
13687func (page SecurityRuleListResultPage) NotDone() bool {
13688	return !page.srlr.IsEmpty()
13689}
13690
13691// Response returns the raw server response from the last page request.
13692func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
13693	return page.srlr
13694}
13695
13696// Values returns the slice of values for the current page or nil if there are no values.
13697func (page SecurityRuleListResultPage) Values() []SecurityRule {
13698	if page.srlr.IsEmpty() {
13699		return nil
13700	}
13701	return *page.srlr.Value
13702}
13703
13704// Creates a new instance of the SecurityRuleListResultPage type.
13705func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
13706	return SecurityRuleListResultPage{
13707		fn:   getNextPage,
13708		srlr: cur,
13709	}
13710}
13711
13712// SecurityRulePropertiesFormat security rule resource.
13713type SecurityRulePropertiesFormat struct {
13714	// Description - A description for this rule. Restricted to 140 chars.
13715	Description *string `json:"description,omitempty"`
13716	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
13717	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
13718	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13719	SourcePortRange *string `json:"sourcePortRange,omitempty"`
13720	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
13721	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
13722	// 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.
13723	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
13724	// SourceAddressPrefixes - The CIDR or source IP ranges.
13725	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
13726	// SourceApplicationSecurityGroups - The application security group specified as source.
13727	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
13728	// 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.
13729	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
13730	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
13731	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
13732	// DestinationApplicationSecurityGroups - The application security group specified as destination.
13733	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
13734	// SourcePortRanges - The source port ranges.
13735	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
13736	// DestinationPortRanges - The destination port ranges.
13737	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
13738	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
13739	Access SecurityRuleAccess `json:"access,omitempty"`
13740	// 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.
13741	Priority *int32 `json:"priority,omitempty"`
13742	// 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'
13743	Direction SecurityRuleDirection `json:"direction,omitempty"`
13744	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13745	ProvisioningState *string `json:"provisioningState,omitempty"`
13746}
13747
13748// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13749// long-running operation.
13750type SecurityRulesCreateOrUpdateFuture struct {
13751	azure.FutureAPI
13752	// Result returns the result of the asynchronous operation.
13753	// If the operation has not completed it will return an error.
13754	Result func(SecurityRulesClient) (SecurityRule, error)
13755}
13756
13757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13758func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13759	var azFuture azure.Future
13760	if err := json.Unmarshal(body, &azFuture); err != nil {
13761		return err
13762	}
13763	future.FutureAPI = &azFuture
13764	future.Result = future.result
13765	return nil
13766}
13767
13768// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
13769func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
13770	var done bool
13771	done, err = future.DoneWithContext(context.Background(), client)
13772	if err != nil {
13773		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13774		return
13775	}
13776	if !done {
13777		sr.Response.Response = future.Response()
13778		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
13779		return
13780	}
13781	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13782	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
13783		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
13784		if err != nil {
13785			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
13786		}
13787	}
13788	return
13789}
13790
13791// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13792// operation.
13793type SecurityRulesDeleteFuture struct {
13794	azure.FutureAPI
13795	// Result returns the result of the asynchronous operation.
13796	// If the operation has not completed it will return an error.
13797	Result func(SecurityRulesClient) (autorest.Response, error)
13798}
13799
13800// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13801func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
13802	var azFuture azure.Future
13803	if err := json.Unmarshal(body, &azFuture); err != nil {
13804		return err
13805	}
13806	future.FutureAPI = &azFuture
13807	future.Result = future.result
13808	return nil
13809}
13810
13811// result is the default implementation for SecurityRulesDeleteFuture.Result.
13812func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
13813	var done bool
13814	done, err = future.DoneWithContext(context.Background(), client)
13815	if err != nil {
13816		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
13817		return
13818	}
13819	if !done {
13820		ar.Response = future.Response()
13821		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
13822		return
13823	}
13824	ar.Response = future.Response()
13825	return
13826}
13827
13828// ServiceEndpointPropertiesFormat the service endpoint properties.
13829type ServiceEndpointPropertiesFormat struct {
13830	// Service - The type of the endpoint service.
13831	Service *string `json:"service,omitempty"`
13832	// Locations - A list of locations.
13833	Locations *[]string `json:"locations,omitempty"`
13834	// ProvisioningState - The provisioning state of the resource.
13835	ProvisioningState *string `json:"provisioningState,omitempty"`
13836}
13837
13838// String ...
13839type String struct {
13840	autorest.Response `json:"-"`
13841	Value             *string `json:"value,omitempty"`
13842}
13843
13844// Subnet subnet in a virtual network resource.
13845type Subnet struct {
13846	autorest.Response `json:"-"`
13847	// SubnetPropertiesFormat - Properties of the subnet.
13848	*SubnetPropertiesFormat `json:"properties,omitempty"`
13849	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13850	Name *string `json:"name,omitempty"`
13851	// Etag - A unique read-only string that changes whenever the resource is updated.
13852	Etag *string `json:"etag,omitempty"`
13853	// ID - Resource ID.
13854	ID *string `json:"id,omitempty"`
13855}
13856
13857// MarshalJSON is the custom marshaler for Subnet.
13858func (s Subnet) MarshalJSON() ([]byte, error) {
13859	objectMap := make(map[string]interface{})
13860	if s.SubnetPropertiesFormat != nil {
13861		objectMap["properties"] = s.SubnetPropertiesFormat
13862	}
13863	if s.Name != nil {
13864		objectMap["name"] = s.Name
13865	}
13866	if s.Etag != nil {
13867		objectMap["etag"] = s.Etag
13868	}
13869	if s.ID != nil {
13870		objectMap["id"] = s.ID
13871	}
13872	return json.Marshal(objectMap)
13873}
13874
13875// UnmarshalJSON is the custom unmarshaler for Subnet struct.
13876func (s *Subnet) UnmarshalJSON(body []byte) error {
13877	var m map[string]*json.RawMessage
13878	err := json.Unmarshal(body, &m)
13879	if err != nil {
13880		return err
13881	}
13882	for k, v := range m {
13883		switch k {
13884		case "properties":
13885			if v != nil {
13886				var subnetPropertiesFormat SubnetPropertiesFormat
13887				err = json.Unmarshal(*v, &subnetPropertiesFormat)
13888				if err != nil {
13889					return err
13890				}
13891				s.SubnetPropertiesFormat = &subnetPropertiesFormat
13892			}
13893		case "name":
13894			if v != nil {
13895				var name string
13896				err = json.Unmarshal(*v, &name)
13897				if err != nil {
13898					return err
13899				}
13900				s.Name = &name
13901			}
13902		case "etag":
13903			if v != nil {
13904				var etag string
13905				err = json.Unmarshal(*v, &etag)
13906				if err != nil {
13907					return err
13908				}
13909				s.Etag = &etag
13910			}
13911		case "id":
13912			if v != nil {
13913				var ID string
13914				err = json.Unmarshal(*v, &ID)
13915				if err != nil {
13916					return err
13917				}
13918				s.ID = &ID
13919			}
13920		}
13921	}
13922
13923	return nil
13924}
13925
13926// SubnetAssociation network interface and its custom security rules.
13927type SubnetAssociation struct {
13928	// ID - READ-ONLY; Subnet ID.
13929	ID *string `json:"id,omitempty"`
13930	// SecurityRules - Collection of custom security rules.
13931	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13932}
13933
13934// MarshalJSON is the custom marshaler for SubnetAssociation.
13935func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
13936	objectMap := make(map[string]interface{})
13937	if sa.SecurityRules != nil {
13938		objectMap["securityRules"] = sa.SecurityRules
13939	}
13940	return json.Marshal(objectMap)
13941}
13942
13943// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
13944// network
13945type SubnetListResult struct {
13946	autorest.Response `json:"-"`
13947	// Value - The subnets in a virtual network.
13948	Value *[]Subnet `json:"value,omitempty"`
13949	// NextLink - The URL to get the next set of results.
13950	NextLink *string `json:"nextLink,omitempty"`
13951}
13952
13953// SubnetListResultIterator provides access to a complete listing of Subnet values.
13954type SubnetListResultIterator struct {
13955	i    int
13956	page SubnetListResultPage
13957}
13958
13959// NextWithContext advances to the next value.  If there was an error making
13960// the request the iterator does not advance and the error is returned.
13961func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
13962	if tracing.IsEnabled() {
13963		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
13964		defer func() {
13965			sc := -1
13966			if iter.Response().Response.Response != nil {
13967				sc = iter.Response().Response.Response.StatusCode
13968			}
13969			tracing.EndSpan(ctx, sc, err)
13970		}()
13971	}
13972	iter.i++
13973	if iter.i < len(iter.page.Values()) {
13974		return nil
13975	}
13976	err = iter.page.NextWithContext(ctx)
13977	if err != nil {
13978		iter.i--
13979		return err
13980	}
13981	iter.i = 0
13982	return nil
13983}
13984
13985// Next advances to the next value.  If there was an error making
13986// the request the iterator does not advance and the error is returned.
13987// Deprecated: Use NextWithContext() instead.
13988func (iter *SubnetListResultIterator) Next() error {
13989	return iter.NextWithContext(context.Background())
13990}
13991
13992// NotDone returns true if the enumeration should be started or is not yet complete.
13993func (iter SubnetListResultIterator) NotDone() bool {
13994	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13995}
13996
13997// Response returns the raw server response from the last page request.
13998func (iter SubnetListResultIterator) Response() SubnetListResult {
13999	return iter.page.Response()
14000}
14001
14002// Value returns the current value or a zero-initialized value if the
14003// iterator has advanced beyond the end of the collection.
14004func (iter SubnetListResultIterator) Value() Subnet {
14005	if !iter.page.NotDone() {
14006		return Subnet{}
14007	}
14008	return iter.page.Values()[iter.i]
14009}
14010
14011// Creates a new instance of the SubnetListResultIterator type.
14012func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
14013	return SubnetListResultIterator{page: page}
14014}
14015
14016// IsEmpty returns true if the ListResult contains no values.
14017func (slr SubnetListResult) IsEmpty() bool {
14018	return slr.Value == nil || len(*slr.Value) == 0
14019}
14020
14021// hasNextLink returns true if the NextLink is not empty.
14022func (slr SubnetListResult) hasNextLink() bool {
14023	return slr.NextLink != nil && len(*slr.NextLink) != 0
14024}
14025
14026// subnetListResultPreparer prepares a request to retrieve the next set of results.
14027// It returns nil if no more results exist.
14028func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
14029	if !slr.hasNextLink() {
14030		return nil, nil
14031	}
14032	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14033		autorest.AsJSON(),
14034		autorest.AsGet(),
14035		autorest.WithBaseURL(to.String(slr.NextLink)))
14036}
14037
14038// SubnetListResultPage contains a page of Subnet values.
14039type SubnetListResultPage struct {
14040	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
14041	slr SubnetListResult
14042}
14043
14044// NextWithContext advances to the next page of values.  If there was an error making
14045// the request the page does not advance and the error is returned.
14046func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
14047	if tracing.IsEnabled() {
14048		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
14049		defer func() {
14050			sc := -1
14051			if page.Response().Response.Response != nil {
14052				sc = page.Response().Response.Response.StatusCode
14053			}
14054			tracing.EndSpan(ctx, sc, err)
14055		}()
14056	}
14057	for {
14058		next, err := page.fn(ctx, page.slr)
14059		if err != nil {
14060			return err
14061		}
14062		page.slr = next
14063		if !next.hasNextLink() || !next.IsEmpty() {
14064			break
14065		}
14066	}
14067	return nil
14068}
14069
14070// Next advances to the next page of values.  If there was an error making
14071// the request the page does not advance and the error is returned.
14072// Deprecated: Use NextWithContext() instead.
14073func (page *SubnetListResultPage) Next() error {
14074	return page.NextWithContext(context.Background())
14075}
14076
14077// NotDone returns true if the page enumeration should be started or is not yet complete.
14078func (page SubnetListResultPage) NotDone() bool {
14079	return !page.slr.IsEmpty()
14080}
14081
14082// Response returns the raw server response from the last page request.
14083func (page SubnetListResultPage) Response() SubnetListResult {
14084	return page.slr
14085}
14086
14087// Values returns the slice of values for the current page or nil if there are no values.
14088func (page SubnetListResultPage) Values() []Subnet {
14089	if page.slr.IsEmpty() {
14090		return nil
14091	}
14092	return *page.slr.Value
14093}
14094
14095// Creates a new instance of the SubnetListResultPage type.
14096func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
14097	return SubnetListResultPage{
14098		fn:  getNextPage,
14099		slr: cur,
14100	}
14101}
14102
14103// SubnetPropertiesFormat properties of the subnet.
14104type SubnetPropertiesFormat struct {
14105	// AddressPrefix - The address prefix for the subnet.
14106	AddressPrefix *string `json:"addressPrefix,omitempty"`
14107	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14108	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14109	// RouteTable - The reference of the RouteTable resource.
14110	RouteTable *RouteTable `json:"routeTable,omitempty"`
14111	// ServiceEndpoints - An array of service endpoints.
14112	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
14113	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
14114	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
14115	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
14116	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
14117	// ProvisioningState - The provisioning state of the resource.
14118	ProvisioningState *string `json:"provisioningState,omitempty"`
14119}
14120
14121// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
14122func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
14123	objectMap := make(map[string]interface{})
14124	if spf.AddressPrefix != nil {
14125		objectMap["addressPrefix"] = spf.AddressPrefix
14126	}
14127	if spf.NetworkSecurityGroup != nil {
14128		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
14129	}
14130	if spf.RouteTable != nil {
14131		objectMap["routeTable"] = spf.RouteTable
14132	}
14133	if spf.ServiceEndpoints != nil {
14134		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
14135	}
14136	if spf.ResourceNavigationLinks != nil {
14137		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
14138	}
14139	if spf.ProvisioningState != nil {
14140		objectMap["provisioningState"] = spf.ProvisioningState
14141	}
14142	return json.Marshal(objectMap)
14143}
14144
14145// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14146// operation.
14147type SubnetsCreateOrUpdateFuture struct {
14148	azure.FutureAPI
14149	// Result returns the result of the asynchronous operation.
14150	// If the operation has not completed it will return an error.
14151	Result func(SubnetsClient) (Subnet, error)
14152}
14153
14154// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14155func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14156	var azFuture azure.Future
14157	if err := json.Unmarshal(body, &azFuture); err != nil {
14158		return err
14159	}
14160	future.FutureAPI = &azFuture
14161	future.Result = future.result
14162	return nil
14163}
14164
14165// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
14166func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
14167	var done bool
14168	done, err = future.DoneWithContext(context.Background(), client)
14169	if err != nil {
14170		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14171		return
14172	}
14173	if !done {
14174		s.Response.Response = future.Response()
14175		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
14176		return
14177	}
14178	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14179	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
14180		s, err = client.CreateOrUpdateResponder(s.Response.Response)
14181		if err != nil {
14182			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
14183		}
14184	}
14185	return
14186}
14187
14188// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14189// operation.
14190type SubnetsDeleteFuture struct {
14191	azure.FutureAPI
14192	// Result returns the result of the asynchronous operation.
14193	// If the operation has not completed it will return an error.
14194	Result func(SubnetsClient) (autorest.Response, error)
14195}
14196
14197// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14198func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
14199	var azFuture azure.Future
14200	if err := json.Unmarshal(body, &azFuture); err != nil {
14201		return err
14202	}
14203	future.FutureAPI = &azFuture
14204	future.Result = future.result
14205	return nil
14206}
14207
14208// result is the default implementation for SubnetsDeleteFuture.Result.
14209func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
14210	var done bool
14211	done, err = future.DoneWithContext(context.Background(), client)
14212	if err != nil {
14213		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
14214		return
14215	}
14216	if !done {
14217		ar.Response = future.Response()
14218		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
14219		return
14220	}
14221	ar.Response = future.Response()
14222	return
14223}
14224
14225// SubResource reference to another subresource.
14226type SubResource struct {
14227	// ID - Resource ID.
14228	ID *string `json:"id,omitempty"`
14229}
14230
14231// TagsObject tags object for patch operations.
14232type TagsObject struct {
14233	// Tags - Resource tags.
14234	Tags map[string]*string `json:"tags"`
14235}
14236
14237// MarshalJSON is the custom marshaler for TagsObject.
14238func (toVar TagsObject) MarshalJSON() ([]byte, error) {
14239	objectMap := make(map[string]interface{})
14240	if toVar.Tags != nil {
14241		objectMap["tags"] = toVar.Tags
14242	}
14243	return json.Marshal(objectMap)
14244}
14245
14246// Topology topology of the specified resource group.
14247type Topology struct {
14248	autorest.Response `json:"-"`
14249	// ID - READ-ONLY; GUID representing the operation id.
14250	ID *string `json:"id,omitempty"`
14251	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
14252	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
14253	// LastModified - READ-ONLY; The datetime when the topology was last modified.
14254	LastModified *date.Time          `json:"lastModified,omitempty"`
14255	Resources    *[]TopologyResource `json:"resources,omitempty"`
14256}
14257
14258// MarshalJSON is the custom marshaler for Topology.
14259func (t Topology) MarshalJSON() ([]byte, error) {
14260	objectMap := make(map[string]interface{})
14261	if t.Resources != nil {
14262		objectMap["resources"] = t.Resources
14263	}
14264	return json.Marshal(objectMap)
14265}
14266
14267// TopologyAssociation resources that have an association with the parent resource.
14268type TopologyAssociation struct {
14269	// Name - The name of the resource that is associated with the parent resource.
14270	Name *string `json:"name,omitempty"`
14271	// ResourceID - The ID of the resource that is associated with the parent resource.
14272	ResourceID *string `json:"resourceId,omitempty"`
14273	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
14274	AssociationType AssociationType `json:"associationType,omitempty"`
14275}
14276
14277// TopologyParameters parameters that define the representation of topology.
14278type TopologyParameters struct {
14279	// TargetResourceGroupName - The name of the target resource group to perform topology on.
14280	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
14281	// TargetVirtualNetwork - The reference of the Virtual Network resource.
14282	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
14283	// TargetSubnet - The reference of the Subnet resource.
14284	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
14285}
14286
14287// TopologyResource the network resource topology information for the given resource group.
14288type TopologyResource struct {
14289	// Name - Name of the resource.
14290	Name *string `json:"name,omitempty"`
14291	// ID - ID of the resource.
14292	ID *string `json:"id,omitempty"`
14293	// Location - Resource location.
14294	Location *string `json:"location,omitempty"`
14295	// Associations - Holds the associations the resource has with other resources in the resource group.
14296	Associations *[]TopologyAssociation `json:"associations,omitempty"`
14297}
14298
14299// TroubleshootingDetails information gained from troubleshooting of specified resource.
14300type TroubleshootingDetails struct {
14301	// ID - The id of the get troubleshoot operation.
14302	ID *string `json:"id,omitempty"`
14303	// ReasonType - Reason type of failure.
14304	ReasonType *string `json:"reasonType,omitempty"`
14305	// Summary - A summary of troubleshooting.
14306	Summary *string `json:"summary,omitempty"`
14307	// Detail - Details on troubleshooting results.
14308	Detail *string `json:"detail,omitempty"`
14309	// RecommendedActions - List of recommended actions.
14310	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
14311}
14312
14313// TroubleshootingParameters parameters that define the resource to troubleshoot.
14314type TroubleshootingParameters struct {
14315	// TargetResourceID - The target resource to troubleshoot.
14316	TargetResourceID           *string `json:"targetResourceId,omitempty"`
14317	*TroubleshootingProperties `json:"properties,omitempty"`
14318}
14319
14320// MarshalJSON is the custom marshaler for TroubleshootingParameters.
14321func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
14322	objectMap := make(map[string]interface{})
14323	if tp.TargetResourceID != nil {
14324		objectMap["targetResourceId"] = tp.TargetResourceID
14325	}
14326	if tp.TroubleshootingProperties != nil {
14327		objectMap["properties"] = tp.TroubleshootingProperties
14328	}
14329	return json.Marshal(objectMap)
14330}
14331
14332// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
14333func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
14334	var m map[string]*json.RawMessage
14335	err := json.Unmarshal(body, &m)
14336	if err != nil {
14337		return err
14338	}
14339	for k, v := range m {
14340		switch k {
14341		case "targetResourceId":
14342			if v != nil {
14343				var targetResourceID string
14344				err = json.Unmarshal(*v, &targetResourceID)
14345				if err != nil {
14346					return err
14347				}
14348				tp.TargetResourceID = &targetResourceID
14349			}
14350		case "properties":
14351			if v != nil {
14352				var troubleshootingProperties TroubleshootingProperties
14353				err = json.Unmarshal(*v, &troubleshootingProperties)
14354				if err != nil {
14355					return err
14356				}
14357				tp.TroubleshootingProperties = &troubleshootingProperties
14358			}
14359		}
14360	}
14361
14362	return nil
14363}
14364
14365// TroubleshootingProperties storage location provided for troubleshoot.
14366type TroubleshootingProperties struct {
14367	// StorageID - The ID for the storage account to save the troubleshoot result.
14368	StorageID *string `json:"storageId,omitempty"`
14369	// StoragePath - The path to the blob to save the troubleshoot result in.
14370	StoragePath *string `json:"storagePath,omitempty"`
14371}
14372
14373// TroubleshootingRecommendedActions recommended actions based on discovered issues.
14374type TroubleshootingRecommendedActions struct {
14375	// ActionID - ID of the recommended action.
14376	ActionID *string `json:"actionId,omitempty"`
14377	// ActionText - Description of recommended actions.
14378	ActionText *string `json:"actionText,omitempty"`
14379	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
14380	ActionURI *string `json:"actionUri,omitempty"`
14381	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
14382	ActionURIText *string `json:"actionUriText,omitempty"`
14383}
14384
14385// TroubleshootingResult troubleshooting information gained from specified resource.
14386type TroubleshootingResult struct {
14387	autorest.Response `json:"-"`
14388	// StartTime - The start time of the troubleshooting.
14389	StartTime *date.Time `json:"startTime,omitempty"`
14390	// EndTime - The end time of the troubleshooting.
14391	EndTime *date.Time `json:"endTime,omitempty"`
14392	// Code - The result code of the troubleshooting.
14393	Code *string `json:"code,omitempty"`
14394	// Results - Information from troubleshooting.
14395	Results *[]TroubleshootingDetails `json:"results,omitempty"`
14396}
14397
14398// TunnelConnectionHealth virtualNetworkGatewayConnection properties
14399type TunnelConnectionHealth struct {
14400	// Tunnel - READ-ONLY; Tunnel name.
14401	Tunnel *string `json:"tunnel,omitempty"`
14402	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
14403	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
14404	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
14405	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
14406	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
14407	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
14408	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
14409	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
14410}
14411
14412// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
14413func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
14414	objectMap := make(map[string]interface{})
14415	return json.Marshal(objectMap)
14416}
14417
14418// Usage describes network resource usage.
14419type Usage struct {
14420	// ID - READ-ONLY; Resource identifier.
14421	ID *string `json:"id,omitempty"`
14422	// Unit - An enum describing the unit of measurement.
14423	Unit *string `json:"unit,omitempty"`
14424	// CurrentValue - The current value of the usage.
14425	CurrentValue *int64 `json:"currentValue,omitempty"`
14426	// Limit - The limit of usage.
14427	Limit *int64 `json:"limit,omitempty"`
14428	// Name - The name of the type of usage.
14429	Name *UsageName `json:"name,omitempty"`
14430}
14431
14432// MarshalJSON is the custom marshaler for Usage.
14433func (u Usage) MarshalJSON() ([]byte, error) {
14434	objectMap := make(map[string]interface{})
14435	if u.Unit != nil {
14436		objectMap["unit"] = u.Unit
14437	}
14438	if u.CurrentValue != nil {
14439		objectMap["currentValue"] = u.CurrentValue
14440	}
14441	if u.Limit != nil {
14442		objectMap["limit"] = u.Limit
14443	}
14444	if u.Name != nil {
14445		objectMap["name"] = u.Name
14446	}
14447	return json.Marshal(objectMap)
14448}
14449
14450// UsageName the usage names.
14451type UsageName struct {
14452	// Value - A string describing the resource name.
14453	Value *string `json:"value,omitempty"`
14454	// LocalizedValue - A localized string describing the resource name.
14455	LocalizedValue *string `json:"localizedValue,omitempty"`
14456}
14457
14458// UsagesListResult the list usages operation response.
14459type UsagesListResult struct {
14460	autorest.Response `json:"-"`
14461	// Value - The list network resource usages.
14462	Value *[]Usage `json:"value,omitempty"`
14463	// NextLink - URL to get the next set of results.
14464	NextLink *string `json:"nextLink,omitempty"`
14465}
14466
14467// UsagesListResultIterator provides access to a complete listing of Usage values.
14468type UsagesListResultIterator struct {
14469	i    int
14470	page UsagesListResultPage
14471}
14472
14473// NextWithContext advances to the next value.  If there was an error making
14474// the request the iterator does not advance and the error is returned.
14475func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
14476	if tracing.IsEnabled() {
14477		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
14478		defer func() {
14479			sc := -1
14480			if iter.Response().Response.Response != nil {
14481				sc = iter.Response().Response.Response.StatusCode
14482			}
14483			tracing.EndSpan(ctx, sc, err)
14484		}()
14485	}
14486	iter.i++
14487	if iter.i < len(iter.page.Values()) {
14488		return nil
14489	}
14490	err = iter.page.NextWithContext(ctx)
14491	if err != nil {
14492		iter.i--
14493		return err
14494	}
14495	iter.i = 0
14496	return nil
14497}
14498
14499// Next advances to the next value.  If there was an error making
14500// the request the iterator does not advance and the error is returned.
14501// Deprecated: Use NextWithContext() instead.
14502func (iter *UsagesListResultIterator) Next() error {
14503	return iter.NextWithContext(context.Background())
14504}
14505
14506// NotDone returns true if the enumeration should be started or is not yet complete.
14507func (iter UsagesListResultIterator) NotDone() bool {
14508	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14509}
14510
14511// Response returns the raw server response from the last page request.
14512func (iter UsagesListResultIterator) Response() UsagesListResult {
14513	return iter.page.Response()
14514}
14515
14516// Value returns the current value or a zero-initialized value if the
14517// iterator has advanced beyond the end of the collection.
14518func (iter UsagesListResultIterator) Value() Usage {
14519	if !iter.page.NotDone() {
14520		return Usage{}
14521	}
14522	return iter.page.Values()[iter.i]
14523}
14524
14525// Creates a new instance of the UsagesListResultIterator type.
14526func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
14527	return UsagesListResultIterator{page: page}
14528}
14529
14530// IsEmpty returns true if the ListResult contains no values.
14531func (ulr UsagesListResult) IsEmpty() bool {
14532	return ulr.Value == nil || len(*ulr.Value) == 0
14533}
14534
14535// hasNextLink returns true if the NextLink is not empty.
14536func (ulr UsagesListResult) hasNextLink() bool {
14537	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
14538}
14539
14540// usagesListResultPreparer prepares a request to retrieve the next set of results.
14541// It returns nil if no more results exist.
14542func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
14543	if !ulr.hasNextLink() {
14544		return nil, nil
14545	}
14546	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14547		autorest.AsJSON(),
14548		autorest.AsGet(),
14549		autorest.WithBaseURL(to.String(ulr.NextLink)))
14550}
14551
14552// UsagesListResultPage contains a page of Usage values.
14553type UsagesListResultPage struct {
14554	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
14555	ulr UsagesListResult
14556}
14557
14558// NextWithContext advances to the next page of values.  If there was an error making
14559// the request the page does not advance and the error is returned.
14560func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
14561	if tracing.IsEnabled() {
14562		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
14563		defer func() {
14564			sc := -1
14565			if page.Response().Response.Response != nil {
14566				sc = page.Response().Response.Response.StatusCode
14567			}
14568			tracing.EndSpan(ctx, sc, err)
14569		}()
14570	}
14571	for {
14572		next, err := page.fn(ctx, page.ulr)
14573		if err != nil {
14574			return err
14575		}
14576		page.ulr = next
14577		if !next.hasNextLink() || !next.IsEmpty() {
14578			break
14579		}
14580	}
14581	return nil
14582}
14583
14584// Next advances to the next page of values.  If there was an error making
14585// the request the page does not advance and the error is returned.
14586// Deprecated: Use NextWithContext() instead.
14587func (page *UsagesListResultPage) Next() error {
14588	return page.NextWithContext(context.Background())
14589}
14590
14591// NotDone returns true if the page enumeration should be started or is not yet complete.
14592func (page UsagesListResultPage) NotDone() bool {
14593	return !page.ulr.IsEmpty()
14594}
14595
14596// Response returns the raw server response from the last page request.
14597func (page UsagesListResultPage) Response() UsagesListResult {
14598	return page.ulr
14599}
14600
14601// Values returns the slice of values for the current page or nil if there are no values.
14602func (page UsagesListResultPage) Values() []Usage {
14603	if page.ulr.IsEmpty() {
14604		return nil
14605	}
14606	return *page.ulr.Value
14607}
14608
14609// Creates a new instance of the UsagesListResultPage type.
14610func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
14611	return UsagesListResultPage{
14612		fn:  getNextPage,
14613		ulr: cur,
14614	}
14615}
14616
14617// VerificationIPFlowParameters parameters that define the IP flow to be verified.
14618type VerificationIPFlowParameters struct {
14619	// TargetResourceID - The ID of the target resource to perform next-hop on.
14620	TargetResourceID *string `json:"targetResourceId,omitempty"`
14621	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
14622	Direction Direction `json:"direction,omitempty"`
14623	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
14624	Protocol Protocol `json:"protocol,omitempty"`
14625	// 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.
14626	LocalPort *string `json:"localPort,omitempty"`
14627	// 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.
14628	RemotePort *string `json:"remotePort,omitempty"`
14629	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
14630	LocalIPAddress *string `json:"localIPAddress,omitempty"`
14631	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
14632	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
14633	// 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).
14634	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
14635}
14636
14637// VerificationIPFlowResult results of IP flow verification on the target resource.
14638type VerificationIPFlowResult struct {
14639	autorest.Response `json:"-"`
14640	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
14641	Access Access `json:"access,omitempty"`
14642	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
14643	RuleName *string `json:"ruleName,omitempty"`
14644}
14645
14646// VirtualNetwork virtual Network resource.
14647type VirtualNetwork struct {
14648	autorest.Response `json:"-"`
14649	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
14650	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
14651	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14652	Etag *string `json:"etag,omitempty"`
14653	// ID - Resource ID.
14654	ID *string `json:"id,omitempty"`
14655	// Name - READ-ONLY; Resource name.
14656	Name *string `json:"name,omitempty"`
14657	// Type - READ-ONLY; Resource type.
14658	Type *string `json:"type,omitempty"`
14659	// Location - Resource location.
14660	Location *string `json:"location,omitempty"`
14661	// Tags - Resource tags.
14662	Tags map[string]*string `json:"tags"`
14663}
14664
14665// MarshalJSON is the custom marshaler for VirtualNetwork.
14666func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
14667	objectMap := make(map[string]interface{})
14668	if vn.VirtualNetworkPropertiesFormat != nil {
14669		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
14670	}
14671	if vn.Etag != nil {
14672		objectMap["etag"] = vn.Etag
14673	}
14674	if vn.ID != nil {
14675		objectMap["id"] = vn.ID
14676	}
14677	if vn.Location != nil {
14678		objectMap["location"] = vn.Location
14679	}
14680	if vn.Tags != nil {
14681		objectMap["tags"] = vn.Tags
14682	}
14683	return json.Marshal(objectMap)
14684}
14685
14686// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
14687func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
14688	var m map[string]*json.RawMessage
14689	err := json.Unmarshal(body, &m)
14690	if err != nil {
14691		return err
14692	}
14693	for k, v := range m {
14694		switch k {
14695		case "properties":
14696			if v != nil {
14697				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
14698				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
14699				if err != nil {
14700					return err
14701				}
14702				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
14703			}
14704		case "etag":
14705			if v != nil {
14706				var etag string
14707				err = json.Unmarshal(*v, &etag)
14708				if err != nil {
14709					return err
14710				}
14711				vn.Etag = &etag
14712			}
14713		case "id":
14714			if v != nil {
14715				var ID string
14716				err = json.Unmarshal(*v, &ID)
14717				if err != nil {
14718					return err
14719				}
14720				vn.ID = &ID
14721			}
14722		case "name":
14723			if v != nil {
14724				var name string
14725				err = json.Unmarshal(*v, &name)
14726				if err != nil {
14727					return err
14728				}
14729				vn.Name = &name
14730			}
14731		case "type":
14732			if v != nil {
14733				var typeVar string
14734				err = json.Unmarshal(*v, &typeVar)
14735				if err != nil {
14736					return err
14737				}
14738				vn.Type = &typeVar
14739			}
14740		case "location":
14741			if v != nil {
14742				var location string
14743				err = json.Unmarshal(*v, &location)
14744				if err != nil {
14745					return err
14746				}
14747				vn.Location = &location
14748			}
14749		case "tags":
14750			if v != nil {
14751				var tags map[string]*string
14752				err = json.Unmarshal(*v, &tags)
14753				if err != nil {
14754					return err
14755				}
14756				vn.Tags = tags
14757			}
14758		}
14759	}
14760
14761	return nil
14762}
14763
14764// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
14765// resource.
14766type VirtualNetworkConnectionGatewayReference struct {
14767	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
14768	ID *string `json:"id,omitempty"`
14769}
14770
14771// VirtualNetworkGateway a common class for general resource information
14772type VirtualNetworkGateway struct {
14773	autorest.Response `json:"-"`
14774	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
14775	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
14776	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14777	Etag *string `json:"etag,omitempty"`
14778	// ID - Resource ID.
14779	ID *string `json:"id,omitempty"`
14780	// Name - READ-ONLY; Resource name.
14781	Name *string `json:"name,omitempty"`
14782	// Type - READ-ONLY; Resource type.
14783	Type *string `json:"type,omitempty"`
14784	// Location - Resource location.
14785	Location *string `json:"location,omitempty"`
14786	// Tags - Resource tags.
14787	Tags map[string]*string `json:"tags"`
14788}
14789
14790// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
14791func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
14792	objectMap := make(map[string]interface{})
14793	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
14794		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
14795	}
14796	if vng.Etag != nil {
14797		objectMap["etag"] = vng.Etag
14798	}
14799	if vng.ID != nil {
14800		objectMap["id"] = vng.ID
14801	}
14802	if vng.Location != nil {
14803		objectMap["location"] = vng.Location
14804	}
14805	if vng.Tags != nil {
14806		objectMap["tags"] = vng.Tags
14807	}
14808	return json.Marshal(objectMap)
14809}
14810
14811// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
14812func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
14813	var m map[string]*json.RawMessage
14814	err := json.Unmarshal(body, &m)
14815	if err != nil {
14816		return err
14817	}
14818	for k, v := range m {
14819		switch k {
14820		case "properties":
14821			if v != nil {
14822				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
14823				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
14824				if err != nil {
14825					return err
14826				}
14827				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
14828			}
14829		case "etag":
14830			if v != nil {
14831				var etag string
14832				err = json.Unmarshal(*v, &etag)
14833				if err != nil {
14834					return err
14835				}
14836				vng.Etag = &etag
14837			}
14838		case "id":
14839			if v != nil {
14840				var ID string
14841				err = json.Unmarshal(*v, &ID)
14842				if err != nil {
14843					return err
14844				}
14845				vng.ID = &ID
14846			}
14847		case "name":
14848			if v != nil {
14849				var name string
14850				err = json.Unmarshal(*v, &name)
14851				if err != nil {
14852					return err
14853				}
14854				vng.Name = &name
14855			}
14856		case "type":
14857			if v != nil {
14858				var typeVar string
14859				err = json.Unmarshal(*v, &typeVar)
14860				if err != nil {
14861					return err
14862				}
14863				vng.Type = &typeVar
14864			}
14865		case "location":
14866			if v != nil {
14867				var location string
14868				err = json.Unmarshal(*v, &location)
14869				if err != nil {
14870					return err
14871				}
14872				vng.Location = &location
14873			}
14874		case "tags":
14875			if v != nil {
14876				var tags map[string]*string
14877				err = json.Unmarshal(*v, &tags)
14878				if err != nil {
14879					return err
14880				}
14881				vng.Tags = tags
14882			}
14883		}
14884	}
14885
14886	return nil
14887}
14888
14889// VirtualNetworkGatewayConnection a common class for general resource information
14890type VirtualNetworkGatewayConnection struct {
14891	autorest.Response `json:"-"`
14892	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
14893	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
14894	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14895	Etag *string `json:"etag,omitempty"`
14896	// ID - Resource ID.
14897	ID *string `json:"id,omitempty"`
14898	// Name - READ-ONLY; Resource name.
14899	Name *string `json:"name,omitempty"`
14900	// Type - READ-ONLY; Resource type.
14901	Type *string `json:"type,omitempty"`
14902	// Location - Resource location.
14903	Location *string `json:"location,omitempty"`
14904	// Tags - Resource tags.
14905	Tags map[string]*string `json:"tags"`
14906}
14907
14908// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
14909func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
14910	objectMap := make(map[string]interface{})
14911	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
14912		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
14913	}
14914	if vngc.Etag != nil {
14915		objectMap["etag"] = vngc.Etag
14916	}
14917	if vngc.ID != nil {
14918		objectMap["id"] = vngc.ID
14919	}
14920	if vngc.Location != nil {
14921		objectMap["location"] = vngc.Location
14922	}
14923	if vngc.Tags != nil {
14924		objectMap["tags"] = vngc.Tags
14925	}
14926	return json.Marshal(objectMap)
14927}
14928
14929// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
14930func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
14931	var m map[string]*json.RawMessage
14932	err := json.Unmarshal(body, &m)
14933	if err != nil {
14934		return err
14935	}
14936	for k, v := range m {
14937		switch k {
14938		case "properties":
14939			if v != nil {
14940				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
14941				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
14942				if err != nil {
14943					return err
14944				}
14945				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
14946			}
14947		case "etag":
14948			if v != nil {
14949				var etag string
14950				err = json.Unmarshal(*v, &etag)
14951				if err != nil {
14952					return err
14953				}
14954				vngc.Etag = &etag
14955			}
14956		case "id":
14957			if v != nil {
14958				var ID string
14959				err = json.Unmarshal(*v, &ID)
14960				if err != nil {
14961					return err
14962				}
14963				vngc.ID = &ID
14964			}
14965		case "name":
14966			if v != nil {
14967				var name string
14968				err = json.Unmarshal(*v, &name)
14969				if err != nil {
14970					return err
14971				}
14972				vngc.Name = &name
14973			}
14974		case "type":
14975			if v != nil {
14976				var typeVar string
14977				err = json.Unmarshal(*v, &typeVar)
14978				if err != nil {
14979					return err
14980				}
14981				vngc.Type = &typeVar
14982			}
14983		case "location":
14984			if v != nil {
14985				var location string
14986				err = json.Unmarshal(*v, &location)
14987				if err != nil {
14988					return err
14989				}
14990				vngc.Location = &location
14991			}
14992		case "tags":
14993			if v != nil {
14994				var tags map[string]*string
14995				err = json.Unmarshal(*v, &tags)
14996				if err != nil {
14997					return err
14998				}
14999				vngc.Tags = tags
15000			}
15001		}
15002	}
15003
15004	return nil
15005}
15006
15007// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
15008type VirtualNetworkGatewayConnectionListEntity struct {
15009	autorest.Response `json:"-"`
15010	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
15011	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
15012	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15013	Etag *string `json:"etag,omitempty"`
15014	// ID - Resource ID.
15015	ID *string `json:"id,omitempty"`
15016	// Name - READ-ONLY; Resource name.
15017	Name *string `json:"name,omitempty"`
15018	// Type - READ-ONLY; Resource type.
15019	Type *string `json:"type,omitempty"`
15020	// Location - Resource location.
15021	Location *string `json:"location,omitempty"`
15022	// Tags - Resource tags.
15023	Tags map[string]*string `json:"tags"`
15024}
15025
15026// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
15027func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
15028	objectMap := make(map[string]interface{})
15029	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
15030		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15031	}
15032	if vngcle.Etag != nil {
15033		objectMap["etag"] = vngcle.Etag
15034	}
15035	if vngcle.ID != nil {
15036		objectMap["id"] = vngcle.ID
15037	}
15038	if vngcle.Location != nil {
15039		objectMap["location"] = vngcle.Location
15040	}
15041	if vngcle.Tags != nil {
15042		objectMap["tags"] = vngcle.Tags
15043	}
15044	return json.Marshal(objectMap)
15045}
15046
15047// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
15048func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
15049	var m map[string]*json.RawMessage
15050	err := json.Unmarshal(body, &m)
15051	if err != nil {
15052		return err
15053	}
15054	for k, v := range m {
15055		switch k {
15056		case "properties":
15057			if v != nil {
15058				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
15059				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
15060				if err != nil {
15061					return err
15062				}
15063				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
15064			}
15065		case "etag":
15066			if v != nil {
15067				var etag string
15068				err = json.Unmarshal(*v, &etag)
15069				if err != nil {
15070					return err
15071				}
15072				vngcle.Etag = &etag
15073			}
15074		case "id":
15075			if v != nil {
15076				var ID string
15077				err = json.Unmarshal(*v, &ID)
15078				if err != nil {
15079					return err
15080				}
15081				vngcle.ID = &ID
15082			}
15083		case "name":
15084			if v != nil {
15085				var name string
15086				err = json.Unmarshal(*v, &name)
15087				if err != nil {
15088					return err
15089				}
15090				vngcle.Name = &name
15091			}
15092		case "type":
15093			if v != nil {
15094				var typeVar string
15095				err = json.Unmarshal(*v, &typeVar)
15096				if err != nil {
15097					return err
15098				}
15099				vngcle.Type = &typeVar
15100			}
15101		case "location":
15102			if v != nil {
15103				var location string
15104				err = json.Unmarshal(*v, &location)
15105				if err != nil {
15106					return err
15107				}
15108				vngcle.Location = &location
15109			}
15110		case "tags":
15111			if v != nil {
15112				var tags map[string]*string
15113				err = json.Unmarshal(*v, &tags)
15114				if err != nil {
15115					return err
15116				}
15117				vngcle.Tags = tags
15118			}
15119		}
15120	}
15121
15122	return nil
15123}
15124
15125// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
15126type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
15127	// AuthorizationKey - The authorizationKey.
15128	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15129	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15130	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
15131	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15132	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
15133	// LocalNetworkGateway2 - The reference to local network gateway resource.
15134	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
15135	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15136	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15137	// RoutingWeight - The routing weight.
15138	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15139	// SharedKey - The IPSec shared key.
15140	SharedKey *string `json:"sharedKey,omitempty"`
15141	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15142	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15143	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15144	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15145	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15146	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15147	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15148	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15149	// Peer - The reference to peerings resource.
15150	Peer *SubResource `json:"peer,omitempty"`
15151	// EnableBgp - EnableBgp flag
15152	EnableBgp *bool `json:"enableBgp,omitempty"`
15153	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15154	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15155	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15156	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15157	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15158	ResourceGUID *string `json:"resourceGuid,omitempty"`
15159	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15160	ProvisioningState *string `json:"provisioningState,omitempty"`
15161}
15162
15163// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
15164func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
15165	objectMap := make(map[string]interface{})
15166	if vngclepf.AuthorizationKey != nil {
15167		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
15168	}
15169	if vngclepf.VirtualNetworkGateway1 != nil {
15170		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
15171	}
15172	if vngclepf.VirtualNetworkGateway2 != nil {
15173		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
15174	}
15175	if vngclepf.LocalNetworkGateway2 != nil {
15176		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
15177	}
15178	if vngclepf.ConnectionType != "" {
15179		objectMap["connectionType"] = vngclepf.ConnectionType
15180	}
15181	if vngclepf.RoutingWeight != nil {
15182		objectMap["routingWeight"] = vngclepf.RoutingWeight
15183	}
15184	if vngclepf.SharedKey != nil {
15185		objectMap["sharedKey"] = vngclepf.SharedKey
15186	}
15187	if vngclepf.Peer != nil {
15188		objectMap["peer"] = vngclepf.Peer
15189	}
15190	if vngclepf.EnableBgp != nil {
15191		objectMap["enableBgp"] = vngclepf.EnableBgp
15192	}
15193	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
15194		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
15195	}
15196	if vngclepf.IpsecPolicies != nil {
15197		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
15198	}
15199	if vngclepf.ResourceGUID != nil {
15200		objectMap["resourceGuid"] = vngclepf.ResourceGUID
15201	}
15202	return json.Marshal(objectMap)
15203}
15204
15205// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
15206// service call
15207type VirtualNetworkGatewayConnectionListResult struct {
15208	autorest.Response `json:"-"`
15209	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15210	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
15211	// NextLink - READ-ONLY; The URL to get the next set of results.
15212	NextLink *string `json:"nextLink,omitempty"`
15213}
15214
15215// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
15216func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
15217	objectMap := make(map[string]interface{})
15218	if vngclr.Value != nil {
15219		objectMap["value"] = vngclr.Value
15220	}
15221	return json.Marshal(objectMap)
15222}
15223
15224// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
15225// VirtualNetworkGatewayConnection values.
15226type VirtualNetworkGatewayConnectionListResultIterator struct {
15227	i    int
15228	page VirtualNetworkGatewayConnectionListResultPage
15229}
15230
15231// NextWithContext advances to the next value.  If there was an error making
15232// the request the iterator does not advance and the error is returned.
15233func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
15234	if tracing.IsEnabled() {
15235		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
15236		defer func() {
15237			sc := -1
15238			if iter.Response().Response.Response != nil {
15239				sc = iter.Response().Response.Response.StatusCode
15240			}
15241			tracing.EndSpan(ctx, sc, err)
15242		}()
15243	}
15244	iter.i++
15245	if iter.i < len(iter.page.Values()) {
15246		return nil
15247	}
15248	err = iter.page.NextWithContext(ctx)
15249	if err != nil {
15250		iter.i--
15251		return err
15252	}
15253	iter.i = 0
15254	return nil
15255}
15256
15257// Next advances to the next value.  If there was an error making
15258// the request the iterator does not advance and the error is returned.
15259// Deprecated: Use NextWithContext() instead.
15260func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
15261	return iter.NextWithContext(context.Background())
15262}
15263
15264// NotDone returns true if the enumeration should be started or is not yet complete.
15265func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
15266	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15267}
15268
15269// Response returns the raw server response from the last page request.
15270func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
15271	return iter.page.Response()
15272}
15273
15274// Value returns the current value or a zero-initialized value if the
15275// iterator has advanced beyond the end of the collection.
15276func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
15277	if !iter.page.NotDone() {
15278		return VirtualNetworkGatewayConnection{}
15279	}
15280	return iter.page.Values()[iter.i]
15281}
15282
15283// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
15284func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
15285	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
15286}
15287
15288// IsEmpty returns true if the ListResult contains no values.
15289func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
15290	return vngclr.Value == nil || len(*vngclr.Value) == 0
15291}
15292
15293// hasNextLink returns true if the NextLink is not empty.
15294func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
15295	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
15296}
15297
15298// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
15299// It returns nil if no more results exist.
15300func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
15301	if !vngclr.hasNextLink() {
15302		return nil, nil
15303	}
15304	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15305		autorest.AsJSON(),
15306		autorest.AsGet(),
15307		autorest.WithBaseURL(to.String(vngclr.NextLink)))
15308}
15309
15310// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
15311type VirtualNetworkGatewayConnectionListResultPage struct {
15312	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
15313	vngclr VirtualNetworkGatewayConnectionListResult
15314}
15315
15316// NextWithContext advances to the next page of values.  If there was an error making
15317// the request the page does not advance and the error is returned.
15318func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
15319	if tracing.IsEnabled() {
15320		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
15321		defer func() {
15322			sc := -1
15323			if page.Response().Response.Response != nil {
15324				sc = page.Response().Response.Response.StatusCode
15325			}
15326			tracing.EndSpan(ctx, sc, err)
15327		}()
15328	}
15329	for {
15330		next, err := page.fn(ctx, page.vngclr)
15331		if err != nil {
15332			return err
15333		}
15334		page.vngclr = next
15335		if !next.hasNextLink() || !next.IsEmpty() {
15336			break
15337		}
15338	}
15339	return nil
15340}
15341
15342// Next advances to the next page of values.  If there was an error making
15343// the request the page does not advance and the error is returned.
15344// Deprecated: Use NextWithContext() instead.
15345func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
15346	return page.NextWithContext(context.Background())
15347}
15348
15349// NotDone returns true if the page enumeration should be started or is not yet complete.
15350func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
15351	return !page.vngclr.IsEmpty()
15352}
15353
15354// Response returns the raw server response from the last page request.
15355func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
15356	return page.vngclr
15357}
15358
15359// Values returns the slice of values for the current page or nil if there are no values.
15360func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
15361	if page.vngclr.IsEmpty() {
15362		return nil
15363	}
15364	return *page.vngclr.Value
15365}
15366
15367// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
15368func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
15369	return VirtualNetworkGatewayConnectionListResultPage{
15370		fn:     getNextPage,
15371		vngclr: cur,
15372	}
15373}
15374
15375// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
15376type VirtualNetworkGatewayConnectionPropertiesFormat struct {
15377	// AuthorizationKey - The authorizationKey.
15378	AuthorizationKey *string `json:"authorizationKey,omitempty"`
15379	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
15380	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
15381	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
15382	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
15383	// LocalNetworkGateway2 - The reference to local network gateway resource.
15384	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
15385	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
15386	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
15387	// RoutingWeight - The routing weight.
15388	RoutingWeight *int32 `json:"routingWeight,omitempty"`
15389	// SharedKey - The IPSec shared key.
15390	SharedKey *string `json:"sharedKey,omitempty"`
15391	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15392	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15393	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
15394	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
15395	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
15396	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15397	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
15398	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15399	// Peer - The reference to peerings resource.
15400	Peer *SubResource `json:"peer,omitempty"`
15401	// EnableBgp - EnableBgp flag
15402	EnableBgp *bool `json:"enableBgp,omitempty"`
15403	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
15404	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
15405	// IpsecPolicies - The IPSec Policies to be considered by this connection.
15406	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
15407	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
15408	ResourceGUID *string `json:"resourceGuid,omitempty"`
15409	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15410	ProvisioningState *string `json:"provisioningState,omitempty"`
15411}
15412
15413// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
15414func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
15415	objectMap := make(map[string]interface{})
15416	if vngcpf.AuthorizationKey != nil {
15417		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
15418	}
15419	if vngcpf.VirtualNetworkGateway1 != nil {
15420		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
15421	}
15422	if vngcpf.VirtualNetworkGateway2 != nil {
15423		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
15424	}
15425	if vngcpf.LocalNetworkGateway2 != nil {
15426		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
15427	}
15428	if vngcpf.ConnectionType != "" {
15429		objectMap["connectionType"] = vngcpf.ConnectionType
15430	}
15431	if vngcpf.RoutingWeight != nil {
15432		objectMap["routingWeight"] = vngcpf.RoutingWeight
15433	}
15434	if vngcpf.SharedKey != nil {
15435		objectMap["sharedKey"] = vngcpf.SharedKey
15436	}
15437	if vngcpf.Peer != nil {
15438		objectMap["peer"] = vngcpf.Peer
15439	}
15440	if vngcpf.EnableBgp != nil {
15441		objectMap["enableBgp"] = vngcpf.EnableBgp
15442	}
15443	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
15444		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
15445	}
15446	if vngcpf.IpsecPolicies != nil {
15447		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
15448	}
15449	if vngcpf.ResourceGUID != nil {
15450		objectMap["resourceGuid"] = vngcpf.ResourceGUID
15451	}
15452	return json.Marshal(objectMap)
15453}
15454
15455// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
15456// results of a long-running operation.
15457type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
15458	azure.FutureAPI
15459	// Result returns the result of the asynchronous operation.
15460	// If the operation has not completed it will return an error.
15461	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
15462}
15463
15464// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15465func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15466	var azFuture azure.Future
15467	if err := json.Unmarshal(body, &azFuture); err != nil {
15468		return err
15469	}
15470	future.FutureAPI = &azFuture
15471	future.Result = future.result
15472	return nil
15473}
15474
15475// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
15476func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
15477	var done bool
15478	done, err = future.DoneWithContext(context.Background(), client)
15479	if err != nil {
15480		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15481		return
15482	}
15483	if !done {
15484		vngc.Response.Response = future.Response()
15485		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
15486		return
15487	}
15488	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15489	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
15490		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
15491		if err != nil {
15492			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
15493		}
15494	}
15495	return
15496}
15497
15498// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
15499// a long-running operation.
15500type VirtualNetworkGatewayConnectionsDeleteFuture struct {
15501	azure.FutureAPI
15502	// Result returns the result of the asynchronous operation.
15503	// If the operation has not completed it will return an error.
15504	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
15505}
15506
15507// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15508func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
15509	var azFuture azure.Future
15510	if err := json.Unmarshal(body, &azFuture); err != nil {
15511		return err
15512	}
15513	future.FutureAPI = &azFuture
15514	future.Result = future.result
15515	return nil
15516}
15517
15518// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
15519func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
15520	var done bool
15521	done, err = future.DoneWithContext(context.Background(), client)
15522	if err != nil {
15523		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
15524		return
15525	}
15526	if !done {
15527		ar.Response = future.Response()
15528		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
15529		return
15530	}
15531	ar.Response = future.Response()
15532	return
15533}
15534
15535// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
15536// results of a long-running operation.
15537type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
15538	azure.FutureAPI
15539	// Result returns the result of the asynchronous operation.
15540	// If the operation has not completed it will return an error.
15541	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
15542}
15543
15544// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15545func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15546	var azFuture azure.Future
15547	if err := json.Unmarshal(body, &azFuture); err != nil {
15548		return err
15549	}
15550	future.FutureAPI = &azFuture
15551	future.Result = future.result
15552	return nil
15553}
15554
15555// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
15556func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
15557	var done bool
15558	done, err = future.DoneWithContext(context.Background(), client)
15559	if err != nil {
15560		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15561		return
15562	}
15563	if !done {
15564		crsk.Response.Response = future.Response()
15565		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
15566		return
15567	}
15568	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15569	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
15570		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
15571		if err != nil {
15572			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
15573		}
15574	}
15575	return
15576}
15577
15578// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
15579// results of a long-running operation.
15580type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
15581	azure.FutureAPI
15582	// Result returns the result of the asynchronous operation.
15583	// If the operation has not completed it will return an error.
15584	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
15585}
15586
15587// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15588func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
15589	var azFuture azure.Future
15590	if err := json.Unmarshal(body, &azFuture); err != nil {
15591		return err
15592	}
15593	future.FutureAPI = &azFuture
15594	future.Result = future.result
15595	return nil
15596}
15597
15598// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
15599func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
15600	var done bool
15601	done, err = future.DoneWithContext(context.Background(), client)
15602	if err != nil {
15603		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
15604		return
15605	}
15606	if !done {
15607		csk.Response.Response = future.Response()
15608		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
15609		return
15610	}
15611	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15612	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
15613		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
15614		if err != nil {
15615			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
15616		}
15617	}
15618	return
15619}
15620
15621// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
15622// results of a long-running operation.
15623type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
15624	azure.FutureAPI
15625	// Result returns the result of the asynchronous operation.
15626	// If the operation has not completed it will return an error.
15627	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
15628}
15629
15630// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15631func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
15632	var azFuture azure.Future
15633	if err := json.Unmarshal(body, &azFuture); err != nil {
15634		return err
15635	}
15636	future.FutureAPI = &azFuture
15637	future.Result = future.result
15638	return nil
15639}
15640
15641// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
15642func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
15643	var done bool
15644	done, err = future.DoneWithContext(context.Background(), client)
15645	if err != nil {
15646		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15647		return
15648	}
15649	if !done {
15650		vngcle.Response.Response = future.Response()
15651		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
15652		return
15653	}
15654	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15655	if vngcle.Response.Response, err = future.GetResult(sender); err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
15656		vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
15657		if err != nil {
15658			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
15659		}
15660	}
15661	return
15662}
15663
15664// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
15665type VirtualNetworkGatewayIPConfiguration struct {
15666	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
15667	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
15668	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15669	Name *string `json:"name,omitempty"`
15670	// Etag - A unique read-only string that changes whenever the resource is updated.
15671	Etag *string `json:"etag,omitempty"`
15672	// ID - Resource ID.
15673	ID *string `json:"id,omitempty"`
15674}
15675
15676// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
15677func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
15678	objectMap := make(map[string]interface{})
15679	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
15680		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
15681	}
15682	if vngic.Name != nil {
15683		objectMap["name"] = vngic.Name
15684	}
15685	if vngic.Etag != nil {
15686		objectMap["etag"] = vngic.Etag
15687	}
15688	if vngic.ID != nil {
15689		objectMap["id"] = vngic.ID
15690	}
15691	return json.Marshal(objectMap)
15692}
15693
15694// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
15695func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
15696	var m map[string]*json.RawMessage
15697	err := json.Unmarshal(body, &m)
15698	if err != nil {
15699		return err
15700	}
15701	for k, v := range m {
15702		switch k {
15703		case "properties":
15704			if v != nil {
15705				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
15706				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
15707				if err != nil {
15708					return err
15709				}
15710				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
15711			}
15712		case "name":
15713			if v != nil {
15714				var name string
15715				err = json.Unmarshal(*v, &name)
15716				if err != nil {
15717					return err
15718				}
15719				vngic.Name = &name
15720			}
15721		case "etag":
15722			if v != nil {
15723				var etag string
15724				err = json.Unmarshal(*v, &etag)
15725				if err != nil {
15726					return err
15727				}
15728				vngic.Etag = &etag
15729			}
15730		case "id":
15731			if v != nil {
15732				var ID string
15733				err = json.Unmarshal(*v, &ID)
15734				if err != nil {
15735					return err
15736				}
15737				vngic.ID = &ID
15738			}
15739		}
15740	}
15741
15742	return nil
15743}
15744
15745// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
15746type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
15747	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
15748	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15749	// Subnet - The reference of the subnet resource.
15750	Subnet *SubResource `json:"subnet,omitempty"`
15751	// PublicIPAddress - The reference of the public IP resource.
15752	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
15753	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15754	ProvisioningState *string `json:"provisioningState,omitempty"`
15755}
15756
15757// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
15758func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15759	objectMap := make(map[string]interface{})
15760	if vngicpf.PrivateIPAllocationMethod != "" {
15761		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
15762	}
15763	if vngicpf.Subnet != nil {
15764		objectMap["subnet"] = vngicpf.Subnet
15765	}
15766	if vngicpf.PublicIPAddress != nil {
15767		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
15768	}
15769	return json.Marshal(objectMap)
15770}
15771
15772// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
15773// service call
15774type VirtualNetworkGatewayListConnectionsResult struct {
15775	autorest.Response `json:"-"`
15776	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
15777	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
15778	// NextLink - READ-ONLY; The URL to get the next set of results.
15779	NextLink *string `json:"nextLink,omitempty"`
15780}
15781
15782// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
15783func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
15784	objectMap := make(map[string]interface{})
15785	if vnglcr.Value != nil {
15786		objectMap["value"] = vnglcr.Value
15787	}
15788	return json.Marshal(objectMap)
15789}
15790
15791// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
15792// VirtualNetworkGatewayConnectionListEntity values.
15793type VirtualNetworkGatewayListConnectionsResultIterator struct {
15794	i    int
15795	page VirtualNetworkGatewayListConnectionsResultPage
15796}
15797
15798// NextWithContext advances to the next value.  If there was an error making
15799// the request the iterator does not advance and the error is returned.
15800func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15801	if tracing.IsEnabled() {
15802		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
15803		defer func() {
15804			sc := -1
15805			if iter.Response().Response.Response != nil {
15806				sc = iter.Response().Response.Response.StatusCode
15807			}
15808			tracing.EndSpan(ctx, sc, err)
15809		}()
15810	}
15811	iter.i++
15812	if iter.i < len(iter.page.Values()) {
15813		return nil
15814	}
15815	err = iter.page.NextWithContext(ctx)
15816	if err != nil {
15817		iter.i--
15818		return err
15819	}
15820	iter.i = 0
15821	return nil
15822}
15823
15824// Next advances to the next value.  If there was an error making
15825// the request the iterator does not advance and the error is returned.
15826// Deprecated: Use NextWithContext() instead.
15827func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
15828	return iter.NextWithContext(context.Background())
15829}
15830
15831// NotDone returns true if the enumeration should be started or is not yet complete.
15832func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
15833	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15834}
15835
15836// Response returns the raw server response from the last page request.
15837func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
15838	return iter.page.Response()
15839}
15840
15841// Value returns the current value or a zero-initialized value if the
15842// iterator has advanced beyond the end of the collection.
15843func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
15844	if !iter.page.NotDone() {
15845		return VirtualNetworkGatewayConnectionListEntity{}
15846	}
15847	return iter.page.Values()[iter.i]
15848}
15849
15850// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
15851func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
15852	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
15853}
15854
15855// IsEmpty returns true if the ListResult contains no values.
15856func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
15857	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
15858}
15859
15860// hasNextLink returns true if the NextLink is not empty.
15861func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
15862	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
15863}
15864
15865// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
15866// It returns nil if no more results exist.
15867func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15868	if !vnglcr.hasNextLink() {
15869		return nil, nil
15870	}
15871	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15872		autorest.AsJSON(),
15873		autorest.AsGet(),
15874		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
15875}
15876
15877// VirtualNetworkGatewayListConnectionsResultPage contains a page of
15878// VirtualNetworkGatewayConnectionListEntity values.
15879type VirtualNetworkGatewayListConnectionsResultPage struct {
15880	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
15881	vnglcr VirtualNetworkGatewayListConnectionsResult
15882}
15883
15884// NextWithContext advances to the next page of values.  If there was an error making
15885// the request the page does not advance and the error is returned.
15886func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15887	if tracing.IsEnabled() {
15888		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
15889		defer func() {
15890			sc := -1
15891			if page.Response().Response.Response != nil {
15892				sc = page.Response().Response.Response.StatusCode
15893			}
15894			tracing.EndSpan(ctx, sc, err)
15895		}()
15896	}
15897	for {
15898		next, err := page.fn(ctx, page.vnglcr)
15899		if err != nil {
15900			return err
15901		}
15902		page.vnglcr = next
15903		if !next.hasNextLink() || !next.IsEmpty() {
15904			break
15905		}
15906	}
15907	return nil
15908}
15909
15910// Next advances to the next page of values.  If there was an error making
15911// the request the page does not advance and the error is returned.
15912// Deprecated: Use NextWithContext() instead.
15913func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
15914	return page.NextWithContext(context.Background())
15915}
15916
15917// NotDone returns true if the page enumeration should be started or is not yet complete.
15918func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
15919	return !page.vnglcr.IsEmpty()
15920}
15921
15922// Response returns the raw server response from the last page request.
15923func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
15924	return page.vnglcr
15925}
15926
15927// Values returns the slice of values for the current page or nil if there are no values.
15928func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
15929	if page.vnglcr.IsEmpty() {
15930		return nil
15931	}
15932	return *page.vnglcr.Value
15933}
15934
15935// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
15936func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
15937	return VirtualNetworkGatewayListConnectionsResultPage{
15938		fn:     getNextPage,
15939		vnglcr: cur,
15940	}
15941}
15942
15943// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
15944type VirtualNetworkGatewayListResult struct {
15945	autorest.Response `json:"-"`
15946	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
15947	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
15948	// NextLink - READ-ONLY; The URL to get the next set of results.
15949	NextLink *string `json:"nextLink,omitempty"`
15950}
15951
15952// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
15953func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
15954	objectMap := make(map[string]interface{})
15955	if vnglr.Value != nil {
15956		objectMap["value"] = vnglr.Value
15957	}
15958	return json.Marshal(objectMap)
15959}
15960
15961// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
15962// values.
15963type VirtualNetworkGatewayListResultIterator struct {
15964	i    int
15965	page VirtualNetworkGatewayListResultPage
15966}
15967
15968// NextWithContext advances to the next value.  If there was an error making
15969// the request the iterator does not advance and the error is returned.
15970func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
15971	if tracing.IsEnabled() {
15972		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
15973		defer func() {
15974			sc := -1
15975			if iter.Response().Response.Response != nil {
15976				sc = iter.Response().Response.Response.StatusCode
15977			}
15978			tracing.EndSpan(ctx, sc, err)
15979		}()
15980	}
15981	iter.i++
15982	if iter.i < len(iter.page.Values()) {
15983		return nil
15984	}
15985	err = iter.page.NextWithContext(ctx)
15986	if err != nil {
15987		iter.i--
15988		return err
15989	}
15990	iter.i = 0
15991	return nil
15992}
15993
15994// Next advances to the next value.  If there was an error making
15995// the request the iterator does not advance and the error is returned.
15996// Deprecated: Use NextWithContext() instead.
15997func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
15998	return iter.NextWithContext(context.Background())
15999}
16000
16001// NotDone returns true if the enumeration should be started or is not yet complete.
16002func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
16003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16004}
16005
16006// Response returns the raw server response from the last page request.
16007func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
16008	return iter.page.Response()
16009}
16010
16011// Value returns the current value or a zero-initialized value if the
16012// iterator has advanced beyond the end of the collection.
16013func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
16014	if !iter.page.NotDone() {
16015		return VirtualNetworkGateway{}
16016	}
16017	return iter.page.Values()[iter.i]
16018}
16019
16020// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
16021func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
16022	return VirtualNetworkGatewayListResultIterator{page: page}
16023}
16024
16025// IsEmpty returns true if the ListResult contains no values.
16026func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
16027	return vnglr.Value == nil || len(*vnglr.Value) == 0
16028}
16029
16030// hasNextLink returns true if the NextLink is not empty.
16031func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
16032	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
16033}
16034
16035// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
16036// It returns nil if no more results exist.
16037func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
16038	if !vnglr.hasNextLink() {
16039		return nil, nil
16040	}
16041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16042		autorest.AsJSON(),
16043		autorest.AsGet(),
16044		autorest.WithBaseURL(to.String(vnglr.NextLink)))
16045}
16046
16047// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
16048type VirtualNetworkGatewayListResultPage struct {
16049	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
16050	vnglr VirtualNetworkGatewayListResult
16051}
16052
16053// NextWithContext advances to the next page of values.  If there was an error making
16054// the request the page does not advance and the error is returned.
16055func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
16056	if tracing.IsEnabled() {
16057		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
16058		defer func() {
16059			sc := -1
16060			if page.Response().Response.Response != nil {
16061				sc = page.Response().Response.Response.StatusCode
16062			}
16063			tracing.EndSpan(ctx, sc, err)
16064		}()
16065	}
16066	for {
16067		next, err := page.fn(ctx, page.vnglr)
16068		if err != nil {
16069			return err
16070		}
16071		page.vnglr = next
16072		if !next.hasNextLink() || !next.IsEmpty() {
16073			break
16074		}
16075	}
16076	return nil
16077}
16078
16079// Next advances to the next page of values.  If there was an error making
16080// the request the page does not advance and the error is returned.
16081// Deprecated: Use NextWithContext() instead.
16082func (page *VirtualNetworkGatewayListResultPage) Next() error {
16083	return page.NextWithContext(context.Background())
16084}
16085
16086// NotDone returns true if the page enumeration should be started or is not yet complete.
16087func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
16088	return !page.vnglr.IsEmpty()
16089}
16090
16091// Response returns the raw server response from the last page request.
16092func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
16093	return page.vnglr
16094}
16095
16096// Values returns the slice of values for the current page or nil if there are no values.
16097func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
16098	if page.vnglr.IsEmpty() {
16099		return nil
16100	}
16101	return *page.vnglr.Value
16102}
16103
16104// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
16105func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
16106	return VirtualNetworkGatewayListResultPage{
16107		fn:    getNextPage,
16108		vnglr: cur,
16109	}
16110}
16111
16112// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
16113type VirtualNetworkGatewayPropertiesFormat struct {
16114	// IPConfigurations - IP configurations for virtual network gateway.
16115	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
16116	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
16117	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
16118	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
16119	VpnType VpnType `json:"vpnType,omitempty"`
16120	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
16121	EnableBgp *bool `json:"enableBgp,omitempty"`
16122	// ActiveActive - ActiveActive flag
16123	ActiveActive *bool `json:"activeActive,omitempty"`
16124	// 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.
16125	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
16126	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
16127	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
16128	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
16129	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
16130	// BgpSettings - Virtual network gateway's BGP speaker settings.
16131	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
16132	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
16133	ResourceGUID *string `json:"resourceGuid,omitempty"`
16134	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16135	ProvisioningState *string `json:"provisioningState,omitempty"`
16136}
16137
16138// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
16139func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
16140	objectMap := make(map[string]interface{})
16141	if vngpf.IPConfigurations != nil {
16142		objectMap["ipConfigurations"] = vngpf.IPConfigurations
16143	}
16144	if vngpf.GatewayType != "" {
16145		objectMap["gatewayType"] = vngpf.GatewayType
16146	}
16147	if vngpf.VpnType != "" {
16148		objectMap["vpnType"] = vngpf.VpnType
16149	}
16150	if vngpf.EnableBgp != nil {
16151		objectMap["enableBgp"] = vngpf.EnableBgp
16152	}
16153	if vngpf.ActiveActive != nil {
16154		objectMap["activeActive"] = vngpf.ActiveActive
16155	}
16156	if vngpf.GatewayDefaultSite != nil {
16157		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
16158	}
16159	if vngpf.Sku != nil {
16160		objectMap["sku"] = vngpf.Sku
16161	}
16162	if vngpf.VpnClientConfiguration != nil {
16163		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
16164	}
16165	if vngpf.BgpSettings != nil {
16166		objectMap["bgpSettings"] = vngpf.BgpSettings
16167	}
16168	if vngpf.ResourceGUID != nil {
16169		objectMap["resourceGuid"] = vngpf.ResourceGUID
16170	}
16171	return json.Marshal(objectMap)
16172}
16173
16174// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16175// long-running operation.
16176type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
16177	azure.FutureAPI
16178	// Result returns the result of the asynchronous operation.
16179	// If the operation has not completed it will return an error.
16180	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16181}
16182
16183// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16184func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16185	var azFuture azure.Future
16186	if err := json.Unmarshal(body, &azFuture); err != nil {
16187		return err
16188	}
16189	future.FutureAPI = &azFuture
16190	future.Result = future.result
16191	return nil
16192}
16193
16194// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
16195func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16196	var done bool
16197	done, err = future.DoneWithContext(context.Background(), client)
16198	if err != nil {
16199		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16200		return
16201	}
16202	if !done {
16203		vng.Response.Response = future.Response()
16204		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
16205		return
16206	}
16207	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16208	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16209		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
16210		if err != nil {
16211			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
16212		}
16213	}
16214	return
16215}
16216
16217// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
16218// long-running operation.
16219type VirtualNetworkGatewaysDeleteFuture struct {
16220	azure.FutureAPI
16221	// Result returns the result of the asynchronous operation.
16222	// If the operation has not completed it will return an error.
16223	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
16224}
16225
16226// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16227func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
16228	var azFuture azure.Future
16229	if err := json.Unmarshal(body, &azFuture); err != nil {
16230		return err
16231	}
16232	future.FutureAPI = &azFuture
16233	future.Result = future.result
16234	return nil
16235}
16236
16237// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
16238func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
16239	var done bool
16240	done, err = future.DoneWithContext(context.Background(), client)
16241	if err != nil {
16242		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
16243		return
16244	}
16245	if !done {
16246		ar.Response = future.Response()
16247		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
16248		return
16249	}
16250	ar.Response = future.Response()
16251	return
16252}
16253
16254// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
16255// results of a long-running operation.
16256type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
16257	azure.FutureAPI
16258	// Result returns the result of the asynchronous operation.
16259	// If the operation has not completed it will return an error.
16260	Result func(VirtualNetworkGatewaysClient) (String, error)
16261}
16262
16263// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16264func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
16265	var azFuture azure.Future
16266	if err := json.Unmarshal(body, &azFuture); err != nil {
16267		return err
16268	}
16269	future.FutureAPI = &azFuture
16270	future.Result = future.result
16271	return nil
16272}
16273
16274// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
16275func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16276	var done bool
16277	done, err = future.DoneWithContext(context.Background(), client)
16278	if err != nil {
16279		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
16280		return
16281	}
16282	if !done {
16283		s.Response.Response = future.Response()
16284		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
16285		return
16286	}
16287	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16288	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16289		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
16290		if err != nil {
16291			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
16292		}
16293	}
16294	return
16295}
16296
16297// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
16298// of a long-running operation.
16299type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
16300	azure.FutureAPI
16301	// Result returns the result of the asynchronous operation.
16302	// If the operation has not completed it will return an error.
16303	Result func(VirtualNetworkGatewaysClient) (String, error)
16304}
16305
16306// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16307func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
16308	var azFuture azure.Future
16309	if err := json.Unmarshal(body, &azFuture); err != nil {
16310		return err
16311	}
16312	future.FutureAPI = &azFuture
16313	future.Result = future.result
16314	return nil
16315}
16316
16317// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
16318func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16319	var done bool
16320	done, err = future.DoneWithContext(context.Background(), client)
16321	if err != nil {
16322		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
16323		return
16324	}
16325	if !done {
16326		s.Response.Response = future.Response()
16327		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
16328		return
16329	}
16330	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16331	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16332		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
16333		if err != nil {
16334			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
16335		}
16336	}
16337	return
16338}
16339
16340// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
16341// of a long-running operation.
16342type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
16343	azure.FutureAPI
16344	// Result returns the result of the asynchronous operation.
16345	// If the operation has not completed it will return an error.
16346	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16347}
16348
16349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16350func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
16351	var azFuture azure.Future
16352	if err := json.Unmarshal(body, &azFuture); err != nil {
16353		return err
16354	}
16355	future.FutureAPI = &azFuture
16356	future.Result = future.result
16357	return nil
16358}
16359
16360// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
16361func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16362	var done bool
16363	done, err = future.DoneWithContext(context.Background(), client)
16364	if err != nil {
16365		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
16366		return
16367	}
16368	if !done {
16369		grlr.Response.Response = future.Response()
16370		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
16371		return
16372	}
16373	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16374	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16375		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
16376		if err != nil {
16377			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16378		}
16379	}
16380	return
16381}
16382
16383// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
16384// a long-running operation.
16385type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
16386	azure.FutureAPI
16387	// Result returns the result of the asynchronous operation.
16388	// If the operation has not completed it will return an error.
16389	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
16390}
16391
16392// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16393func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
16394	var azFuture azure.Future
16395	if err := json.Unmarshal(body, &azFuture); err != nil {
16396		return err
16397	}
16398	future.FutureAPI = &azFuture
16399	future.Result = future.result
16400	return nil
16401}
16402
16403// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
16404func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
16405	var done bool
16406	done, err = future.DoneWithContext(context.Background(), client)
16407	if err != nil {
16408		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
16409		return
16410	}
16411	if !done {
16412		bpslr.Response.Response = future.Response()
16413		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
16414		return
16415	}
16416	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16417	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
16418		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
16419		if err != nil {
16420			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
16421		}
16422	}
16423	return
16424}
16425
16426// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
16427// a long-running operation.
16428type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
16429	azure.FutureAPI
16430	// Result returns the result of the asynchronous operation.
16431	// If the operation has not completed it will return an error.
16432	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
16433}
16434
16435// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16436func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
16437	var azFuture azure.Future
16438	if err := json.Unmarshal(body, &azFuture); err != nil {
16439		return err
16440	}
16441	future.FutureAPI = &azFuture
16442	future.Result = future.result
16443	return nil
16444}
16445
16446// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
16447func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
16448	var done bool
16449	done, err = future.DoneWithContext(context.Background(), client)
16450	if err != nil {
16451		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
16452		return
16453	}
16454	if !done {
16455		grlr.Response.Response = future.Response()
16456		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
16457		return
16458	}
16459	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16460	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
16461		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
16462		if err != nil {
16463			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
16464		}
16465	}
16466	return
16467}
16468
16469// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
16470// results of a long-running operation.
16471type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
16472	azure.FutureAPI
16473	// Result returns the result of the asynchronous operation.
16474	// If the operation has not completed it will return an error.
16475	Result func(VirtualNetworkGatewaysClient) (String, error)
16476}
16477
16478// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16479func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
16480	var azFuture azure.Future
16481	if err := json.Unmarshal(body, &azFuture); err != nil {
16482		return err
16483	}
16484	future.FutureAPI = &azFuture
16485	future.Result = future.result
16486	return nil
16487}
16488
16489// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
16490func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
16491	var done bool
16492	done, err = future.DoneWithContext(context.Background(), client)
16493	if err != nil {
16494		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
16495		return
16496	}
16497	if !done {
16498		s.Response.Response = future.Response()
16499		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
16500		return
16501	}
16502	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16503	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16504		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
16505		if err != nil {
16506			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
16507		}
16508	}
16509	return
16510}
16511
16512// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
16513type VirtualNetworkGatewaySku struct {
16514	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
16515	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
16516	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
16517	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
16518	// Capacity - The capacity.
16519	Capacity *int32 `json:"capacity,omitempty"`
16520}
16521
16522// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
16523// long-running operation.
16524type VirtualNetworkGatewaysResetFuture struct {
16525	azure.FutureAPI
16526	// Result returns the result of the asynchronous operation.
16527	// If the operation has not completed it will return an error.
16528	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16529}
16530
16531// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16532func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
16533	var azFuture azure.Future
16534	if err := json.Unmarshal(body, &azFuture); err != nil {
16535		return err
16536	}
16537	future.FutureAPI = &azFuture
16538	future.Result = future.result
16539	return nil
16540}
16541
16542// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
16543func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16544	var done bool
16545	done, err = future.DoneWithContext(context.Background(), client)
16546	if err != nil {
16547		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
16548		return
16549	}
16550	if !done {
16551		vng.Response.Response = future.Response()
16552		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
16553		return
16554	}
16555	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16556	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16557		vng, err = client.ResetResponder(vng.Response.Response)
16558		if err != nil {
16559			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
16560		}
16561	}
16562	return
16563}
16564
16565// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16566// long-running operation.
16567type VirtualNetworkGatewaysUpdateTagsFuture struct {
16568	azure.FutureAPI
16569	// Result returns the result of the asynchronous operation.
16570	// If the operation has not completed it will return an error.
16571	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
16572}
16573
16574// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16575func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16576	var azFuture azure.Future
16577	if err := json.Unmarshal(body, &azFuture); err != nil {
16578		return err
16579	}
16580	future.FutureAPI = &azFuture
16581	future.Result = future.result
16582	return nil
16583}
16584
16585// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
16586func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
16587	var done bool
16588	done, err = future.DoneWithContext(context.Background(), client)
16589	if err != nil {
16590		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16591		return
16592	}
16593	if !done {
16594		vng.Response.Response = future.Response()
16595		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
16596		return
16597	}
16598	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16599	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
16600		vng, err = client.UpdateTagsResponder(vng.Response.Response)
16601		if err != nil {
16602			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
16603		}
16604	}
16605	return
16606}
16607
16608// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
16609type VirtualNetworkListResult struct {
16610	autorest.Response `json:"-"`
16611	// Value - Gets a list of VirtualNetwork resources in a resource group.
16612	Value *[]VirtualNetwork `json:"value,omitempty"`
16613	// NextLink - The URL to get the next set of results.
16614	NextLink *string `json:"nextLink,omitempty"`
16615}
16616
16617// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
16618type VirtualNetworkListResultIterator struct {
16619	i    int
16620	page VirtualNetworkListResultPage
16621}
16622
16623// NextWithContext advances to the next value.  If there was an error making
16624// the request the iterator does not advance and the error is returned.
16625func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
16626	if tracing.IsEnabled() {
16627		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
16628		defer func() {
16629			sc := -1
16630			if iter.Response().Response.Response != nil {
16631				sc = iter.Response().Response.Response.StatusCode
16632			}
16633			tracing.EndSpan(ctx, sc, err)
16634		}()
16635	}
16636	iter.i++
16637	if iter.i < len(iter.page.Values()) {
16638		return nil
16639	}
16640	err = iter.page.NextWithContext(ctx)
16641	if err != nil {
16642		iter.i--
16643		return err
16644	}
16645	iter.i = 0
16646	return nil
16647}
16648
16649// Next advances to the next value.  If there was an error making
16650// the request the iterator does not advance and the error is returned.
16651// Deprecated: Use NextWithContext() instead.
16652func (iter *VirtualNetworkListResultIterator) Next() error {
16653	return iter.NextWithContext(context.Background())
16654}
16655
16656// NotDone returns true if the enumeration should be started or is not yet complete.
16657func (iter VirtualNetworkListResultIterator) NotDone() bool {
16658	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16659}
16660
16661// Response returns the raw server response from the last page request.
16662func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
16663	return iter.page.Response()
16664}
16665
16666// Value returns the current value or a zero-initialized value if the
16667// iterator has advanced beyond the end of the collection.
16668func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
16669	if !iter.page.NotDone() {
16670		return VirtualNetwork{}
16671	}
16672	return iter.page.Values()[iter.i]
16673}
16674
16675// Creates a new instance of the VirtualNetworkListResultIterator type.
16676func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
16677	return VirtualNetworkListResultIterator{page: page}
16678}
16679
16680// IsEmpty returns true if the ListResult contains no values.
16681func (vnlr VirtualNetworkListResult) IsEmpty() bool {
16682	return vnlr.Value == nil || len(*vnlr.Value) == 0
16683}
16684
16685// hasNextLink returns true if the NextLink is not empty.
16686func (vnlr VirtualNetworkListResult) hasNextLink() bool {
16687	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
16688}
16689
16690// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
16691// It returns nil if no more results exist.
16692func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
16693	if !vnlr.hasNextLink() {
16694		return nil, nil
16695	}
16696	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16697		autorest.AsJSON(),
16698		autorest.AsGet(),
16699		autorest.WithBaseURL(to.String(vnlr.NextLink)))
16700}
16701
16702// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
16703type VirtualNetworkListResultPage struct {
16704	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
16705	vnlr VirtualNetworkListResult
16706}
16707
16708// NextWithContext advances to the next page of values.  If there was an error making
16709// the request the page does not advance and the error is returned.
16710func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
16711	if tracing.IsEnabled() {
16712		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
16713		defer func() {
16714			sc := -1
16715			if page.Response().Response.Response != nil {
16716				sc = page.Response().Response.Response.StatusCode
16717			}
16718			tracing.EndSpan(ctx, sc, err)
16719		}()
16720	}
16721	for {
16722		next, err := page.fn(ctx, page.vnlr)
16723		if err != nil {
16724			return err
16725		}
16726		page.vnlr = next
16727		if !next.hasNextLink() || !next.IsEmpty() {
16728			break
16729		}
16730	}
16731	return nil
16732}
16733
16734// Next advances to the next page of values.  If there was an error making
16735// the request the page does not advance and the error is returned.
16736// Deprecated: Use NextWithContext() instead.
16737func (page *VirtualNetworkListResultPage) Next() error {
16738	return page.NextWithContext(context.Background())
16739}
16740
16741// NotDone returns true if the page enumeration should be started or is not yet complete.
16742func (page VirtualNetworkListResultPage) NotDone() bool {
16743	return !page.vnlr.IsEmpty()
16744}
16745
16746// Response returns the raw server response from the last page request.
16747func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
16748	return page.vnlr
16749}
16750
16751// Values returns the slice of values for the current page or nil if there are no values.
16752func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
16753	if page.vnlr.IsEmpty() {
16754		return nil
16755	}
16756	return *page.vnlr.Value
16757}
16758
16759// Creates a new instance of the VirtualNetworkListResultPage type.
16760func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
16761	return VirtualNetworkListResultPage{
16762		fn:   getNextPage,
16763		vnlr: cur,
16764	}
16765}
16766
16767// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
16768type VirtualNetworkListUsageResult struct {
16769	autorest.Response `json:"-"`
16770	// Value - READ-ONLY; VirtualNetwork usage stats.
16771	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
16772	// NextLink - The URL to get the next set of results.
16773	NextLink *string `json:"nextLink,omitempty"`
16774}
16775
16776// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
16777func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
16778	objectMap := make(map[string]interface{})
16779	if vnlur.NextLink != nil {
16780		objectMap["nextLink"] = vnlur.NextLink
16781	}
16782	return json.Marshal(objectMap)
16783}
16784
16785// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
16786// values.
16787type VirtualNetworkListUsageResultIterator struct {
16788	i    int
16789	page VirtualNetworkListUsageResultPage
16790}
16791
16792// NextWithContext advances to the next value.  If there was an error making
16793// the request the iterator does not advance and the error is returned.
16794func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
16795	if tracing.IsEnabled() {
16796		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
16797		defer func() {
16798			sc := -1
16799			if iter.Response().Response.Response != nil {
16800				sc = iter.Response().Response.Response.StatusCode
16801			}
16802			tracing.EndSpan(ctx, sc, err)
16803		}()
16804	}
16805	iter.i++
16806	if iter.i < len(iter.page.Values()) {
16807		return nil
16808	}
16809	err = iter.page.NextWithContext(ctx)
16810	if err != nil {
16811		iter.i--
16812		return err
16813	}
16814	iter.i = 0
16815	return nil
16816}
16817
16818// Next advances to the next value.  If there was an error making
16819// the request the iterator does not advance and the error is returned.
16820// Deprecated: Use NextWithContext() instead.
16821func (iter *VirtualNetworkListUsageResultIterator) Next() error {
16822	return iter.NextWithContext(context.Background())
16823}
16824
16825// NotDone returns true if the enumeration should be started or is not yet complete.
16826func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
16827	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16828}
16829
16830// Response returns the raw server response from the last page request.
16831func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
16832	return iter.page.Response()
16833}
16834
16835// Value returns the current value or a zero-initialized value if the
16836// iterator has advanced beyond the end of the collection.
16837func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
16838	if !iter.page.NotDone() {
16839		return VirtualNetworkUsage{}
16840	}
16841	return iter.page.Values()[iter.i]
16842}
16843
16844// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
16845func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
16846	return VirtualNetworkListUsageResultIterator{page: page}
16847}
16848
16849// IsEmpty returns true if the ListResult contains no values.
16850func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
16851	return vnlur.Value == nil || len(*vnlur.Value) == 0
16852}
16853
16854// hasNextLink returns true if the NextLink is not empty.
16855func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
16856	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
16857}
16858
16859// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
16860// It returns nil if no more results exist.
16861func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
16862	if !vnlur.hasNextLink() {
16863		return nil, nil
16864	}
16865	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16866		autorest.AsJSON(),
16867		autorest.AsGet(),
16868		autorest.WithBaseURL(to.String(vnlur.NextLink)))
16869}
16870
16871// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
16872type VirtualNetworkListUsageResultPage struct {
16873	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
16874	vnlur VirtualNetworkListUsageResult
16875}
16876
16877// NextWithContext advances to the next page of values.  If there was an error making
16878// the request the page does not advance and the error is returned.
16879func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
16880	if tracing.IsEnabled() {
16881		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
16882		defer func() {
16883			sc := -1
16884			if page.Response().Response.Response != nil {
16885				sc = page.Response().Response.Response.StatusCode
16886			}
16887			tracing.EndSpan(ctx, sc, err)
16888		}()
16889	}
16890	for {
16891		next, err := page.fn(ctx, page.vnlur)
16892		if err != nil {
16893			return err
16894		}
16895		page.vnlur = next
16896		if !next.hasNextLink() || !next.IsEmpty() {
16897			break
16898		}
16899	}
16900	return nil
16901}
16902
16903// Next advances to the next page of values.  If there was an error making
16904// the request the page does not advance and the error is returned.
16905// Deprecated: Use NextWithContext() instead.
16906func (page *VirtualNetworkListUsageResultPage) Next() error {
16907	return page.NextWithContext(context.Background())
16908}
16909
16910// NotDone returns true if the page enumeration should be started or is not yet complete.
16911func (page VirtualNetworkListUsageResultPage) NotDone() bool {
16912	return !page.vnlur.IsEmpty()
16913}
16914
16915// Response returns the raw server response from the last page request.
16916func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
16917	return page.vnlur
16918}
16919
16920// Values returns the slice of values for the current page or nil if there are no values.
16921func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
16922	if page.vnlur.IsEmpty() {
16923		return nil
16924	}
16925	return *page.vnlur.Value
16926}
16927
16928// Creates a new instance of the VirtualNetworkListUsageResultPage type.
16929func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
16930	return VirtualNetworkListUsageResultPage{
16931		fn:    getNextPage,
16932		vnlur: cur,
16933	}
16934}
16935
16936// VirtualNetworkPeering peerings in a virtual network resource.
16937type VirtualNetworkPeering struct {
16938	autorest.Response `json:"-"`
16939	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
16940	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
16941	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16942	Name *string `json:"name,omitempty"`
16943	// Etag - A unique read-only string that changes whenever the resource is updated.
16944	Etag *string `json:"etag,omitempty"`
16945	// ID - Resource ID.
16946	ID *string `json:"id,omitempty"`
16947}
16948
16949// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
16950func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
16951	objectMap := make(map[string]interface{})
16952	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
16953		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
16954	}
16955	if vnp.Name != nil {
16956		objectMap["name"] = vnp.Name
16957	}
16958	if vnp.Etag != nil {
16959		objectMap["etag"] = vnp.Etag
16960	}
16961	if vnp.ID != nil {
16962		objectMap["id"] = vnp.ID
16963	}
16964	return json.Marshal(objectMap)
16965}
16966
16967// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
16968func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
16969	var m map[string]*json.RawMessage
16970	err := json.Unmarshal(body, &m)
16971	if err != nil {
16972		return err
16973	}
16974	for k, v := range m {
16975		switch k {
16976		case "properties":
16977			if v != nil {
16978				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
16979				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
16980				if err != nil {
16981					return err
16982				}
16983				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
16984			}
16985		case "name":
16986			if v != nil {
16987				var name string
16988				err = json.Unmarshal(*v, &name)
16989				if err != nil {
16990					return err
16991				}
16992				vnp.Name = &name
16993			}
16994		case "etag":
16995			if v != nil {
16996				var etag string
16997				err = json.Unmarshal(*v, &etag)
16998				if err != nil {
16999					return err
17000				}
17001				vnp.Etag = &etag
17002			}
17003		case "id":
17004			if v != nil {
17005				var ID string
17006				err = json.Unmarshal(*v, &ID)
17007				if err != nil {
17008					return err
17009				}
17010				vnp.ID = &ID
17011			}
17012		}
17013	}
17014
17015	return nil
17016}
17017
17018// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
17019// belong to a virtual network.
17020type VirtualNetworkPeeringListResult struct {
17021	autorest.Response `json:"-"`
17022	// Value - The peerings in a virtual network.
17023	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
17024	// NextLink - The URL to get the next set of results.
17025	NextLink *string `json:"nextLink,omitempty"`
17026}
17027
17028// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
17029// values.
17030type VirtualNetworkPeeringListResultIterator struct {
17031	i    int
17032	page VirtualNetworkPeeringListResultPage
17033}
17034
17035// NextWithContext advances to the next value.  If there was an error making
17036// the request the iterator does not advance and the error is returned.
17037func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
17038	if tracing.IsEnabled() {
17039		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
17040		defer func() {
17041			sc := -1
17042			if iter.Response().Response.Response != nil {
17043				sc = iter.Response().Response.Response.StatusCode
17044			}
17045			tracing.EndSpan(ctx, sc, err)
17046		}()
17047	}
17048	iter.i++
17049	if iter.i < len(iter.page.Values()) {
17050		return nil
17051	}
17052	err = iter.page.NextWithContext(ctx)
17053	if err != nil {
17054		iter.i--
17055		return err
17056	}
17057	iter.i = 0
17058	return nil
17059}
17060
17061// Next advances to the next value.  If there was an error making
17062// the request the iterator does not advance and the error is returned.
17063// Deprecated: Use NextWithContext() instead.
17064func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
17065	return iter.NextWithContext(context.Background())
17066}
17067
17068// NotDone returns true if the enumeration should be started or is not yet complete.
17069func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
17070	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17071}
17072
17073// Response returns the raw server response from the last page request.
17074func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
17075	return iter.page.Response()
17076}
17077
17078// Value returns the current value or a zero-initialized value if the
17079// iterator has advanced beyond the end of the collection.
17080func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
17081	if !iter.page.NotDone() {
17082		return VirtualNetworkPeering{}
17083	}
17084	return iter.page.Values()[iter.i]
17085}
17086
17087// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
17088func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
17089	return VirtualNetworkPeeringListResultIterator{page: page}
17090}
17091
17092// IsEmpty returns true if the ListResult contains no values.
17093func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
17094	return vnplr.Value == nil || len(*vnplr.Value) == 0
17095}
17096
17097// hasNextLink returns true if the NextLink is not empty.
17098func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
17099	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
17100}
17101
17102// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
17103// It returns nil if no more results exist.
17104func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
17105	if !vnplr.hasNextLink() {
17106		return nil, nil
17107	}
17108	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17109		autorest.AsJSON(),
17110		autorest.AsGet(),
17111		autorest.WithBaseURL(to.String(vnplr.NextLink)))
17112}
17113
17114// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
17115type VirtualNetworkPeeringListResultPage struct {
17116	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
17117	vnplr VirtualNetworkPeeringListResult
17118}
17119
17120// NextWithContext advances to the next page of values.  If there was an error making
17121// the request the page does not advance and the error is returned.
17122func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
17123	if tracing.IsEnabled() {
17124		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
17125		defer func() {
17126			sc := -1
17127			if page.Response().Response.Response != nil {
17128				sc = page.Response().Response.Response.StatusCode
17129			}
17130			tracing.EndSpan(ctx, sc, err)
17131		}()
17132	}
17133	for {
17134		next, err := page.fn(ctx, page.vnplr)
17135		if err != nil {
17136			return err
17137		}
17138		page.vnplr = next
17139		if !next.hasNextLink() || !next.IsEmpty() {
17140			break
17141		}
17142	}
17143	return nil
17144}
17145
17146// Next advances to the next page of values.  If there was an error making
17147// the request the page does not advance and the error is returned.
17148// Deprecated: Use NextWithContext() instead.
17149func (page *VirtualNetworkPeeringListResultPage) Next() error {
17150	return page.NextWithContext(context.Background())
17151}
17152
17153// NotDone returns true if the page enumeration should be started or is not yet complete.
17154func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
17155	return !page.vnplr.IsEmpty()
17156}
17157
17158// Response returns the raw server response from the last page request.
17159func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
17160	return page.vnplr
17161}
17162
17163// Values returns the slice of values for the current page or nil if there are no values.
17164func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
17165	if page.vnplr.IsEmpty() {
17166		return nil
17167	}
17168	return *page.vnplr.Value
17169}
17170
17171// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
17172func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
17173	return VirtualNetworkPeeringListResultPage{
17174		fn:    getNextPage,
17175		vnplr: cur,
17176	}
17177}
17178
17179// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
17180type VirtualNetworkPeeringPropertiesFormat struct {
17181	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
17182	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
17183	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
17184	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
17185	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
17186	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
17187	// 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.
17188	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
17189	// RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
17190	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
17191	// RemoteAddressSpace - The reference of the remote virtual network address space.
17192	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
17193	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
17194	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
17195	// ProvisioningState - The provisioning state of the resource.
17196	ProvisioningState *string `json:"provisioningState,omitempty"`
17197}
17198
17199// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17200// long-running operation.
17201type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
17202	azure.FutureAPI
17203	// Result returns the result of the asynchronous operation.
17204	// If the operation has not completed it will return an error.
17205	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
17206}
17207
17208// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17209func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17210	var azFuture azure.Future
17211	if err := json.Unmarshal(body, &azFuture); err != nil {
17212		return err
17213	}
17214	future.FutureAPI = &azFuture
17215	future.Result = future.result
17216	return nil
17217}
17218
17219// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
17220func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
17221	var done bool
17222	done, err = future.DoneWithContext(context.Background(), client)
17223	if err != nil {
17224		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17225		return
17226	}
17227	if !done {
17228		vnp.Response.Response = future.Response()
17229		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
17230		return
17231	}
17232	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17233	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
17234		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
17235		if err != nil {
17236			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
17237		}
17238	}
17239	return
17240}
17241
17242// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
17243// long-running operation.
17244type VirtualNetworkPeeringsDeleteFuture struct {
17245	azure.FutureAPI
17246	// Result returns the result of the asynchronous operation.
17247	// If the operation has not completed it will return an error.
17248	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
17249}
17250
17251// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17252func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
17253	var azFuture azure.Future
17254	if err := json.Unmarshal(body, &azFuture); err != nil {
17255		return err
17256	}
17257	future.FutureAPI = &azFuture
17258	future.Result = future.result
17259	return nil
17260}
17261
17262// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
17263func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
17264	var done bool
17265	done, err = future.DoneWithContext(context.Background(), client)
17266	if err != nil {
17267		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
17268		return
17269	}
17270	if !done {
17271		ar.Response = future.Response()
17272		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
17273		return
17274	}
17275	ar.Response = future.Response()
17276	return
17277}
17278
17279// VirtualNetworkPropertiesFormat properties of the virtual network.
17280type VirtualNetworkPropertiesFormat struct {
17281	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
17282	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
17283	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
17284	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
17285	// Subnets - A list of subnets in a Virtual Network.
17286	Subnets *[]Subnet `json:"subnets,omitempty"`
17287	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
17288	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
17289	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
17290	ResourceGUID *string `json:"resourceGuid,omitempty"`
17291	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17292	ProvisioningState *string `json:"provisioningState,omitempty"`
17293	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network.
17294	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
17295	// EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network.
17296	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
17297}
17298
17299// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17300// long-running operation.
17301type VirtualNetworksCreateOrUpdateFuture struct {
17302	azure.FutureAPI
17303	// Result returns the result of the asynchronous operation.
17304	// If the operation has not completed it will return an error.
17305	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17306}
17307
17308// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17309func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17310	var azFuture azure.Future
17311	if err := json.Unmarshal(body, &azFuture); err != nil {
17312		return err
17313	}
17314	future.FutureAPI = &azFuture
17315	future.Result = future.result
17316	return nil
17317}
17318
17319// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
17320func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17321	var done bool
17322	done, err = future.DoneWithContext(context.Background(), client)
17323	if err != nil {
17324		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17325		return
17326	}
17327	if !done {
17328		vn.Response.Response = future.Response()
17329		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
17330		return
17331	}
17332	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17333	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17334		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
17335		if err != nil {
17336			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
17337		}
17338	}
17339	return
17340}
17341
17342// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17343// operation.
17344type VirtualNetworksDeleteFuture struct {
17345	azure.FutureAPI
17346	// Result returns the result of the asynchronous operation.
17347	// If the operation has not completed it will return an error.
17348	Result func(VirtualNetworksClient) (autorest.Response, error)
17349}
17350
17351// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17352func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
17353	var azFuture azure.Future
17354	if err := json.Unmarshal(body, &azFuture); err != nil {
17355		return err
17356	}
17357	future.FutureAPI = &azFuture
17358	future.Result = future.result
17359	return nil
17360}
17361
17362// result is the default implementation for VirtualNetworksDeleteFuture.Result.
17363func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
17364	var done bool
17365	done, err = future.DoneWithContext(context.Background(), client)
17366	if err != nil {
17367		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
17368		return
17369	}
17370	if !done {
17371		ar.Response = future.Response()
17372		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
17373		return
17374	}
17375	ar.Response = future.Response()
17376	return
17377}
17378
17379// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17380// long-running operation.
17381type VirtualNetworksUpdateTagsFuture struct {
17382	azure.FutureAPI
17383	// Result returns the result of the asynchronous operation.
17384	// If the operation has not completed it will return an error.
17385	Result func(VirtualNetworksClient) (VirtualNetwork, error)
17386}
17387
17388// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17389func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17390	var azFuture azure.Future
17391	if err := json.Unmarshal(body, &azFuture); err != nil {
17392		return err
17393	}
17394	future.FutureAPI = &azFuture
17395	future.Result = future.result
17396	return nil
17397}
17398
17399// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
17400func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
17401	var done bool
17402	done, err = future.DoneWithContext(context.Background(), client)
17403	if err != nil {
17404		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17405		return
17406	}
17407	if !done {
17408		vn.Response.Response = future.Response()
17409		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
17410		return
17411	}
17412	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17413	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
17414		vn, err = client.UpdateTagsResponder(vn.Response.Response)
17415		if err != nil {
17416			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
17417		}
17418	}
17419	return
17420}
17421
17422// VirtualNetworkUsage usage details for subnet.
17423type VirtualNetworkUsage struct {
17424	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
17425	CurrentValue *float64 `json:"currentValue,omitempty"`
17426	// ID - READ-ONLY; Subnet identifier.
17427	ID *string `json:"id,omitempty"`
17428	// Limit - READ-ONLY; Indicates the size of the subnet.
17429	Limit *float64 `json:"limit,omitempty"`
17430	// Name - READ-ONLY; The name containing common and localized value for usage.
17431	Name *VirtualNetworkUsageName `json:"name,omitempty"`
17432	// Unit - READ-ONLY; Usage units. Returns 'Count'
17433	Unit *string `json:"unit,omitempty"`
17434}
17435
17436// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
17437func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
17438	objectMap := make(map[string]interface{})
17439	return json.Marshal(objectMap)
17440}
17441
17442// VirtualNetworkUsageName usage strings container.
17443type VirtualNetworkUsageName struct {
17444	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
17445	LocalizedValue *string `json:"localizedValue,omitempty"`
17446	// Value - READ-ONLY; Subnet size and usage string.
17447	Value *string `json:"value,omitempty"`
17448}
17449
17450// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
17451func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
17452	objectMap := make(map[string]interface{})
17453	return json.Marshal(objectMap)
17454}
17455
17456// VpnClientConfiguration vpnClientConfiguration for P2S client.
17457type VpnClientConfiguration struct {
17458	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
17459	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
17460	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
17461	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
17462	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
17463	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
17464	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
17465	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
17466	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
17467	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
17468	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
17469	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
17470}
17471
17472// VpnClientParameters vpn Client Parameters for package generation
17473type VpnClientParameters struct {
17474	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
17475	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
17476	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
17477	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
17478	// 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.
17479	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
17480	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
17481	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
17482}
17483
17484// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
17485type VpnClientRevokedCertificate struct {
17486	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
17487	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
17488	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17489	Name *string `json:"name,omitempty"`
17490	// Etag - A unique read-only string that changes whenever the resource is updated.
17491	Etag *string `json:"etag,omitempty"`
17492	// ID - Resource ID.
17493	ID *string `json:"id,omitempty"`
17494}
17495
17496// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
17497func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
17498	objectMap := make(map[string]interface{})
17499	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
17500		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
17501	}
17502	if vcrc.Name != nil {
17503		objectMap["name"] = vcrc.Name
17504	}
17505	if vcrc.Etag != nil {
17506		objectMap["etag"] = vcrc.Etag
17507	}
17508	if vcrc.ID != nil {
17509		objectMap["id"] = vcrc.ID
17510	}
17511	return json.Marshal(objectMap)
17512}
17513
17514// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
17515func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
17516	var m map[string]*json.RawMessage
17517	err := json.Unmarshal(body, &m)
17518	if err != nil {
17519		return err
17520	}
17521	for k, v := range m {
17522		switch k {
17523		case "properties":
17524			if v != nil {
17525				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
17526				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
17527				if err != nil {
17528					return err
17529				}
17530				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
17531			}
17532		case "name":
17533			if v != nil {
17534				var name string
17535				err = json.Unmarshal(*v, &name)
17536				if err != nil {
17537					return err
17538				}
17539				vcrc.Name = &name
17540			}
17541		case "etag":
17542			if v != nil {
17543				var etag string
17544				err = json.Unmarshal(*v, &etag)
17545				if err != nil {
17546					return err
17547				}
17548				vcrc.Etag = &etag
17549			}
17550		case "id":
17551			if v != nil {
17552				var ID string
17553				err = json.Unmarshal(*v, &ID)
17554				if err != nil {
17555					return err
17556				}
17557				vcrc.ID = &ID
17558			}
17559		}
17560	}
17561
17562	return nil
17563}
17564
17565// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
17566// network gateway.
17567type VpnClientRevokedCertificatePropertiesFormat struct {
17568	// Thumbprint - The revoked VPN client certificate thumbprint.
17569	Thumbprint *string `json:"thumbprint,omitempty"`
17570	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17571	ProvisioningState *string `json:"provisioningState,omitempty"`
17572}
17573
17574// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
17575func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17576	objectMap := make(map[string]interface{})
17577	if vcrcpf.Thumbprint != nil {
17578		objectMap["thumbprint"] = vcrcpf.Thumbprint
17579	}
17580	return json.Marshal(objectMap)
17581}
17582
17583// VpnClientRootCertificate VPN client root certificate of virtual network gateway
17584type VpnClientRootCertificate struct {
17585	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
17586	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
17587	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17588	Name *string `json:"name,omitempty"`
17589	// Etag - A unique read-only string that changes whenever the resource is updated.
17590	Etag *string `json:"etag,omitempty"`
17591	// ID - Resource ID.
17592	ID *string `json:"id,omitempty"`
17593}
17594
17595// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
17596func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
17597	objectMap := make(map[string]interface{})
17598	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
17599		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
17600	}
17601	if vcrc.Name != nil {
17602		objectMap["name"] = vcrc.Name
17603	}
17604	if vcrc.Etag != nil {
17605		objectMap["etag"] = vcrc.Etag
17606	}
17607	if vcrc.ID != nil {
17608		objectMap["id"] = vcrc.ID
17609	}
17610	return json.Marshal(objectMap)
17611}
17612
17613// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
17614func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
17615	var m map[string]*json.RawMessage
17616	err := json.Unmarshal(body, &m)
17617	if err != nil {
17618		return err
17619	}
17620	for k, v := range m {
17621		switch k {
17622		case "properties":
17623			if v != nil {
17624				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
17625				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
17626				if err != nil {
17627					return err
17628				}
17629				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
17630			}
17631		case "name":
17632			if v != nil {
17633				var name string
17634				err = json.Unmarshal(*v, &name)
17635				if err != nil {
17636					return err
17637				}
17638				vcrc.Name = &name
17639			}
17640		case "etag":
17641			if v != nil {
17642				var etag string
17643				err = json.Unmarshal(*v, &etag)
17644				if err != nil {
17645					return err
17646				}
17647				vcrc.Etag = &etag
17648			}
17649		case "id":
17650			if v != nil {
17651				var ID string
17652				err = json.Unmarshal(*v, &ID)
17653				if err != nil {
17654					return err
17655				}
17656				vcrc.ID = &ID
17657			}
17658		}
17659	}
17660
17661	return nil
17662}
17663
17664// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
17665type VpnClientRootCertificatePropertiesFormat struct {
17666	// PublicCertData - The certificate public data.
17667	PublicCertData *string `json:"publicCertData,omitempty"`
17668	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17669	ProvisioningState *string `json:"provisioningState,omitempty"`
17670}
17671
17672// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
17673func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17674	objectMap := make(map[string]interface{})
17675	if vcrcpf.PublicCertData != nil {
17676		objectMap["publicCertData"] = vcrcpf.PublicCertData
17677	}
17678	return json.Marshal(objectMap)
17679}
17680
17681// VpnDeviceScriptParameters vpn device configuration script generation parameters
17682type VpnDeviceScriptParameters struct {
17683	// Vendor - The vendor for the vpn device.
17684	Vendor *string `json:"vendor,omitempty"`
17685	// DeviceFamily - The device family for the vpn device.
17686	DeviceFamily *string `json:"deviceFamily,omitempty"`
17687	// FirmwareVersion - The firmware version for the vpn device.
17688	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
17689}
17690
17691// Watcher network watcher in a resource group.
17692type Watcher struct {
17693	autorest.Response `json:"-"`
17694	// Etag - A unique read-only string that changes whenever the resource is updated.
17695	Etag                     *string `json:"etag,omitempty"`
17696	*WatcherPropertiesFormat `json:"properties,omitempty"`
17697	// ID - Resource ID.
17698	ID *string `json:"id,omitempty"`
17699	// Name - READ-ONLY; Resource name.
17700	Name *string `json:"name,omitempty"`
17701	// Type - READ-ONLY; Resource type.
17702	Type *string `json:"type,omitempty"`
17703	// Location - Resource location.
17704	Location *string `json:"location,omitempty"`
17705	// Tags - Resource tags.
17706	Tags map[string]*string `json:"tags"`
17707}
17708
17709// MarshalJSON is the custom marshaler for Watcher.
17710func (w Watcher) MarshalJSON() ([]byte, error) {
17711	objectMap := make(map[string]interface{})
17712	if w.Etag != nil {
17713		objectMap["etag"] = w.Etag
17714	}
17715	if w.WatcherPropertiesFormat != nil {
17716		objectMap["properties"] = w.WatcherPropertiesFormat
17717	}
17718	if w.ID != nil {
17719		objectMap["id"] = w.ID
17720	}
17721	if w.Location != nil {
17722		objectMap["location"] = w.Location
17723	}
17724	if w.Tags != nil {
17725		objectMap["tags"] = w.Tags
17726	}
17727	return json.Marshal(objectMap)
17728}
17729
17730// UnmarshalJSON is the custom unmarshaler for Watcher struct.
17731func (w *Watcher) UnmarshalJSON(body []byte) error {
17732	var m map[string]*json.RawMessage
17733	err := json.Unmarshal(body, &m)
17734	if err != nil {
17735		return err
17736	}
17737	for k, v := range m {
17738		switch k {
17739		case "etag":
17740			if v != nil {
17741				var etag string
17742				err = json.Unmarshal(*v, &etag)
17743				if err != nil {
17744					return err
17745				}
17746				w.Etag = &etag
17747			}
17748		case "properties":
17749			if v != nil {
17750				var watcherPropertiesFormat WatcherPropertiesFormat
17751				err = json.Unmarshal(*v, &watcherPropertiesFormat)
17752				if err != nil {
17753					return err
17754				}
17755				w.WatcherPropertiesFormat = &watcherPropertiesFormat
17756			}
17757		case "id":
17758			if v != nil {
17759				var ID string
17760				err = json.Unmarshal(*v, &ID)
17761				if err != nil {
17762					return err
17763				}
17764				w.ID = &ID
17765			}
17766		case "name":
17767			if v != nil {
17768				var name string
17769				err = json.Unmarshal(*v, &name)
17770				if err != nil {
17771					return err
17772				}
17773				w.Name = &name
17774			}
17775		case "type":
17776			if v != nil {
17777				var typeVar string
17778				err = json.Unmarshal(*v, &typeVar)
17779				if err != nil {
17780					return err
17781				}
17782				w.Type = &typeVar
17783			}
17784		case "location":
17785			if v != nil {
17786				var location string
17787				err = json.Unmarshal(*v, &location)
17788				if err != nil {
17789					return err
17790				}
17791				w.Location = &location
17792			}
17793		case "tags":
17794			if v != nil {
17795				var tags map[string]*string
17796				err = json.Unmarshal(*v, &tags)
17797				if err != nil {
17798					return err
17799				}
17800				w.Tags = tags
17801			}
17802		}
17803	}
17804
17805	return nil
17806}
17807
17808// WatcherListResult list of network watcher resources.
17809type WatcherListResult struct {
17810	autorest.Response `json:"-"`
17811	Value             *[]Watcher `json:"value,omitempty"`
17812}
17813
17814// WatcherPropertiesFormat the network watcher properties.
17815type WatcherPropertiesFormat struct {
17816	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17817	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17818}
17819
17820// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
17821func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
17822	objectMap := make(map[string]interface{})
17823	return json.Marshal(objectMap)
17824}
17825
17826// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
17827// long-running operation.
17828type WatchersCheckConnectivityFuture struct {
17829	azure.FutureAPI
17830	// Result returns the result of the asynchronous operation.
17831	// If the operation has not completed it will return an error.
17832	Result func(WatchersClient) (ConnectivityInformation, error)
17833}
17834
17835// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17836func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
17837	var azFuture azure.Future
17838	if err := json.Unmarshal(body, &azFuture); err != nil {
17839		return err
17840	}
17841	future.FutureAPI = &azFuture
17842	future.Result = future.result
17843	return nil
17844}
17845
17846// result is the default implementation for WatchersCheckConnectivityFuture.Result.
17847func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
17848	var done bool
17849	done, err = future.DoneWithContext(context.Background(), client)
17850	if err != nil {
17851		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
17852		return
17853	}
17854	if !done {
17855		ci.Response.Response = future.Response()
17856		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
17857		return
17858	}
17859	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17860	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
17861		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
17862		if err != nil {
17863			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
17864		}
17865	}
17866	return
17867}
17868
17869// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17870// operation.
17871type WatchersDeleteFuture struct {
17872	azure.FutureAPI
17873	// Result returns the result of the asynchronous operation.
17874	// If the operation has not completed it will return an error.
17875	Result func(WatchersClient) (autorest.Response, error)
17876}
17877
17878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17879func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
17880	var azFuture azure.Future
17881	if err := json.Unmarshal(body, &azFuture); err != nil {
17882		return err
17883	}
17884	future.FutureAPI = &azFuture
17885	future.Result = future.result
17886	return nil
17887}
17888
17889// result is the default implementation for WatchersDeleteFuture.Result.
17890func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
17891	var done bool
17892	done, err = future.DoneWithContext(context.Background(), client)
17893	if err != nil {
17894		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
17895		return
17896	}
17897	if !done {
17898		ar.Response = future.Response()
17899		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
17900		return
17901	}
17902	ar.Response = future.Response()
17903	return
17904}
17905
17906// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
17907// long-running operation.
17908type WatchersGetAzureReachabilityReportFuture struct {
17909	azure.FutureAPI
17910	// Result returns the result of the asynchronous operation.
17911	// If the operation has not completed it will return an error.
17912	Result func(WatchersClient) (AzureReachabilityReport, error)
17913}
17914
17915// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17916func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
17917	var azFuture azure.Future
17918	if err := json.Unmarshal(body, &azFuture); err != nil {
17919		return err
17920	}
17921	future.FutureAPI = &azFuture
17922	future.Result = future.result
17923	return nil
17924}
17925
17926// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
17927func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
17928	var done bool
17929	done, err = future.DoneWithContext(context.Background(), client)
17930	if err != nil {
17931		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
17932		return
17933	}
17934	if !done {
17935		arr.Response.Response = future.Response()
17936		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
17937		return
17938	}
17939	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17940	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
17941		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
17942		if err != nil {
17943			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
17944		}
17945	}
17946	return
17947}
17948
17949// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
17950// long-running operation.
17951type WatchersGetFlowLogStatusFuture struct {
17952	azure.FutureAPI
17953	// Result returns the result of the asynchronous operation.
17954	// If the operation has not completed it will return an error.
17955	Result func(WatchersClient) (FlowLogInformation, error)
17956}
17957
17958// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17959func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
17960	var azFuture azure.Future
17961	if err := json.Unmarshal(body, &azFuture); err != nil {
17962		return err
17963	}
17964	future.FutureAPI = &azFuture
17965	future.Result = future.result
17966	return nil
17967}
17968
17969// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
17970func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
17971	var done bool
17972	done, err = future.DoneWithContext(context.Background(), client)
17973	if err != nil {
17974		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
17975		return
17976	}
17977	if !done {
17978		fli.Response.Response = future.Response()
17979		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
17980		return
17981	}
17982	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17983	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
17984		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
17985		if err != nil {
17986			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
17987		}
17988	}
17989	return
17990}
17991
17992// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
17993// operation.
17994type WatchersGetNextHopFuture struct {
17995	azure.FutureAPI
17996	// Result returns the result of the asynchronous operation.
17997	// If the operation has not completed it will return an error.
17998	Result func(WatchersClient) (NextHopResult, error)
17999}
18000
18001// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18002func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
18003	var azFuture azure.Future
18004	if err := json.Unmarshal(body, &azFuture); err != nil {
18005		return err
18006	}
18007	future.FutureAPI = &azFuture
18008	future.Result = future.result
18009	return nil
18010}
18011
18012// result is the default implementation for WatchersGetNextHopFuture.Result.
18013func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
18014	var done bool
18015	done, err = future.DoneWithContext(context.Background(), client)
18016	if err != nil {
18017		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
18018		return
18019	}
18020	if !done {
18021		nhr.Response.Response = future.Response()
18022		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
18023		return
18024	}
18025	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18026	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
18027		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
18028		if err != nil {
18029			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
18030		}
18031	}
18032	return
18033}
18034
18035// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
18036// long-running operation.
18037type WatchersGetTroubleshootingFuture struct {
18038	azure.FutureAPI
18039	// Result returns the result of the asynchronous operation.
18040	// If the operation has not completed it will return an error.
18041	Result func(WatchersClient) (TroubleshootingResult, error)
18042}
18043
18044// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18045func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
18046	var azFuture azure.Future
18047	if err := json.Unmarshal(body, &azFuture); err != nil {
18048		return err
18049	}
18050	future.FutureAPI = &azFuture
18051	future.Result = future.result
18052	return nil
18053}
18054
18055// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
18056func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18057	var done bool
18058	done, err = future.DoneWithContext(context.Background(), client)
18059	if err != nil {
18060		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
18061		return
18062	}
18063	if !done {
18064		tr.Response.Response = future.Response()
18065		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
18066		return
18067	}
18068	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18069	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18070		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
18071		if err != nil {
18072			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
18073		}
18074	}
18075	return
18076}
18077
18078// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
18079// long-running operation.
18080type WatchersGetTroubleshootingResultFuture struct {
18081	azure.FutureAPI
18082	// Result returns the result of the asynchronous operation.
18083	// If the operation has not completed it will return an error.
18084	Result func(WatchersClient) (TroubleshootingResult, error)
18085}
18086
18087// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18088func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
18089	var azFuture azure.Future
18090	if err := json.Unmarshal(body, &azFuture); err != nil {
18091		return err
18092	}
18093	future.FutureAPI = &azFuture
18094	future.Result = future.result
18095	return nil
18096}
18097
18098// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
18099func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
18100	var done bool
18101	done, err = future.DoneWithContext(context.Background(), client)
18102	if err != nil {
18103		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
18104		return
18105	}
18106	if !done {
18107		tr.Response.Response = future.Response()
18108		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
18109		return
18110	}
18111	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18112	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
18113		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
18114		if err != nil {
18115			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
18116		}
18117	}
18118	return
18119}
18120
18121// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
18122// long-running operation.
18123type WatchersGetVMSecurityRulesFuture struct {
18124	azure.FutureAPI
18125	// Result returns the result of the asynchronous operation.
18126	// If the operation has not completed it will return an error.
18127	Result func(WatchersClient) (SecurityGroupViewResult, error)
18128}
18129
18130// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18131func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
18132	var azFuture azure.Future
18133	if err := json.Unmarshal(body, &azFuture); err != nil {
18134		return err
18135	}
18136	future.FutureAPI = &azFuture
18137	future.Result = future.result
18138	return nil
18139}
18140
18141// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
18142func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
18143	var done bool
18144	done, err = future.DoneWithContext(context.Background(), client)
18145	if err != nil {
18146		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
18147		return
18148	}
18149	if !done {
18150		sgvr.Response.Response = future.Response()
18151		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
18152		return
18153	}
18154	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18155	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
18156		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
18157		if err != nil {
18158			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
18159		}
18160	}
18161	return
18162}
18163
18164// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
18165// long-running operation.
18166type WatchersListAvailableProvidersFuture struct {
18167	azure.FutureAPI
18168	// Result returns the result of the asynchronous operation.
18169	// If the operation has not completed it will return an error.
18170	Result func(WatchersClient) (AvailableProvidersList, error)
18171}
18172
18173// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18174func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
18175	var azFuture azure.Future
18176	if err := json.Unmarshal(body, &azFuture); err != nil {
18177		return err
18178	}
18179	future.FutureAPI = &azFuture
18180	future.Result = future.result
18181	return nil
18182}
18183
18184// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
18185func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
18186	var done bool
18187	done, err = future.DoneWithContext(context.Background(), client)
18188	if err != nil {
18189		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
18190		return
18191	}
18192	if !done {
18193		apl.Response.Response = future.Response()
18194		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
18195		return
18196	}
18197	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18198	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
18199		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
18200		if err != nil {
18201			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
18202		}
18203	}
18204	return
18205}
18206
18207// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
18208// long-running operation.
18209type WatchersSetFlowLogConfigurationFuture struct {
18210	azure.FutureAPI
18211	// Result returns the result of the asynchronous operation.
18212	// If the operation has not completed it will return an error.
18213	Result func(WatchersClient) (FlowLogInformation, error)
18214}
18215
18216// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18217func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
18218	var azFuture azure.Future
18219	if err := json.Unmarshal(body, &azFuture); err != nil {
18220		return err
18221	}
18222	future.FutureAPI = &azFuture
18223	future.Result = future.result
18224	return nil
18225}
18226
18227// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
18228func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
18229	var done bool
18230	done, err = future.DoneWithContext(context.Background(), client)
18231	if err != nil {
18232		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
18233		return
18234	}
18235	if !done {
18236		fli.Response.Response = future.Response()
18237		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
18238		return
18239	}
18240	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18241	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
18242		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
18243		if err != nil {
18244			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
18245		}
18246	}
18247	return
18248}
18249
18250// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
18251// operation.
18252type WatchersVerifyIPFlowFuture struct {
18253	azure.FutureAPI
18254	// Result returns the result of the asynchronous operation.
18255	// If the operation has not completed it will return an error.
18256	Result func(WatchersClient) (VerificationIPFlowResult, error)
18257}
18258
18259// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18260func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
18261	var azFuture azure.Future
18262	if err := json.Unmarshal(body, &azFuture); err != nil {
18263		return err
18264	}
18265	future.FutureAPI = &azFuture
18266	future.Result = future.result
18267	return nil
18268}
18269
18270// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
18271func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
18272	var done bool
18273	done, err = future.DoneWithContext(context.Background(), client)
18274	if err != nil {
18275		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
18276		return
18277	}
18278	if !done {
18279		vifr.Response.Response = future.Response()
18280		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
18281		return
18282	}
18283	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18284	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
18285		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
18286		if err != nil {
18287			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
18288		}
18289	}
18290	return
18291}
18292