1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-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	// Zones - A list of availability zones denoting where the resource needs to come from.
37	Zones *[]string `json:"zones,omitempty"`
38	// Identity - The identity of the application gateway, if configured.
39	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
40	// ID - Resource ID.
41	ID *string `json:"id,omitempty"`
42	// Name - READ-ONLY; Resource name.
43	Name *string `json:"name,omitempty"`
44	// Type - READ-ONLY; Resource type.
45	Type *string `json:"type,omitempty"`
46	// Location - Resource location.
47	Location *string `json:"location,omitempty"`
48	// Tags - Resource tags.
49	Tags map[string]*string `json:"tags"`
50}
51
52// MarshalJSON is the custom marshaler for ApplicationGateway.
53func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
54	objectMap := make(map[string]interface{})
55	if ag.ApplicationGatewayPropertiesFormat != nil {
56		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
57	}
58	if ag.Etag != nil {
59		objectMap["etag"] = ag.Etag
60	}
61	if ag.Zones != nil {
62		objectMap["zones"] = ag.Zones
63	}
64	if ag.Identity != nil {
65		objectMap["identity"] = ag.Identity
66	}
67	if ag.ID != nil {
68		objectMap["id"] = ag.ID
69	}
70	if ag.Location != nil {
71		objectMap["location"] = ag.Location
72	}
73	if ag.Tags != nil {
74		objectMap["tags"] = ag.Tags
75	}
76	return json.Marshal(objectMap)
77}
78
79// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
80func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
81	var m map[string]*json.RawMessage
82	err := json.Unmarshal(body, &m)
83	if err != nil {
84		return err
85	}
86	for k, v := range m {
87		switch k {
88		case "properties":
89			if v != nil {
90				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
91				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
92				if err != nil {
93					return err
94				}
95				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
96			}
97		case "etag":
98			if v != nil {
99				var etag string
100				err = json.Unmarshal(*v, &etag)
101				if err != nil {
102					return err
103				}
104				ag.Etag = &etag
105			}
106		case "zones":
107			if v != nil {
108				var zones []string
109				err = json.Unmarshal(*v, &zones)
110				if err != nil {
111					return err
112				}
113				ag.Zones = &zones
114			}
115		case "identity":
116			if v != nil {
117				var identity ManagedServiceIdentity
118				err = json.Unmarshal(*v, &identity)
119				if err != nil {
120					return err
121				}
122				ag.Identity = &identity
123			}
124		case "id":
125			if v != nil {
126				var ID string
127				err = json.Unmarshal(*v, &ID)
128				if err != nil {
129					return err
130				}
131				ag.ID = &ID
132			}
133		case "name":
134			if v != nil {
135				var name string
136				err = json.Unmarshal(*v, &name)
137				if err != nil {
138					return err
139				}
140				ag.Name = &name
141			}
142		case "type":
143			if v != nil {
144				var typeVar string
145				err = json.Unmarshal(*v, &typeVar)
146				if err != nil {
147					return err
148				}
149				ag.Type = &typeVar
150			}
151		case "location":
152			if v != nil {
153				var location string
154				err = json.Unmarshal(*v, &location)
155				if err != nil {
156					return err
157				}
158				ag.Location = &location
159			}
160		case "tags":
161			if v != nil {
162				var tags map[string]*string
163				err = json.Unmarshal(*v, &tags)
164				if err != nil {
165					return err
166				}
167				ag.Tags = tags
168			}
169		}
170	}
171
172	return nil
173}
174
175// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
176type ApplicationGatewayAuthenticationCertificate struct {
177	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
178	// Name - Name of the authentication certificate that is unique within an Application Gateway.
179	Name *string `json:"name,omitempty"`
180	// Etag - A unique read-only string that changes whenever the resource is updated.
181	Etag *string `json:"etag,omitempty"`
182	// Type - Type of the resource.
183	Type *string `json:"type,omitempty"`
184	// ID - Resource ID.
185	ID *string `json:"id,omitempty"`
186}
187
188// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
189func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
190	objectMap := make(map[string]interface{})
191	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
192		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
193	}
194	if agac.Name != nil {
195		objectMap["name"] = agac.Name
196	}
197	if agac.Etag != nil {
198		objectMap["etag"] = agac.Etag
199	}
200	if agac.Type != nil {
201		objectMap["type"] = agac.Type
202	}
203	if agac.ID != nil {
204		objectMap["id"] = agac.ID
205	}
206	return json.Marshal(objectMap)
207}
208
209// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
210func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
211	var m map[string]*json.RawMessage
212	err := json.Unmarshal(body, &m)
213	if err != nil {
214		return err
215	}
216	for k, v := range m {
217		switch k {
218		case "properties":
219			if v != nil {
220				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
221				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
222				if err != nil {
223					return err
224				}
225				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
226			}
227		case "name":
228			if v != nil {
229				var name string
230				err = json.Unmarshal(*v, &name)
231				if err != nil {
232					return err
233				}
234				agac.Name = &name
235			}
236		case "etag":
237			if v != nil {
238				var etag string
239				err = json.Unmarshal(*v, &etag)
240				if err != nil {
241					return err
242				}
243				agac.Etag = &etag
244			}
245		case "type":
246			if v != nil {
247				var typeVar string
248				err = json.Unmarshal(*v, &typeVar)
249				if err != nil {
250					return err
251				}
252				agac.Type = &typeVar
253			}
254		case "id":
255			if v != nil {
256				var ID string
257				err = json.Unmarshal(*v, &ID)
258				if err != nil {
259					return err
260				}
261				agac.ID = &ID
262			}
263		}
264	}
265
266	return nil
267}
268
269// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
270// application gateway.
271type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
272	// Data - Certificate public data.
273	Data *string `json:"data,omitempty"`
274	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
275	ProvisioningState *string `json:"provisioningState,omitempty"`
276}
277
278// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
279type ApplicationGatewayAutoscaleConfiguration struct {
280	// MinCapacity - Lower bound on number of Application Gateway instances
281	MinCapacity *int32 `json:"minCapacity,omitempty"`
282}
283
284// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
285// call.
286type ApplicationGatewayAvailableSslOptions struct {
287	autorest.Response                                      `json:"-"`
288	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
289	// ID - Resource ID.
290	ID *string `json:"id,omitempty"`
291	// Name - READ-ONLY; Resource name.
292	Name *string `json:"name,omitempty"`
293	// Type - READ-ONLY; Resource type.
294	Type *string `json:"type,omitempty"`
295	// Location - Resource location.
296	Location *string `json:"location,omitempty"`
297	// Tags - Resource tags.
298	Tags map[string]*string `json:"tags"`
299}
300
301// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
302func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
303	objectMap := make(map[string]interface{})
304	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
305		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
306	}
307	if agaso.ID != nil {
308		objectMap["id"] = agaso.ID
309	}
310	if agaso.Location != nil {
311		objectMap["location"] = agaso.Location
312	}
313	if agaso.Tags != nil {
314		objectMap["tags"] = agaso.Tags
315	}
316	return json.Marshal(objectMap)
317}
318
319// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
320func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
321	var m map[string]*json.RawMessage
322	err := json.Unmarshal(body, &m)
323	if err != nil {
324		return err
325	}
326	for k, v := range m {
327		switch k {
328		case "properties":
329			if v != nil {
330				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
331				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
332				if err != nil {
333					return err
334				}
335				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
336			}
337		case "id":
338			if v != nil {
339				var ID string
340				err = json.Unmarshal(*v, &ID)
341				if err != nil {
342					return err
343				}
344				agaso.ID = &ID
345			}
346		case "name":
347			if v != nil {
348				var name string
349				err = json.Unmarshal(*v, &name)
350				if err != nil {
351					return err
352				}
353				agaso.Name = &name
354			}
355		case "type":
356			if v != nil {
357				var typeVar string
358				err = json.Unmarshal(*v, &typeVar)
359				if err != nil {
360					return err
361				}
362				agaso.Type = &typeVar
363			}
364		case "location":
365			if v != nil {
366				var location string
367				err = json.Unmarshal(*v, &location)
368				if err != nil {
369					return err
370				}
371				agaso.Location = &location
372			}
373		case "tags":
374			if v != nil {
375				var tags map[string]*string
376				err = json.Unmarshal(*v, &tags)
377				if err != nil {
378					return err
379				}
380				agaso.Tags = tags
381			}
382		}
383	}
384
385	return nil
386}
387
388// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
389// ApplicationGatewayAvailableSslOptions
390type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
391	// PredefinedPolicies - List of available Ssl predefined policy.
392	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
393	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
394	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
395	// AvailableCipherSuites - List of available Ssl cipher suites.
396	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
397	// AvailableProtocols - List of available Ssl protocols.
398	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
399}
400
401// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
402// service call.
403type ApplicationGatewayAvailableSslPredefinedPolicies struct {
404	autorest.Response `json:"-"`
405	// Value - List of available Ssl predefined policy.
406	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
407	// NextLink - URL to get the next set of results.
408	NextLink *string `json:"nextLink,omitempty"`
409}
410
411// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
412// ApplicationGatewaySslPredefinedPolicy values.
413type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
414	i    int
415	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
416}
417
418// NextWithContext advances to the next value.  If there was an error making
419// the request the iterator does not advance and the error is returned.
420func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
421	if tracing.IsEnabled() {
422		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
423		defer func() {
424			sc := -1
425			if iter.Response().Response.Response != nil {
426				sc = iter.Response().Response.Response.StatusCode
427			}
428			tracing.EndSpan(ctx, sc, err)
429		}()
430	}
431	iter.i++
432	if iter.i < len(iter.page.Values()) {
433		return nil
434	}
435	err = iter.page.NextWithContext(ctx)
436	if err != nil {
437		iter.i--
438		return err
439	}
440	iter.i = 0
441	return nil
442}
443
444// Next advances to the next value.  If there was an error making
445// the request the iterator does not advance and the error is returned.
446// Deprecated: Use NextWithContext() instead.
447func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
448	return iter.NextWithContext(context.Background())
449}
450
451// NotDone returns true if the enumeration should be started or is not yet complete.
452func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
453	return iter.page.NotDone() && iter.i < len(iter.page.Values())
454}
455
456// Response returns the raw server response from the last page request.
457func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
458	return iter.page.Response()
459}
460
461// Value returns the current value or a zero-initialized value if the
462// iterator has advanced beyond the end of the collection.
463func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
464	if !iter.page.NotDone() {
465		return ApplicationGatewaySslPredefinedPolicy{}
466	}
467	return iter.page.Values()[iter.i]
468}
469
470// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
471func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
472	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
473}
474
475// IsEmpty returns true if the ListResult contains no values.
476func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
477	return agaspp.Value == nil || len(*agaspp.Value) == 0
478}
479
480// hasNextLink returns true if the NextLink is not empty.
481func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
482	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
483}
484
485// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
486// It returns nil if no more results exist.
487func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
488	if !agaspp.hasNextLink() {
489		return nil, nil
490	}
491	return autorest.Prepare((&http.Request{}).WithContext(ctx),
492		autorest.AsJSON(),
493		autorest.AsGet(),
494		autorest.WithBaseURL(to.String(agaspp.NextLink)))
495}
496
497// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
498// ApplicationGatewaySslPredefinedPolicy values.
499type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
500	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
501	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
502}
503
504// NextWithContext advances to the next page of values.  If there was an error making
505// the request the page does not advance and the error is returned.
506func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
507	if tracing.IsEnabled() {
508		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
509		defer func() {
510			sc := -1
511			if page.Response().Response.Response != nil {
512				sc = page.Response().Response.Response.StatusCode
513			}
514			tracing.EndSpan(ctx, sc, err)
515		}()
516	}
517	for {
518		next, err := page.fn(ctx, page.agaspp)
519		if err != nil {
520			return err
521		}
522		page.agaspp = next
523		if !next.hasNextLink() || !next.IsEmpty() {
524			break
525		}
526	}
527	return nil
528}
529
530// Next advances to the next page of values.  If there was an error making
531// the request the page does not advance and the error is returned.
532// Deprecated: Use NextWithContext() instead.
533func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
534	return page.NextWithContext(context.Background())
535}
536
537// NotDone returns true if the page enumeration should be started or is not yet complete.
538func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
539	return !page.agaspp.IsEmpty()
540}
541
542// Response returns the raw server response from the last page request.
543func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
544	return page.agaspp
545}
546
547// Values returns the slice of values for the current page or nil if there are no values.
548func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
549	if page.agaspp.IsEmpty() {
550		return nil
551	}
552	return *page.agaspp.Value
553}
554
555// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
556func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
557	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
558		fn:     getNextPage,
559		agaspp: cur,
560	}
561}
562
563// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
564// service call.
565type ApplicationGatewayAvailableWafRuleSetsResult struct {
566	autorest.Response `json:"-"`
567	// Value - The list of application gateway rule sets.
568	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
569}
570
571// ApplicationGatewayBackendAddress backend address of an application gateway.
572type ApplicationGatewayBackendAddress struct {
573	// Fqdn - Fully qualified domain name (FQDN).
574	Fqdn *string `json:"fqdn,omitempty"`
575	// IPAddress - IP address
576	IPAddress *string `json:"ipAddress,omitempty"`
577}
578
579// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
580type ApplicationGatewayBackendAddressPool struct {
581	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
582	// Name - Name of the backend address pool that is unique within an Application Gateway.
583	Name *string `json:"name,omitempty"`
584	// Etag - A unique read-only string that changes whenever the resource is updated.
585	Etag *string `json:"etag,omitempty"`
586	// Type - Type of the resource.
587	Type *string `json:"type,omitempty"`
588	// ID - Resource ID.
589	ID *string `json:"id,omitempty"`
590}
591
592// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
593func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
594	objectMap := make(map[string]interface{})
595	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
596		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
597	}
598	if agbap.Name != nil {
599		objectMap["name"] = agbap.Name
600	}
601	if agbap.Etag != nil {
602		objectMap["etag"] = agbap.Etag
603	}
604	if agbap.Type != nil {
605		objectMap["type"] = agbap.Type
606	}
607	if agbap.ID != nil {
608		objectMap["id"] = agbap.ID
609	}
610	return json.Marshal(objectMap)
611}
612
613// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
614func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
615	var m map[string]*json.RawMessage
616	err := json.Unmarshal(body, &m)
617	if err != nil {
618		return err
619	}
620	for k, v := range m {
621		switch k {
622		case "properties":
623			if v != nil {
624				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
625				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
626				if err != nil {
627					return err
628				}
629				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
630			}
631		case "name":
632			if v != nil {
633				var name string
634				err = json.Unmarshal(*v, &name)
635				if err != nil {
636					return err
637				}
638				agbap.Name = &name
639			}
640		case "etag":
641			if v != nil {
642				var etag string
643				err = json.Unmarshal(*v, &etag)
644				if err != nil {
645					return err
646				}
647				agbap.Etag = &etag
648			}
649		case "type":
650			if v != nil {
651				var typeVar string
652				err = json.Unmarshal(*v, &typeVar)
653				if err != nil {
654					return err
655				}
656				agbap.Type = &typeVar
657			}
658		case "id":
659			if v != nil {
660				var ID string
661				err = json.Unmarshal(*v, &ID)
662				if err != nil {
663					return err
664				}
665				agbap.ID = &ID
666			}
667		}
668	}
669
670	return nil
671}
672
673// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
674// application gateway.
675type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
676	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
677	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
678	// BackendAddresses - Backend addresses
679	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
680	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
681	ProvisioningState *string `json:"provisioningState,omitempty"`
682}
683
684// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
685type ApplicationGatewayBackendHealth struct {
686	autorest.Response   `json:"-"`
687	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
688}
689
690// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
691type ApplicationGatewayBackendHealthHTTPSettings struct {
692	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
693	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
694	// Servers - List of ApplicationGatewayBackendHealthServer resources.
695	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
696}
697
698// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
699type ApplicationGatewayBackendHealthPool struct {
700	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
701	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
702	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
703	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
704}
705
706// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
707type ApplicationGatewayBackendHealthServer struct {
708	// Address - IP address or FQDN of backend server.
709	Address *string `json:"address,omitempty"`
710	// IPConfiguration - Reference of IP configuration of backend server.
711	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
712	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
713	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
714}
715
716// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
717type ApplicationGatewayBackendHTTPSettings struct {
718	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
719	// Name - Name of the backend http settings that is unique within an Application Gateway.
720	Name *string `json:"name,omitempty"`
721	// Etag - A unique read-only string that changes whenever the resource is updated.
722	Etag *string `json:"etag,omitempty"`
723	// Type - Type of the resource.
724	Type *string `json:"type,omitempty"`
725	// ID - Resource ID.
726	ID *string `json:"id,omitempty"`
727}
728
729// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
730func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
731	objectMap := make(map[string]interface{})
732	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
733		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
734	}
735	if agbhs.Name != nil {
736		objectMap["name"] = agbhs.Name
737	}
738	if agbhs.Etag != nil {
739		objectMap["etag"] = agbhs.Etag
740	}
741	if agbhs.Type != nil {
742		objectMap["type"] = agbhs.Type
743	}
744	if agbhs.ID != nil {
745		objectMap["id"] = agbhs.ID
746	}
747	return json.Marshal(objectMap)
748}
749
750// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
751func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
752	var m map[string]*json.RawMessage
753	err := json.Unmarshal(body, &m)
754	if err != nil {
755		return err
756	}
757	for k, v := range m {
758		switch k {
759		case "properties":
760			if v != nil {
761				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
762				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
763				if err != nil {
764					return err
765				}
766				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
767			}
768		case "name":
769			if v != nil {
770				var name string
771				err = json.Unmarshal(*v, &name)
772				if err != nil {
773					return err
774				}
775				agbhs.Name = &name
776			}
777		case "etag":
778			if v != nil {
779				var etag string
780				err = json.Unmarshal(*v, &etag)
781				if err != nil {
782					return err
783				}
784				agbhs.Etag = &etag
785			}
786		case "type":
787			if v != nil {
788				var typeVar string
789				err = json.Unmarshal(*v, &typeVar)
790				if err != nil {
791					return err
792				}
793				agbhs.Type = &typeVar
794			}
795		case "id":
796			if v != nil {
797				var ID string
798				err = json.Unmarshal(*v, &ID)
799				if err != nil {
800					return err
801				}
802				agbhs.ID = &ID
803			}
804		}
805	}
806
807	return nil
808}
809
810// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
811// application gateway.
812type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
813	// Port - The destination port on the backend.
814	Port *int32 `json:"port,omitempty"`
815	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
816	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
817	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
818	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
819	// 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.
820	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
821	// Probe - Probe resource of an application gateway.
822	Probe *SubResource `json:"probe,omitempty"`
823	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
824	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
825	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
826	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
827	// ConnectionDraining - Connection draining of the backend http settings resource.
828	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
829	// HostName - Host header to be sent to the backend servers.
830	HostName *string `json:"hostName,omitempty"`
831	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
832	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
833	// AffinityCookieName - Cookie name to use for the affinity cookie.
834	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
835	// ProbeEnabled - Whether the probe is enabled. Default value is false.
836	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
837	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
838	Path *string `json:"path,omitempty"`
839	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
840	ProvisioningState *string `json:"provisioningState,omitempty"`
841}
842
843// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
844// be active for a specified time after the backend server got removed from the configuration.
845type ApplicationGatewayConnectionDraining struct {
846	// Enabled - Whether connection draining is enabled or not.
847	Enabled *bool `json:"enabled,omitempty"`
848	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
849	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
850}
851
852// ApplicationGatewayCustomError customer error of an application gateway.
853type ApplicationGatewayCustomError struct {
854	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
855	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
856	// CustomErrorPageURL - Error page URL of the application gateway customer error.
857	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
858}
859
860// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
861// rule group.
862type ApplicationGatewayFirewallDisabledRuleGroup struct {
863	// RuleGroupName - The name of the rule group that will be disabled.
864	RuleGroupName *string `json:"ruleGroupName,omitempty"`
865	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
866	Rules *[]int32 `json:"rules,omitempty"`
867}
868
869// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
870// check
871type ApplicationGatewayFirewallExclusion struct {
872	// MatchVariable - The variable to be excluded.
873	MatchVariable *string `json:"matchVariable,omitempty"`
874	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
875	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
876	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
877	Selector *string `json:"selector,omitempty"`
878}
879
880// ApplicationGatewayFirewallRule a web application firewall rule.
881type ApplicationGatewayFirewallRule struct {
882	// RuleID - The identifier of the web application firewall rule.
883	RuleID *int32 `json:"ruleId,omitempty"`
884	// Description - The description of the web application firewall rule.
885	Description *string `json:"description,omitempty"`
886}
887
888// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
889type ApplicationGatewayFirewallRuleGroup struct {
890	// RuleGroupName - The name of the web application firewall rule group.
891	RuleGroupName *string `json:"ruleGroupName,omitempty"`
892	// Description - The description of the web application firewall rule group.
893	Description *string `json:"description,omitempty"`
894	// Rules - The rules of the web application firewall rule group.
895	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
896}
897
898// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
899type ApplicationGatewayFirewallRuleSet struct {
900	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
901	// ID - Resource ID.
902	ID *string `json:"id,omitempty"`
903	// Name - READ-ONLY; Resource name.
904	Name *string `json:"name,omitempty"`
905	// Type - READ-ONLY; Resource type.
906	Type *string `json:"type,omitempty"`
907	// Location - Resource location.
908	Location *string `json:"location,omitempty"`
909	// Tags - Resource tags.
910	Tags map[string]*string `json:"tags"`
911}
912
913// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
914func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
915	objectMap := make(map[string]interface{})
916	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
917		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
918	}
919	if agfrs.ID != nil {
920		objectMap["id"] = agfrs.ID
921	}
922	if agfrs.Location != nil {
923		objectMap["location"] = agfrs.Location
924	}
925	if agfrs.Tags != nil {
926		objectMap["tags"] = agfrs.Tags
927	}
928	return json.Marshal(objectMap)
929}
930
931// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
932func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
933	var m map[string]*json.RawMessage
934	err := json.Unmarshal(body, &m)
935	if err != nil {
936		return err
937	}
938	for k, v := range m {
939		switch k {
940		case "properties":
941			if v != nil {
942				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
943				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
944				if err != nil {
945					return err
946				}
947				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
948			}
949		case "id":
950			if v != nil {
951				var ID string
952				err = json.Unmarshal(*v, &ID)
953				if err != nil {
954					return err
955				}
956				agfrs.ID = &ID
957			}
958		case "name":
959			if v != nil {
960				var name string
961				err = json.Unmarshal(*v, &name)
962				if err != nil {
963					return err
964				}
965				agfrs.Name = &name
966			}
967		case "type":
968			if v != nil {
969				var typeVar string
970				err = json.Unmarshal(*v, &typeVar)
971				if err != nil {
972					return err
973				}
974				agfrs.Type = &typeVar
975			}
976		case "location":
977			if v != nil {
978				var location string
979				err = json.Unmarshal(*v, &location)
980				if err != nil {
981					return err
982				}
983				agfrs.Location = &location
984			}
985		case "tags":
986			if v != nil {
987				var tags map[string]*string
988				err = json.Unmarshal(*v, &tags)
989				if err != nil {
990					return err
991				}
992				agfrs.Tags = tags
993			}
994		}
995	}
996
997	return nil
998}
999
1000// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1001type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1002	// ProvisioningState - The provisioning state of the web application firewall rule set.
1003	ProvisioningState *string `json:"provisioningState,omitempty"`
1004	// RuleSetType - The type of the web application firewall rule set.
1005	RuleSetType *string `json:"ruleSetType,omitempty"`
1006	// RuleSetVersion - The version of the web application firewall rule set type.
1007	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1008	// RuleGroups - The rule groups of the web application firewall rule set.
1009	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1010}
1011
1012// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1013type ApplicationGatewayFrontendIPConfiguration struct {
1014	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1015	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1016	Name *string `json:"name,omitempty"`
1017	// Etag - A unique read-only string that changes whenever the resource is updated.
1018	Etag *string `json:"etag,omitempty"`
1019	// Type - Type of the resource.
1020	Type *string `json:"type,omitempty"`
1021	// ID - Resource ID.
1022	ID *string `json:"id,omitempty"`
1023}
1024
1025// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1026func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1027	objectMap := make(map[string]interface{})
1028	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1029		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1030	}
1031	if agfic.Name != nil {
1032		objectMap["name"] = agfic.Name
1033	}
1034	if agfic.Etag != nil {
1035		objectMap["etag"] = agfic.Etag
1036	}
1037	if agfic.Type != nil {
1038		objectMap["type"] = agfic.Type
1039	}
1040	if agfic.ID != nil {
1041		objectMap["id"] = agfic.ID
1042	}
1043	return json.Marshal(objectMap)
1044}
1045
1046// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1047func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1048	var m map[string]*json.RawMessage
1049	err := json.Unmarshal(body, &m)
1050	if err != nil {
1051		return err
1052	}
1053	for k, v := range m {
1054		switch k {
1055		case "properties":
1056			if v != nil {
1057				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1058				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1059				if err != nil {
1060					return err
1061				}
1062				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1063			}
1064		case "name":
1065			if v != nil {
1066				var name string
1067				err = json.Unmarshal(*v, &name)
1068				if err != nil {
1069					return err
1070				}
1071				agfic.Name = &name
1072			}
1073		case "etag":
1074			if v != nil {
1075				var etag string
1076				err = json.Unmarshal(*v, &etag)
1077				if err != nil {
1078					return err
1079				}
1080				agfic.Etag = &etag
1081			}
1082		case "type":
1083			if v != nil {
1084				var typeVar string
1085				err = json.Unmarshal(*v, &typeVar)
1086				if err != nil {
1087					return err
1088				}
1089				agfic.Type = &typeVar
1090			}
1091		case "id":
1092			if v != nil {
1093				var ID string
1094				err = json.Unmarshal(*v, &ID)
1095				if err != nil {
1096					return err
1097				}
1098				agfic.ID = &ID
1099			}
1100		}
1101	}
1102
1103	return nil
1104}
1105
1106// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1107// application gateway.
1108type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1109	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1110	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1111	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1112	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1113	// Subnet - Reference of the subnet resource.
1114	Subnet *SubResource `json:"subnet,omitempty"`
1115	// PublicIPAddress - Reference of the PublicIP resource.
1116	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1117	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1118	ProvisioningState *string `json:"provisioningState,omitempty"`
1119}
1120
1121// ApplicationGatewayFrontendPort frontend port of an application gateway.
1122type ApplicationGatewayFrontendPort struct {
1123	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1124	// Name - Name of the frontend port that is unique within an Application Gateway
1125	Name *string `json:"name,omitempty"`
1126	// Etag - A unique read-only string that changes whenever the resource is updated.
1127	Etag *string `json:"etag,omitempty"`
1128	// Type - Type of the resource.
1129	Type *string `json:"type,omitempty"`
1130	// ID - Resource ID.
1131	ID *string `json:"id,omitempty"`
1132}
1133
1134// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1135func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1136	objectMap := make(map[string]interface{})
1137	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1138		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1139	}
1140	if agfp.Name != nil {
1141		objectMap["name"] = agfp.Name
1142	}
1143	if agfp.Etag != nil {
1144		objectMap["etag"] = agfp.Etag
1145	}
1146	if agfp.Type != nil {
1147		objectMap["type"] = agfp.Type
1148	}
1149	if agfp.ID != nil {
1150		objectMap["id"] = agfp.ID
1151	}
1152	return json.Marshal(objectMap)
1153}
1154
1155// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1156func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1157	var m map[string]*json.RawMessage
1158	err := json.Unmarshal(body, &m)
1159	if err != nil {
1160		return err
1161	}
1162	for k, v := range m {
1163		switch k {
1164		case "properties":
1165			if v != nil {
1166				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1167				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1168				if err != nil {
1169					return err
1170				}
1171				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1172			}
1173		case "name":
1174			if v != nil {
1175				var name string
1176				err = json.Unmarshal(*v, &name)
1177				if err != nil {
1178					return err
1179				}
1180				agfp.Name = &name
1181			}
1182		case "etag":
1183			if v != nil {
1184				var etag string
1185				err = json.Unmarshal(*v, &etag)
1186				if err != nil {
1187					return err
1188				}
1189				agfp.Etag = &etag
1190			}
1191		case "type":
1192			if v != nil {
1193				var typeVar string
1194				err = json.Unmarshal(*v, &typeVar)
1195				if err != nil {
1196					return err
1197				}
1198				agfp.Type = &typeVar
1199			}
1200		case "id":
1201			if v != nil {
1202				var ID string
1203				err = json.Unmarshal(*v, &ID)
1204				if err != nil {
1205					return err
1206				}
1207				agfp.ID = &ID
1208			}
1209		}
1210	}
1211
1212	return nil
1213}
1214
1215// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1216type ApplicationGatewayFrontendPortPropertiesFormat struct {
1217	// Port - Frontend port
1218	Port *int32 `json:"port,omitempty"`
1219	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1220	ProvisioningState *string `json:"provisioningState,omitempty"`
1221}
1222
1223// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1224type ApplicationGatewayHeaderConfiguration struct {
1225	// HeaderName - Header name of the header configuration
1226	HeaderName *string `json:"headerName,omitempty"`
1227	// HeaderValue - Header value of the header configuration
1228	HeaderValue *string `json:"headerValue,omitempty"`
1229}
1230
1231// ApplicationGatewayHTTPListener http listener of an application gateway.
1232type ApplicationGatewayHTTPListener struct {
1233	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1234	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1235	Name *string `json:"name,omitempty"`
1236	// Etag - A unique read-only string that changes whenever the resource is updated.
1237	Etag *string `json:"etag,omitempty"`
1238	// Type - Type of the resource.
1239	Type *string `json:"type,omitempty"`
1240	// ID - Resource ID.
1241	ID *string `json:"id,omitempty"`
1242}
1243
1244// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1245func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1246	objectMap := make(map[string]interface{})
1247	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1248		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1249	}
1250	if aghl.Name != nil {
1251		objectMap["name"] = aghl.Name
1252	}
1253	if aghl.Etag != nil {
1254		objectMap["etag"] = aghl.Etag
1255	}
1256	if aghl.Type != nil {
1257		objectMap["type"] = aghl.Type
1258	}
1259	if aghl.ID != nil {
1260		objectMap["id"] = aghl.ID
1261	}
1262	return json.Marshal(objectMap)
1263}
1264
1265// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1266func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1267	var m map[string]*json.RawMessage
1268	err := json.Unmarshal(body, &m)
1269	if err != nil {
1270		return err
1271	}
1272	for k, v := range m {
1273		switch k {
1274		case "properties":
1275			if v != nil {
1276				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1277				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1278				if err != nil {
1279					return err
1280				}
1281				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1282			}
1283		case "name":
1284			if v != nil {
1285				var name string
1286				err = json.Unmarshal(*v, &name)
1287				if err != nil {
1288					return err
1289				}
1290				aghl.Name = &name
1291			}
1292		case "etag":
1293			if v != nil {
1294				var etag string
1295				err = json.Unmarshal(*v, &etag)
1296				if err != nil {
1297					return err
1298				}
1299				aghl.Etag = &etag
1300			}
1301		case "type":
1302			if v != nil {
1303				var typeVar string
1304				err = json.Unmarshal(*v, &typeVar)
1305				if err != nil {
1306					return err
1307				}
1308				aghl.Type = &typeVar
1309			}
1310		case "id":
1311			if v != nil {
1312				var ID string
1313				err = json.Unmarshal(*v, &ID)
1314				if err != nil {
1315					return err
1316				}
1317				aghl.ID = &ID
1318			}
1319		}
1320	}
1321
1322	return nil
1323}
1324
1325// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1326type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1327	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1328	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1329	// FrontendPort - Frontend port resource of an application gateway.
1330	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1331	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1332	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1333	// HostName - Host name of HTTP listener.
1334	HostName *string `json:"hostName,omitempty"`
1335	// SslCertificate - SSL certificate resource of an application gateway.
1336	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1337	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1338	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1339	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1340	ProvisioningState *string `json:"provisioningState,omitempty"`
1341	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1342	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1343}
1344
1345// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1346// private IP configuration is allowed.
1347type ApplicationGatewayIPConfiguration struct {
1348	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1349	// Name - Name of the IP configuration that is unique within an Application Gateway.
1350	Name *string `json:"name,omitempty"`
1351	// Etag - A unique read-only string that changes whenever the resource is updated.
1352	Etag *string `json:"etag,omitempty"`
1353	// Type - Type of the resource.
1354	Type *string `json:"type,omitempty"`
1355	// ID - Resource ID.
1356	ID *string `json:"id,omitempty"`
1357}
1358
1359// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1360func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1361	objectMap := make(map[string]interface{})
1362	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1363		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1364	}
1365	if agic.Name != nil {
1366		objectMap["name"] = agic.Name
1367	}
1368	if agic.Etag != nil {
1369		objectMap["etag"] = agic.Etag
1370	}
1371	if agic.Type != nil {
1372		objectMap["type"] = agic.Type
1373	}
1374	if agic.ID != nil {
1375		objectMap["id"] = agic.ID
1376	}
1377	return json.Marshal(objectMap)
1378}
1379
1380// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1381func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1382	var m map[string]*json.RawMessage
1383	err := json.Unmarshal(body, &m)
1384	if err != nil {
1385		return err
1386	}
1387	for k, v := range m {
1388		switch k {
1389		case "properties":
1390			if v != nil {
1391				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1392				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1393				if err != nil {
1394					return err
1395				}
1396				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1397			}
1398		case "name":
1399			if v != nil {
1400				var name string
1401				err = json.Unmarshal(*v, &name)
1402				if err != nil {
1403					return err
1404				}
1405				agic.Name = &name
1406			}
1407		case "etag":
1408			if v != nil {
1409				var etag string
1410				err = json.Unmarshal(*v, &etag)
1411				if err != nil {
1412					return err
1413				}
1414				agic.Etag = &etag
1415			}
1416		case "type":
1417			if v != nil {
1418				var typeVar string
1419				err = json.Unmarshal(*v, &typeVar)
1420				if err != nil {
1421					return err
1422				}
1423				agic.Type = &typeVar
1424			}
1425		case "id":
1426			if v != nil {
1427				var ID string
1428				err = json.Unmarshal(*v, &ID)
1429				if err != nil {
1430					return err
1431				}
1432				agic.ID = &ID
1433			}
1434		}
1435	}
1436
1437	return nil
1438}
1439
1440// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1441// gateway.
1442type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1443	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1444	Subnet *SubResource `json:"subnet,omitempty"`
1445	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1446	ProvisioningState *string `json:"provisioningState,omitempty"`
1447}
1448
1449// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1450type ApplicationGatewayListResult struct {
1451	autorest.Response `json:"-"`
1452	// Value - List of an application gateways in a resource group.
1453	Value *[]ApplicationGateway `json:"value,omitempty"`
1454	// NextLink - URL to get the next set of results.
1455	NextLink *string `json:"nextLink,omitempty"`
1456}
1457
1458// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1459type ApplicationGatewayListResultIterator struct {
1460	i    int
1461	page ApplicationGatewayListResultPage
1462}
1463
1464// NextWithContext advances to the next value.  If there was an error making
1465// the request the iterator does not advance and the error is returned.
1466func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1467	if tracing.IsEnabled() {
1468		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1469		defer func() {
1470			sc := -1
1471			if iter.Response().Response.Response != nil {
1472				sc = iter.Response().Response.Response.StatusCode
1473			}
1474			tracing.EndSpan(ctx, sc, err)
1475		}()
1476	}
1477	iter.i++
1478	if iter.i < len(iter.page.Values()) {
1479		return nil
1480	}
1481	err = iter.page.NextWithContext(ctx)
1482	if err != nil {
1483		iter.i--
1484		return err
1485	}
1486	iter.i = 0
1487	return nil
1488}
1489
1490// Next advances to the next value.  If there was an error making
1491// the request the iterator does not advance and the error is returned.
1492// Deprecated: Use NextWithContext() instead.
1493func (iter *ApplicationGatewayListResultIterator) Next() error {
1494	return iter.NextWithContext(context.Background())
1495}
1496
1497// NotDone returns true if the enumeration should be started or is not yet complete.
1498func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1499	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1500}
1501
1502// Response returns the raw server response from the last page request.
1503func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1504	return iter.page.Response()
1505}
1506
1507// Value returns the current value or a zero-initialized value if the
1508// iterator has advanced beyond the end of the collection.
1509func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1510	if !iter.page.NotDone() {
1511		return ApplicationGateway{}
1512	}
1513	return iter.page.Values()[iter.i]
1514}
1515
1516// Creates a new instance of the ApplicationGatewayListResultIterator type.
1517func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1518	return ApplicationGatewayListResultIterator{page: page}
1519}
1520
1521// IsEmpty returns true if the ListResult contains no values.
1522func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1523	return aglr.Value == nil || len(*aglr.Value) == 0
1524}
1525
1526// hasNextLink returns true if the NextLink is not empty.
1527func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1528	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1529}
1530
1531// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1532// It returns nil if no more results exist.
1533func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1534	if !aglr.hasNextLink() {
1535		return nil, nil
1536	}
1537	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1538		autorest.AsJSON(),
1539		autorest.AsGet(),
1540		autorest.WithBaseURL(to.String(aglr.NextLink)))
1541}
1542
1543// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1544type ApplicationGatewayListResultPage struct {
1545	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1546	aglr ApplicationGatewayListResult
1547}
1548
1549// NextWithContext advances to the next page of values.  If there was an error making
1550// the request the page does not advance and the error is returned.
1551func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1552	if tracing.IsEnabled() {
1553		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1554		defer func() {
1555			sc := -1
1556			if page.Response().Response.Response != nil {
1557				sc = page.Response().Response.Response.StatusCode
1558			}
1559			tracing.EndSpan(ctx, sc, err)
1560		}()
1561	}
1562	for {
1563		next, err := page.fn(ctx, page.aglr)
1564		if err != nil {
1565			return err
1566		}
1567		page.aglr = next
1568		if !next.hasNextLink() || !next.IsEmpty() {
1569			break
1570		}
1571	}
1572	return nil
1573}
1574
1575// Next advances to the next page of values.  If there was an error making
1576// the request the page does not advance and the error is returned.
1577// Deprecated: Use NextWithContext() instead.
1578func (page *ApplicationGatewayListResultPage) Next() error {
1579	return page.NextWithContext(context.Background())
1580}
1581
1582// NotDone returns true if the page enumeration should be started or is not yet complete.
1583func (page ApplicationGatewayListResultPage) NotDone() bool {
1584	return !page.aglr.IsEmpty()
1585}
1586
1587// Response returns the raw server response from the last page request.
1588func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1589	return page.aglr
1590}
1591
1592// Values returns the slice of values for the current page or nil if there are no values.
1593func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1594	if page.aglr.IsEmpty() {
1595		return nil
1596	}
1597	return *page.aglr.Value
1598}
1599
1600// Creates a new instance of the ApplicationGatewayListResultPage type.
1601func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1602	return ApplicationGatewayListResultPage{
1603		fn:   getNextPage,
1604		aglr: cur,
1605	}
1606}
1607
1608// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1609type ApplicationGatewayPathRule struct {
1610	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1611	// Name - Name of the path rule that is unique within an Application Gateway.
1612	Name *string `json:"name,omitempty"`
1613	// Etag - A unique read-only string that changes whenever the resource is updated.
1614	Etag *string `json:"etag,omitempty"`
1615	// Type - Type of the resource.
1616	Type *string `json:"type,omitempty"`
1617	// ID - Resource ID.
1618	ID *string `json:"id,omitempty"`
1619}
1620
1621// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1622func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1623	objectMap := make(map[string]interface{})
1624	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1625		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1626	}
1627	if agpr.Name != nil {
1628		objectMap["name"] = agpr.Name
1629	}
1630	if agpr.Etag != nil {
1631		objectMap["etag"] = agpr.Etag
1632	}
1633	if agpr.Type != nil {
1634		objectMap["type"] = agpr.Type
1635	}
1636	if agpr.ID != nil {
1637		objectMap["id"] = agpr.ID
1638	}
1639	return json.Marshal(objectMap)
1640}
1641
1642// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1643func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1644	var m map[string]*json.RawMessage
1645	err := json.Unmarshal(body, &m)
1646	if err != nil {
1647		return err
1648	}
1649	for k, v := range m {
1650		switch k {
1651		case "properties":
1652			if v != nil {
1653				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1654				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1655				if err != nil {
1656					return err
1657				}
1658				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1659			}
1660		case "name":
1661			if v != nil {
1662				var name string
1663				err = json.Unmarshal(*v, &name)
1664				if err != nil {
1665					return err
1666				}
1667				agpr.Name = &name
1668			}
1669		case "etag":
1670			if v != nil {
1671				var etag string
1672				err = json.Unmarshal(*v, &etag)
1673				if err != nil {
1674					return err
1675				}
1676				agpr.Etag = &etag
1677			}
1678		case "type":
1679			if v != nil {
1680				var typeVar string
1681				err = json.Unmarshal(*v, &typeVar)
1682				if err != nil {
1683					return err
1684				}
1685				agpr.Type = &typeVar
1686			}
1687		case "id":
1688			if v != nil {
1689				var ID string
1690				err = json.Unmarshal(*v, &ID)
1691				if err != nil {
1692					return err
1693				}
1694				agpr.ID = &ID
1695			}
1696		}
1697	}
1698
1699	return nil
1700}
1701
1702// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1703type ApplicationGatewayPathRulePropertiesFormat struct {
1704	// Paths - Path rules of URL path map.
1705	Paths *[]string `json:"paths,omitempty"`
1706	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1707	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1708	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1709	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1710	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1711	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1712	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1713	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1714	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1715	ProvisioningState *string `json:"provisioningState,omitempty"`
1716}
1717
1718// ApplicationGatewayProbe probe of the application gateway.
1719type ApplicationGatewayProbe struct {
1720	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1721	// Name - Name of the probe that is unique within an Application Gateway.
1722	Name *string `json:"name,omitempty"`
1723	// Etag - A unique read-only string that changes whenever the resource is updated.
1724	Etag *string `json:"etag,omitempty"`
1725	// Type - Type of the resource.
1726	Type *string `json:"type,omitempty"`
1727	// ID - Resource ID.
1728	ID *string `json:"id,omitempty"`
1729}
1730
1731// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1732func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1733	objectMap := make(map[string]interface{})
1734	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1735		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1736	}
1737	if agp.Name != nil {
1738		objectMap["name"] = agp.Name
1739	}
1740	if agp.Etag != nil {
1741		objectMap["etag"] = agp.Etag
1742	}
1743	if agp.Type != nil {
1744		objectMap["type"] = agp.Type
1745	}
1746	if agp.ID != nil {
1747		objectMap["id"] = agp.ID
1748	}
1749	return json.Marshal(objectMap)
1750}
1751
1752// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1753func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1754	var m map[string]*json.RawMessage
1755	err := json.Unmarshal(body, &m)
1756	if err != nil {
1757		return err
1758	}
1759	for k, v := range m {
1760		switch k {
1761		case "properties":
1762			if v != nil {
1763				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1764				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1765				if err != nil {
1766					return err
1767				}
1768				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1769			}
1770		case "name":
1771			if v != nil {
1772				var name string
1773				err = json.Unmarshal(*v, &name)
1774				if err != nil {
1775					return err
1776				}
1777				agp.Name = &name
1778			}
1779		case "etag":
1780			if v != nil {
1781				var etag string
1782				err = json.Unmarshal(*v, &etag)
1783				if err != nil {
1784					return err
1785				}
1786				agp.Etag = &etag
1787			}
1788		case "type":
1789			if v != nil {
1790				var typeVar string
1791				err = json.Unmarshal(*v, &typeVar)
1792				if err != nil {
1793					return err
1794				}
1795				agp.Type = &typeVar
1796			}
1797		case "id":
1798			if v != nil {
1799				var ID string
1800				err = json.Unmarshal(*v, &ID)
1801				if err != nil {
1802					return err
1803				}
1804				agp.ID = &ID
1805			}
1806		}
1807	}
1808
1809	return nil
1810}
1811
1812// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1813type ApplicationGatewayProbeHealthResponseMatch struct {
1814	// Body - Body that must be contained in the health response. Default value is empty.
1815	Body *string `json:"body,omitempty"`
1816	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1817	StatusCodes *[]string `json:"statusCodes,omitempty"`
1818}
1819
1820// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1821type ApplicationGatewayProbePropertiesFormat struct {
1822	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1823	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1824	// Host - Host name to send the probe to.
1825	Host *string `json:"host,omitempty"`
1826	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1827	Path *string `json:"path,omitempty"`
1828	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1829	Interval *int32 `json:"interval,omitempty"`
1830	// 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.
1831	Timeout *int32 `json:"timeout,omitempty"`
1832	// 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.
1833	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1834	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1835	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1836	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1837	MinServers *int32 `json:"minServers,omitempty"`
1838	// Match - Criterion for classifying a healthy probe response.
1839	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1840	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1841	ProvisioningState *string `json:"provisioningState,omitempty"`
1842}
1843
1844// ApplicationGatewayPropertiesFormat properties of the application gateway.
1845type ApplicationGatewayPropertiesFormat struct {
1846	// Sku - SKU of the application gateway resource.
1847	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1848	// SslPolicy - SSL policy of the application gateway resource.
1849	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1850	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1851	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1852	// GatewayIPConfigurations - Subnets of application the gateway resource.
1853	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1854	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1855	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1856	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource.
1857	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1858	// SslCertificates - SSL certificates of the application gateway resource.
1859	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1860	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1861	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1862	// FrontendPorts - Frontend ports of the application gateway resource.
1863	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1864	// Probes - Probes of the application gateway resource.
1865	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1866	// BackendAddressPools - Backend address pool of the application gateway resource.
1867	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1868	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1869	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1870	// HTTPListeners - Http listeners of the application gateway resource.
1871	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1872	// URLPathMaps - URL path map of the application gateway resource.
1873	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1874	// RequestRoutingRules - Request routing rules of the application gateway resource.
1875	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1876	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1877	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1878	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1879	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1880	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1881	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1882	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1883	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1884	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1885	EnableFips *bool `json:"enableFips,omitempty"`
1886	// AutoscaleConfiguration - Autoscale Configuration.
1887	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1888	// ResourceGUID - Resource GUID property of the application gateway resource.
1889	ResourceGUID *string `json:"resourceGuid,omitempty"`
1890	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1891	ProvisioningState *string `json:"provisioningState,omitempty"`
1892	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1893	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1894}
1895
1896// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1897func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1898	objectMap := make(map[string]interface{})
1899	if agpf.Sku != nil {
1900		objectMap["sku"] = agpf.Sku
1901	}
1902	if agpf.SslPolicy != nil {
1903		objectMap["sslPolicy"] = agpf.SslPolicy
1904	}
1905	if agpf.GatewayIPConfigurations != nil {
1906		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1907	}
1908	if agpf.AuthenticationCertificates != nil {
1909		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1910	}
1911	if agpf.TrustedRootCertificates != nil {
1912		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1913	}
1914	if agpf.SslCertificates != nil {
1915		objectMap["sslCertificates"] = agpf.SslCertificates
1916	}
1917	if agpf.FrontendIPConfigurations != nil {
1918		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1919	}
1920	if agpf.FrontendPorts != nil {
1921		objectMap["frontendPorts"] = agpf.FrontendPorts
1922	}
1923	if agpf.Probes != nil {
1924		objectMap["probes"] = agpf.Probes
1925	}
1926	if agpf.BackendAddressPools != nil {
1927		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1928	}
1929	if agpf.BackendHTTPSettingsCollection != nil {
1930		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1931	}
1932	if agpf.HTTPListeners != nil {
1933		objectMap["httpListeners"] = agpf.HTTPListeners
1934	}
1935	if agpf.URLPathMaps != nil {
1936		objectMap["urlPathMaps"] = agpf.URLPathMaps
1937	}
1938	if agpf.RequestRoutingRules != nil {
1939		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1940	}
1941	if agpf.RewriteRuleSets != nil {
1942		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1943	}
1944	if agpf.RedirectConfigurations != nil {
1945		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1946	}
1947	if agpf.WebApplicationFirewallConfiguration != nil {
1948		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1949	}
1950	if agpf.EnableHTTP2 != nil {
1951		objectMap["enableHttp2"] = agpf.EnableHTTP2
1952	}
1953	if agpf.EnableFips != nil {
1954		objectMap["enableFips"] = agpf.EnableFips
1955	}
1956	if agpf.AutoscaleConfiguration != nil {
1957		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1958	}
1959	if agpf.ResourceGUID != nil {
1960		objectMap["resourceGuid"] = agpf.ResourceGUID
1961	}
1962	if agpf.ProvisioningState != nil {
1963		objectMap["provisioningState"] = agpf.ProvisioningState
1964	}
1965	if agpf.CustomErrorConfigurations != nil {
1966		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
1967	}
1968	return json.Marshal(objectMap)
1969}
1970
1971// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1972type ApplicationGatewayRedirectConfiguration struct {
1973	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1974	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1975	Name *string `json:"name,omitempty"`
1976	// Etag - A unique read-only string that changes whenever the resource is updated.
1977	Etag *string `json:"etag,omitempty"`
1978	// Type - Type of the resource.
1979	Type *string `json:"type,omitempty"`
1980	// ID - Resource ID.
1981	ID *string `json:"id,omitempty"`
1982}
1983
1984// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1985func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1986	objectMap := make(map[string]interface{})
1987	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1988		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1989	}
1990	if agrc.Name != nil {
1991		objectMap["name"] = agrc.Name
1992	}
1993	if agrc.Etag != nil {
1994		objectMap["etag"] = agrc.Etag
1995	}
1996	if agrc.Type != nil {
1997		objectMap["type"] = agrc.Type
1998	}
1999	if agrc.ID != nil {
2000		objectMap["id"] = agrc.ID
2001	}
2002	return json.Marshal(objectMap)
2003}
2004
2005// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2006func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2007	var m map[string]*json.RawMessage
2008	err := json.Unmarshal(body, &m)
2009	if err != nil {
2010		return err
2011	}
2012	for k, v := range m {
2013		switch k {
2014		case "properties":
2015			if v != nil {
2016				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2017				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2018				if err != nil {
2019					return err
2020				}
2021				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2022			}
2023		case "name":
2024			if v != nil {
2025				var name string
2026				err = json.Unmarshal(*v, &name)
2027				if err != nil {
2028					return err
2029				}
2030				agrc.Name = &name
2031			}
2032		case "etag":
2033			if v != nil {
2034				var etag string
2035				err = json.Unmarshal(*v, &etag)
2036				if err != nil {
2037					return err
2038				}
2039				agrc.Etag = &etag
2040			}
2041		case "type":
2042			if v != nil {
2043				var typeVar string
2044				err = json.Unmarshal(*v, &typeVar)
2045				if err != nil {
2046					return err
2047				}
2048				agrc.Type = &typeVar
2049			}
2050		case "id":
2051			if v != nil {
2052				var ID string
2053				err = json.Unmarshal(*v, &ID)
2054				if err != nil {
2055					return err
2056				}
2057				agrc.ID = &ID
2058			}
2059		}
2060	}
2061
2062	return nil
2063}
2064
2065// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2066// application gateway.
2067type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2068	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2069	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2070	// TargetListener - Reference to a listener to redirect the request to.
2071	TargetListener *SubResource `json:"targetListener,omitempty"`
2072	// TargetURL - Url to redirect the request to.
2073	TargetURL *string `json:"targetUrl,omitempty"`
2074	// IncludePath - Include path in the redirected url.
2075	IncludePath *bool `json:"includePath,omitempty"`
2076	// IncludeQueryString - Include query string in the redirected url.
2077	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2078	// RequestRoutingRules - Request routing specifying redirect configuration.
2079	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2080	// URLPathMaps - Url path maps specifying default redirect configuration.
2081	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2082	// PathRules - Path rules specifying redirect configuration.
2083	PathRules *[]SubResource `json:"pathRules,omitempty"`
2084}
2085
2086// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2087type ApplicationGatewayRequestRoutingRule struct {
2088	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2089	// Name - Name of the request routing rule that is unique within an Application Gateway.
2090	Name *string `json:"name,omitempty"`
2091	// Etag - A unique read-only string that changes whenever the resource is updated.
2092	Etag *string `json:"etag,omitempty"`
2093	// Type - Type of the resource.
2094	Type *string `json:"type,omitempty"`
2095	// ID - Resource ID.
2096	ID *string `json:"id,omitempty"`
2097}
2098
2099// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2100func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2101	objectMap := make(map[string]interface{})
2102	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2103		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2104	}
2105	if agrrr.Name != nil {
2106		objectMap["name"] = agrrr.Name
2107	}
2108	if agrrr.Etag != nil {
2109		objectMap["etag"] = agrrr.Etag
2110	}
2111	if agrrr.Type != nil {
2112		objectMap["type"] = agrrr.Type
2113	}
2114	if agrrr.ID != nil {
2115		objectMap["id"] = agrrr.ID
2116	}
2117	return json.Marshal(objectMap)
2118}
2119
2120// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2121func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2122	var m map[string]*json.RawMessage
2123	err := json.Unmarshal(body, &m)
2124	if err != nil {
2125		return err
2126	}
2127	for k, v := range m {
2128		switch k {
2129		case "properties":
2130			if v != nil {
2131				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2132				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2133				if err != nil {
2134					return err
2135				}
2136				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2137			}
2138		case "name":
2139			if v != nil {
2140				var name string
2141				err = json.Unmarshal(*v, &name)
2142				if err != nil {
2143					return err
2144				}
2145				agrrr.Name = &name
2146			}
2147		case "etag":
2148			if v != nil {
2149				var etag string
2150				err = json.Unmarshal(*v, &etag)
2151				if err != nil {
2152					return err
2153				}
2154				agrrr.Etag = &etag
2155			}
2156		case "type":
2157			if v != nil {
2158				var typeVar string
2159				err = json.Unmarshal(*v, &typeVar)
2160				if err != nil {
2161					return err
2162				}
2163				agrrr.Type = &typeVar
2164			}
2165		case "id":
2166			if v != nil {
2167				var ID string
2168				err = json.Unmarshal(*v, &ID)
2169				if err != nil {
2170					return err
2171				}
2172				agrrr.ID = &ID
2173			}
2174		}
2175	}
2176
2177	return nil
2178}
2179
2180// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2181// application gateway.
2182type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2183	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2184	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2185	// BackendAddressPool - Backend address pool resource of the application gateway.
2186	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2187	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2188	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2189	// HTTPListener - Http listener resource of the application gateway.
2190	HTTPListener *SubResource `json:"httpListener,omitempty"`
2191	// URLPathMap - URL path map resource of the application gateway.
2192	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2193	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2194	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2195	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2196	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2197	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2198	ProvisioningState *string `json:"provisioningState,omitempty"`
2199}
2200
2201// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2202type ApplicationGatewayRewriteRule struct {
2203	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2204	Name *string `json:"name,omitempty"`
2205	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2206	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2207}
2208
2209// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2210type ApplicationGatewayRewriteRuleActionSet struct {
2211	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2212	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2213	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2214	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2215}
2216
2217// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2218type ApplicationGatewayRewriteRuleSet struct {
2219	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2220	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2221	Name *string `json:"name,omitempty"`
2222	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2223	Etag *string `json:"etag,omitempty"`
2224	// ID - Resource ID.
2225	ID *string `json:"id,omitempty"`
2226}
2227
2228// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2229func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2230	objectMap := make(map[string]interface{})
2231	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2232		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2233	}
2234	if agrrs.Name != nil {
2235		objectMap["name"] = agrrs.Name
2236	}
2237	if agrrs.ID != nil {
2238		objectMap["id"] = agrrs.ID
2239	}
2240	return json.Marshal(objectMap)
2241}
2242
2243// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2244func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2245	var m map[string]*json.RawMessage
2246	err := json.Unmarshal(body, &m)
2247	if err != nil {
2248		return err
2249	}
2250	for k, v := range m {
2251		switch k {
2252		case "properties":
2253			if v != nil {
2254				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2255				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2256				if err != nil {
2257					return err
2258				}
2259				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2260			}
2261		case "name":
2262			if v != nil {
2263				var name string
2264				err = json.Unmarshal(*v, &name)
2265				if err != nil {
2266					return err
2267				}
2268				agrrs.Name = &name
2269			}
2270		case "etag":
2271			if v != nil {
2272				var etag string
2273				err = json.Unmarshal(*v, &etag)
2274				if err != nil {
2275					return err
2276				}
2277				agrrs.Etag = &etag
2278			}
2279		case "id":
2280			if v != nil {
2281				var ID string
2282				err = json.Unmarshal(*v, &ID)
2283				if err != nil {
2284					return err
2285				}
2286				agrrs.ID = &ID
2287			}
2288		}
2289	}
2290
2291	return nil
2292}
2293
2294// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2295// gateway.
2296type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2297	// RewriteRules - Rewrite rules in the rewrite rule set.
2298	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2299	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2300	ProvisioningState *string `json:"provisioningState,omitempty"`
2301}
2302
2303// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2304func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2305	objectMap := make(map[string]interface{})
2306	if agrrspf.RewriteRules != nil {
2307		objectMap["rewriteRules"] = agrrspf.RewriteRules
2308	}
2309	return json.Marshal(objectMap)
2310}
2311
2312// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2313// long-running operation.
2314type ApplicationGatewaysBackendHealthFuture struct {
2315	azure.FutureAPI
2316	// Result returns the result of the asynchronous operation.
2317	// If the operation has not completed it will return an error.
2318	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2319}
2320
2321// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2322func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2323	var azFuture azure.Future
2324	if err := json.Unmarshal(body, &azFuture); err != nil {
2325		return err
2326	}
2327	future.FutureAPI = &azFuture
2328	future.Result = future.result
2329	return nil
2330}
2331
2332// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2333func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2334	var done bool
2335	done, err = future.DoneWithContext(context.Background(), client)
2336	if err != nil {
2337		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2338		return
2339	}
2340	if !done {
2341		agbh.Response.Response = future.Response()
2342		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2343		return
2344	}
2345	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2346	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2347		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2348		if err != nil {
2349			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2350		}
2351	}
2352	return
2353}
2354
2355// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2356// long-running operation.
2357type ApplicationGatewaysCreateOrUpdateFuture struct {
2358	azure.FutureAPI
2359	// Result returns the result of the asynchronous operation.
2360	// If the operation has not completed it will return an error.
2361	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2362}
2363
2364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2365func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2366	var azFuture azure.Future
2367	if err := json.Unmarshal(body, &azFuture); err != nil {
2368		return err
2369	}
2370	future.FutureAPI = &azFuture
2371	future.Result = future.result
2372	return nil
2373}
2374
2375// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2376func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2377	var done bool
2378	done, err = future.DoneWithContext(context.Background(), client)
2379	if err != nil {
2380		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2381		return
2382	}
2383	if !done {
2384		ag.Response.Response = future.Response()
2385		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2386		return
2387	}
2388	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2389	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2390		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2391		if err != nil {
2392			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2393		}
2394	}
2395	return
2396}
2397
2398// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2399// long-running operation.
2400type ApplicationGatewaysDeleteFuture struct {
2401	azure.FutureAPI
2402	// Result returns the result of the asynchronous operation.
2403	// If the operation has not completed it will return an error.
2404	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2405}
2406
2407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2408func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2409	var azFuture azure.Future
2410	if err := json.Unmarshal(body, &azFuture); err != nil {
2411		return err
2412	}
2413	future.FutureAPI = &azFuture
2414	future.Result = future.result
2415	return nil
2416}
2417
2418// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2419func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2420	var done bool
2421	done, err = future.DoneWithContext(context.Background(), client)
2422	if err != nil {
2423		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2424		return
2425	}
2426	if !done {
2427		ar.Response = future.Response()
2428		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2429		return
2430	}
2431	ar.Response = future.Response()
2432	return
2433}
2434
2435// ApplicationGatewaySku SKU of an application gateway
2436type ApplicationGatewaySku struct {
2437	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2438	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2439	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2440	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2441	// Capacity - Capacity (instance count) of an application gateway.
2442	Capacity *int32 `json:"capacity,omitempty"`
2443}
2444
2445// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2446type ApplicationGatewaySslCertificate struct {
2447	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2448	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2449	Name *string `json:"name,omitempty"`
2450	// Etag - A unique read-only string that changes whenever the resource is updated.
2451	Etag *string `json:"etag,omitempty"`
2452	// Type - Type of the resource.
2453	Type *string `json:"type,omitempty"`
2454	// ID - Resource ID.
2455	ID *string `json:"id,omitempty"`
2456}
2457
2458// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2459func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2460	objectMap := make(map[string]interface{})
2461	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2462		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2463	}
2464	if agsc.Name != nil {
2465		objectMap["name"] = agsc.Name
2466	}
2467	if agsc.Etag != nil {
2468		objectMap["etag"] = agsc.Etag
2469	}
2470	if agsc.Type != nil {
2471		objectMap["type"] = agsc.Type
2472	}
2473	if agsc.ID != nil {
2474		objectMap["id"] = agsc.ID
2475	}
2476	return json.Marshal(objectMap)
2477}
2478
2479// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2480func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2481	var m map[string]*json.RawMessage
2482	err := json.Unmarshal(body, &m)
2483	if err != nil {
2484		return err
2485	}
2486	for k, v := range m {
2487		switch k {
2488		case "properties":
2489			if v != nil {
2490				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2491				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2492				if err != nil {
2493					return err
2494				}
2495				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2496			}
2497		case "name":
2498			if v != nil {
2499				var name string
2500				err = json.Unmarshal(*v, &name)
2501				if err != nil {
2502					return err
2503				}
2504				agsc.Name = &name
2505			}
2506		case "etag":
2507			if v != nil {
2508				var etag string
2509				err = json.Unmarshal(*v, &etag)
2510				if err != nil {
2511					return err
2512				}
2513				agsc.Etag = &etag
2514			}
2515		case "type":
2516			if v != nil {
2517				var typeVar string
2518				err = json.Unmarshal(*v, &typeVar)
2519				if err != nil {
2520					return err
2521				}
2522				agsc.Type = &typeVar
2523			}
2524		case "id":
2525			if v != nil {
2526				var ID string
2527				err = json.Unmarshal(*v, &ID)
2528				if err != nil {
2529					return err
2530				}
2531				agsc.ID = &ID
2532			}
2533		}
2534	}
2535
2536	return nil
2537}
2538
2539// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2540// gateway.
2541type ApplicationGatewaySslCertificatePropertiesFormat struct {
2542	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2543	Data *string `json:"data,omitempty"`
2544	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2545	Password *string `json:"password,omitempty"`
2546	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2547	PublicCertData *string `json:"publicCertData,omitempty"`
2548	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2549	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2550	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2551	ProvisioningState *string `json:"provisioningState,omitempty"`
2552}
2553
2554// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2555type ApplicationGatewaySslPolicy struct {
2556	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2557	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2558	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2559	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2560	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2561	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2562	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2563	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2564	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2565	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2566}
2567
2568// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2569type ApplicationGatewaySslPredefinedPolicy struct {
2570	autorest.Response `json:"-"`
2571	// Name - Name of the Ssl predefined policy.
2572	Name                                                   *string `json:"name,omitempty"`
2573	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2574	// ID - Resource ID.
2575	ID *string `json:"id,omitempty"`
2576}
2577
2578// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2579func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2580	objectMap := make(map[string]interface{})
2581	if agspp.Name != nil {
2582		objectMap["name"] = agspp.Name
2583	}
2584	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2585		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2586	}
2587	if agspp.ID != nil {
2588		objectMap["id"] = agspp.ID
2589	}
2590	return json.Marshal(objectMap)
2591}
2592
2593// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2594func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2595	var m map[string]*json.RawMessage
2596	err := json.Unmarshal(body, &m)
2597	if err != nil {
2598		return err
2599	}
2600	for k, v := range m {
2601		switch k {
2602		case "name":
2603			if v != nil {
2604				var name string
2605				err = json.Unmarshal(*v, &name)
2606				if err != nil {
2607					return err
2608				}
2609				agspp.Name = &name
2610			}
2611		case "properties":
2612			if v != nil {
2613				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2614				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2615				if err != nil {
2616					return err
2617				}
2618				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2619			}
2620		case "id":
2621			if v != nil {
2622				var ID string
2623				err = json.Unmarshal(*v, &ID)
2624				if err != nil {
2625					return err
2626				}
2627				agspp.ID = &ID
2628			}
2629		}
2630	}
2631
2632	return nil
2633}
2634
2635// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2636// ApplicationGatewaySslPredefinedPolicy
2637type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2638	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2639	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2640	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2641	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2642}
2643
2644// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2645// long-running operation.
2646type ApplicationGatewaysStartFuture struct {
2647	azure.FutureAPI
2648	// Result returns the result of the asynchronous operation.
2649	// If the operation has not completed it will return an error.
2650	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2651}
2652
2653// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2654func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2655	var azFuture azure.Future
2656	if err := json.Unmarshal(body, &azFuture); err != nil {
2657		return err
2658	}
2659	future.FutureAPI = &azFuture
2660	future.Result = future.result
2661	return nil
2662}
2663
2664// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2665func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2666	var done bool
2667	done, err = future.DoneWithContext(context.Background(), client)
2668	if err != nil {
2669		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2670		return
2671	}
2672	if !done {
2673		ar.Response = future.Response()
2674		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2675		return
2676	}
2677	ar.Response = future.Response()
2678	return
2679}
2680
2681// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2682// operation.
2683type ApplicationGatewaysStopFuture struct {
2684	azure.FutureAPI
2685	// Result returns the result of the asynchronous operation.
2686	// If the operation has not completed it will return an error.
2687	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2688}
2689
2690// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2691func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2692	var azFuture azure.Future
2693	if err := json.Unmarshal(body, &azFuture); err != nil {
2694		return err
2695	}
2696	future.FutureAPI = &azFuture
2697	future.Result = future.result
2698	return nil
2699}
2700
2701// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2702func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2703	var done bool
2704	done, err = future.DoneWithContext(context.Background(), client)
2705	if err != nil {
2706		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2707		return
2708	}
2709	if !done {
2710		ar.Response = future.Response()
2711		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2712		return
2713	}
2714	ar.Response = future.Response()
2715	return
2716}
2717
2718// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2719// long-running operation.
2720type ApplicationGatewaysUpdateTagsFuture struct {
2721	azure.FutureAPI
2722	// Result returns the result of the asynchronous operation.
2723	// If the operation has not completed it will return an error.
2724	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2725}
2726
2727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2728func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2729	var azFuture azure.Future
2730	if err := json.Unmarshal(body, &azFuture); err != nil {
2731		return err
2732	}
2733	future.FutureAPI = &azFuture
2734	future.Result = future.result
2735	return nil
2736}
2737
2738// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2739func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2740	var done bool
2741	done, err = future.DoneWithContext(context.Background(), client)
2742	if err != nil {
2743		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2744		return
2745	}
2746	if !done {
2747		ag.Response.Response = future.Response()
2748		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2749		return
2750	}
2751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2752	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2753		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2754		if err != nil {
2755			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2756		}
2757	}
2758	return
2759}
2760
2761// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2762type ApplicationGatewayTrustedRootCertificate struct {
2763	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2764	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2765	Name *string `json:"name,omitempty"`
2766	// Etag - A unique read-only string that changes whenever the resource is updated.
2767	Etag *string `json:"etag,omitempty"`
2768	// Type - Type of the resource.
2769	Type *string `json:"type,omitempty"`
2770	// ID - Resource ID.
2771	ID *string `json:"id,omitempty"`
2772}
2773
2774// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2775func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2776	objectMap := make(map[string]interface{})
2777	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2778		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2779	}
2780	if agtrc.Name != nil {
2781		objectMap["name"] = agtrc.Name
2782	}
2783	if agtrc.Etag != nil {
2784		objectMap["etag"] = agtrc.Etag
2785	}
2786	if agtrc.Type != nil {
2787		objectMap["type"] = agtrc.Type
2788	}
2789	if agtrc.ID != nil {
2790		objectMap["id"] = agtrc.ID
2791	}
2792	return json.Marshal(objectMap)
2793}
2794
2795// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2796func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2797	var m map[string]*json.RawMessage
2798	err := json.Unmarshal(body, &m)
2799	if err != nil {
2800		return err
2801	}
2802	for k, v := range m {
2803		switch k {
2804		case "properties":
2805			if v != nil {
2806				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2807				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2808				if err != nil {
2809					return err
2810				}
2811				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2812			}
2813		case "name":
2814			if v != nil {
2815				var name string
2816				err = json.Unmarshal(*v, &name)
2817				if err != nil {
2818					return err
2819				}
2820				agtrc.Name = &name
2821			}
2822		case "etag":
2823			if v != nil {
2824				var etag string
2825				err = json.Unmarshal(*v, &etag)
2826				if err != nil {
2827					return err
2828				}
2829				agtrc.Etag = &etag
2830			}
2831		case "type":
2832			if v != nil {
2833				var typeVar string
2834				err = json.Unmarshal(*v, &typeVar)
2835				if err != nil {
2836					return err
2837				}
2838				agtrc.Type = &typeVar
2839			}
2840		case "id":
2841			if v != nil {
2842				var ID string
2843				err = json.Unmarshal(*v, &ID)
2844				if err != nil {
2845					return err
2846				}
2847				agtrc.ID = &ID
2848			}
2849		}
2850	}
2851
2852	return nil
2853}
2854
2855// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2856// application gateway.
2857type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2858	// Data - Certificate public data.
2859	Data *string `json:"data,omitempty"`
2860	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2861	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2862	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2863	ProvisioningState *string `json:"provisioningState,omitempty"`
2864}
2865
2866// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2867// PathBasedRouting.
2868type ApplicationGatewayURLPathMap struct {
2869	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2870	// Name - Name of the URL path map that is unique within an Application Gateway.
2871	Name *string `json:"name,omitempty"`
2872	// Etag - A unique read-only string that changes whenever the resource is updated.
2873	Etag *string `json:"etag,omitempty"`
2874	// Type - Type of the resource.
2875	Type *string `json:"type,omitempty"`
2876	// ID - Resource ID.
2877	ID *string `json:"id,omitempty"`
2878}
2879
2880// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2881func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2882	objectMap := make(map[string]interface{})
2883	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2884		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2885	}
2886	if agupm.Name != nil {
2887		objectMap["name"] = agupm.Name
2888	}
2889	if agupm.Etag != nil {
2890		objectMap["etag"] = agupm.Etag
2891	}
2892	if agupm.Type != nil {
2893		objectMap["type"] = agupm.Type
2894	}
2895	if agupm.ID != nil {
2896		objectMap["id"] = agupm.ID
2897	}
2898	return json.Marshal(objectMap)
2899}
2900
2901// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2902func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2903	var m map[string]*json.RawMessage
2904	err := json.Unmarshal(body, &m)
2905	if err != nil {
2906		return err
2907	}
2908	for k, v := range m {
2909		switch k {
2910		case "properties":
2911			if v != nil {
2912				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2913				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2914				if err != nil {
2915					return err
2916				}
2917				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2918			}
2919		case "name":
2920			if v != nil {
2921				var name string
2922				err = json.Unmarshal(*v, &name)
2923				if err != nil {
2924					return err
2925				}
2926				agupm.Name = &name
2927			}
2928		case "etag":
2929			if v != nil {
2930				var etag string
2931				err = json.Unmarshal(*v, &etag)
2932				if err != nil {
2933					return err
2934				}
2935				agupm.Etag = &etag
2936			}
2937		case "type":
2938			if v != nil {
2939				var typeVar string
2940				err = json.Unmarshal(*v, &typeVar)
2941				if err != nil {
2942					return err
2943				}
2944				agupm.Type = &typeVar
2945			}
2946		case "id":
2947			if v != nil {
2948				var ID string
2949				err = json.Unmarshal(*v, &ID)
2950				if err != nil {
2951					return err
2952				}
2953				agupm.ID = &ID
2954			}
2955		}
2956	}
2957
2958	return nil
2959}
2960
2961// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2962type ApplicationGatewayURLPathMapPropertiesFormat struct {
2963	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2964	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2965	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2966	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2967	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2968	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2969	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2970	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2971	// PathRules - Path rule of URL path map resource.
2972	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2973	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2974	ProvisioningState *string `json:"provisioningState,omitempty"`
2975}
2976
2977// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2978// configuration.
2979type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2980	// Enabled - Whether the web application firewall is enabled or not.
2981	Enabled *bool `json:"enabled,omitempty"`
2982	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2983	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2984	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2985	RuleSetType *string `json:"ruleSetType,omitempty"`
2986	// RuleSetVersion - The version of the rule set type.
2987	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2988	// DisabledRuleGroups - The disabled rule groups.
2989	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2990	// RequestBodyCheck - Whether allow WAF to check request Body.
2991	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2992	// MaxRequestBodySize - Maximum request body size for WAF.
2993	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2994	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2995	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2996	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2997	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
2998	// Exclusions - The exclusion list.
2999	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3000}
3001
3002// ApplicationSecurityGroup an application security group in a resource group.
3003type ApplicationSecurityGroup struct {
3004	autorest.Response `json:"-"`
3005	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3006	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3007	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3008	Etag *string `json:"etag,omitempty"`
3009	// ID - Resource ID.
3010	ID *string `json:"id,omitempty"`
3011	// Name - READ-ONLY; Resource name.
3012	Name *string `json:"name,omitempty"`
3013	// Type - READ-ONLY; Resource type.
3014	Type *string `json:"type,omitempty"`
3015	// Location - Resource location.
3016	Location *string `json:"location,omitempty"`
3017	// Tags - Resource tags.
3018	Tags map[string]*string `json:"tags"`
3019}
3020
3021// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3022func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3023	objectMap := make(map[string]interface{})
3024	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3025		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3026	}
3027	if asg.ID != nil {
3028		objectMap["id"] = asg.ID
3029	}
3030	if asg.Location != nil {
3031		objectMap["location"] = asg.Location
3032	}
3033	if asg.Tags != nil {
3034		objectMap["tags"] = asg.Tags
3035	}
3036	return json.Marshal(objectMap)
3037}
3038
3039// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3040func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3041	var m map[string]*json.RawMessage
3042	err := json.Unmarshal(body, &m)
3043	if err != nil {
3044		return err
3045	}
3046	for k, v := range m {
3047		switch k {
3048		case "properties":
3049			if v != nil {
3050				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3051				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3052				if err != nil {
3053					return err
3054				}
3055				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3056			}
3057		case "etag":
3058			if v != nil {
3059				var etag string
3060				err = json.Unmarshal(*v, &etag)
3061				if err != nil {
3062					return err
3063				}
3064				asg.Etag = &etag
3065			}
3066		case "id":
3067			if v != nil {
3068				var ID string
3069				err = json.Unmarshal(*v, &ID)
3070				if err != nil {
3071					return err
3072				}
3073				asg.ID = &ID
3074			}
3075		case "name":
3076			if v != nil {
3077				var name string
3078				err = json.Unmarshal(*v, &name)
3079				if err != nil {
3080					return err
3081				}
3082				asg.Name = &name
3083			}
3084		case "type":
3085			if v != nil {
3086				var typeVar string
3087				err = json.Unmarshal(*v, &typeVar)
3088				if err != nil {
3089					return err
3090				}
3091				asg.Type = &typeVar
3092			}
3093		case "location":
3094			if v != nil {
3095				var location string
3096				err = json.Unmarshal(*v, &location)
3097				if err != nil {
3098					return err
3099				}
3100				asg.Location = &location
3101			}
3102		case "tags":
3103			if v != nil {
3104				var tags map[string]*string
3105				err = json.Unmarshal(*v, &tags)
3106				if err != nil {
3107					return err
3108				}
3109				asg.Tags = tags
3110			}
3111		}
3112	}
3113
3114	return nil
3115}
3116
3117// ApplicationSecurityGroupListResult a list of application security groups.
3118type ApplicationSecurityGroupListResult struct {
3119	autorest.Response `json:"-"`
3120	// Value - A list of application security groups.
3121	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3122	// NextLink - READ-ONLY; The URL to get the next set of results.
3123	NextLink *string `json:"nextLink,omitempty"`
3124}
3125
3126// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3127func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3128	objectMap := make(map[string]interface{})
3129	if asglr.Value != nil {
3130		objectMap["value"] = asglr.Value
3131	}
3132	return json.Marshal(objectMap)
3133}
3134
3135// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3136// ApplicationSecurityGroup values.
3137type ApplicationSecurityGroupListResultIterator struct {
3138	i    int
3139	page ApplicationSecurityGroupListResultPage
3140}
3141
3142// NextWithContext advances to the next value.  If there was an error making
3143// the request the iterator does not advance and the error is returned.
3144func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3145	if tracing.IsEnabled() {
3146		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3147		defer func() {
3148			sc := -1
3149			if iter.Response().Response.Response != nil {
3150				sc = iter.Response().Response.Response.StatusCode
3151			}
3152			tracing.EndSpan(ctx, sc, err)
3153		}()
3154	}
3155	iter.i++
3156	if iter.i < len(iter.page.Values()) {
3157		return nil
3158	}
3159	err = iter.page.NextWithContext(ctx)
3160	if err != nil {
3161		iter.i--
3162		return err
3163	}
3164	iter.i = 0
3165	return nil
3166}
3167
3168// Next advances to the next value.  If there was an error making
3169// the request the iterator does not advance and the error is returned.
3170// Deprecated: Use NextWithContext() instead.
3171func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3172	return iter.NextWithContext(context.Background())
3173}
3174
3175// NotDone returns true if the enumeration should be started or is not yet complete.
3176func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3177	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3178}
3179
3180// Response returns the raw server response from the last page request.
3181func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3182	return iter.page.Response()
3183}
3184
3185// Value returns the current value or a zero-initialized value if the
3186// iterator has advanced beyond the end of the collection.
3187func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3188	if !iter.page.NotDone() {
3189		return ApplicationSecurityGroup{}
3190	}
3191	return iter.page.Values()[iter.i]
3192}
3193
3194// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3195func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3196	return ApplicationSecurityGroupListResultIterator{page: page}
3197}
3198
3199// IsEmpty returns true if the ListResult contains no values.
3200func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3201	return asglr.Value == nil || len(*asglr.Value) == 0
3202}
3203
3204// hasNextLink returns true if the NextLink is not empty.
3205func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3206	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3207}
3208
3209// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3210// It returns nil if no more results exist.
3211func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3212	if !asglr.hasNextLink() {
3213		return nil, nil
3214	}
3215	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3216		autorest.AsJSON(),
3217		autorest.AsGet(),
3218		autorest.WithBaseURL(to.String(asglr.NextLink)))
3219}
3220
3221// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3222type ApplicationSecurityGroupListResultPage struct {
3223	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3224	asglr ApplicationSecurityGroupListResult
3225}
3226
3227// NextWithContext advances to the next page of values.  If there was an error making
3228// the request the page does not advance and the error is returned.
3229func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3230	if tracing.IsEnabled() {
3231		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3232		defer func() {
3233			sc := -1
3234			if page.Response().Response.Response != nil {
3235				sc = page.Response().Response.Response.StatusCode
3236			}
3237			tracing.EndSpan(ctx, sc, err)
3238		}()
3239	}
3240	for {
3241		next, err := page.fn(ctx, page.asglr)
3242		if err != nil {
3243			return err
3244		}
3245		page.asglr = next
3246		if !next.hasNextLink() || !next.IsEmpty() {
3247			break
3248		}
3249	}
3250	return nil
3251}
3252
3253// Next advances to the next page of values.  If there was an error making
3254// the request the page does not advance and the error is returned.
3255// Deprecated: Use NextWithContext() instead.
3256func (page *ApplicationSecurityGroupListResultPage) Next() error {
3257	return page.NextWithContext(context.Background())
3258}
3259
3260// NotDone returns true if the page enumeration should be started or is not yet complete.
3261func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3262	return !page.asglr.IsEmpty()
3263}
3264
3265// Response returns the raw server response from the last page request.
3266func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3267	return page.asglr
3268}
3269
3270// Values returns the slice of values for the current page or nil if there are no values.
3271func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3272	if page.asglr.IsEmpty() {
3273		return nil
3274	}
3275	return *page.asglr.Value
3276}
3277
3278// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3279func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3280	return ApplicationSecurityGroupListResultPage{
3281		fn:    getNextPage,
3282		asglr: cur,
3283	}
3284}
3285
3286// ApplicationSecurityGroupPropertiesFormat application security group properties.
3287type ApplicationSecurityGroupPropertiesFormat struct {
3288	// 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.
3289	ResourceGUID *string `json:"resourceGuid,omitempty"`
3290	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3291	ProvisioningState *string `json:"provisioningState,omitempty"`
3292}
3293
3294// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3295func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3296	objectMap := make(map[string]interface{})
3297	return json.Marshal(objectMap)
3298}
3299
3300// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3301// of a long-running operation.
3302type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3303	azure.FutureAPI
3304	// Result returns the result of the asynchronous operation.
3305	// If the operation has not completed it will return an error.
3306	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3307}
3308
3309// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3310func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3311	var azFuture azure.Future
3312	if err := json.Unmarshal(body, &azFuture); err != nil {
3313		return err
3314	}
3315	future.FutureAPI = &azFuture
3316	future.Result = future.result
3317	return nil
3318}
3319
3320// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3321func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3322	var done bool
3323	done, err = future.DoneWithContext(context.Background(), client)
3324	if err != nil {
3325		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3326		return
3327	}
3328	if !done {
3329		asg.Response.Response = future.Response()
3330		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3331		return
3332	}
3333	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3334	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3335		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3336		if err != nil {
3337			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3338		}
3339	}
3340	return
3341}
3342
3343// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3344// long-running operation.
3345type ApplicationSecurityGroupsDeleteFuture struct {
3346	azure.FutureAPI
3347	// Result returns the result of the asynchronous operation.
3348	// If the operation has not completed it will return an error.
3349	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3350}
3351
3352// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3353func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3354	var azFuture azure.Future
3355	if err := json.Unmarshal(body, &azFuture); err != nil {
3356		return err
3357	}
3358	future.FutureAPI = &azFuture
3359	future.Result = future.result
3360	return nil
3361}
3362
3363// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3364func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3365	var done bool
3366	done, err = future.DoneWithContext(context.Background(), client)
3367	if err != nil {
3368		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3369		return
3370	}
3371	if !done {
3372		ar.Response = future.Response()
3373		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3374		return
3375	}
3376	ar.Response = future.Response()
3377	return
3378}
3379
3380// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3381// that belongs to an ExpressRouteCircuit.
3382type AuthorizationListResult struct {
3383	autorest.Response `json:"-"`
3384	// Value - The authorizations in an ExpressRoute Circuit.
3385	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3386	// NextLink - The URL to get the next set of results.
3387	NextLink *string `json:"nextLink,omitempty"`
3388}
3389
3390// AuthorizationListResultIterator provides access to a complete listing of
3391// ExpressRouteCircuitAuthorization values.
3392type AuthorizationListResultIterator struct {
3393	i    int
3394	page AuthorizationListResultPage
3395}
3396
3397// NextWithContext advances to the next value.  If there was an error making
3398// the request the iterator does not advance and the error is returned.
3399func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3400	if tracing.IsEnabled() {
3401		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3402		defer func() {
3403			sc := -1
3404			if iter.Response().Response.Response != nil {
3405				sc = iter.Response().Response.Response.StatusCode
3406			}
3407			tracing.EndSpan(ctx, sc, err)
3408		}()
3409	}
3410	iter.i++
3411	if iter.i < len(iter.page.Values()) {
3412		return nil
3413	}
3414	err = iter.page.NextWithContext(ctx)
3415	if err != nil {
3416		iter.i--
3417		return err
3418	}
3419	iter.i = 0
3420	return nil
3421}
3422
3423// Next advances to the next value.  If there was an error making
3424// the request the iterator does not advance and the error is returned.
3425// Deprecated: Use NextWithContext() instead.
3426func (iter *AuthorizationListResultIterator) Next() error {
3427	return iter.NextWithContext(context.Background())
3428}
3429
3430// NotDone returns true if the enumeration should be started or is not yet complete.
3431func (iter AuthorizationListResultIterator) NotDone() bool {
3432	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3433}
3434
3435// Response returns the raw server response from the last page request.
3436func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3437	return iter.page.Response()
3438}
3439
3440// Value returns the current value or a zero-initialized value if the
3441// iterator has advanced beyond the end of the collection.
3442func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3443	if !iter.page.NotDone() {
3444		return ExpressRouteCircuitAuthorization{}
3445	}
3446	return iter.page.Values()[iter.i]
3447}
3448
3449// Creates a new instance of the AuthorizationListResultIterator type.
3450func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3451	return AuthorizationListResultIterator{page: page}
3452}
3453
3454// IsEmpty returns true if the ListResult contains no values.
3455func (alr AuthorizationListResult) IsEmpty() bool {
3456	return alr.Value == nil || len(*alr.Value) == 0
3457}
3458
3459// hasNextLink returns true if the NextLink is not empty.
3460func (alr AuthorizationListResult) hasNextLink() bool {
3461	return alr.NextLink != nil && len(*alr.NextLink) != 0
3462}
3463
3464// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3465// It returns nil if no more results exist.
3466func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3467	if !alr.hasNextLink() {
3468		return nil, nil
3469	}
3470	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3471		autorest.AsJSON(),
3472		autorest.AsGet(),
3473		autorest.WithBaseURL(to.String(alr.NextLink)))
3474}
3475
3476// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3477type AuthorizationListResultPage struct {
3478	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3479	alr AuthorizationListResult
3480}
3481
3482// NextWithContext advances to the next page of values.  If there was an error making
3483// the request the page does not advance and the error is returned.
3484func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3485	if tracing.IsEnabled() {
3486		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3487		defer func() {
3488			sc := -1
3489			if page.Response().Response.Response != nil {
3490				sc = page.Response().Response.Response.StatusCode
3491			}
3492			tracing.EndSpan(ctx, sc, err)
3493		}()
3494	}
3495	for {
3496		next, err := page.fn(ctx, page.alr)
3497		if err != nil {
3498			return err
3499		}
3500		page.alr = next
3501		if !next.hasNextLink() || !next.IsEmpty() {
3502			break
3503		}
3504	}
3505	return nil
3506}
3507
3508// Next advances to the next page of values.  If there was an error making
3509// the request the page does not advance and the error is returned.
3510// Deprecated: Use NextWithContext() instead.
3511func (page *AuthorizationListResultPage) Next() error {
3512	return page.NextWithContext(context.Background())
3513}
3514
3515// NotDone returns true if the page enumeration should be started or is not yet complete.
3516func (page AuthorizationListResultPage) NotDone() bool {
3517	return !page.alr.IsEmpty()
3518}
3519
3520// Response returns the raw server response from the last page request.
3521func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3522	return page.alr
3523}
3524
3525// Values returns the slice of values for the current page or nil if there are no values.
3526func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3527	if page.alr.IsEmpty() {
3528		return nil
3529	}
3530	return *page.alr.Value
3531}
3532
3533// Creates a new instance of the AuthorizationListResultPage type.
3534func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3535	return AuthorizationListResultPage{
3536		fn:  getNextPage,
3537		alr: cur,
3538	}
3539}
3540
3541// AuthorizationPropertiesFormat ...
3542type AuthorizationPropertiesFormat struct {
3543	// AuthorizationKey - The authorization key.
3544	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3545	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3546	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3547	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3548	ProvisioningState *string `json:"provisioningState,omitempty"`
3549}
3550
3551// Availability availability of the metric.
3552type Availability struct {
3553	// TimeGrain - The time grain of the availability.
3554	TimeGrain *string `json:"timeGrain,omitempty"`
3555	// Retention - The retention of the availability.
3556	Retention *string `json:"retention,omitempty"`
3557	// BlobDuration - Duration of the availability blob.
3558	BlobDuration *string `json:"blobDuration,omitempty"`
3559}
3560
3561// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3562// subnet.
3563type AvailableDelegation struct {
3564	// Name - The name of the AvailableDelegation resource.
3565	Name *string `json:"name,omitempty"`
3566	// ID - A unique identifier of the AvailableDelegation resource.
3567	ID *string `json:"id,omitempty"`
3568	// Type - Resource type.
3569	Type *string `json:"type,omitempty"`
3570	// ServiceName - The name of the service and resource
3571	ServiceName *string `json:"serviceName,omitempty"`
3572	// Actions - Describes the actions permitted to the service upon delegation
3573	Actions *[]string `json:"actions,omitempty"`
3574}
3575
3576// AvailableDelegationsResult an array of available delegations.
3577type AvailableDelegationsResult struct {
3578	autorest.Response `json:"-"`
3579	// Value - An array of available delegations.
3580	Value *[]AvailableDelegation `json:"value,omitempty"`
3581	// NextLink - READ-ONLY; The URL to get the next set of results.
3582	NextLink *string `json:"nextLink,omitempty"`
3583}
3584
3585// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3586func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3587	objectMap := make(map[string]interface{})
3588	if adr.Value != nil {
3589		objectMap["value"] = adr.Value
3590	}
3591	return json.Marshal(objectMap)
3592}
3593
3594// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3595type AvailableDelegationsResultIterator struct {
3596	i    int
3597	page AvailableDelegationsResultPage
3598}
3599
3600// NextWithContext advances to the next value.  If there was an error making
3601// the request the iterator does not advance and the error is returned.
3602func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3603	if tracing.IsEnabled() {
3604		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3605		defer func() {
3606			sc := -1
3607			if iter.Response().Response.Response != nil {
3608				sc = iter.Response().Response.Response.StatusCode
3609			}
3610			tracing.EndSpan(ctx, sc, err)
3611		}()
3612	}
3613	iter.i++
3614	if iter.i < len(iter.page.Values()) {
3615		return nil
3616	}
3617	err = iter.page.NextWithContext(ctx)
3618	if err != nil {
3619		iter.i--
3620		return err
3621	}
3622	iter.i = 0
3623	return nil
3624}
3625
3626// Next advances to the next value.  If there was an error making
3627// the request the iterator does not advance and the error is returned.
3628// Deprecated: Use NextWithContext() instead.
3629func (iter *AvailableDelegationsResultIterator) Next() error {
3630	return iter.NextWithContext(context.Background())
3631}
3632
3633// NotDone returns true if the enumeration should be started or is not yet complete.
3634func (iter AvailableDelegationsResultIterator) NotDone() bool {
3635	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3636}
3637
3638// Response returns the raw server response from the last page request.
3639func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3640	return iter.page.Response()
3641}
3642
3643// Value returns the current value or a zero-initialized value if the
3644// iterator has advanced beyond the end of the collection.
3645func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3646	if !iter.page.NotDone() {
3647		return AvailableDelegation{}
3648	}
3649	return iter.page.Values()[iter.i]
3650}
3651
3652// Creates a new instance of the AvailableDelegationsResultIterator type.
3653func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3654	return AvailableDelegationsResultIterator{page: page}
3655}
3656
3657// IsEmpty returns true if the ListResult contains no values.
3658func (adr AvailableDelegationsResult) IsEmpty() bool {
3659	return adr.Value == nil || len(*adr.Value) == 0
3660}
3661
3662// hasNextLink returns true if the NextLink is not empty.
3663func (adr AvailableDelegationsResult) hasNextLink() bool {
3664	return adr.NextLink != nil && len(*adr.NextLink) != 0
3665}
3666
3667// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3668// It returns nil if no more results exist.
3669func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3670	if !adr.hasNextLink() {
3671		return nil, nil
3672	}
3673	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3674		autorest.AsJSON(),
3675		autorest.AsGet(),
3676		autorest.WithBaseURL(to.String(adr.NextLink)))
3677}
3678
3679// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3680type AvailableDelegationsResultPage struct {
3681	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3682	adr AvailableDelegationsResult
3683}
3684
3685// NextWithContext advances to the next page of values.  If there was an error making
3686// the request the page does not advance and the error is returned.
3687func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3688	if tracing.IsEnabled() {
3689		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3690		defer func() {
3691			sc := -1
3692			if page.Response().Response.Response != nil {
3693				sc = page.Response().Response.Response.StatusCode
3694			}
3695			tracing.EndSpan(ctx, sc, err)
3696		}()
3697	}
3698	for {
3699		next, err := page.fn(ctx, page.adr)
3700		if err != nil {
3701			return err
3702		}
3703		page.adr = next
3704		if !next.hasNextLink() || !next.IsEmpty() {
3705			break
3706		}
3707	}
3708	return nil
3709}
3710
3711// Next advances to the next page of values.  If there was an error making
3712// the request the page does not advance and the error is returned.
3713// Deprecated: Use NextWithContext() instead.
3714func (page *AvailableDelegationsResultPage) Next() error {
3715	return page.NextWithContext(context.Background())
3716}
3717
3718// NotDone returns true if the page enumeration should be started or is not yet complete.
3719func (page AvailableDelegationsResultPage) NotDone() bool {
3720	return !page.adr.IsEmpty()
3721}
3722
3723// Response returns the raw server response from the last page request.
3724func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3725	return page.adr
3726}
3727
3728// Values returns the slice of values for the current page or nil if there are no values.
3729func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3730	if page.adr.IsEmpty() {
3731		return nil
3732	}
3733	return *page.adr.Value
3734}
3735
3736// Creates a new instance of the AvailableDelegationsResultPage type.
3737func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3738	return AvailableDelegationsResultPage{
3739		fn:  getNextPage,
3740		adr: cur,
3741	}
3742}
3743
3744// AvailableProvidersList list of available countries with details.
3745type AvailableProvidersList struct {
3746	autorest.Response `json:"-"`
3747	// Countries - List of available countries.
3748	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3749}
3750
3751// AvailableProvidersListCity city or town details.
3752type AvailableProvidersListCity struct {
3753	// CityName - The city or town name.
3754	CityName *string `json:"cityName,omitempty"`
3755	// Providers - A list of Internet service providers.
3756	Providers *[]string `json:"providers,omitempty"`
3757}
3758
3759// AvailableProvidersListCountry country details.
3760type AvailableProvidersListCountry struct {
3761	// CountryName - The country name.
3762	CountryName *string `json:"countryName,omitempty"`
3763	// Providers - A list of Internet service providers.
3764	Providers *[]string `json:"providers,omitempty"`
3765	// States - List of available states in the country.
3766	States *[]AvailableProvidersListState `json:"states,omitempty"`
3767}
3768
3769// AvailableProvidersListParameters constraints that determine the list of available Internet service
3770// providers.
3771type AvailableProvidersListParameters struct {
3772	// AzureLocations - A list of Azure regions.
3773	AzureLocations *[]string `json:"azureLocations,omitempty"`
3774	// Country - The country for available providers list.
3775	Country *string `json:"country,omitempty"`
3776	// State - The state for available providers list.
3777	State *string `json:"state,omitempty"`
3778	// City - The city or town for available providers list.
3779	City *string `json:"city,omitempty"`
3780}
3781
3782// AvailableProvidersListState state details.
3783type AvailableProvidersListState struct {
3784	// StateName - The state name.
3785	StateName *string `json:"stateName,omitempty"`
3786	// Providers - A list of Internet service providers.
3787	Providers *[]string `json:"providers,omitempty"`
3788	// Cities - List of available cities or towns in the state.
3789	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3790}
3791
3792// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3793// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3794// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3795// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3796// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3797// and error information regarding the failure.
3798type AzureAsyncOperationResult struct {
3799	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3800	Status OperationStatus `json:"status,omitempty"`
3801	Error  *Error          `json:"error,omitempty"`
3802}
3803
3804// AzureFirewall azure Firewall resource
3805type AzureFirewall struct {
3806	autorest.Response              `json:"-"`
3807	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3808	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3809	Etag *string `json:"etag,omitempty"`
3810	// ID - Resource ID.
3811	ID *string `json:"id,omitempty"`
3812	// Name - READ-ONLY; Resource name.
3813	Name *string `json:"name,omitempty"`
3814	// Type - READ-ONLY; Resource type.
3815	Type *string `json:"type,omitempty"`
3816	// Location - Resource location.
3817	Location *string `json:"location,omitempty"`
3818	// Tags - Resource tags.
3819	Tags map[string]*string `json:"tags"`
3820}
3821
3822// MarshalJSON is the custom marshaler for AzureFirewall.
3823func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3824	objectMap := make(map[string]interface{})
3825	if af.AzureFirewallPropertiesFormat != nil {
3826		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3827	}
3828	if af.ID != nil {
3829		objectMap["id"] = af.ID
3830	}
3831	if af.Location != nil {
3832		objectMap["location"] = af.Location
3833	}
3834	if af.Tags != nil {
3835		objectMap["tags"] = af.Tags
3836	}
3837	return json.Marshal(objectMap)
3838}
3839
3840// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3841func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3842	var m map[string]*json.RawMessage
3843	err := json.Unmarshal(body, &m)
3844	if err != nil {
3845		return err
3846	}
3847	for k, v := range m {
3848		switch k {
3849		case "properties":
3850			if v != nil {
3851				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3852				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3853				if err != nil {
3854					return err
3855				}
3856				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3857			}
3858		case "etag":
3859			if v != nil {
3860				var etag string
3861				err = json.Unmarshal(*v, &etag)
3862				if err != nil {
3863					return err
3864				}
3865				af.Etag = &etag
3866			}
3867		case "id":
3868			if v != nil {
3869				var ID string
3870				err = json.Unmarshal(*v, &ID)
3871				if err != nil {
3872					return err
3873				}
3874				af.ID = &ID
3875			}
3876		case "name":
3877			if v != nil {
3878				var name string
3879				err = json.Unmarshal(*v, &name)
3880				if err != nil {
3881					return err
3882				}
3883				af.Name = &name
3884			}
3885		case "type":
3886			if v != nil {
3887				var typeVar string
3888				err = json.Unmarshal(*v, &typeVar)
3889				if err != nil {
3890					return err
3891				}
3892				af.Type = &typeVar
3893			}
3894		case "location":
3895			if v != nil {
3896				var location string
3897				err = json.Unmarshal(*v, &location)
3898				if err != nil {
3899					return err
3900				}
3901				af.Location = &location
3902			}
3903		case "tags":
3904			if v != nil {
3905				var tags map[string]*string
3906				err = json.Unmarshal(*v, &tags)
3907				if err != nil {
3908					return err
3909				}
3910				af.Tags = tags
3911			}
3912		}
3913	}
3914
3915	return nil
3916}
3917
3918// AzureFirewallApplicationRule properties of an application rule.
3919type AzureFirewallApplicationRule struct {
3920	// Name - Name of the application rule.
3921	Name *string `json:"name,omitempty"`
3922	// Description - Description of the rule.
3923	Description *string `json:"description,omitempty"`
3924	// SourceAddresses - List of source IP addresses for this rule.
3925	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3926	// Protocols - Array of ApplicationRuleProtocols.
3927	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3928	// TargetFqdns - List of FQDNs for this rule.
3929	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3930	// FqdnTags - List of FQDN Tags for this rule.
3931	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3932}
3933
3934// AzureFirewallApplicationRuleCollection application rule collection resource
3935type AzureFirewallApplicationRuleCollection struct {
3936	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3937	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3938	Name *string `json:"name,omitempty"`
3939	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3940	Etag *string `json:"etag,omitempty"`
3941	// ID - Resource ID.
3942	ID *string `json:"id,omitempty"`
3943}
3944
3945// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3946func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3947	objectMap := make(map[string]interface{})
3948	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3949		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3950	}
3951	if afarc.Name != nil {
3952		objectMap["name"] = afarc.Name
3953	}
3954	if afarc.ID != nil {
3955		objectMap["id"] = afarc.ID
3956	}
3957	return json.Marshal(objectMap)
3958}
3959
3960// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3961func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3962	var m map[string]*json.RawMessage
3963	err := json.Unmarshal(body, &m)
3964	if err != nil {
3965		return err
3966	}
3967	for k, v := range m {
3968		switch k {
3969		case "properties":
3970			if v != nil {
3971				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3972				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3973				if err != nil {
3974					return err
3975				}
3976				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3977			}
3978		case "name":
3979			if v != nil {
3980				var name string
3981				err = json.Unmarshal(*v, &name)
3982				if err != nil {
3983					return err
3984				}
3985				afarc.Name = &name
3986			}
3987		case "etag":
3988			if v != nil {
3989				var etag string
3990				err = json.Unmarshal(*v, &etag)
3991				if err != nil {
3992					return err
3993				}
3994				afarc.Etag = &etag
3995			}
3996		case "id":
3997			if v != nil {
3998				var ID string
3999				err = json.Unmarshal(*v, &ID)
4000				if err != nil {
4001					return err
4002				}
4003				afarc.ID = &ID
4004			}
4005		}
4006	}
4007
4008	return nil
4009}
4010
4011// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4012type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4013	// Priority - Priority of the application rule collection resource.
4014	Priority *int32 `json:"priority,omitempty"`
4015	// Action - The action type of a rule collection
4016	Action *AzureFirewallRCAction `json:"action,omitempty"`
4017	// Rules - Collection of rules used by a application rule collection.
4018	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4019	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4020	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4021}
4022
4023// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4024type AzureFirewallApplicationRuleProtocol struct {
4025	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4026	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4027	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4028	Port *int32 `json:"port,omitempty"`
4029}
4030
4031// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
4032type AzureFirewallFqdnTag struct {
4033	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4034	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4035	Etag *string `json:"etag,omitempty"`
4036	// ID - Resource ID.
4037	ID *string `json:"id,omitempty"`
4038	// Name - READ-ONLY; Resource name.
4039	Name *string `json:"name,omitempty"`
4040	// Type - READ-ONLY; Resource type.
4041	Type *string `json:"type,omitempty"`
4042	// Location - Resource location.
4043	Location *string `json:"location,omitempty"`
4044	// Tags - Resource tags.
4045	Tags map[string]*string `json:"tags"`
4046}
4047
4048// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4049func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4050	objectMap := make(map[string]interface{})
4051	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4052		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4053	}
4054	if afft.ID != nil {
4055		objectMap["id"] = afft.ID
4056	}
4057	if afft.Location != nil {
4058		objectMap["location"] = afft.Location
4059	}
4060	if afft.Tags != nil {
4061		objectMap["tags"] = afft.Tags
4062	}
4063	return json.Marshal(objectMap)
4064}
4065
4066// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4067func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4068	var m map[string]*json.RawMessage
4069	err := json.Unmarshal(body, &m)
4070	if err != nil {
4071		return err
4072	}
4073	for k, v := range m {
4074		switch k {
4075		case "properties":
4076			if v != nil {
4077				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4078				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4079				if err != nil {
4080					return err
4081				}
4082				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4083			}
4084		case "etag":
4085			if v != nil {
4086				var etag string
4087				err = json.Unmarshal(*v, &etag)
4088				if err != nil {
4089					return err
4090				}
4091				afft.Etag = &etag
4092			}
4093		case "id":
4094			if v != nil {
4095				var ID string
4096				err = json.Unmarshal(*v, &ID)
4097				if err != nil {
4098					return err
4099				}
4100				afft.ID = &ID
4101			}
4102		case "name":
4103			if v != nil {
4104				var name string
4105				err = json.Unmarshal(*v, &name)
4106				if err != nil {
4107					return err
4108				}
4109				afft.Name = &name
4110			}
4111		case "type":
4112			if v != nil {
4113				var typeVar string
4114				err = json.Unmarshal(*v, &typeVar)
4115				if err != nil {
4116					return err
4117				}
4118				afft.Type = &typeVar
4119			}
4120		case "location":
4121			if v != nil {
4122				var location string
4123				err = json.Unmarshal(*v, &location)
4124				if err != nil {
4125					return err
4126				}
4127				afft.Location = &location
4128			}
4129		case "tags":
4130			if v != nil {
4131				var tags map[string]*string
4132				err = json.Unmarshal(*v, &tags)
4133				if err != nil {
4134					return err
4135				}
4136				afft.Tags = tags
4137			}
4138		}
4139	}
4140
4141	return nil
4142}
4143
4144// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4145type AzureFirewallFqdnTagListResult struct {
4146	autorest.Response `json:"-"`
4147	// Value - List of Azure Firewall FQDN Tags in a resource group.
4148	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4149	// NextLink - URL to get the next set of results.
4150	NextLink *string `json:"nextLink,omitempty"`
4151}
4152
4153// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4154// values.
4155type AzureFirewallFqdnTagListResultIterator struct {
4156	i    int
4157	page AzureFirewallFqdnTagListResultPage
4158}
4159
4160// NextWithContext advances to the next value.  If there was an error making
4161// the request the iterator does not advance and the error is returned.
4162func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4163	if tracing.IsEnabled() {
4164		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4165		defer func() {
4166			sc := -1
4167			if iter.Response().Response.Response != nil {
4168				sc = iter.Response().Response.Response.StatusCode
4169			}
4170			tracing.EndSpan(ctx, sc, err)
4171		}()
4172	}
4173	iter.i++
4174	if iter.i < len(iter.page.Values()) {
4175		return nil
4176	}
4177	err = iter.page.NextWithContext(ctx)
4178	if err != nil {
4179		iter.i--
4180		return err
4181	}
4182	iter.i = 0
4183	return nil
4184}
4185
4186// Next advances to the next value.  If there was an error making
4187// the request the iterator does not advance and the error is returned.
4188// Deprecated: Use NextWithContext() instead.
4189func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4190	return iter.NextWithContext(context.Background())
4191}
4192
4193// NotDone returns true if the enumeration should be started or is not yet complete.
4194func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4195	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4196}
4197
4198// Response returns the raw server response from the last page request.
4199func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4200	return iter.page.Response()
4201}
4202
4203// Value returns the current value or a zero-initialized value if the
4204// iterator has advanced beyond the end of the collection.
4205func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4206	if !iter.page.NotDone() {
4207		return AzureFirewallFqdnTag{}
4208	}
4209	return iter.page.Values()[iter.i]
4210}
4211
4212// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4213func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4214	return AzureFirewallFqdnTagListResultIterator{page: page}
4215}
4216
4217// IsEmpty returns true if the ListResult contains no values.
4218func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4219	return afftlr.Value == nil || len(*afftlr.Value) == 0
4220}
4221
4222// hasNextLink returns true if the NextLink is not empty.
4223func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4224	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4225}
4226
4227// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4228// It returns nil if no more results exist.
4229func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4230	if !afftlr.hasNextLink() {
4231		return nil, nil
4232	}
4233	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4234		autorest.AsJSON(),
4235		autorest.AsGet(),
4236		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4237}
4238
4239// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4240type AzureFirewallFqdnTagListResultPage struct {
4241	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4242	afftlr AzureFirewallFqdnTagListResult
4243}
4244
4245// NextWithContext advances to the next page of values.  If there was an error making
4246// the request the page does not advance and the error is returned.
4247func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4248	if tracing.IsEnabled() {
4249		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4250		defer func() {
4251			sc := -1
4252			if page.Response().Response.Response != nil {
4253				sc = page.Response().Response.Response.StatusCode
4254			}
4255			tracing.EndSpan(ctx, sc, err)
4256		}()
4257	}
4258	for {
4259		next, err := page.fn(ctx, page.afftlr)
4260		if err != nil {
4261			return err
4262		}
4263		page.afftlr = next
4264		if !next.hasNextLink() || !next.IsEmpty() {
4265			break
4266		}
4267	}
4268	return nil
4269}
4270
4271// Next advances to the next page of values.  If there was an error making
4272// the request the page does not advance and the error is returned.
4273// Deprecated: Use NextWithContext() instead.
4274func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4275	return page.NextWithContext(context.Background())
4276}
4277
4278// NotDone returns true if the page enumeration should be started or is not yet complete.
4279func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4280	return !page.afftlr.IsEmpty()
4281}
4282
4283// Response returns the raw server response from the last page request.
4284func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4285	return page.afftlr
4286}
4287
4288// Values returns the slice of values for the current page or nil if there are no values.
4289func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4290	if page.afftlr.IsEmpty() {
4291		return nil
4292	}
4293	return *page.afftlr.Value
4294}
4295
4296// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4297func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4298	return AzureFirewallFqdnTagListResultPage{
4299		fn:     getNextPage,
4300		afftlr: cur,
4301	}
4302}
4303
4304// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4305type AzureFirewallFqdnTagPropertiesFormat struct {
4306	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4307	ProvisioningState *string `json:"provisioningState,omitempty"`
4308	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4309	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4310}
4311
4312// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4313func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4314	objectMap := make(map[string]interface{})
4315	return json.Marshal(objectMap)
4316}
4317
4318// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4319type AzureFirewallIPConfiguration struct {
4320	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4321	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4322	Name *string `json:"name,omitempty"`
4323	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4324	Etag *string `json:"etag,omitempty"`
4325	// ID - Resource ID.
4326	ID *string `json:"id,omitempty"`
4327}
4328
4329// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4330func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4331	objectMap := make(map[string]interface{})
4332	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4333		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4334	}
4335	if afic.Name != nil {
4336		objectMap["name"] = afic.Name
4337	}
4338	if afic.ID != nil {
4339		objectMap["id"] = afic.ID
4340	}
4341	return json.Marshal(objectMap)
4342}
4343
4344// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4345func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4346	var m map[string]*json.RawMessage
4347	err := json.Unmarshal(body, &m)
4348	if err != nil {
4349		return err
4350	}
4351	for k, v := range m {
4352		switch k {
4353		case "properties":
4354			if v != nil {
4355				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4356				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4357				if err != nil {
4358					return err
4359				}
4360				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4361			}
4362		case "name":
4363			if v != nil {
4364				var name string
4365				err = json.Unmarshal(*v, &name)
4366				if err != nil {
4367					return err
4368				}
4369				afic.Name = &name
4370			}
4371		case "etag":
4372			if v != nil {
4373				var etag string
4374				err = json.Unmarshal(*v, &etag)
4375				if err != nil {
4376					return err
4377				}
4378				afic.Etag = &etag
4379			}
4380		case "id":
4381			if v != nil {
4382				var ID string
4383				err = json.Unmarshal(*v, &ID)
4384				if err != nil {
4385					return err
4386				}
4387				afic.ID = &ID
4388			}
4389		}
4390	}
4391
4392	return nil
4393}
4394
4395// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4396type AzureFirewallIPConfigurationPropertiesFormat struct {
4397	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4398	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4399	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4400	Subnet *SubResource `json:"subnet,omitempty"`
4401	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4402	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4403	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4404	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4405}
4406
4407// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4408func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4409	objectMap := make(map[string]interface{})
4410	if aficpf.Subnet != nil {
4411		objectMap["subnet"] = aficpf.Subnet
4412	}
4413	if aficpf.PublicIPAddress != nil {
4414		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4415	}
4416	if aficpf.ProvisioningState != "" {
4417		objectMap["provisioningState"] = aficpf.ProvisioningState
4418	}
4419	return json.Marshal(objectMap)
4420}
4421
4422// AzureFirewallListResult response for ListAzureFirewalls API service call.
4423type AzureFirewallListResult struct {
4424	autorest.Response `json:"-"`
4425	// Value - List of Azure Firewalls in a resource group.
4426	Value *[]AzureFirewall `json:"value,omitempty"`
4427	// NextLink - URL to get the next set of results.
4428	NextLink *string `json:"nextLink,omitempty"`
4429}
4430
4431// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4432type AzureFirewallListResultIterator struct {
4433	i    int
4434	page AzureFirewallListResultPage
4435}
4436
4437// NextWithContext advances to the next value.  If there was an error making
4438// the request the iterator does not advance and the error is returned.
4439func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4440	if tracing.IsEnabled() {
4441		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4442		defer func() {
4443			sc := -1
4444			if iter.Response().Response.Response != nil {
4445				sc = iter.Response().Response.Response.StatusCode
4446			}
4447			tracing.EndSpan(ctx, sc, err)
4448		}()
4449	}
4450	iter.i++
4451	if iter.i < len(iter.page.Values()) {
4452		return nil
4453	}
4454	err = iter.page.NextWithContext(ctx)
4455	if err != nil {
4456		iter.i--
4457		return err
4458	}
4459	iter.i = 0
4460	return nil
4461}
4462
4463// Next advances to the next value.  If there was an error making
4464// the request the iterator does not advance and the error is returned.
4465// Deprecated: Use NextWithContext() instead.
4466func (iter *AzureFirewallListResultIterator) Next() error {
4467	return iter.NextWithContext(context.Background())
4468}
4469
4470// NotDone returns true if the enumeration should be started or is not yet complete.
4471func (iter AzureFirewallListResultIterator) NotDone() bool {
4472	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4473}
4474
4475// Response returns the raw server response from the last page request.
4476func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4477	return iter.page.Response()
4478}
4479
4480// Value returns the current value or a zero-initialized value if the
4481// iterator has advanced beyond the end of the collection.
4482func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4483	if !iter.page.NotDone() {
4484		return AzureFirewall{}
4485	}
4486	return iter.page.Values()[iter.i]
4487}
4488
4489// Creates a new instance of the AzureFirewallListResultIterator type.
4490func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4491	return AzureFirewallListResultIterator{page: page}
4492}
4493
4494// IsEmpty returns true if the ListResult contains no values.
4495func (aflr AzureFirewallListResult) IsEmpty() bool {
4496	return aflr.Value == nil || len(*aflr.Value) == 0
4497}
4498
4499// hasNextLink returns true if the NextLink is not empty.
4500func (aflr AzureFirewallListResult) hasNextLink() bool {
4501	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4502}
4503
4504// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4505// It returns nil if no more results exist.
4506func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4507	if !aflr.hasNextLink() {
4508		return nil, nil
4509	}
4510	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4511		autorest.AsJSON(),
4512		autorest.AsGet(),
4513		autorest.WithBaseURL(to.String(aflr.NextLink)))
4514}
4515
4516// AzureFirewallListResultPage contains a page of AzureFirewall values.
4517type AzureFirewallListResultPage struct {
4518	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4519	aflr AzureFirewallListResult
4520}
4521
4522// NextWithContext advances to the next page of values.  If there was an error making
4523// the request the page does not advance and the error is returned.
4524func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4525	if tracing.IsEnabled() {
4526		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4527		defer func() {
4528			sc := -1
4529			if page.Response().Response.Response != nil {
4530				sc = page.Response().Response.Response.StatusCode
4531			}
4532			tracing.EndSpan(ctx, sc, err)
4533		}()
4534	}
4535	for {
4536		next, err := page.fn(ctx, page.aflr)
4537		if err != nil {
4538			return err
4539		}
4540		page.aflr = next
4541		if !next.hasNextLink() || !next.IsEmpty() {
4542			break
4543		}
4544	}
4545	return nil
4546}
4547
4548// Next advances to the next page of values.  If there was an error making
4549// the request the page does not advance and the error is returned.
4550// Deprecated: Use NextWithContext() instead.
4551func (page *AzureFirewallListResultPage) Next() error {
4552	return page.NextWithContext(context.Background())
4553}
4554
4555// NotDone returns true if the page enumeration should be started or is not yet complete.
4556func (page AzureFirewallListResultPage) NotDone() bool {
4557	return !page.aflr.IsEmpty()
4558}
4559
4560// Response returns the raw server response from the last page request.
4561func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4562	return page.aflr
4563}
4564
4565// Values returns the slice of values for the current page or nil if there are no values.
4566func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4567	if page.aflr.IsEmpty() {
4568		return nil
4569	}
4570	return *page.aflr.Value
4571}
4572
4573// Creates a new instance of the AzureFirewallListResultPage type.
4574func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4575	return AzureFirewallListResultPage{
4576		fn:   getNextPage,
4577		aflr: cur,
4578	}
4579}
4580
4581// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4582type AzureFirewallNatRCAction struct {
4583	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4584	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4585}
4586
4587// AzureFirewallNatRule properties of a NAT rule.
4588type AzureFirewallNatRule struct {
4589	// Name - Name of the NAT rule.
4590	Name *string `json:"name,omitempty"`
4591	// Description - Description of the rule.
4592	Description *string `json:"description,omitempty"`
4593	// SourceAddresses - List of source IP addresses for this rule.
4594	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4595	// DestinationAddresses - List of destination IP addresses for this rule.
4596	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4597	// DestinationPorts - List of destination ports.
4598	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4599	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4600	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4601	// TranslatedAddress - The translated address for this NAT rule.
4602	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4603	// TranslatedPort - The translated port for this NAT rule.
4604	TranslatedPort *string `json:"translatedPort,omitempty"`
4605}
4606
4607// AzureFirewallNatRuleCollection NAT rule collection resource
4608type AzureFirewallNatRuleCollection struct {
4609	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4610	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4611	Name *string `json:"name,omitempty"`
4612	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4613	Etag *string `json:"etag,omitempty"`
4614	// ID - Resource ID.
4615	ID *string `json:"id,omitempty"`
4616}
4617
4618// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4619func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4620	objectMap := make(map[string]interface{})
4621	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4622		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4623	}
4624	if afnrc.Name != nil {
4625		objectMap["name"] = afnrc.Name
4626	}
4627	if afnrc.ID != nil {
4628		objectMap["id"] = afnrc.ID
4629	}
4630	return json.Marshal(objectMap)
4631}
4632
4633// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4634func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4635	var m map[string]*json.RawMessage
4636	err := json.Unmarshal(body, &m)
4637	if err != nil {
4638		return err
4639	}
4640	for k, v := range m {
4641		switch k {
4642		case "properties":
4643			if v != nil {
4644				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4645				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4646				if err != nil {
4647					return err
4648				}
4649				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4650			}
4651		case "name":
4652			if v != nil {
4653				var name string
4654				err = json.Unmarshal(*v, &name)
4655				if err != nil {
4656					return err
4657				}
4658				afnrc.Name = &name
4659			}
4660		case "etag":
4661			if v != nil {
4662				var etag string
4663				err = json.Unmarshal(*v, &etag)
4664				if err != nil {
4665					return err
4666				}
4667				afnrc.Etag = &etag
4668			}
4669		case "id":
4670			if v != nil {
4671				var ID string
4672				err = json.Unmarshal(*v, &ID)
4673				if err != nil {
4674					return err
4675				}
4676				afnrc.ID = &ID
4677			}
4678		}
4679	}
4680
4681	return nil
4682}
4683
4684// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4685type AzureFirewallNatRuleCollectionProperties struct {
4686	// Priority - Priority of the NAT rule collection resource.
4687	Priority *int32 `json:"priority,omitempty"`
4688	// Action - The action type of a NAT rule collection
4689	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4690	// Rules - Collection of rules used by a NAT rule collection.
4691	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4692	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4693	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4694}
4695
4696// AzureFirewallNetworkRule properties of the network rule.
4697type AzureFirewallNetworkRule struct {
4698	// Name - Name of the network rule.
4699	Name *string `json:"name,omitempty"`
4700	// Description - Description of the rule.
4701	Description *string `json:"description,omitempty"`
4702	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4703	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4704	// SourceAddresses - List of source IP addresses for this rule.
4705	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4706	// DestinationAddresses - List of destination IP addresses.
4707	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4708	// DestinationPorts - List of destination ports.
4709	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4710}
4711
4712// AzureFirewallNetworkRuleCollection network rule collection resource
4713type AzureFirewallNetworkRuleCollection struct {
4714	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4715	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4716	Name *string `json:"name,omitempty"`
4717	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4718	Etag *string `json:"etag,omitempty"`
4719	// ID - Resource ID.
4720	ID *string `json:"id,omitempty"`
4721}
4722
4723// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4724func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4725	objectMap := make(map[string]interface{})
4726	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4727		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4728	}
4729	if afnrc.Name != nil {
4730		objectMap["name"] = afnrc.Name
4731	}
4732	if afnrc.ID != nil {
4733		objectMap["id"] = afnrc.ID
4734	}
4735	return json.Marshal(objectMap)
4736}
4737
4738// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4739func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4740	var m map[string]*json.RawMessage
4741	err := json.Unmarshal(body, &m)
4742	if err != nil {
4743		return err
4744	}
4745	for k, v := range m {
4746		switch k {
4747		case "properties":
4748			if v != nil {
4749				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4750				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4751				if err != nil {
4752					return err
4753				}
4754				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4755			}
4756		case "name":
4757			if v != nil {
4758				var name string
4759				err = json.Unmarshal(*v, &name)
4760				if err != nil {
4761					return err
4762				}
4763				afnrc.Name = &name
4764			}
4765		case "etag":
4766			if v != nil {
4767				var etag string
4768				err = json.Unmarshal(*v, &etag)
4769				if err != nil {
4770					return err
4771				}
4772				afnrc.Etag = &etag
4773			}
4774		case "id":
4775			if v != nil {
4776				var ID string
4777				err = json.Unmarshal(*v, &ID)
4778				if err != nil {
4779					return err
4780				}
4781				afnrc.ID = &ID
4782			}
4783		}
4784	}
4785
4786	return nil
4787}
4788
4789// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4790type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4791	// Priority - Priority of the network rule collection resource.
4792	Priority *int32 `json:"priority,omitempty"`
4793	// Action - The action type of a rule collection
4794	Action *AzureFirewallRCAction `json:"action,omitempty"`
4795	// Rules - Collection of rules used by a network rule collection.
4796	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4797	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4798	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4799}
4800
4801// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4802type AzureFirewallPropertiesFormat struct {
4803	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4804	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4805	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4806	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4807	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4808	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4809	// IPConfigurations - IP configuration of the Azure Firewall resource.
4810	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4811	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4812	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4813}
4814
4815// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4816type AzureFirewallRCAction struct {
4817	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4818	Type AzureFirewallRCActionType `json:"type,omitempty"`
4819}
4820
4821// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4822// long-running operation.
4823type AzureFirewallsCreateOrUpdateFuture struct {
4824	azure.FutureAPI
4825	// Result returns the result of the asynchronous operation.
4826	// If the operation has not completed it will return an error.
4827	Result func(AzureFirewallsClient) (AzureFirewall, error)
4828}
4829
4830// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4831func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4832	var azFuture azure.Future
4833	if err := json.Unmarshal(body, &azFuture); err != nil {
4834		return err
4835	}
4836	future.FutureAPI = &azFuture
4837	future.Result = future.result
4838	return nil
4839}
4840
4841// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
4842func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
4843	var done bool
4844	done, err = future.DoneWithContext(context.Background(), client)
4845	if err != nil {
4846		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4847		return
4848	}
4849	if !done {
4850		af.Response.Response = future.Response()
4851		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
4852		return
4853	}
4854	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4855	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
4856		af, err = client.CreateOrUpdateResponder(af.Response.Response)
4857		if err != nil {
4858			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
4859		}
4860	}
4861	return
4862}
4863
4864// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4865// operation.
4866type AzureFirewallsDeleteFuture struct {
4867	azure.FutureAPI
4868	// Result returns the result of the asynchronous operation.
4869	// If the operation has not completed it will return an error.
4870	Result func(AzureFirewallsClient) (autorest.Response, error)
4871}
4872
4873// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4874func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
4875	var azFuture azure.Future
4876	if err := json.Unmarshal(body, &azFuture); err != nil {
4877		return err
4878	}
4879	future.FutureAPI = &azFuture
4880	future.Result = future.result
4881	return nil
4882}
4883
4884// result is the default implementation for AzureFirewallsDeleteFuture.Result.
4885func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
4886	var done bool
4887	done, err = future.DoneWithContext(context.Background(), client)
4888	if err != nil {
4889		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
4890		return
4891	}
4892	if !done {
4893		ar.Response = future.Response()
4894		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
4895		return
4896	}
4897	ar.Response = future.Response()
4898	return
4899}
4900
4901// AzureReachabilityReport azure reachability report details.
4902type AzureReachabilityReport struct {
4903	autorest.Response `json:"-"`
4904	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4905	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4906	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4907	// ReachabilityReport - List of Azure reachability report items.
4908	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4909}
4910
4911// AzureReachabilityReportItem azure reachability report details for a given provider location.
4912type AzureReachabilityReportItem struct {
4913	// Provider - The Internet service provider.
4914	Provider *string `json:"provider,omitempty"`
4915	// AzureLocation - The Azure region.
4916	AzureLocation *string `json:"azureLocation,omitempty"`
4917	// Latencies - List of latency details for each of the time series.
4918	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4919}
4920
4921// AzureReachabilityReportLatencyInfo details on latency for a time series.
4922type AzureReachabilityReportLatencyInfo struct {
4923	// TimeStamp - The time stamp.
4924	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4925	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4926	Score *int32 `json:"score,omitempty"`
4927}
4928
4929// AzureReachabilityReportLocation parameters that define a geographic location.
4930type AzureReachabilityReportLocation struct {
4931	// Country - The name of the country.
4932	Country *string `json:"country,omitempty"`
4933	// State - The name of the state.
4934	State *string `json:"state,omitempty"`
4935	// City - The name of the city or town.
4936	City *string `json:"city,omitempty"`
4937}
4938
4939// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4940type AzureReachabilityReportParameters struct {
4941	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4942	// Providers - List of Internet service providers.
4943	Providers *[]string `json:"providers,omitempty"`
4944	// AzureLocations - Optional Azure regions to scope the query to.
4945	AzureLocations *[]string `json:"azureLocations,omitempty"`
4946	// StartTime - The start time for the Azure reachability report.
4947	StartTime *date.Time `json:"startTime,omitempty"`
4948	// EndTime - The end time for the Azure reachability report.
4949	EndTime *date.Time `json:"endTime,omitempty"`
4950}
4951
4952// BackendAddressPool pool of backend IP addresses.
4953type BackendAddressPool struct {
4954	autorest.Response `json:"-"`
4955	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
4956	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
4957	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4958	Name *string `json:"name,omitempty"`
4959	// Etag - A unique read-only string that changes whenever the resource is updated.
4960	Etag *string `json:"etag,omitempty"`
4961	// ID - Resource ID.
4962	ID *string `json:"id,omitempty"`
4963}
4964
4965// MarshalJSON is the custom marshaler for BackendAddressPool.
4966func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
4967	objectMap := make(map[string]interface{})
4968	if bap.BackendAddressPoolPropertiesFormat != nil {
4969		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
4970	}
4971	if bap.Name != nil {
4972		objectMap["name"] = bap.Name
4973	}
4974	if bap.Etag != nil {
4975		objectMap["etag"] = bap.Etag
4976	}
4977	if bap.ID != nil {
4978		objectMap["id"] = bap.ID
4979	}
4980	return json.Marshal(objectMap)
4981}
4982
4983// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
4984func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
4985	var m map[string]*json.RawMessage
4986	err := json.Unmarshal(body, &m)
4987	if err != nil {
4988		return err
4989	}
4990	for k, v := range m {
4991		switch k {
4992		case "properties":
4993			if v != nil {
4994				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
4995				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
4996				if err != nil {
4997					return err
4998				}
4999				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5000			}
5001		case "name":
5002			if v != nil {
5003				var name string
5004				err = json.Unmarshal(*v, &name)
5005				if err != nil {
5006					return err
5007				}
5008				bap.Name = &name
5009			}
5010		case "etag":
5011			if v != nil {
5012				var etag string
5013				err = json.Unmarshal(*v, &etag)
5014				if err != nil {
5015					return err
5016				}
5017				bap.Etag = &etag
5018			}
5019		case "id":
5020			if v != nil {
5021				var ID string
5022				err = json.Unmarshal(*v, &ID)
5023				if err != nil {
5024					return err
5025				}
5026				bap.ID = &ID
5027			}
5028		}
5029	}
5030
5031	return nil
5032}
5033
5034// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5035type BackendAddressPoolPropertiesFormat struct {
5036	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5037	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5038	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5039	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5040	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5041	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5042	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5043	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5044	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5045	ProvisioningState *string `json:"provisioningState,omitempty"`
5046}
5047
5048// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5049func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5050	objectMap := make(map[string]interface{})
5051	if bappf.ProvisioningState != nil {
5052		objectMap["provisioningState"] = bappf.ProvisioningState
5053	}
5054	return json.Marshal(objectMap)
5055}
5056
5057// BGPCommunity contains bgp community information offered in Service Community resources.
5058type BGPCommunity struct {
5059	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5060	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5061	// CommunityName - The name of the bgp community. e.g. Skype.
5062	CommunityName *string `json:"communityName,omitempty"`
5063	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5064	CommunityValue *string `json:"communityValue,omitempty"`
5065	// CommunityPrefixes - The prefixes that the bgp community contains.
5066	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5067	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5068	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5069	// ServiceGroup - The service group of the bgp community contains.
5070	ServiceGroup *string `json:"serviceGroup,omitempty"`
5071}
5072
5073// BgpPeerStatus BGP peer status details
5074type BgpPeerStatus struct {
5075	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5076	LocalAddress *string `json:"localAddress,omitempty"`
5077	// Neighbor - READ-ONLY; The remote BGP peer
5078	Neighbor *string `json:"neighbor,omitempty"`
5079	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5080	Asn *int32 `json:"asn,omitempty"`
5081	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5082	State BgpPeerState `json:"state,omitempty"`
5083	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5084	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5085	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5086	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5087	// MessagesSent - READ-ONLY; The number of BGP messages sent
5088	MessagesSent *int64 `json:"messagesSent,omitempty"`
5089	// MessagesReceived - READ-ONLY; The number of BGP messages received
5090	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5091}
5092
5093// MarshalJSON is the custom marshaler for BgpPeerStatus.
5094func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
5095	objectMap := make(map[string]interface{})
5096	return json.Marshal(objectMap)
5097}
5098
5099// BgpPeerStatusListResult response for list BGP peer status API service call
5100type BgpPeerStatusListResult struct {
5101	autorest.Response `json:"-"`
5102	// Value - List of BGP peers
5103	Value *[]BgpPeerStatus `json:"value,omitempty"`
5104}
5105
5106// BgpServiceCommunity service Community Properties.
5107type BgpServiceCommunity struct {
5108	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5109	// ID - Resource ID.
5110	ID *string `json:"id,omitempty"`
5111	// Name - READ-ONLY; Resource name.
5112	Name *string `json:"name,omitempty"`
5113	// Type - READ-ONLY; Resource type.
5114	Type *string `json:"type,omitempty"`
5115	// Location - Resource location.
5116	Location *string `json:"location,omitempty"`
5117	// Tags - Resource tags.
5118	Tags map[string]*string `json:"tags"`
5119}
5120
5121// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5122func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5123	objectMap := make(map[string]interface{})
5124	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5125		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5126	}
5127	if bsc.ID != nil {
5128		objectMap["id"] = bsc.ID
5129	}
5130	if bsc.Location != nil {
5131		objectMap["location"] = bsc.Location
5132	}
5133	if bsc.Tags != nil {
5134		objectMap["tags"] = bsc.Tags
5135	}
5136	return json.Marshal(objectMap)
5137}
5138
5139// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5140func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5141	var m map[string]*json.RawMessage
5142	err := json.Unmarshal(body, &m)
5143	if err != nil {
5144		return err
5145	}
5146	for k, v := range m {
5147		switch k {
5148		case "properties":
5149			if v != nil {
5150				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5151				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5152				if err != nil {
5153					return err
5154				}
5155				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5156			}
5157		case "id":
5158			if v != nil {
5159				var ID string
5160				err = json.Unmarshal(*v, &ID)
5161				if err != nil {
5162					return err
5163				}
5164				bsc.ID = &ID
5165			}
5166		case "name":
5167			if v != nil {
5168				var name string
5169				err = json.Unmarshal(*v, &name)
5170				if err != nil {
5171					return err
5172				}
5173				bsc.Name = &name
5174			}
5175		case "type":
5176			if v != nil {
5177				var typeVar string
5178				err = json.Unmarshal(*v, &typeVar)
5179				if err != nil {
5180					return err
5181				}
5182				bsc.Type = &typeVar
5183			}
5184		case "location":
5185			if v != nil {
5186				var location string
5187				err = json.Unmarshal(*v, &location)
5188				if err != nil {
5189					return err
5190				}
5191				bsc.Location = &location
5192			}
5193		case "tags":
5194			if v != nil {
5195				var tags map[string]*string
5196				err = json.Unmarshal(*v, &tags)
5197				if err != nil {
5198					return err
5199				}
5200				bsc.Tags = tags
5201			}
5202		}
5203	}
5204
5205	return nil
5206}
5207
5208// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5209type BgpServiceCommunityListResult struct {
5210	autorest.Response `json:"-"`
5211	// Value - A list of service community resources.
5212	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5213	// NextLink - The URL to get the next set of results.
5214	NextLink *string `json:"nextLink,omitempty"`
5215}
5216
5217// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5218// values.
5219type BgpServiceCommunityListResultIterator struct {
5220	i    int
5221	page BgpServiceCommunityListResultPage
5222}
5223
5224// NextWithContext advances to the next value.  If there was an error making
5225// the request the iterator does not advance and the error is returned.
5226func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5227	if tracing.IsEnabled() {
5228		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5229		defer func() {
5230			sc := -1
5231			if iter.Response().Response.Response != nil {
5232				sc = iter.Response().Response.Response.StatusCode
5233			}
5234			tracing.EndSpan(ctx, sc, err)
5235		}()
5236	}
5237	iter.i++
5238	if iter.i < len(iter.page.Values()) {
5239		return nil
5240	}
5241	err = iter.page.NextWithContext(ctx)
5242	if err != nil {
5243		iter.i--
5244		return err
5245	}
5246	iter.i = 0
5247	return nil
5248}
5249
5250// Next advances to the next value.  If there was an error making
5251// the request the iterator does not advance and the error is returned.
5252// Deprecated: Use NextWithContext() instead.
5253func (iter *BgpServiceCommunityListResultIterator) Next() error {
5254	return iter.NextWithContext(context.Background())
5255}
5256
5257// NotDone returns true if the enumeration should be started or is not yet complete.
5258func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5259	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5260}
5261
5262// Response returns the raw server response from the last page request.
5263func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5264	return iter.page.Response()
5265}
5266
5267// Value returns the current value or a zero-initialized value if the
5268// iterator has advanced beyond the end of the collection.
5269func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5270	if !iter.page.NotDone() {
5271		return BgpServiceCommunity{}
5272	}
5273	return iter.page.Values()[iter.i]
5274}
5275
5276// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5277func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5278	return BgpServiceCommunityListResultIterator{page: page}
5279}
5280
5281// IsEmpty returns true if the ListResult contains no values.
5282func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5283	return bsclr.Value == nil || len(*bsclr.Value) == 0
5284}
5285
5286// hasNextLink returns true if the NextLink is not empty.
5287func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5288	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5289}
5290
5291// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5292// It returns nil if no more results exist.
5293func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5294	if !bsclr.hasNextLink() {
5295		return nil, nil
5296	}
5297	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5298		autorest.AsJSON(),
5299		autorest.AsGet(),
5300		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5301}
5302
5303// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5304type BgpServiceCommunityListResultPage struct {
5305	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5306	bsclr BgpServiceCommunityListResult
5307}
5308
5309// NextWithContext advances to the next page of values.  If there was an error making
5310// the request the page does not advance and the error is returned.
5311func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5312	if tracing.IsEnabled() {
5313		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5314		defer func() {
5315			sc := -1
5316			if page.Response().Response.Response != nil {
5317				sc = page.Response().Response.Response.StatusCode
5318			}
5319			tracing.EndSpan(ctx, sc, err)
5320		}()
5321	}
5322	for {
5323		next, err := page.fn(ctx, page.bsclr)
5324		if err != nil {
5325			return err
5326		}
5327		page.bsclr = next
5328		if !next.hasNextLink() || !next.IsEmpty() {
5329			break
5330		}
5331	}
5332	return nil
5333}
5334
5335// Next advances to the next page of values.  If there was an error making
5336// the request the page does not advance and the error is returned.
5337// Deprecated: Use NextWithContext() instead.
5338func (page *BgpServiceCommunityListResultPage) Next() error {
5339	return page.NextWithContext(context.Background())
5340}
5341
5342// NotDone returns true if the page enumeration should be started or is not yet complete.
5343func (page BgpServiceCommunityListResultPage) NotDone() bool {
5344	return !page.bsclr.IsEmpty()
5345}
5346
5347// Response returns the raw server response from the last page request.
5348func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5349	return page.bsclr
5350}
5351
5352// Values returns the slice of values for the current page or nil if there are no values.
5353func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5354	if page.bsclr.IsEmpty() {
5355		return nil
5356	}
5357	return *page.bsclr.Value
5358}
5359
5360// Creates a new instance of the BgpServiceCommunityListResultPage type.
5361func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5362	return BgpServiceCommunityListResultPage{
5363		fn:    getNextPage,
5364		bsclr: cur,
5365	}
5366}
5367
5368// BgpServiceCommunityPropertiesFormat properties of Service Community.
5369type BgpServiceCommunityPropertiesFormat struct {
5370	// ServiceName - The name of the bgp community. e.g. Skype.
5371	ServiceName *string `json:"serviceName,omitempty"`
5372	// BgpCommunities - Get a list of bgp communities.
5373	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5374}
5375
5376// BgpSettings BGP settings details
5377type BgpSettings struct {
5378	// Asn - The BGP speaker's ASN.
5379	Asn *int64 `json:"asn,omitempty"`
5380	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5381	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5382	// PeerWeight - The weight added to routes learned from this BGP speaker.
5383	PeerWeight *int32 `json:"peerWeight,omitempty"`
5384}
5385
5386// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5387type ConfigurationDiagnosticParameters struct {
5388	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5389	TargetResourceID *string `json:"targetResourceId,omitempty"`
5390	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5391	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5392	// Profiles - List of network configuration diagnostic profiles.
5393	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5394}
5395
5396// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5397type ConfigurationDiagnosticProfile struct {
5398	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
5399	Direction Direction `json:"direction,omitempty"`
5400	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5401	Protocol *string `json:"protocol,omitempty"`
5402	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5403	Source *string `json:"source,omitempty"`
5404	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5405	Destination *string `json:"destination,omitempty"`
5406	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5407	DestinationPort *string `json:"destinationPort,omitempty"`
5408}
5409
5410// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5411type ConfigurationDiagnosticResponse struct {
5412	autorest.Response `json:"-"`
5413	// Results - READ-ONLY; List of network configuration diagnostic results.
5414	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5415}
5416
5417// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
5418func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
5419	objectMap := make(map[string]interface{})
5420	return json.Marshal(objectMap)
5421}
5422
5423// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5424// query.
5425type ConfigurationDiagnosticResult struct {
5426	Profile                    *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5427	NetworkSecurityGroupResult *SecurityGroupResult            `json:"networkSecurityGroupResult,omitempty"`
5428}
5429
5430// ConnectionMonitor parameters that define the operation to create a connection monitor.
5431type ConnectionMonitor struct {
5432	// Location - Connection monitor location.
5433	Location *string `json:"location,omitempty"`
5434	// Tags - Connection monitor tags.
5435	Tags                         map[string]*string `json:"tags"`
5436	*ConnectionMonitorParameters `json:"properties,omitempty"`
5437}
5438
5439// MarshalJSON is the custom marshaler for ConnectionMonitor.
5440func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5441	objectMap := make(map[string]interface{})
5442	if cm.Location != nil {
5443		objectMap["location"] = cm.Location
5444	}
5445	if cm.Tags != nil {
5446		objectMap["tags"] = cm.Tags
5447	}
5448	if cm.ConnectionMonitorParameters != nil {
5449		objectMap["properties"] = cm.ConnectionMonitorParameters
5450	}
5451	return json.Marshal(objectMap)
5452}
5453
5454// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5455func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5456	var m map[string]*json.RawMessage
5457	err := json.Unmarshal(body, &m)
5458	if err != nil {
5459		return err
5460	}
5461	for k, v := range m {
5462		switch k {
5463		case "location":
5464			if v != nil {
5465				var location string
5466				err = json.Unmarshal(*v, &location)
5467				if err != nil {
5468					return err
5469				}
5470				cm.Location = &location
5471			}
5472		case "tags":
5473			if v != nil {
5474				var tags map[string]*string
5475				err = json.Unmarshal(*v, &tags)
5476				if err != nil {
5477					return err
5478				}
5479				cm.Tags = tags
5480			}
5481		case "properties":
5482			if v != nil {
5483				var connectionMonitorParameters ConnectionMonitorParameters
5484				err = json.Unmarshal(*v, &connectionMonitorParameters)
5485				if err != nil {
5486					return err
5487				}
5488				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5489			}
5490		}
5491	}
5492
5493	return nil
5494}
5495
5496// ConnectionMonitorDestination describes the destination of connection monitor.
5497type ConnectionMonitorDestination struct {
5498	// ResourceID - The ID of the resource used as the destination by connection monitor.
5499	ResourceID *string `json:"resourceId,omitempty"`
5500	// Address - Address of the connection monitor destination (IP or domain name).
5501	Address *string `json:"address,omitempty"`
5502	// Port - The destination port used by connection monitor.
5503	Port *int32 `json:"port,omitempty"`
5504}
5505
5506// ConnectionMonitorListResult list of connection monitors.
5507type ConnectionMonitorListResult struct {
5508	autorest.Response `json:"-"`
5509	// Value - Information about connection monitors.
5510	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5511}
5512
5513// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5514type ConnectionMonitorParameters struct {
5515	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5516	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5517	// AutoStart - Determines if the connection monitor will start automatically once created.
5518	AutoStart *bool `json:"autoStart,omitempty"`
5519	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5520	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5521}
5522
5523// ConnectionMonitorQueryResult list of connection states snapshots.
5524type ConnectionMonitorQueryResult struct {
5525	autorest.Response `json:"-"`
5526	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5527	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5528	// States - Information about connection states.
5529	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5530}
5531
5532// ConnectionMonitorResult information about the connection monitor.
5533type ConnectionMonitorResult struct {
5534	autorest.Response `json:"-"`
5535	// Name - READ-ONLY; Name of the connection monitor.
5536	Name *string `json:"name,omitempty"`
5537	// ID - READ-ONLY; ID of the connection monitor.
5538	ID   *string `json:"id,omitempty"`
5539	Etag *string `json:"etag,omitempty"`
5540	// Type - READ-ONLY; Connection monitor type.
5541	Type *string `json:"type,omitempty"`
5542	// Location - Connection monitor location.
5543	Location *string `json:"location,omitempty"`
5544	// Tags - Connection monitor tags.
5545	Tags                               map[string]*string `json:"tags"`
5546	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5547}
5548
5549// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5550func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5551	objectMap := make(map[string]interface{})
5552	if cmr.Etag != nil {
5553		objectMap["etag"] = cmr.Etag
5554	}
5555	if cmr.Location != nil {
5556		objectMap["location"] = cmr.Location
5557	}
5558	if cmr.Tags != nil {
5559		objectMap["tags"] = cmr.Tags
5560	}
5561	if cmr.ConnectionMonitorResultProperties != nil {
5562		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5563	}
5564	return json.Marshal(objectMap)
5565}
5566
5567// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5568func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5569	var m map[string]*json.RawMessage
5570	err := json.Unmarshal(body, &m)
5571	if err != nil {
5572		return err
5573	}
5574	for k, v := range m {
5575		switch k {
5576		case "name":
5577			if v != nil {
5578				var name string
5579				err = json.Unmarshal(*v, &name)
5580				if err != nil {
5581					return err
5582				}
5583				cmr.Name = &name
5584			}
5585		case "id":
5586			if v != nil {
5587				var ID string
5588				err = json.Unmarshal(*v, &ID)
5589				if err != nil {
5590					return err
5591				}
5592				cmr.ID = &ID
5593			}
5594		case "etag":
5595			if v != nil {
5596				var etag string
5597				err = json.Unmarshal(*v, &etag)
5598				if err != nil {
5599					return err
5600				}
5601				cmr.Etag = &etag
5602			}
5603		case "type":
5604			if v != nil {
5605				var typeVar string
5606				err = json.Unmarshal(*v, &typeVar)
5607				if err != nil {
5608					return err
5609				}
5610				cmr.Type = &typeVar
5611			}
5612		case "location":
5613			if v != nil {
5614				var location string
5615				err = json.Unmarshal(*v, &location)
5616				if err != nil {
5617					return err
5618				}
5619				cmr.Location = &location
5620			}
5621		case "tags":
5622			if v != nil {
5623				var tags map[string]*string
5624				err = json.Unmarshal(*v, &tags)
5625				if err != nil {
5626					return err
5627				}
5628				cmr.Tags = tags
5629			}
5630		case "properties":
5631			if v != nil {
5632				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5633				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5634				if err != nil {
5635					return err
5636				}
5637				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5638			}
5639		}
5640	}
5641
5642	return nil
5643}
5644
5645// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5646type ConnectionMonitorResultProperties struct {
5647	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5648	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5649	// StartTime - The date and time when the connection monitor was started.
5650	StartTime *date.Time `json:"startTime,omitempty"`
5651	// MonitoringStatus - The monitoring status of the connection monitor.
5652	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5653	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5654	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5655	// AutoStart - Determines if the connection monitor will start automatically once created.
5656	AutoStart *bool `json:"autoStart,omitempty"`
5657	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5658	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5659}
5660
5661// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5662// long-running operation.
5663type ConnectionMonitorsCreateOrUpdateFuture struct {
5664	azure.FutureAPI
5665	// Result returns the result of the asynchronous operation.
5666	// If the operation has not completed it will return an error.
5667	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5668}
5669
5670// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5671func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5672	var azFuture azure.Future
5673	if err := json.Unmarshal(body, &azFuture); err != nil {
5674		return err
5675	}
5676	future.FutureAPI = &azFuture
5677	future.Result = future.result
5678	return nil
5679}
5680
5681// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
5682func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5683	var done bool
5684	done, err = future.DoneWithContext(context.Background(), client)
5685	if err != nil {
5686		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5687		return
5688	}
5689	if !done {
5690		cmr.Response.Response = future.Response()
5691		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5692		return
5693	}
5694	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5695	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5696		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5697		if err != nil {
5698			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5699		}
5700	}
5701	return
5702}
5703
5704// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5705// long-running operation.
5706type ConnectionMonitorsDeleteFuture struct {
5707	azure.FutureAPI
5708	// Result returns the result of the asynchronous operation.
5709	// If the operation has not completed it will return an error.
5710	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5711}
5712
5713// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5714func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
5715	var azFuture azure.Future
5716	if err := json.Unmarshal(body, &azFuture); err != nil {
5717		return err
5718	}
5719	future.FutureAPI = &azFuture
5720	future.Result = future.result
5721	return nil
5722}
5723
5724// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
5725func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5726	var done bool
5727	done, err = future.DoneWithContext(context.Background(), client)
5728	if err != nil {
5729		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5730		return
5731	}
5732	if !done {
5733		ar.Response = future.Response()
5734		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5735		return
5736	}
5737	ar.Response = future.Response()
5738	return
5739}
5740
5741// ConnectionMonitorSource describes the source of connection monitor.
5742type ConnectionMonitorSource struct {
5743	// ResourceID - The ID of the resource used as the source by connection monitor.
5744	ResourceID *string `json:"resourceId,omitempty"`
5745	// Port - The source port used by connection monitor.
5746	Port *int32 `json:"port,omitempty"`
5747}
5748
5749// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5750// operation.
5751type ConnectionMonitorsQueryFuture struct {
5752	azure.FutureAPI
5753	// Result returns the result of the asynchronous operation.
5754	// If the operation has not completed it will return an error.
5755	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5756}
5757
5758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5759func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
5760	var azFuture azure.Future
5761	if err := json.Unmarshal(body, &azFuture); err != nil {
5762		return err
5763	}
5764	future.FutureAPI = &azFuture
5765	future.Result = future.result
5766	return nil
5767}
5768
5769// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
5770func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5771	var done bool
5772	done, err = future.DoneWithContext(context.Background(), client)
5773	if err != nil {
5774		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5775		return
5776	}
5777	if !done {
5778		cmqr.Response.Response = future.Response()
5779		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5780		return
5781	}
5782	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5783	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
5784		cmqr, err = client.QueryResponder(cmqr.Response.Response)
5785		if err != nil {
5786			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
5787		}
5788	}
5789	return
5790}
5791
5792// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5793// operation.
5794type ConnectionMonitorsStartFuture struct {
5795	azure.FutureAPI
5796	// Result returns the result of the asynchronous operation.
5797	// If the operation has not completed it will return an error.
5798	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5799}
5800
5801// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5802func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
5803	var azFuture azure.Future
5804	if err := json.Unmarshal(body, &azFuture); err != nil {
5805		return err
5806	}
5807	future.FutureAPI = &azFuture
5808	future.Result = future.result
5809	return nil
5810}
5811
5812// result is the default implementation for ConnectionMonitorsStartFuture.Result.
5813func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5814	var done bool
5815	done, err = future.DoneWithContext(context.Background(), client)
5816	if err != nil {
5817		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
5818		return
5819	}
5820	if !done {
5821		ar.Response = future.Response()
5822		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
5823		return
5824	}
5825	ar.Response = future.Response()
5826	return
5827}
5828
5829// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5830// operation.
5831type ConnectionMonitorsStopFuture struct {
5832	azure.FutureAPI
5833	// Result returns the result of the asynchronous operation.
5834	// If the operation has not completed it will return an error.
5835	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5836}
5837
5838// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5839func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
5840	var azFuture azure.Future
5841	if err := json.Unmarshal(body, &azFuture); err != nil {
5842		return err
5843	}
5844	future.FutureAPI = &azFuture
5845	future.Result = future.result
5846	return nil
5847}
5848
5849// result is the default implementation for ConnectionMonitorsStopFuture.Result.
5850func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5851	var done bool
5852	done, err = future.DoneWithContext(context.Background(), client)
5853	if err != nil {
5854		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
5855		return
5856	}
5857	if !done {
5858		ar.Response = future.Response()
5859		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
5860		return
5861	}
5862	ar.Response = future.Response()
5863	return
5864}
5865
5866// ConnectionResetSharedKey the virtual network connection reset shared key
5867type ConnectionResetSharedKey struct {
5868	autorest.Response `json:"-"`
5869	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5870	KeyLength *int32 `json:"keyLength,omitempty"`
5871}
5872
5873// ConnectionSharedKey response for GetConnectionSharedKey API service call
5874type ConnectionSharedKey struct {
5875	autorest.Response `json:"-"`
5876	// Value - The virtual network connection shared key value.
5877	Value *string `json:"value,omitempty"`
5878	// ID - Resource ID.
5879	ID *string `json:"id,omitempty"`
5880}
5881
5882// ConnectionStateSnapshot connection state snapshot.
5883type ConnectionStateSnapshot struct {
5884	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5885	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5886	// StartTime - The start time of the connection snapshot.
5887	StartTime *date.Time `json:"startTime,omitempty"`
5888	// EndTime - The end time of the connection snapshot.
5889	EndTime *date.Time `json:"endTime,omitempty"`
5890	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5891	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5892	// AvgLatencyInMs - Average latency in ms.
5893	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5894	// MinLatencyInMs - Minimum latency in ms.
5895	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5896	// MaxLatencyInMs - Maximum latency in ms.
5897	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5898	// ProbesSent - The number of sent probes.
5899	ProbesSent *int32 `json:"probesSent,omitempty"`
5900	// ProbesFailed - The number of failed probes.
5901	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5902	// Hops - READ-ONLY; List of hops between the source and the destination.
5903	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5904}
5905
5906// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5907func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5908	objectMap := make(map[string]interface{})
5909	if CSS.ConnectionState != "" {
5910		objectMap["connectionState"] = CSS.ConnectionState
5911	}
5912	if CSS.StartTime != nil {
5913		objectMap["startTime"] = CSS.StartTime
5914	}
5915	if CSS.EndTime != nil {
5916		objectMap["endTime"] = CSS.EndTime
5917	}
5918	if CSS.EvaluationState != "" {
5919		objectMap["evaluationState"] = CSS.EvaluationState
5920	}
5921	if CSS.AvgLatencyInMs != nil {
5922		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5923	}
5924	if CSS.MinLatencyInMs != nil {
5925		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5926	}
5927	if CSS.MaxLatencyInMs != nil {
5928		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5929	}
5930	if CSS.ProbesSent != nil {
5931		objectMap["probesSent"] = CSS.ProbesSent
5932	}
5933	if CSS.ProbesFailed != nil {
5934		objectMap["probesFailed"] = CSS.ProbesFailed
5935	}
5936	return json.Marshal(objectMap)
5937}
5938
5939// ConnectivityDestination parameters that define destination of connection.
5940type ConnectivityDestination struct {
5941	// ResourceID - The ID of the resource to which a connection attempt will be made.
5942	ResourceID *string `json:"resourceId,omitempty"`
5943	// Address - The IP address or URI the resource to which a connection attempt will be made.
5944	Address *string `json:"address,omitempty"`
5945	// Port - Port on which check connectivity will be performed.
5946	Port *int32 `json:"port,omitempty"`
5947}
5948
5949// ConnectivityHop information about a hop between the source and the destination.
5950type ConnectivityHop struct {
5951	// Type - READ-ONLY; The type of the hop.
5952	Type *string `json:"type,omitempty"`
5953	// ID - READ-ONLY; The ID of the hop.
5954	ID *string `json:"id,omitempty"`
5955	// Address - READ-ONLY; The IP address of the hop.
5956	Address *string `json:"address,omitempty"`
5957	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
5958	ResourceID *string `json:"resourceId,omitempty"`
5959	// NextHopIds - READ-ONLY; List of next hop identifiers.
5960	NextHopIds *[]string `json:"nextHopIds,omitempty"`
5961	// Issues - READ-ONLY; List of issues.
5962	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
5963}
5964
5965// MarshalJSON is the custom marshaler for ConnectivityHop.
5966func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
5967	objectMap := make(map[string]interface{})
5968	return json.Marshal(objectMap)
5969}
5970
5971// ConnectivityInformation information on the connectivity status.
5972type ConnectivityInformation struct {
5973	autorest.Response `json:"-"`
5974	// Hops - READ-ONLY; List of hops between the source and the destination.
5975	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5976	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
5977	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
5978	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
5979	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5980	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
5981	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5982	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
5983	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5984	// ProbesSent - READ-ONLY; Total number of probes sent.
5985	ProbesSent *int32 `json:"probesSent,omitempty"`
5986	// ProbesFailed - READ-ONLY; Number of failed probes.
5987	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5988}
5989
5990// MarshalJSON is the custom marshaler for ConnectivityInformation.
5991func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
5992	objectMap := make(map[string]interface{})
5993	return json.Marshal(objectMap)
5994}
5995
5996// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
5997type ConnectivityIssue struct {
5998	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
5999	Origin Origin `json:"origin,omitempty"`
6000	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6001	Severity Severity `json:"severity,omitempty"`
6002	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6003	Type IssueType `json:"type,omitempty"`
6004	// Context - READ-ONLY; Provides additional context on the issue.
6005	Context *[]map[string]*string `json:"context,omitempty"`
6006}
6007
6008// MarshalJSON is the custom marshaler for ConnectivityIssue.
6009func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
6010	objectMap := make(map[string]interface{})
6011	return json.Marshal(objectMap)
6012}
6013
6014// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6015type ConnectivityParameters struct {
6016	Source      *ConnectivitySource      `json:"source,omitempty"`
6017	Destination *ConnectivityDestination `json:"destination,omitempty"`
6018	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6019	Protocol              Protocol               `json:"protocol,omitempty"`
6020	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6021}
6022
6023// ConnectivitySource parameters that define the source of the connection.
6024type ConnectivitySource struct {
6025	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6026	ResourceID *string `json:"resourceId,omitempty"`
6027	// Port - The source port from which a connectivity check will be performed.
6028	Port *int32 `json:"port,omitempty"`
6029}
6030
6031// Container reference to container resource in remote resource provider.
6032type Container struct {
6033	// ID - Resource ID.
6034	ID *string `json:"id,omitempty"`
6035}
6036
6037// ContainerNetworkInterface container network interface child resource.
6038type ContainerNetworkInterface struct {
6039	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
6040	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
6041	// Name - The name of the resource. This name can be used to access the resource.
6042	Name *string `json:"name,omitempty"`
6043	// Type - READ-ONLY; Sub Resource type.
6044	Type *string `json:"type,omitempty"`
6045	// Etag - A unique read-only string that changes whenever the resource is updated.
6046	Etag *string `json:"etag,omitempty"`
6047	// ID - Resource ID.
6048	ID *string `json:"id,omitempty"`
6049}
6050
6051// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
6052func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
6053	objectMap := make(map[string]interface{})
6054	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
6055		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
6056	}
6057	if cni.Name != nil {
6058		objectMap["name"] = cni.Name
6059	}
6060	if cni.Etag != nil {
6061		objectMap["etag"] = cni.Etag
6062	}
6063	if cni.ID != nil {
6064		objectMap["id"] = cni.ID
6065	}
6066	return json.Marshal(objectMap)
6067}
6068
6069// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
6070func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
6071	var m map[string]*json.RawMessage
6072	err := json.Unmarshal(body, &m)
6073	if err != nil {
6074		return err
6075	}
6076	for k, v := range m {
6077		switch k {
6078		case "properties":
6079			if v != nil {
6080				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
6081				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
6082				if err != nil {
6083					return err
6084				}
6085				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
6086			}
6087		case "name":
6088			if v != nil {
6089				var name string
6090				err = json.Unmarshal(*v, &name)
6091				if err != nil {
6092					return err
6093				}
6094				cni.Name = &name
6095			}
6096		case "type":
6097			if v != nil {
6098				var typeVar string
6099				err = json.Unmarshal(*v, &typeVar)
6100				if err != nil {
6101					return err
6102				}
6103				cni.Type = &typeVar
6104			}
6105		case "etag":
6106			if v != nil {
6107				var etag string
6108				err = json.Unmarshal(*v, &etag)
6109				if err != nil {
6110					return err
6111				}
6112				cni.Etag = &etag
6113			}
6114		case "id":
6115			if v != nil {
6116				var ID string
6117				err = json.Unmarshal(*v, &ID)
6118				if err != nil {
6119					return err
6120				}
6121				cni.ID = &ID
6122			}
6123		}
6124	}
6125
6126	return nil
6127}
6128
6129// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
6130type ContainerNetworkInterfaceConfiguration struct {
6131	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
6132	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
6133	// Name - The name of the resource. This name can be used to access the resource.
6134	Name *string `json:"name,omitempty"`
6135	// Type - READ-ONLY; Sub Resource type.
6136	Type *string `json:"type,omitempty"`
6137	// Etag - A unique read-only string that changes whenever the resource is updated.
6138	Etag *string `json:"etag,omitempty"`
6139	// ID - Resource ID.
6140	ID *string `json:"id,omitempty"`
6141}
6142
6143// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
6144func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
6145	objectMap := make(map[string]interface{})
6146	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
6147		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
6148	}
6149	if cnic.Name != nil {
6150		objectMap["name"] = cnic.Name
6151	}
6152	if cnic.Etag != nil {
6153		objectMap["etag"] = cnic.Etag
6154	}
6155	if cnic.ID != nil {
6156		objectMap["id"] = cnic.ID
6157	}
6158	return json.Marshal(objectMap)
6159}
6160
6161// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6162func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6163	var m map[string]*json.RawMessage
6164	err := json.Unmarshal(body, &m)
6165	if err != nil {
6166		return err
6167	}
6168	for k, v := range m {
6169		switch k {
6170		case "properties":
6171			if v != nil {
6172				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6173				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6174				if err != nil {
6175					return err
6176				}
6177				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6178			}
6179		case "name":
6180			if v != nil {
6181				var name string
6182				err = json.Unmarshal(*v, &name)
6183				if err != nil {
6184					return err
6185				}
6186				cnic.Name = &name
6187			}
6188		case "type":
6189			if v != nil {
6190				var typeVar string
6191				err = json.Unmarshal(*v, &typeVar)
6192				if err != nil {
6193					return err
6194				}
6195				cnic.Type = &typeVar
6196			}
6197		case "etag":
6198			if v != nil {
6199				var etag string
6200				err = json.Unmarshal(*v, &etag)
6201				if err != nil {
6202					return err
6203				}
6204				cnic.Etag = &etag
6205			}
6206		case "id":
6207			if v != nil {
6208				var ID string
6209				err = json.Unmarshal(*v, &ID)
6210				if err != nil {
6211					return err
6212				}
6213				cnic.ID = &ID
6214			}
6215		}
6216	}
6217
6218	return nil
6219}
6220
6221// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6222// properties.
6223type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6224	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6225	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6226	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6227	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
6228	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6229	ProvisioningState *string `json:"provisioningState,omitempty"`
6230}
6231
6232// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6233func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6234	objectMap := make(map[string]interface{})
6235	if cnicpf.IPConfigurations != nil {
6236		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6237	}
6238	if cnicpf.ContainerNetworkInterfaces != nil {
6239		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6240	}
6241	return json.Marshal(objectMap)
6242}
6243
6244// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6245type ContainerNetworkInterfaceIPConfiguration struct {
6246	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6247	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6248	// Name - The name of the resource. This name can be used to access the resource.
6249	Name *string `json:"name,omitempty"`
6250	// Type - READ-ONLY; Sub Resource type.
6251	Type *string `json:"type,omitempty"`
6252	// Etag - A unique read-only string that changes whenever the resource is updated.
6253	Etag *string `json:"etag,omitempty"`
6254}
6255
6256// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6257func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6258	objectMap := make(map[string]interface{})
6259	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6260		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6261	}
6262	if cniic.Name != nil {
6263		objectMap["name"] = cniic.Name
6264	}
6265	if cniic.Etag != nil {
6266		objectMap["etag"] = cniic.Etag
6267	}
6268	return json.Marshal(objectMap)
6269}
6270
6271// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6272func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6273	var m map[string]*json.RawMessage
6274	err := json.Unmarshal(body, &m)
6275	if err != nil {
6276		return err
6277	}
6278	for k, v := range m {
6279		switch k {
6280		case "properties":
6281			if v != nil {
6282				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6283				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6284				if err != nil {
6285					return err
6286				}
6287				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6288			}
6289		case "name":
6290			if v != nil {
6291				var name string
6292				err = json.Unmarshal(*v, &name)
6293				if err != nil {
6294					return err
6295				}
6296				cniic.Name = &name
6297			}
6298		case "type":
6299			if v != nil {
6300				var typeVar string
6301				err = json.Unmarshal(*v, &typeVar)
6302				if err != nil {
6303					return err
6304				}
6305				cniic.Type = &typeVar
6306			}
6307		case "etag":
6308			if v != nil {
6309				var etag string
6310				err = json.Unmarshal(*v, &etag)
6311				if err != nil {
6312					return err
6313				}
6314				cniic.Etag = &etag
6315			}
6316		}
6317	}
6318
6319	return nil
6320}
6321
6322// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6323// IP configuration.
6324type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6325	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6326	ProvisioningState *string `json:"provisioningState,omitempty"`
6327}
6328
6329// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
6330func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6331	objectMap := make(map[string]interface{})
6332	return json.Marshal(objectMap)
6333}
6334
6335// ContainerNetworkInterfacePropertiesFormat ...
6336type ContainerNetworkInterfacePropertiesFormat struct {
6337	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6338	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6339	// Container - Reference to the container to which this container network interface is attached.
6340	Container *Container `json:"container,omitempty"`
6341	// IPConfigurations - Reference to the ip configuration on this container nic.
6342	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6343	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6344	ProvisioningState *string `json:"provisioningState,omitempty"`
6345}
6346
6347// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6348func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6349	objectMap := make(map[string]interface{})
6350	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6351		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6352	}
6353	if cnipf.Container != nil {
6354		objectMap["container"] = cnipf.Container
6355	}
6356	if cnipf.IPConfigurations != nil {
6357		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6358	}
6359	return json.Marshal(objectMap)
6360}
6361
6362// DdosProtectionPlan a DDoS protection plan in a resource group.
6363type DdosProtectionPlan struct {
6364	autorest.Response `json:"-"`
6365	// ID - READ-ONLY; Resource ID.
6366	ID *string `json:"id,omitempty"`
6367	// Name - READ-ONLY; Resource name.
6368	Name *string `json:"name,omitempty"`
6369	// Type - READ-ONLY; Resource type.
6370	Type *string `json:"type,omitempty"`
6371	// Location - Resource location.
6372	Location *string `json:"location,omitempty"`
6373	// Tags - Resource tags.
6374	Tags map[string]*string `json:"tags"`
6375	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6376	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6377	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6378	Etag *string `json:"etag,omitempty"`
6379}
6380
6381// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6382func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6383	objectMap := make(map[string]interface{})
6384	if dpp.Location != nil {
6385		objectMap["location"] = dpp.Location
6386	}
6387	if dpp.Tags != nil {
6388		objectMap["tags"] = dpp.Tags
6389	}
6390	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6391		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6392	}
6393	return json.Marshal(objectMap)
6394}
6395
6396// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6397func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6398	var m map[string]*json.RawMessage
6399	err := json.Unmarshal(body, &m)
6400	if err != nil {
6401		return err
6402	}
6403	for k, v := range m {
6404		switch k {
6405		case "id":
6406			if v != nil {
6407				var ID string
6408				err = json.Unmarshal(*v, &ID)
6409				if err != nil {
6410					return err
6411				}
6412				dpp.ID = &ID
6413			}
6414		case "name":
6415			if v != nil {
6416				var name string
6417				err = json.Unmarshal(*v, &name)
6418				if err != nil {
6419					return err
6420				}
6421				dpp.Name = &name
6422			}
6423		case "type":
6424			if v != nil {
6425				var typeVar string
6426				err = json.Unmarshal(*v, &typeVar)
6427				if err != nil {
6428					return err
6429				}
6430				dpp.Type = &typeVar
6431			}
6432		case "location":
6433			if v != nil {
6434				var location string
6435				err = json.Unmarshal(*v, &location)
6436				if err != nil {
6437					return err
6438				}
6439				dpp.Location = &location
6440			}
6441		case "tags":
6442			if v != nil {
6443				var tags map[string]*string
6444				err = json.Unmarshal(*v, &tags)
6445				if err != nil {
6446					return err
6447				}
6448				dpp.Tags = tags
6449			}
6450		case "properties":
6451			if v != nil {
6452				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6453				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6454				if err != nil {
6455					return err
6456				}
6457				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6458			}
6459		case "etag":
6460			if v != nil {
6461				var etag string
6462				err = json.Unmarshal(*v, &etag)
6463				if err != nil {
6464					return err
6465				}
6466				dpp.Etag = &etag
6467			}
6468		}
6469	}
6470
6471	return nil
6472}
6473
6474// DdosProtectionPlanListResult a list of DDoS protection plans.
6475type DdosProtectionPlanListResult struct {
6476	autorest.Response `json:"-"`
6477	// Value - A list of DDoS protection plans.
6478	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6479	// NextLink - READ-ONLY; The URL to get the next set of results.
6480	NextLink *string `json:"nextLink,omitempty"`
6481}
6482
6483// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6484func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6485	objectMap := make(map[string]interface{})
6486	if dpplr.Value != nil {
6487		objectMap["value"] = dpplr.Value
6488	}
6489	return json.Marshal(objectMap)
6490}
6491
6492// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6493type DdosProtectionPlanListResultIterator struct {
6494	i    int
6495	page DdosProtectionPlanListResultPage
6496}
6497
6498// NextWithContext advances to the next value.  If there was an error making
6499// the request the iterator does not advance and the error is returned.
6500func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6501	if tracing.IsEnabled() {
6502		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6503		defer func() {
6504			sc := -1
6505			if iter.Response().Response.Response != nil {
6506				sc = iter.Response().Response.Response.StatusCode
6507			}
6508			tracing.EndSpan(ctx, sc, err)
6509		}()
6510	}
6511	iter.i++
6512	if iter.i < len(iter.page.Values()) {
6513		return nil
6514	}
6515	err = iter.page.NextWithContext(ctx)
6516	if err != nil {
6517		iter.i--
6518		return err
6519	}
6520	iter.i = 0
6521	return nil
6522}
6523
6524// Next advances to the next value.  If there was an error making
6525// the request the iterator does not advance and the error is returned.
6526// Deprecated: Use NextWithContext() instead.
6527func (iter *DdosProtectionPlanListResultIterator) Next() error {
6528	return iter.NextWithContext(context.Background())
6529}
6530
6531// NotDone returns true if the enumeration should be started or is not yet complete.
6532func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6533	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6534}
6535
6536// Response returns the raw server response from the last page request.
6537func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6538	return iter.page.Response()
6539}
6540
6541// Value returns the current value or a zero-initialized value if the
6542// iterator has advanced beyond the end of the collection.
6543func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6544	if !iter.page.NotDone() {
6545		return DdosProtectionPlan{}
6546	}
6547	return iter.page.Values()[iter.i]
6548}
6549
6550// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6551func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6552	return DdosProtectionPlanListResultIterator{page: page}
6553}
6554
6555// IsEmpty returns true if the ListResult contains no values.
6556func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6557	return dpplr.Value == nil || len(*dpplr.Value) == 0
6558}
6559
6560// hasNextLink returns true if the NextLink is not empty.
6561func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6562	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6563}
6564
6565// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6566// It returns nil if no more results exist.
6567func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6568	if !dpplr.hasNextLink() {
6569		return nil, nil
6570	}
6571	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6572		autorest.AsJSON(),
6573		autorest.AsGet(),
6574		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6575}
6576
6577// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6578type DdosProtectionPlanListResultPage struct {
6579	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6580	dpplr DdosProtectionPlanListResult
6581}
6582
6583// NextWithContext advances to the next page of values.  If there was an error making
6584// the request the page does not advance and the error is returned.
6585func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6586	if tracing.IsEnabled() {
6587		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6588		defer func() {
6589			sc := -1
6590			if page.Response().Response.Response != nil {
6591				sc = page.Response().Response.Response.StatusCode
6592			}
6593			tracing.EndSpan(ctx, sc, err)
6594		}()
6595	}
6596	for {
6597		next, err := page.fn(ctx, page.dpplr)
6598		if err != nil {
6599			return err
6600		}
6601		page.dpplr = next
6602		if !next.hasNextLink() || !next.IsEmpty() {
6603			break
6604		}
6605	}
6606	return nil
6607}
6608
6609// Next advances to the next page of values.  If there was an error making
6610// the request the page does not advance and the error is returned.
6611// Deprecated: Use NextWithContext() instead.
6612func (page *DdosProtectionPlanListResultPage) Next() error {
6613	return page.NextWithContext(context.Background())
6614}
6615
6616// NotDone returns true if the page enumeration should be started or is not yet complete.
6617func (page DdosProtectionPlanListResultPage) NotDone() bool {
6618	return !page.dpplr.IsEmpty()
6619}
6620
6621// Response returns the raw server response from the last page request.
6622func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6623	return page.dpplr
6624}
6625
6626// Values returns the slice of values for the current page or nil if there are no values.
6627func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6628	if page.dpplr.IsEmpty() {
6629		return nil
6630	}
6631	return *page.dpplr.Value
6632}
6633
6634// Creates a new instance of the DdosProtectionPlanListResultPage type.
6635func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6636	return DdosProtectionPlanListResultPage{
6637		fn:    getNextPage,
6638		dpplr: cur,
6639	}
6640}
6641
6642// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6643type DdosProtectionPlanPropertiesFormat struct {
6644	// ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
6645	ResourceGUID *string `json:"resourceGuid,omitempty"`
6646	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6647	ProvisioningState *string `json:"provisioningState,omitempty"`
6648	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6649	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6650}
6651
6652// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
6653func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
6654	objectMap := make(map[string]interface{})
6655	return json.Marshal(objectMap)
6656}
6657
6658// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6659// long-running operation.
6660type DdosProtectionPlansCreateOrUpdateFuture struct {
6661	azure.FutureAPI
6662	// Result returns the result of the asynchronous operation.
6663	// If the operation has not completed it will return an error.
6664	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6665}
6666
6667// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6668func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6669	var azFuture azure.Future
6670	if err := json.Unmarshal(body, &azFuture); err != nil {
6671		return err
6672	}
6673	future.FutureAPI = &azFuture
6674	future.Result = future.result
6675	return nil
6676}
6677
6678// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
6679func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
6680	var done bool
6681	done, err = future.DoneWithContext(context.Background(), client)
6682	if err != nil {
6683		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6684		return
6685	}
6686	if !done {
6687		dpp.Response.Response = future.Response()
6688		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
6689		return
6690	}
6691	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6692	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
6693		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
6694		if err != nil {
6695			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
6696		}
6697	}
6698	return
6699}
6700
6701// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6702// long-running operation.
6703type DdosProtectionPlansDeleteFuture struct {
6704	azure.FutureAPI
6705	// Result returns the result of the asynchronous operation.
6706	// If the operation has not completed it will return an error.
6707	Result func(DdosProtectionPlansClient) (autorest.Response, error)
6708}
6709
6710// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6711func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
6712	var azFuture azure.Future
6713	if err := json.Unmarshal(body, &azFuture); err != nil {
6714		return err
6715	}
6716	future.FutureAPI = &azFuture
6717	future.Result = future.result
6718	return nil
6719}
6720
6721// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
6722func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
6723	var done bool
6724	done, err = future.DoneWithContext(context.Background(), client)
6725	if err != nil {
6726		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
6727		return
6728	}
6729	if !done {
6730		ar.Response = future.Response()
6731		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
6732		return
6733	}
6734	ar.Response = future.Response()
6735	return
6736}
6737
6738// Delegation details the service to which the subnet is delegated.
6739type Delegation struct {
6740	// ServiceDelegationPropertiesFormat - Properties of the subnet.
6741	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
6742	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
6743	Name *string `json:"name,omitempty"`
6744	// Etag - A unique read-only string that changes whenever the resource is updated.
6745	Etag *string `json:"etag,omitempty"`
6746	// ID - Resource ID.
6747	ID *string `json:"id,omitempty"`
6748}
6749
6750// MarshalJSON is the custom marshaler for Delegation.
6751func (d Delegation) MarshalJSON() ([]byte, error) {
6752	objectMap := make(map[string]interface{})
6753	if d.ServiceDelegationPropertiesFormat != nil {
6754		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
6755	}
6756	if d.Name != nil {
6757		objectMap["name"] = d.Name
6758	}
6759	if d.Etag != nil {
6760		objectMap["etag"] = d.Etag
6761	}
6762	if d.ID != nil {
6763		objectMap["id"] = d.ID
6764	}
6765	return json.Marshal(objectMap)
6766}
6767
6768// UnmarshalJSON is the custom unmarshaler for Delegation struct.
6769func (d *Delegation) UnmarshalJSON(body []byte) error {
6770	var m map[string]*json.RawMessage
6771	err := json.Unmarshal(body, &m)
6772	if err != nil {
6773		return err
6774	}
6775	for k, v := range m {
6776		switch k {
6777		case "properties":
6778			if v != nil {
6779				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
6780				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
6781				if err != nil {
6782					return err
6783				}
6784				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
6785			}
6786		case "name":
6787			if v != nil {
6788				var name string
6789				err = json.Unmarshal(*v, &name)
6790				if err != nil {
6791					return err
6792				}
6793				d.Name = &name
6794			}
6795		case "etag":
6796			if v != nil {
6797				var etag string
6798				err = json.Unmarshal(*v, &etag)
6799				if err != nil {
6800					return err
6801				}
6802				d.Etag = &etag
6803			}
6804		case "id":
6805			if v != nil {
6806				var ID string
6807				err = json.Unmarshal(*v, &ID)
6808				if err != nil {
6809					return err
6810				}
6811				d.ID = &ID
6812			}
6813		}
6814	}
6815
6816	return nil
6817}
6818
6819// DeviceProperties list of properties of the device.
6820type DeviceProperties struct {
6821	// DeviceVendor - Name of the device Vendor.
6822	DeviceVendor *string `json:"deviceVendor,omitempty"`
6823	// DeviceModel - Model of the device.
6824	DeviceModel *string `json:"deviceModel,omitempty"`
6825	// LinkSpeedInMbps - Link speed.
6826	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6827}
6828
6829// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6830// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6831type DhcpOptions struct {
6832	// DNSServers - The list of DNS servers IP addresses.
6833	DNSServers *[]string `json:"dnsServers,omitempty"`
6834}
6835
6836// Dimension dimension of the metric.
6837type Dimension struct {
6838	// Name - The name of the dimension.
6839	Name *string `json:"name,omitempty"`
6840	// DisplayName - The display name of the dimension.
6841	DisplayName *string `json:"displayName,omitempty"`
6842	// InternalName - The internal name of the dimension.
6843	InternalName *string `json:"internalName,omitempty"`
6844}
6845
6846// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6847type DNSNameAvailabilityResult struct {
6848	autorest.Response `json:"-"`
6849	// Available - Domain availability (True/False).
6850	Available *bool `json:"available,omitempty"`
6851}
6852
6853// EffectiveNetworkSecurityGroup effective network security group.
6854type EffectiveNetworkSecurityGroup struct {
6855	// NetworkSecurityGroup - The ID of network security group that is applied.
6856	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6857	// Association - Associated resources.
6858	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6859	// EffectiveSecurityRules - A collection of effective security rules.
6860	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6861	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6862	TagMap map[string][]string `json:"tagMap"`
6863}
6864
6865// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6866func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6867	objectMap := make(map[string]interface{})
6868	if ensg.NetworkSecurityGroup != nil {
6869		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6870	}
6871	if ensg.Association != nil {
6872		objectMap["association"] = ensg.Association
6873	}
6874	if ensg.EffectiveSecurityRules != nil {
6875		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6876	}
6877	if ensg.TagMap != nil {
6878		objectMap["tagMap"] = ensg.TagMap
6879	}
6880	return json.Marshal(objectMap)
6881}
6882
6883// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6884type EffectiveNetworkSecurityGroupAssociation struct {
6885	// Subnet - The ID of the subnet if assigned.
6886	Subnet *SubResource `json:"subnet,omitempty"`
6887	// NetworkInterface - The ID of the network interface if assigned.
6888	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6889}
6890
6891// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6892// call.
6893type EffectiveNetworkSecurityGroupListResult struct {
6894	autorest.Response `json:"-"`
6895	// Value - A list of effective network security groups.
6896	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6897	// NextLink - READ-ONLY; The URL to get the next set of results.
6898	NextLink *string `json:"nextLink,omitempty"`
6899}
6900
6901// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
6902func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
6903	objectMap := make(map[string]interface{})
6904	if ensglr.Value != nil {
6905		objectMap["value"] = ensglr.Value
6906	}
6907	return json.Marshal(objectMap)
6908}
6909
6910// EffectiveNetworkSecurityRule effective network security rules.
6911type EffectiveNetworkSecurityRule struct {
6912	// Name - The name of the security rule specified by the user (if created by the user).
6913	Name *string `json:"name,omitempty"`
6914	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6915	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6916	// SourcePortRange - The source port or range.
6917	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6918	// DestinationPortRange - The destination port or range.
6919	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6920	// 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 (*)
6921	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6922	// 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 (*)
6923	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6924	// SourceAddressPrefix - The source address prefix.
6925	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6926	// DestinationAddressPrefix - The destination address prefix.
6927	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6928	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6929	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6930	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6931	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6932	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6933	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6934	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6935	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6936	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6937	Access SecurityRuleAccess `json:"access,omitempty"`
6938	// Priority - The priority of the rule.
6939	Priority *int32 `json:"priority,omitempty"`
6940	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6941	Direction SecurityRuleDirection `json:"direction,omitempty"`
6942}
6943
6944// EffectiveRoute effective Route
6945type EffectiveRoute struct {
6946	// Name - The name of the user defined route. This is optional.
6947	Name *string `json:"name,omitempty"`
6948	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6949	Source EffectiveRouteSource `json:"source,omitempty"`
6950	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
6951	State EffectiveRouteState `json:"state,omitempty"`
6952	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6953	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6954	// NextHopIPAddress - The IP address of the next hop of the effective route.
6955	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6956	// 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'
6957	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6958}
6959
6960// EffectiveRouteListResult response for list effective route API service call.
6961type EffectiveRouteListResult struct {
6962	autorest.Response `json:"-"`
6963	// Value - A list of effective routes.
6964	Value *[]EffectiveRoute `json:"value,omitempty"`
6965	// NextLink - READ-ONLY; The URL to get the next set of results.
6966	NextLink *string `json:"nextLink,omitempty"`
6967}
6968
6969// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
6970func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
6971	objectMap := make(map[string]interface{})
6972	if erlr.Value != nil {
6973		objectMap["value"] = erlr.Value
6974	}
6975	return json.Marshal(objectMap)
6976}
6977
6978// EndpointService identifies the service being brought into the virtual network.
6979type EndpointService struct {
6980	// ID - A unique identifier of the service being referenced by the interface endpoint.
6981	ID *string `json:"id,omitempty"`
6982}
6983
6984// EndpointServiceResult endpoint service.
6985type EndpointServiceResult struct {
6986	// Name - READ-ONLY; Name of the endpoint service.
6987	Name *string `json:"name,omitempty"`
6988	// Type - READ-ONLY; Type of the endpoint service.
6989	Type *string `json:"type,omitempty"`
6990	// ID - Resource ID.
6991	ID *string `json:"id,omitempty"`
6992}
6993
6994// MarshalJSON is the custom marshaler for EndpointServiceResult.
6995func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
6996	objectMap := make(map[string]interface{})
6997	if esr.ID != nil {
6998		objectMap["id"] = esr.ID
6999	}
7000	return json.Marshal(objectMap)
7001}
7002
7003// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
7004type EndpointServicesListResult struct {
7005	autorest.Response `json:"-"`
7006	// Value - List of available endpoint services in a region.
7007	Value *[]EndpointServiceResult `json:"value,omitempty"`
7008	// NextLink - The URL to get the next set of results.
7009	NextLink *string `json:"nextLink,omitempty"`
7010}
7011
7012// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
7013// values.
7014type EndpointServicesListResultIterator struct {
7015	i    int
7016	page EndpointServicesListResultPage
7017}
7018
7019// NextWithContext advances to the next value.  If there was an error making
7020// the request the iterator does not advance and the error is returned.
7021func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
7022	if tracing.IsEnabled() {
7023		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
7024		defer func() {
7025			sc := -1
7026			if iter.Response().Response.Response != nil {
7027				sc = iter.Response().Response.Response.StatusCode
7028			}
7029			tracing.EndSpan(ctx, sc, err)
7030		}()
7031	}
7032	iter.i++
7033	if iter.i < len(iter.page.Values()) {
7034		return nil
7035	}
7036	err = iter.page.NextWithContext(ctx)
7037	if err != nil {
7038		iter.i--
7039		return err
7040	}
7041	iter.i = 0
7042	return nil
7043}
7044
7045// Next advances to the next value.  If there was an error making
7046// the request the iterator does not advance and the error is returned.
7047// Deprecated: Use NextWithContext() instead.
7048func (iter *EndpointServicesListResultIterator) Next() error {
7049	return iter.NextWithContext(context.Background())
7050}
7051
7052// NotDone returns true if the enumeration should be started or is not yet complete.
7053func (iter EndpointServicesListResultIterator) NotDone() bool {
7054	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7055}
7056
7057// Response returns the raw server response from the last page request.
7058func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
7059	return iter.page.Response()
7060}
7061
7062// Value returns the current value or a zero-initialized value if the
7063// iterator has advanced beyond the end of the collection.
7064func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
7065	if !iter.page.NotDone() {
7066		return EndpointServiceResult{}
7067	}
7068	return iter.page.Values()[iter.i]
7069}
7070
7071// Creates a new instance of the EndpointServicesListResultIterator type.
7072func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
7073	return EndpointServicesListResultIterator{page: page}
7074}
7075
7076// IsEmpty returns true if the ListResult contains no values.
7077func (eslr EndpointServicesListResult) IsEmpty() bool {
7078	return eslr.Value == nil || len(*eslr.Value) == 0
7079}
7080
7081// hasNextLink returns true if the NextLink is not empty.
7082func (eslr EndpointServicesListResult) hasNextLink() bool {
7083	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
7084}
7085
7086// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
7087// It returns nil if no more results exist.
7088func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
7089	if !eslr.hasNextLink() {
7090		return nil, nil
7091	}
7092	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7093		autorest.AsJSON(),
7094		autorest.AsGet(),
7095		autorest.WithBaseURL(to.String(eslr.NextLink)))
7096}
7097
7098// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
7099type EndpointServicesListResultPage struct {
7100	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
7101	eslr EndpointServicesListResult
7102}
7103
7104// NextWithContext advances to the next page of values.  If there was an error making
7105// the request the page does not advance and the error is returned.
7106func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
7107	if tracing.IsEnabled() {
7108		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
7109		defer func() {
7110			sc := -1
7111			if page.Response().Response.Response != nil {
7112				sc = page.Response().Response.Response.StatusCode
7113			}
7114			tracing.EndSpan(ctx, sc, err)
7115		}()
7116	}
7117	for {
7118		next, err := page.fn(ctx, page.eslr)
7119		if err != nil {
7120			return err
7121		}
7122		page.eslr = next
7123		if !next.hasNextLink() || !next.IsEmpty() {
7124			break
7125		}
7126	}
7127	return nil
7128}
7129
7130// Next advances to the next page of values.  If there was an error making
7131// the request the page does not advance and the error is returned.
7132// Deprecated: Use NextWithContext() instead.
7133func (page *EndpointServicesListResultPage) Next() error {
7134	return page.NextWithContext(context.Background())
7135}
7136
7137// NotDone returns true if the page enumeration should be started or is not yet complete.
7138func (page EndpointServicesListResultPage) NotDone() bool {
7139	return !page.eslr.IsEmpty()
7140}
7141
7142// Response returns the raw server response from the last page request.
7143func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
7144	return page.eslr
7145}
7146
7147// Values returns the slice of values for the current page or nil if there are no values.
7148func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
7149	if page.eslr.IsEmpty() {
7150		return nil
7151	}
7152	return *page.eslr.Value
7153}
7154
7155// Creates a new instance of the EndpointServicesListResultPage type.
7156func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
7157	return EndpointServicesListResultPage{
7158		fn:   getNextPage,
7159		eslr: cur,
7160	}
7161}
7162
7163// Error ...
7164type Error struct {
7165	Code       *string         `json:"code,omitempty"`
7166	Message    *string         `json:"message,omitempty"`
7167	Target     *string         `json:"target,omitempty"`
7168	Details    *[]ErrorDetails `json:"details,omitempty"`
7169	InnerError *string         `json:"innerError,omitempty"`
7170}
7171
7172// ErrorDetails ...
7173type ErrorDetails struct {
7174	Code    *string `json:"code,omitempty"`
7175	Target  *string `json:"target,omitempty"`
7176	Message *string `json:"message,omitempty"`
7177}
7178
7179// ErrorResponse the error object.
7180type ErrorResponse struct {
7181	Error *ErrorDetails `json:"error,omitempty"`
7182}
7183
7184// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7185type EvaluatedNetworkSecurityGroup struct {
7186	// NetworkSecurityGroupID - Network security group ID.
7187	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7188	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7189	AppliedTo   *string      `json:"appliedTo,omitempty"`
7190	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7191	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7192	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7193}
7194
7195// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7196func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7197	objectMap := make(map[string]interface{})
7198	if ensg.NetworkSecurityGroupID != nil {
7199		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7200	}
7201	if ensg.AppliedTo != nil {
7202		objectMap["appliedTo"] = ensg.AppliedTo
7203	}
7204	if ensg.MatchedRule != nil {
7205		objectMap["matchedRule"] = ensg.MatchedRule
7206	}
7207	return json.Marshal(objectMap)
7208}
7209
7210// ExpressRouteCircuit expressRouteCircuit resource
7211type ExpressRouteCircuit struct {
7212	autorest.Response `json:"-"`
7213	// Sku - The SKU.
7214	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
7215	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7216	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7217	Etag *string `json:"etag,omitempty"`
7218	// ID - Resource ID.
7219	ID *string `json:"id,omitempty"`
7220	// Name - READ-ONLY; Resource name.
7221	Name *string `json:"name,omitempty"`
7222	// Type - READ-ONLY; Resource type.
7223	Type *string `json:"type,omitempty"`
7224	// Location - Resource location.
7225	Location *string `json:"location,omitempty"`
7226	// Tags - Resource tags.
7227	Tags map[string]*string `json:"tags"`
7228}
7229
7230// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7231func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7232	objectMap := make(map[string]interface{})
7233	if erc.Sku != nil {
7234		objectMap["sku"] = erc.Sku
7235	}
7236	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7237		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7238	}
7239	if erc.ID != nil {
7240		objectMap["id"] = erc.ID
7241	}
7242	if erc.Location != nil {
7243		objectMap["location"] = erc.Location
7244	}
7245	if erc.Tags != nil {
7246		objectMap["tags"] = erc.Tags
7247	}
7248	return json.Marshal(objectMap)
7249}
7250
7251// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7252func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7253	var m map[string]*json.RawMessage
7254	err := json.Unmarshal(body, &m)
7255	if err != nil {
7256		return err
7257	}
7258	for k, v := range m {
7259		switch k {
7260		case "sku":
7261			if v != nil {
7262				var sku ExpressRouteCircuitSku
7263				err = json.Unmarshal(*v, &sku)
7264				if err != nil {
7265					return err
7266				}
7267				erc.Sku = &sku
7268			}
7269		case "properties":
7270			if v != nil {
7271				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7272				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7273				if err != nil {
7274					return err
7275				}
7276				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7277			}
7278		case "etag":
7279			if v != nil {
7280				var etag string
7281				err = json.Unmarshal(*v, &etag)
7282				if err != nil {
7283					return err
7284				}
7285				erc.Etag = &etag
7286			}
7287		case "id":
7288			if v != nil {
7289				var ID string
7290				err = json.Unmarshal(*v, &ID)
7291				if err != nil {
7292					return err
7293				}
7294				erc.ID = &ID
7295			}
7296		case "name":
7297			if v != nil {
7298				var name string
7299				err = json.Unmarshal(*v, &name)
7300				if err != nil {
7301					return err
7302				}
7303				erc.Name = &name
7304			}
7305		case "type":
7306			if v != nil {
7307				var typeVar string
7308				err = json.Unmarshal(*v, &typeVar)
7309				if err != nil {
7310					return err
7311				}
7312				erc.Type = &typeVar
7313			}
7314		case "location":
7315			if v != nil {
7316				var location string
7317				err = json.Unmarshal(*v, &location)
7318				if err != nil {
7319					return err
7320				}
7321				erc.Location = &location
7322			}
7323		case "tags":
7324			if v != nil {
7325				var tags map[string]*string
7326				err = json.Unmarshal(*v, &tags)
7327				if err != nil {
7328					return err
7329				}
7330				erc.Tags = tags
7331			}
7332		}
7333	}
7334
7335	return nil
7336}
7337
7338// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7339type ExpressRouteCircuitArpTable struct {
7340	// Age - Entry age in minutes
7341	Age *int32 `json:"age,omitempty"`
7342	// Interface - Interface address
7343	Interface *string `json:"interface,omitempty"`
7344	// IPAddress - The IP address.
7345	IPAddress *string `json:"ipAddress,omitempty"`
7346	// MacAddress - The MAC address.
7347	MacAddress *string `json:"macAddress,omitempty"`
7348}
7349
7350// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7351type ExpressRouteCircuitAuthorization struct {
7352	autorest.Response              `json:"-"`
7353	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7354	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7355	Name *string `json:"name,omitempty"`
7356	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7357	Etag *string `json:"etag,omitempty"`
7358	// ID - Resource ID.
7359	ID *string `json:"id,omitempty"`
7360}
7361
7362// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7363func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7364	objectMap := make(map[string]interface{})
7365	if erca.AuthorizationPropertiesFormat != nil {
7366		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7367	}
7368	if erca.Name != nil {
7369		objectMap["name"] = erca.Name
7370	}
7371	if erca.ID != nil {
7372		objectMap["id"] = erca.ID
7373	}
7374	return json.Marshal(objectMap)
7375}
7376
7377// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7378func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7379	var m map[string]*json.RawMessage
7380	err := json.Unmarshal(body, &m)
7381	if err != nil {
7382		return err
7383	}
7384	for k, v := range m {
7385		switch k {
7386		case "properties":
7387			if v != nil {
7388				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7389				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7390				if err != nil {
7391					return err
7392				}
7393				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7394			}
7395		case "name":
7396			if v != nil {
7397				var name string
7398				err = json.Unmarshal(*v, &name)
7399				if err != nil {
7400					return err
7401				}
7402				erca.Name = &name
7403			}
7404		case "etag":
7405			if v != nil {
7406				var etag string
7407				err = json.Unmarshal(*v, &etag)
7408				if err != nil {
7409					return err
7410				}
7411				erca.Etag = &etag
7412			}
7413		case "id":
7414			if v != nil {
7415				var ID string
7416				err = json.Unmarshal(*v, &ID)
7417				if err != nil {
7418					return err
7419				}
7420				erca.ID = &ID
7421			}
7422		}
7423	}
7424
7425	return nil
7426}
7427
7428// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7429// results of a long-running operation.
7430type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7431	azure.FutureAPI
7432	// Result returns the result of the asynchronous operation.
7433	// If the operation has not completed it will return an error.
7434	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7435}
7436
7437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7438func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7439	var azFuture azure.Future
7440	if err := json.Unmarshal(body, &azFuture); err != nil {
7441		return err
7442	}
7443	future.FutureAPI = &azFuture
7444	future.Result = future.result
7445	return nil
7446}
7447
7448// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
7449func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7450	var done bool
7451	done, err = future.DoneWithContext(context.Background(), client)
7452	if err != nil {
7453		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7454		return
7455	}
7456	if !done {
7457		erca.Response.Response = future.Response()
7458		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7459		return
7460	}
7461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7462	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7463		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7464		if err != nil {
7465			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7466		}
7467	}
7468	return
7469}
7470
7471// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7472// of a long-running operation.
7473type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7474	azure.FutureAPI
7475	// Result returns the result of the asynchronous operation.
7476	// If the operation has not completed it will return an error.
7477	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7478}
7479
7480// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7481func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
7482	var azFuture azure.Future
7483	if err := json.Unmarshal(body, &azFuture); err != nil {
7484		return err
7485	}
7486	future.FutureAPI = &azFuture
7487	future.Result = future.result
7488	return nil
7489}
7490
7491// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
7492func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7493	var done bool
7494	done, err = future.DoneWithContext(context.Background(), client)
7495	if err != nil {
7496		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7497		return
7498	}
7499	if !done {
7500		ar.Response = future.Response()
7501		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7502		return
7503	}
7504	ar.Response = future.Response()
7505	return
7506}
7507
7508// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7509// resource.
7510type ExpressRouteCircuitConnection struct {
7511	autorest.Response                              `json:"-"`
7512	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7513	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7514	Name *string `json:"name,omitempty"`
7515	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7516	Etag *string `json:"etag,omitempty"`
7517	// ID - Resource ID.
7518	ID *string `json:"id,omitempty"`
7519}
7520
7521// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7522func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7523	objectMap := make(map[string]interface{})
7524	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7525		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7526	}
7527	if ercc.Name != nil {
7528		objectMap["name"] = ercc.Name
7529	}
7530	if ercc.ID != nil {
7531		objectMap["id"] = ercc.ID
7532	}
7533	return json.Marshal(objectMap)
7534}
7535
7536// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7537func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7538	var m map[string]*json.RawMessage
7539	err := json.Unmarshal(body, &m)
7540	if err != nil {
7541		return err
7542	}
7543	for k, v := range m {
7544		switch k {
7545		case "properties":
7546			if v != nil {
7547				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7548				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7549				if err != nil {
7550					return err
7551				}
7552				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7553			}
7554		case "name":
7555			if v != nil {
7556				var name string
7557				err = json.Unmarshal(*v, &name)
7558				if err != nil {
7559					return err
7560				}
7561				ercc.Name = &name
7562			}
7563		case "etag":
7564			if v != nil {
7565				var etag string
7566				err = json.Unmarshal(*v, &etag)
7567				if err != nil {
7568					return err
7569				}
7570				ercc.Etag = &etag
7571			}
7572		case "id":
7573			if v != nil {
7574				var ID string
7575				err = json.Unmarshal(*v, &ID)
7576				if err != nil {
7577					return err
7578				}
7579				ercc.ID = &ID
7580			}
7581		}
7582	}
7583
7584	return nil
7585}
7586
7587// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
7588// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
7589type ExpressRouteCircuitConnectionListResult struct {
7590	autorest.Response `json:"-"`
7591	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
7592	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
7593	// NextLink - The URL to get the next set of results.
7594	NextLink *string `json:"nextLink,omitempty"`
7595}
7596
7597// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
7598// ExpressRouteCircuitConnection values.
7599type ExpressRouteCircuitConnectionListResultIterator struct {
7600	i    int
7601	page ExpressRouteCircuitConnectionListResultPage
7602}
7603
7604// NextWithContext advances to the next value.  If there was an error making
7605// the request the iterator does not advance and the error is returned.
7606func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7607	if tracing.IsEnabled() {
7608		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
7609		defer func() {
7610			sc := -1
7611			if iter.Response().Response.Response != nil {
7612				sc = iter.Response().Response.Response.StatusCode
7613			}
7614			tracing.EndSpan(ctx, sc, err)
7615		}()
7616	}
7617	iter.i++
7618	if iter.i < len(iter.page.Values()) {
7619		return nil
7620	}
7621	err = iter.page.NextWithContext(ctx)
7622	if err != nil {
7623		iter.i--
7624		return err
7625	}
7626	iter.i = 0
7627	return nil
7628}
7629
7630// Next advances to the next value.  If there was an error making
7631// the request the iterator does not advance and the error is returned.
7632// Deprecated: Use NextWithContext() instead.
7633func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
7634	return iter.NextWithContext(context.Background())
7635}
7636
7637// NotDone returns true if the enumeration should be started or is not yet complete.
7638func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
7639	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7640}
7641
7642// Response returns the raw server response from the last page request.
7643func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
7644	return iter.page.Response()
7645}
7646
7647// Value returns the current value or a zero-initialized value if the
7648// iterator has advanced beyond the end of the collection.
7649func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
7650	if !iter.page.NotDone() {
7651		return ExpressRouteCircuitConnection{}
7652	}
7653	return iter.page.Values()[iter.i]
7654}
7655
7656// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
7657func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
7658	return ExpressRouteCircuitConnectionListResultIterator{page: page}
7659}
7660
7661// IsEmpty returns true if the ListResult contains no values.
7662func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
7663	return ercclr.Value == nil || len(*ercclr.Value) == 0
7664}
7665
7666// hasNextLink returns true if the NextLink is not empty.
7667func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
7668	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
7669}
7670
7671// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
7672// It returns nil if no more results exist.
7673func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
7674	if !ercclr.hasNextLink() {
7675		return nil, nil
7676	}
7677	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7678		autorest.AsJSON(),
7679		autorest.AsGet(),
7680		autorest.WithBaseURL(to.String(ercclr.NextLink)))
7681}
7682
7683// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
7684type ExpressRouteCircuitConnectionListResultPage struct {
7685	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
7686	ercclr ExpressRouteCircuitConnectionListResult
7687}
7688
7689// NextWithContext advances to the next page of values.  If there was an error making
7690// the request the page does not advance and the error is returned.
7691func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
7692	if tracing.IsEnabled() {
7693		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
7694		defer func() {
7695			sc := -1
7696			if page.Response().Response.Response != nil {
7697				sc = page.Response().Response.Response.StatusCode
7698			}
7699			tracing.EndSpan(ctx, sc, err)
7700		}()
7701	}
7702	for {
7703		next, err := page.fn(ctx, page.ercclr)
7704		if err != nil {
7705			return err
7706		}
7707		page.ercclr = next
7708		if !next.hasNextLink() || !next.IsEmpty() {
7709			break
7710		}
7711	}
7712	return nil
7713}
7714
7715// Next advances to the next page of values.  If there was an error making
7716// the request the page does not advance and the error is returned.
7717// Deprecated: Use NextWithContext() instead.
7718func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
7719	return page.NextWithContext(context.Background())
7720}
7721
7722// NotDone returns true if the page enumeration should be started or is not yet complete.
7723func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
7724	return !page.ercclr.IsEmpty()
7725}
7726
7727// Response returns the raw server response from the last page request.
7728func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
7729	return page.ercclr
7730}
7731
7732// Values returns the slice of values for the current page or nil if there are no values.
7733func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
7734	if page.ercclr.IsEmpty() {
7735		return nil
7736	}
7737	return *page.ercclr.Value
7738}
7739
7740// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
7741func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
7742	return ExpressRouteCircuitConnectionListResultPage{
7743		fn:     getNextPage,
7744		ercclr: cur,
7745	}
7746}
7747
7748// ExpressRouteCircuitConnectionPropertiesFormat ...
7749type ExpressRouteCircuitConnectionPropertiesFormat struct {
7750	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7751	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7752	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7753	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7754	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7755	AddressPrefix *string `json:"addressPrefix,omitempty"`
7756	// AuthorizationKey - The authorization key.
7757	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7758	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7759	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7760	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7761	ProvisioningState *string `json:"provisioningState,omitempty"`
7762}
7763
7764// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
7765func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
7766	objectMap := make(map[string]interface{})
7767	if erccpf.ExpressRouteCircuitPeering != nil {
7768		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
7769	}
7770	if erccpf.PeerExpressRouteCircuitPeering != nil {
7771		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
7772	}
7773	if erccpf.AddressPrefix != nil {
7774		objectMap["addressPrefix"] = erccpf.AddressPrefix
7775	}
7776	if erccpf.AuthorizationKey != nil {
7777		objectMap["authorizationKey"] = erccpf.AuthorizationKey
7778	}
7779	return json.Marshal(objectMap)
7780}
7781
7782// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7783// results of a long-running operation.
7784type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7785	azure.FutureAPI
7786	// Result returns the result of the asynchronous operation.
7787	// If the operation has not completed it will return an error.
7788	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
7789}
7790
7791// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7792func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7793	var azFuture azure.Future
7794	if err := json.Unmarshal(body, &azFuture); err != nil {
7795		return err
7796	}
7797	future.FutureAPI = &azFuture
7798	future.Result = future.result
7799	return nil
7800}
7801
7802// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
7803func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
7804	var done bool
7805	done, err = future.DoneWithContext(context.Background(), client)
7806	if err != nil {
7807		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7808		return
7809	}
7810	if !done {
7811		ercc.Response.Response = future.Response()
7812		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
7813		return
7814	}
7815	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7816	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7817		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
7818		if err != nil {
7819			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
7820		}
7821	}
7822	return
7823}
7824
7825// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7826// long-running operation.
7827type ExpressRouteCircuitConnectionsDeleteFuture struct {
7828	azure.FutureAPI
7829	// Result returns the result of the asynchronous operation.
7830	// If the operation has not completed it will return an error.
7831	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
7832}
7833
7834// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7835func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
7836	var azFuture azure.Future
7837	if err := json.Unmarshal(body, &azFuture); err != nil {
7838		return err
7839	}
7840	future.FutureAPI = &azFuture
7841	future.Result = future.result
7842	return nil
7843}
7844
7845// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
7846func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
7847	var done bool
7848	done, err = future.DoneWithContext(context.Background(), client)
7849	if err != nil {
7850		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
7851		return
7852	}
7853	if !done {
7854		ar.Response = future.Response()
7855		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
7856		return
7857	}
7858	ar.Response = future.Response()
7859	return
7860}
7861
7862// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7863type ExpressRouteCircuitListResult struct {
7864	autorest.Response `json:"-"`
7865	// Value - A list of ExpressRouteCircuits in a resource group.
7866	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7867	// NextLink - The URL to get the next set of results.
7868	NextLink *string `json:"nextLink,omitempty"`
7869}
7870
7871// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7872// values.
7873type ExpressRouteCircuitListResultIterator struct {
7874	i    int
7875	page ExpressRouteCircuitListResultPage
7876}
7877
7878// NextWithContext advances to the next value.  If there was an error making
7879// the request the iterator does not advance and the error is returned.
7880func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7881	if tracing.IsEnabled() {
7882		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7883		defer func() {
7884			sc := -1
7885			if iter.Response().Response.Response != nil {
7886				sc = iter.Response().Response.Response.StatusCode
7887			}
7888			tracing.EndSpan(ctx, sc, err)
7889		}()
7890	}
7891	iter.i++
7892	if iter.i < len(iter.page.Values()) {
7893		return nil
7894	}
7895	err = iter.page.NextWithContext(ctx)
7896	if err != nil {
7897		iter.i--
7898		return err
7899	}
7900	iter.i = 0
7901	return nil
7902}
7903
7904// Next advances to the next value.  If there was an error making
7905// the request the iterator does not advance and the error is returned.
7906// Deprecated: Use NextWithContext() instead.
7907func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7908	return iter.NextWithContext(context.Background())
7909}
7910
7911// NotDone returns true if the enumeration should be started or is not yet complete.
7912func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7913	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7914}
7915
7916// Response returns the raw server response from the last page request.
7917func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7918	return iter.page.Response()
7919}
7920
7921// Value returns the current value or a zero-initialized value if the
7922// iterator has advanced beyond the end of the collection.
7923func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7924	if !iter.page.NotDone() {
7925		return ExpressRouteCircuit{}
7926	}
7927	return iter.page.Values()[iter.i]
7928}
7929
7930// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7931func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7932	return ExpressRouteCircuitListResultIterator{page: page}
7933}
7934
7935// IsEmpty returns true if the ListResult contains no values.
7936func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7937	return erclr.Value == nil || len(*erclr.Value) == 0
7938}
7939
7940// hasNextLink returns true if the NextLink is not empty.
7941func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
7942	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
7943}
7944
7945// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7946// It returns nil if no more results exist.
7947func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7948	if !erclr.hasNextLink() {
7949		return nil, nil
7950	}
7951	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7952		autorest.AsJSON(),
7953		autorest.AsGet(),
7954		autorest.WithBaseURL(to.String(erclr.NextLink)))
7955}
7956
7957// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7958type ExpressRouteCircuitListResultPage struct {
7959	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7960	erclr ExpressRouteCircuitListResult
7961}
7962
7963// NextWithContext advances to the next page of values.  If there was an error making
7964// the request the page does not advance and the error is returned.
7965func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7966	if tracing.IsEnabled() {
7967		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7968		defer func() {
7969			sc := -1
7970			if page.Response().Response.Response != nil {
7971				sc = page.Response().Response.Response.StatusCode
7972			}
7973			tracing.EndSpan(ctx, sc, err)
7974		}()
7975	}
7976	for {
7977		next, err := page.fn(ctx, page.erclr)
7978		if err != nil {
7979			return err
7980		}
7981		page.erclr = next
7982		if !next.hasNextLink() || !next.IsEmpty() {
7983			break
7984		}
7985	}
7986	return nil
7987}
7988
7989// Next advances to the next page of values.  If there was an error making
7990// the request the page does not advance and the error is returned.
7991// Deprecated: Use NextWithContext() instead.
7992func (page *ExpressRouteCircuitListResultPage) Next() error {
7993	return page.NextWithContext(context.Background())
7994}
7995
7996// NotDone returns true if the page enumeration should be started or is not yet complete.
7997func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7998	return !page.erclr.IsEmpty()
7999}
8000
8001// Response returns the raw server response from the last page request.
8002func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
8003	return page.erclr
8004}
8005
8006// Values returns the slice of values for the current page or nil if there are no values.
8007func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
8008	if page.erclr.IsEmpty() {
8009		return nil
8010	}
8011	return *page.erclr.Value
8012}
8013
8014// Creates a new instance of the ExpressRouteCircuitListResultPage type.
8015func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
8016	return ExpressRouteCircuitListResultPage{
8017		fn:    getNextPage,
8018		erclr: cur,
8019	}
8020}
8021
8022// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
8023type ExpressRouteCircuitPeering struct {
8024	autorest.Response                           `json:"-"`
8025	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
8026	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8027	Name *string `json:"name,omitempty"`
8028	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8029	Etag *string `json:"etag,omitempty"`
8030	// ID - Resource ID.
8031	ID *string `json:"id,omitempty"`
8032}
8033
8034// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
8035func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
8036	objectMap := make(map[string]interface{})
8037	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
8038		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
8039	}
8040	if ercp.Name != nil {
8041		objectMap["name"] = ercp.Name
8042	}
8043	if ercp.ID != nil {
8044		objectMap["id"] = ercp.ID
8045	}
8046	return json.Marshal(objectMap)
8047}
8048
8049// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
8050func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
8051	var m map[string]*json.RawMessage
8052	err := json.Unmarshal(body, &m)
8053	if err != nil {
8054		return err
8055	}
8056	for k, v := range m {
8057		switch k {
8058		case "properties":
8059			if v != nil {
8060				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
8061				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
8062				if err != nil {
8063					return err
8064				}
8065				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
8066			}
8067		case "name":
8068			if v != nil {
8069				var name string
8070				err = json.Unmarshal(*v, &name)
8071				if err != nil {
8072					return err
8073				}
8074				ercp.Name = &name
8075			}
8076		case "etag":
8077			if v != nil {
8078				var etag string
8079				err = json.Unmarshal(*v, &etag)
8080				if err != nil {
8081					return err
8082				}
8083				ercp.Etag = &etag
8084			}
8085		case "id":
8086			if v != nil {
8087				var ID string
8088				err = json.Unmarshal(*v, &ID)
8089				if err != nil {
8090					return err
8091				}
8092				ercp.ID = &ID
8093			}
8094		}
8095	}
8096
8097	return nil
8098}
8099
8100// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
8101type ExpressRouteCircuitPeeringConfig struct {
8102	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
8103	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
8104	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
8105	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
8106	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
8107	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
8108	// LegacyMode - The legacy mode of the peering.
8109	LegacyMode *int32 `json:"legacyMode,omitempty"`
8110	// CustomerASN - The CustomerASN of the peering.
8111	CustomerASN *int32 `json:"customerASN,omitempty"`
8112	// RoutingRegistryName - The RoutingRegistryName of the configuration.
8113	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
8114}
8115
8116// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
8117type ExpressRouteCircuitPeeringID struct {
8118	// ID - The ID of the ExpressRoute circuit peering.
8119	ID *string `json:"id,omitempty"`
8120}
8121
8122// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
8123// that belong to an ExpressRouteCircuit.
8124type ExpressRouteCircuitPeeringListResult struct {
8125	autorest.Response `json:"-"`
8126	// Value - The peerings in an express route circuit.
8127	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
8128	// NextLink - The URL to get the next set of results.
8129	NextLink *string `json:"nextLink,omitempty"`
8130}
8131
8132// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
8133// ExpressRouteCircuitPeering values.
8134type ExpressRouteCircuitPeeringListResultIterator struct {
8135	i    int
8136	page ExpressRouteCircuitPeeringListResultPage
8137}
8138
8139// NextWithContext advances to the next value.  If there was an error making
8140// the request the iterator does not advance and the error is returned.
8141func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
8142	if tracing.IsEnabled() {
8143		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
8144		defer func() {
8145			sc := -1
8146			if iter.Response().Response.Response != nil {
8147				sc = iter.Response().Response.Response.StatusCode
8148			}
8149			tracing.EndSpan(ctx, sc, err)
8150		}()
8151	}
8152	iter.i++
8153	if iter.i < len(iter.page.Values()) {
8154		return nil
8155	}
8156	err = iter.page.NextWithContext(ctx)
8157	if err != nil {
8158		iter.i--
8159		return err
8160	}
8161	iter.i = 0
8162	return nil
8163}
8164
8165// Next advances to the next value.  If there was an error making
8166// the request the iterator does not advance and the error is returned.
8167// Deprecated: Use NextWithContext() instead.
8168func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
8169	return iter.NextWithContext(context.Background())
8170}
8171
8172// NotDone returns true if the enumeration should be started or is not yet complete.
8173func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
8174	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8175}
8176
8177// Response returns the raw server response from the last page request.
8178func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
8179	return iter.page.Response()
8180}
8181
8182// Value returns the current value or a zero-initialized value if the
8183// iterator has advanced beyond the end of the collection.
8184func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
8185	if !iter.page.NotDone() {
8186		return ExpressRouteCircuitPeering{}
8187	}
8188	return iter.page.Values()[iter.i]
8189}
8190
8191// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
8192func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
8193	return ExpressRouteCircuitPeeringListResultIterator{page: page}
8194}
8195
8196// IsEmpty returns true if the ListResult contains no values.
8197func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
8198	return ercplr.Value == nil || len(*ercplr.Value) == 0
8199}
8200
8201// hasNextLink returns true if the NextLink is not empty.
8202func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
8203	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
8204}
8205
8206// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
8207// It returns nil if no more results exist.
8208func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
8209	if !ercplr.hasNextLink() {
8210		return nil, nil
8211	}
8212	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8213		autorest.AsJSON(),
8214		autorest.AsGet(),
8215		autorest.WithBaseURL(to.String(ercplr.NextLink)))
8216}
8217
8218// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
8219type ExpressRouteCircuitPeeringListResultPage struct {
8220	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
8221	ercplr ExpressRouteCircuitPeeringListResult
8222}
8223
8224// NextWithContext advances to the next page of values.  If there was an error making
8225// the request the page does not advance and the error is returned.
8226func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
8227	if tracing.IsEnabled() {
8228		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
8229		defer func() {
8230			sc := -1
8231			if page.Response().Response.Response != nil {
8232				sc = page.Response().Response.Response.StatusCode
8233			}
8234			tracing.EndSpan(ctx, sc, err)
8235		}()
8236	}
8237	for {
8238		next, err := page.fn(ctx, page.ercplr)
8239		if err != nil {
8240			return err
8241		}
8242		page.ercplr = next
8243		if !next.hasNextLink() || !next.IsEmpty() {
8244			break
8245		}
8246	}
8247	return nil
8248}
8249
8250// Next advances to the next page of values.  If there was an error making
8251// the request the page does not advance and the error is returned.
8252// Deprecated: Use NextWithContext() instead.
8253func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
8254	return page.NextWithContext(context.Background())
8255}
8256
8257// NotDone returns true if the page enumeration should be started or is not yet complete.
8258func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
8259	return !page.ercplr.IsEmpty()
8260}
8261
8262// Response returns the raw server response from the last page request.
8263func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
8264	return page.ercplr
8265}
8266
8267// Values returns the slice of values for the current page or nil if there are no values.
8268func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
8269	if page.ercplr.IsEmpty() {
8270		return nil
8271	}
8272	return *page.ercplr.Value
8273}
8274
8275// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
8276func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
8277	return ExpressRouteCircuitPeeringListResultPage{
8278		fn:     getNextPage,
8279		ercplr: cur,
8280	}
8281}
8282
8283// ExpressRouteCircuitPeeringPropertiesFormat ...
8284type ExpressRouteCircuitPeeringPropertiesFormat struct {
8285	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8286	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8287	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8288	State ExpressRoutePeeringState `json:"state,omitempty"`
8289	// AzureASN - The Azure ASN.
8290	AzureASN *int32 `json:"azureASN,omitempty"`
8291	// PeerASN - The peer ASN.
8292	PeerASN *int64 `json:"peerASN,omitempty"`
8293	// PrimaryPeerAddressPrefix - The primary address prefix.
8294	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8295	// SecondaryPeerAddressPrefix - The secondary address prefix.
8296	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8297	// PrimaryAzurePort - The primary port.
8298	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8299	// SecondaryAzurePort - The secondary port.
8300	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8301	// SharedKey - The shared key.
8302	SharedKey *string `json:"sharedKey,omitempty"`
8303	// VlanID - The VLAN ID.
8304	VlanID *int32 `json:"vlanId,omitempty"`
8305	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8306	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8307	// Stats - Gets peering stats.
8308	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
8309	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8310	ProvisioningState *string `json:"provisioningState,omitempty"`
8311	// GatewayManagerEtag - The GatewayManager Etag.
8312	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8313	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8314	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8315	// RouteFilter - The reference of the RouteFilter resource.
8316	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8317	// Ipv6PeeringConfig - The IPv6 peering configuration.
8318	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8319	// ExpressRouteConnection - The ExpressRoute connection.
8320	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
8321	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8322	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8323}
8324
8325// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8326// of a long-running operation.
8327type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8328	azure.FutureAPI
8329	// Result returns the result of the asynchronous operation.
8330	// If the operation has not completed it will return an error.
8331	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8332}
8333
8334// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8335func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8336	var azFuture azure.Future
8337	if err := json.Unmarshal(body, &azFuture); err != nil {
8338		return err
8339	}
8340	future.FutureAPI = &azFuture
8341	future.Result = future.result
8342	return nil
8343}
8344
8345// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
8346func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
8347	var done bool
8348	done, err = future.DoneWithContext(context.Background(), client)
8349	if err != nil {
8350		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8351		return
8352	}
8353	if !done {
8354		ercp.Response.Response = future.Response()
8355		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
8356		return
8357	}
8358	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8359	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
8360		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
8361		if err != nil {
8362			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
8363		}
8364	}
8365	return
8366}
8367
8368// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8369// long-running operation.
8370type ExpressRouteCircuitPeeringsDeleteFuture struct {
8371	azure.FutureAPI
8372	// Result returns the result of the asynchronous operation.
8373	// If the operation has not completed it will return an error.
8374	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8375}
8376
8377// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8378func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
8379	var azFuture azure.Future
8380	if err := json.Unmarshal(body, &azFuture); err != nil {
8381		return err
8382	}
8383	future.FutureAPI = &azFuture
8384	future.Result = future.result
8385	return nil
8386}
8387
8388// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
8389func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
8390	var done bool
8391	done, err = future.DoneWithContext(context.Background(), client)
8392	if err != nil {
8393		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8394		return
8395	}
8396	if !done {
8397		ar.Response = future.Response()
8398		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
8399		return
8400	}
8401	ar.Response = future.Response()
8402	return
8403}
8404
8405// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8406type ExpressRouteCircuitPropertiesFormat struct {
8407	// AllowClassicOperations - Allow classic operations
8408	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8409	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8410	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8411	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8412	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8413	// Authorizations - The list of authorizations.
8414	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
8415	// Peerings - The list of peerings.
8416	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
8417	// ServiceKey - The ServiceKey.
8418	ServiceKey *string `json:"serviceKey,omitempty"`
8419	// ServiceProviderNotes - The ServiceProviderNotes.
8420	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8421	// ServiceProviderProperties - The ServiceProviderProperties.
8422	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
8423	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
8424	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
8425	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
8426	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
8427	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
8428	Stag *int32 `json:"stag,omitempty"`
8429	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8430	ProvisioningState *string `json:"provisioningState,omitempty"`
8431	// GatewayManagerEtag - The GatewayManager Etag.
8432	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8433	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
8434	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
8435}
8436
8437// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
8438func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
8439	objectMap := make(map[string]interface{})
8440	if ercpf.AllowClassicOperations != nil {
8441		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
8442	}
8443	if ercpf.CircuitProvisioningState != nil {
8444		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
8445	}
8446	if ercpf.ServiceProviderProvisioningState != "" {
8447		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
8448	}
8449	if ercpf.Authorizations != nil {
8450		objectMap["authorizations"] = ercpf.Authorizations
8451	}
8452	if ercpf.Peerings != nil {
8453		objectMap["peerings"] = ercpf.Peerings
8454	}
8455	if ercpf.ServiceKey != nil {
8456		objectMap["serviceKey"] = ercpf.ServiceKey
8457	}
8458	if ercpf.ServiceProviderNotes != nil {
8459		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
8460	}
8461	if ercpf.ServiceProviderProperties != nil {
8462		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
8463	}
8464	if ercpf.ExpressRoutePort != nil {
8465		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
8466	}
8467	if ercpf.BandwidthInGbps != nil {
8468		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
8469	}
8470	if ercpf.ProvisioningState != nil {
8471		objectMap["provisioningState"] = ercpf.ProvisioningState
8472	}
8473	if ercpf.GatewayManagerEtag != nil {
8474		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
8475	}
8476	if ercpf.AllowGlobalReach != nil {
8477		objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
8478	}
8479	return json.Marshal(objectMap)
8480}
8481
8482// ExpressRouteCircuitReference ...
8483type ExpressRouteCircuitReference struct {
8484	// ID - Corresponding Express Route Circuit Id.
8485	ID *string `json:"id,omitempty"`
8486}
8487
8488// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
8489type ExpressRouteCircuitRoutesTable struct {
8490	// NetworkProperty - IP address of a network entity
8491	NetworkProperty *string `json:"network,omitempty"`
8492	// NextHop - NextHop address
8493	NextHop *string `json:"nextHop,omitempty"`
8494	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
8495	LocPrf *string `json:"locPrf,omitempty"`
8496	// Weight - Route Weight.
8497	Weight *int32 `json:"weight,omitempty"`
8498	// Path - Autonomous system paths to the destination network.
8499	Path *string `json:"path,omitempty"`
8500}
8501
8502// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8503type ExpressRouteCircuitRoutesTableSummary struct {
8504	// Neighbor - IP address of the neighbor.
8505	Neighbor *string `json:"neighbor,omitempty"`
8506	// V - BGP version number spoken to the neighbor.
8507	V *int32 `json:"v,omitempty"`
8508	// As - Autonomous system number.
8509	As *int32 `json:"as,omitempty"`
8510	// 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.
8511	UpDown *string `json:"upDown,omitempty"`
8512	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8513	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
8514}
8515
8516// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
8517// Circuits API.
8518type ExpressRouteCircuitsArpTableListResult struct {
8519	autorest.Response `json:"-"`
8520	// Value - Gets list of the ARP table.
8521	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
8522	// NextLink - The URL to get the next set of results.
8523	NextLink *string `json:"nextLink,omitempty"`
8524}
8525
8526// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8527// long-running operation.
8528type ExpressRouteCircuitsCreateOrUpdateFuture struct {
8529	azure.FutureAPI
8530	// Result returns the result of the asynchronous operation.
8531	// If the operation has not completed it will return an error.
8532	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8533}
8534
8535// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8536func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8537	var azFuture azure.Future
8538	if err := json.Unmarshal(body, &azFuture); err != nil {
8539		return err
8540	}
8541	future.FutureAPI = &azFuture
8542	future.Result = future.result
8543	return nil
8544}
8545
8546// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
8547func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8548	var done bool
8549	done, err = future.DoneWithContext(context.Background(), client)
8550	if err != nil {
8551		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8552		return
8553	}
8554	if !done {
8555		erc.Response.Response = future.Response()
8556		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
8557		return
8558	}
8559	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8560	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8561		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
8562		if err != nil {
8563			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
8564		}
8565	}
8566	return
8567}
8568
8569// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
8570// long-running operation.
8571type ExpressRouteCircuitsDeleteFuture struct {
8572	azure.FutureAPI
8573	// Result returns the result of the asynchronous operation.
8574	// If the operation has not completed it will return an error.
8575	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
8576}
8577
8578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8579func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
8580	var azFuture azure.Future
8581	if err := json.Unmarshal(body, &azFuture); err != nil {
8582		return err
8583	}
8584	future.FutureAPI = &azFuture
8585	future.Result = future.result
8586	return nil
8587}
8588
8589// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
8590func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
8591	var done bool
8592	done, err = future.DoneWithContext(context.Background(), client)
8593	if err != nil {
8594		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
8595		return
8596	}
8597	if !done {
8598		ar.Response = future.Response()
8599		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
8600		return
8601	}
8602	ar.Response = future.Response()
8603	return
8604}
8605
8606// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
8607// ExpressRouteCircuit.
8608type ExpressRouteCircuitServiceProviderProperties struct {
8609	// ServiceProviderName - The serviceProviderName.
8610	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
8611	// PeeringLocation - The peering location.
8612	PeeringLocation *string `json:"peeringLocation,omitempty"`
8613	// BandwidthInMbps - The BandwidthInMbps.
8614	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8615}
8616
8617// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
8618type ExpressRouteCircuitSku struct {
8619	// Name - The name of the SKU.
8620	Name *string `json:"name,omitempty"`
8621	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic'
8622	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
8623	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
8624	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
8625}
8626
8627// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
8628// long-running operation.
8629type ExpressRouteCircuitsListArpTableFuture struct {
8630	azure.FutureAPI
8631	// Result returns the result of the asynchronous operation.
8632	// If the operation has not completed it will return an error.
8633	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
8634}
8635
8636// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8637func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
8638	var azFuture azure.Future
8639	if err := json.Unmarshal(body, &azFuture); err != nil {
8640		return err
8641	}
8642	future.FutureAPI = &azFuture
8643	future.Result = future.result
8644	return nil
8645}
8646
8647// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
8648func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
8649	var done bool
8650	done, err = future.DoneWithContext(context.Background(), client)
8651	if err != nil {
8652		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
8653		return
8654	}
8655	if !done {
8656		ercatlr.Response.Response = future.Response()
8657		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
8658		return
8659	}
8660	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8661	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
8662		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
8663		if err != nil {
8664			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
8665		}
8666	}
8667	return
8668}
8669
8670// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
8671// long-running operation.
8672type ExpressRouteCircuitsListRoutesTableFuture struct {
8673	azure.FutureAPI
8674	// Result returns the result of the asynchronous operation.
8675	// If the operation has not completed it will return an error.
8676	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8677}
8678
8679// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8680func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
8681	var azFuture azure.Future
8682	if err := json.Unmarshal(body, &azFuture); err != nil {
8683		return err
8684	}
8685	future.FutureAPI = &azFuture
8686	future.Result = future.result
8687	return nil
8688}
8689
8690// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
8691func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
8692	var done bool
8693	done, err = future.DoneWithContext(context.Background(), client)
8694	if err != nil {
8695		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
8696		return
8697	}
8698	if !done {
8699		ercrtlr.Response.Response = future.Response()
8700		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
8701		return
8702	}
8703	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8704	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
8705		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
8706		if err != nil {
8707			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
8708		}
8709	}
8710	return
8711}
8712
8713// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
8714// results of a long-running operation.
8715type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
8716	azure.FutureAPI
8717	// Result returns the result of the asynchronous operation.
8718	// If the operation has not completed it will return an error.
8719	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
8720}
8721
8722// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8723func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
8724	var azFuture azure.Future
8725	if err := json.Unmarshal(body, &azFuture); err != nil {
8726		return err
8727	}
8728	future.FutureAPI = &azFuture
8729	future.Result = future.result
8730	return nil
8731}
8732
8733// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
8734func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
8735	var done bool
8736	done, err = future.DoneWithContext(context.Background(), client)
8737	if err != nil {
8738		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
8739		return
8740	}
8741	if !done {
8742		ercrtslr.Response.Response = future.Response()
8743		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
8744		return
8745	}
8746	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8747	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
8748		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
8749		if err != nil {
8750			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
8751		}
8752	}
8753	return
8754}
8755
8756// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
8757// Circuits API.
8758type ExpressRouteCircuitsRoutesTableListResult struct {
8759	autorest.Response `json:"-"`
8760	// Value - The list of routes table.
8761	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
8762	// NextLink - The URL to get the next set of results.
8763	NextLink *string `json:"nextLink,omitempty"`
8764}
8765
8766// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
8767// Express Route Circuits API.
8768type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
8769	autorest.Response `json:"-"`
8770	// Value - A list of the routes table.
8771	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
8772	// NextLink - The URL to get the next set of results.
8773	NextLink *string `json:"nextLink,omitempty"`
8774}
8775
8776// ExpressRouteCircuitStats contains stats associated with the peering.
8777type ExpressRouteCircuitStats struct {
8778	autorest.Response `json:"-"`
8779	// PrimarybytesIn - Gets BytesIn of the peering.
8780	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
8781	// PrimarybytesOut - Gets BytesOut of the peering.
8782	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
8783	// SecondarybytesIn - Gets BytesIn of the peering.
8784	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
8785	// SecondarybytesOut - Gets BytesOut of the peering.
8786	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
8787}
8788
8789// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8790// long-running operation.
8791type ExpressRouteCircuitsUpdateTagsFuture struct {
8792	azure.FutureAPI
8793	// Result returns the result of the asynchronous operation.
8794	// If the operation has not completed it will return an error.
8795	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8796}
8797
8798// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8799func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8800	var azFuture azure.Future
8801	if err := json.Unmarshal(body, &azFuture); err != nil {
8802		return err
8803	}
8804	future.FutureAPI = &azFuture
8805	future.Result = future.result
8806	return nil
8807}
8808
8809// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
8810func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8811	var done bool
8812	done, err = future.DoneWithContext(context.Background(), client)
8813	if err != nil {
8814		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8815		return
8816	}
8817	if !done {
8818		erc.Response.Response = future.Response()
8819		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
8820		return
8821	}
8822	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8823	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8824		erc, err = client.UpdateTagsResponder(erc.Response.Response)
8825		if err != nil {
8826			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
8827		}
8828	}
8829	return
8830}
8831
8832// ExpressRouteConnection expressRouteConnection resource.
8833type ExpressRouteConnection struct {
8834	autorest.Response                 `json:"-"`
8835	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
8836	// Name - The name of the resource.
8837	Name *string `json:"name,omitempty"`
8838	// ID - Resource ID.
8839	ID *string `json:"id,omitempty"`
8840}
8841
8842// MarshalJSON is the custom marshaler for ExpressRouteConnection.
8843func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
8844	objectMap := make(map[string]interface{})
8845	if erc.ExpressRouteConnectionProperties != nil {
8846		objectMap["properties"] = erc.ExpressRouteConnectionProperties
8847	}
8848	if erc.Name != nil {
8849		objectMap["name"] = erc.Name
8850	}
8851	if erc.ID != nil {
8852		objectMap["id"] = erc.ID
8853	}
8854	return json.Marshal(objectMap)
8855}
8856
8857// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
8858func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
8859	var m map[string]*json.RawMessage
8860	err := json.Unmarshal(body, &m)
8861	if err != nil {
8862		return err
8863	}
8864	for k, v := range m {
8865		switch k {
8866		case "properties":
8867			if v != nil {
8868				var expressRouteConnectionProperties ExpressRouteConnectionProperties
8869				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
8870				if err != nil {
8871					return err
8872				}
8873				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
8874			}
8875		case "name":
8876			if v != nil {
8877				var name string
8878				err = json.Unmarshal(*v, &name)
8879				if err != nil {
8880					return err
8881				}
8882				erc.Name = &name
8883			}
8884		case "id":
8885			if v != nil {
8886				var ID string
8887				err = json.Unmarshal(*v, &ID)
8888				if err != nil {
8889					return err
8890				}
8891				erc.ID = &ID
8892			}
8893		}
8894	}
8895
8896	return nil
8897}
8898
8899// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
8900type ExpressRouteConnectionID struct {
8901	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
8902	ID *string `json:"id,omitempty"`
8903}
8904
8905// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
8906func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
8907	objectMap := make(map[string]interface{})
8908	return json.Marshal(objectMap)
8909}
8910
8911// ExpressRouteConnectionList expressRouteConnection list
8912type ExpressRouteConnectionList struct {
8913	autorest.Response `json:"-"`
8914	// Value - The list of ExpressRoute connections
8915	Value *[]ExpressRouteConnection `json:"value,omitempty"`
8916}
8917
8918// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
8919type ExpressRouteConnectionProperties struct {
8920	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8921	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8922	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
8923	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
8924	// AuthorizationKey - Authorization key to establish the connection.
8925	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8926	// RoutingWeight - The routing weight associated to the connection.
8927	RoutingWeight *int32 `json:"routingWeight,omitempty"`
8928}
8929
8930// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
8931func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
8932	objectMap := make(map[string]interface{})
8933	if ercp.ExpressRouteCircuitPeering != nil {
8934		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
8935	}
8936	if ercp.AuthorizationKey != nil {
8937		objectMap["authorizationKey"] = ercp.AuthorizationKey
8938	}
8939	if ercp.RoutingWeight != nil {
8940		objectMap["routingWeight"] = ercp.RoutingWeight
8941	}
8942	return json.Marshal(objectMap)
8943}
8944
8945// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8946// a long-running operation.
8947type ExpressRouteConnectionsCreateOrUpdateFuture struct {
8948	azure.FutureAPI
8949	// Result returns the result of the asynchronous operation.
8950	// If the operation has not completed it will return an error.
8951	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
8952}
8953
8954// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8955func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8956	var azFuture azure.Future
8957	if err := json.Unmarshal(body, &azFuture); err != nil {
8958		return err
8959	}
8960	future.FutureAPI = &azFuture
8961	future.Result = future.result
8962	return nil
8963}
8964
8965// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
8966func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
8967	var done bool
8968	done, err = future.DoneWithContext(context.Background(), client)
8969	if err != nil {
8970		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8971		return
8972	}
8973	if !done {
8974		erc.Response.Response = future.Response()
8975		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
8976		return
8977	}
8978	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8979	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8980		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
8981		if err != nil {
8982			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
8983		}
8984	}
8985	return
8986}
8987
8988// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8989// long-running operation.
8990type ExpressRouteConnectionsDeleteFuture struct {
8991	azure.FutureAPI
8992	// Result returns the result of the asynchronous operation.
8993	// If the operation has not completed it will return an error.
8994	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
8995}
8996
8997// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8998func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
8999	var azFuture azure.Future
9000	if err := json.Unmarshal(body, &azFuture); err != nil {
9001		return err
9002	}
9003	future.FutureAPI = &azFuture
9004	future.Result = future.result
9005	return nil
9006}
9007
9008// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
9009func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
9010	var done bool
9011	done, err = future.DoneWithContext(context.Background(), client)
9012	if err != nil {
9013		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9014		return
9015	}
9016	if !done {
9017		ar.Response = future.Response()
9018		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
9019		return
9020	}
9021	ar.Response = future.Response()
9022	return
9023}
9024
9025// ExpressRouteCrossConnection expressRouteCrossConnection resource
9026type ExpressRouteCrossConnection struct {
9027	autorest.Response                      `json:"-"`
9028	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
9029	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9030	Etag *string `json:"etag,omitempty"`
9031	// ID - Resource ID.
9032	ID *string `json:"id,omitempty"`
9033	// Name - READ-ONLY; Resource name.
9034	Name *string `json:"name,omitempty"`
9035	// Type - READ-ONLY; Resource type.
9036	Type *string `json:"type,omitempty"`
9037	// Location - Resource location.
9038	Location *string `json:"location,omitempty"`
9039	// Tags - Resource tags.
9040	Tags map[string]*string `json:"tags"`
9041}
9042
9043// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
9044func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
9045	objectMap := make(map[string]interface{})
9046	if ercc.ExpressRouteCrossConnectionProperties != nil {
9047		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
9048	}
9049	if ercc.ID != nil {
9050		objectMap["id"] = ercc.ID
9051	}
9052	if ercc.Location != nil {
9053		objectMap["location"] = ercc.Location
9054	}
9055	if ercc.Tags != nil {
9056		objectMap["tags"] = ercc.Tags
9057	}
9058	return json.Marshal(objectMap)
9059}
9060
9061// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
9062func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
9063	var m map[string]*json.RawMessage
9064	err := json.Unmarshal(body, &m)
9065	if err != nil {
9066		return err
9067	}
9068	for k, v := range m {
9069		switch k {
9070		case "properties":
9071			if v != nil {
9072				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
9073				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
9074				if err != nil {
9075					return err
9076				}
9077				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
9078			}
9079		case "etag":
9080			if v != nil {
9081				var etag string
9082				err = json.Unmarshal(*v, &etag)
9083				if err != nil {
9084					return err
9085				}
9086				ercc.Etag = &etag
9087			}
9088		case "id":
9089			if v != nil {
9090				var ID string
9091				err = json.Unmarshal(*v, &ID)
9092				if err != nil {
9093					return err
9094				}
9095				ercc.ID = &ID
9096			}
9097		case "name":
9098			if v != nil {
9099				var name string
9100				err = json.Unmarshal(*v, &name)
9101				if err != nil {
9102					return err
9103				}
9104				ercc.Name = &name
9105			}
9106		case "type":
9107			if v != nil {
9108				var typeVar string
9109				err = json.Unmarshal(*v, &typeVar)
9110				if err != nil {
9111					return err
9112				}
9113				ercc.Type = &typeVar
9114			}
9115		case "location":
9116			if v != nil {
9117				var location string
9118				err = json.Unmarshal(*v, &location)
9119				if err != nil {
9120					return err
9121				}
9122				ercc.Location = &location
9123			}
9124		case "tags":
9125			if v != nil {
9126				var tags map[string]*string
9127				err = json.Unmarshal(*v, &tags)
9128				if err != nil {
9129					return err
9130				}
9131				ercc.Tags = tags
9132			}
9133		}
9134	}
9135
9136	return nil
9137}
9138
9139// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
9140type ExpressRouteCrossConnectionListResult struct {
9141	autorest.Response `json:"-"`
9142	// Value - A list of ExpressRouteCrossConnection resources.
9143	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
9144	// NextLink - READ-ONLY; The URL to get the next set of results.
9145	NextLink *string `json:"nextLink,omitempty"`
9146}
9147
9148// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
9149func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
9150	objectMap := make(map[string]interface{})
9151	if ercclr.Value != nil {
9152		objectMap["value"] = ercclr.Value
9153	}
9154	return json.Marshal(objectMap)
9155}
9156
9157// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
9158// ExpressRouteCrossConnection values.
9159type ExpressRouteCrossConnectionListResultIterator struct {
9160	i    int
9161	page ExpressRouteCrossConnectionListResultPage
9162}
9163
9164// NextWithContext advances to the next value.  If there was an error making
9165// the request the iterator does not advance and the error is returned.
9166func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9167	if tracing.IsEnabled() {
9168		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
9169		defer func() {
9170			sc := -1
9171			if iter.Response().Response.Response != nil {
9172				sc = iter.Response().Response.Response.StatusCode
9173			}
9174			tracing.EndSpan(ctx, sc, err)
9175		}()
9176	}
9177	iter.i++
9178	if iter.i < len(iter.page.Values()) {
9179		return nil
9180	}
9181	err = iter.page.NextWithContext(ctx)
9182	if err != nil {
9183		iter.i--
9184		return err
9185	}
9186	iter.i = 0
9187	return nil
9188}
9189
9190// Next advances to the next value.  If there was an error making
9191// the request the iterator does not advance and the error is returned.
9192// Deprecated: Use NextWithContext() instead.
9193func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
9194	return iter.NextWithContext(context.Background())
9195}
9196
9197// NotDone returns true if the enumeration should be started or is not yet complete.
9198func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
9199	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9200}
9201
9202// Response returns the raw server response from the last page request.
9203func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
9204	return iter.page.Response()
9205}
9206
9207// Value returns the current value or a zero-initialized value if the
9208// iterator has advanced beyond the end of the collection.
9209func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
9210	if !iter.page.NotDone() {
9211		return ExpressRouteCrossConnection{}
9212	}
9213	return iter.page.Values()[iter.i]
9214}
9215
9216// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
9217func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
9218	return ExpressRouteCrossConnectionListResultIterator{page: page}
9219}
9220
9221// IsEmpty returns true if the ListResult contains no values.
9222func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
9223	return ercclr.Value == nil || len(*ercclr.Value) == 0
9224}
9225
9226// hasNextLink returns true if the NextLink is not empty.
9227func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
9228	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9229}
9230
9231// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
9232// It returns nil if no more results exist.
9233func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9234	if !ercclr.hasNextLink() {
9235		return nil, nil
9236	}
9237	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9238		autorest.AsJSON(),
9239		autorest.AsGet(),
9240		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9241}
9242
9243// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
9244type ExpressRouteCrossConnectionListResultPage struct {
9245	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
9246	ercclr ExpressRouteCrossConnectionListResult
9247}
9248
9249// NextWithContext advances to the next page of values.  If there was an error making
9250// the request the page does not advance and the error is returned.
9251func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9252	if tracing.IsEnabled() {
9253		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
9254		defer func() {
9255			sc := -1
9256			if page.Response().Response.Response != nil {
9257				sc = page.Response().Response.Response.StatusCode
9258			}
9259			tracing.EndSpan(ctx, sc, err)
9260		}()
9261	}
9262	for {
9263		next, err := page.fn(ctx, page.ercclr)
9264		if err != nil {
9265			return err
9266		}
9267		page.ercclr = next
9268		if !next.hasNextLink() || !next.IsEmpty() {
9269			break
9270		}
9271	}
9272	return nil
9273}
9274
9275// Next advances to the next page of values.  If there was an error making
9276// the request the page does not advance and the error is returned.
9277// Deprecated: Use NextWithContext() instead.
9278func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
9279	return page.NextWithContext(context.Background())
9280}
9281
9282// NotDone returns true if the page enumeration should be started or is not yet complete.
9283func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
9284	return !page.ercclr.IsEmpty()
9285}
9286
9287// Response returns the raw server response from the last page request.
9288func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
9289	return page.ercclr
9290}
9291
9292// Values returns the slice of values for the current page or nil if there are no values.
9293func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
9294	if page.ercclr.IsEmpty() {
9295		return nil
9296	}
9297	return *page.ercclr.Value
9298}
9299
9300// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
9301func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
9302	return ExpressRouteCrossConnectionListResultPage{
9303		fn:     getNextPage,
9304		ercclr: cur,
9305	}
9306}
9307
9308// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
9309type ExpressRouteCrossConnectionPeering struct {
9310	autorest.Response                             `json:"-"`
9311	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
9312	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9313	Name *string `json:"name,omitempty"`
9314	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9315	Etag *string `json:"etag,omitempty"`
9316	// ID - Resource ID.
9317	ID *string `json:"id,omitempty"`
9318}
9319
9320// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
9321func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9322	objectMap := make(map[string]interface{})
9323	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9324		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9325	}
9326	if erccp.Name != nil {
9327		objectMap["name"] = erccp.Name
9328	}
9329	if erccp.ID != nil {
9330		objectMap["id"] = erccp.ID
9331	}
9332	return json.Marshal(objectMap)
9333}
9334
9335// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9336func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9337	var m map[string]*json.RawMessage
9338	err := json.Unmarshal(body, &m)
9339	if err != nil {
9340		return err
9341	}
9342	for k, v := range m {
9343		switch k {
9344		case "properties":
9345			if v != nil {
9346				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9347				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9348				if err != nil {
9349					return err
9350				}
9351				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9352			}
9353		case "name":
9354			if v != nil {
9355				var name string
9356				err = json.Unmarshal(*v, &name)
9357				if err != nil {
9358					return err
9359				}
9360				erccp.Name = &name
9361			}
9362		case "etag":
9363			if v != nil {
9364				var etag string
9365				err = json.Unmarshal(*v, &etag)
9366				if err != nil {
9367					return err
9368				}
9369				erccp.Etag = &etag
9370			}
9371		case "id":
9372			if v != nil {
9373				var ID string
9374				err = json.Unmarshal(*v, &ID)
9375				if err != nil {
9376					return err
9377				}
9378				erccp.ID = &ID
9379			}
9380		}
9381	}
9382
9383	return nil
9384}
9385
9386// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9387// that belong to an ExpressRouteCrossConnection.
9388type ExpressRouteCrossConnectionPeeringList struct {
9389	autorest.Response `json:"-"`
9390	// Value - The peerings in an express route cross connection.
9391	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9392	// NextLink - READ-ONLY; The URL to get the next set of results.
9393	NextLink *string `json:"nextLink,omitempty"`
9394}
9395
9396// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9397func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9398	objectMap := make(map[string]interface{})
9399	if erccpl.Value != nil {
9400		objectMap["value"] = erccpl.Value
9401	}
9402	return json.Marshal(objectMap)
9403}
9404
9405// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9406// ExpressRouteCrossConnectionPeering values.
9407type ExpressRouteCrossConnectionPeeringListIterator struct {
9408	i    int
9409	page ExpressRouteCrossConnectionPeeringListPage
9410}
9411
9412// NextWithContext advances to the next value.  If there was an error making
9413// the request the iterator does not advance and the error is returned.
9414func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9415	if tracing.IsEnabled() {
9416		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
9417		defer func() {
9418			sc := -1
9419			if iter.Response().Response.Response != nil {
9420				sc = iter.Response().Response.Response.StatusCode
9421			}
9422			tracing.EndSpan(ctx, sc, err)
9423		}()
9424	}
9425	iter.i++
9426	if iter.i < len(iter.page.Values()) {
9427		return nil
9428	}
9429	err = iter.page.NextWithContext(ctx)
9430	if err != nil {
9431		iter.i--
9432		return err
9433	}
9434	iter.i = 0
9435	return nil
9436}
9437
9438// Next advances to the next value.  If there was an error making
9439// the request the iterator does not advance and the error is returned.
9440// Deprecated: Use NextWithContext() instead.
9441func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
9442	return iter.NextWithContext(context.Background())
9443}
9444
9445// NotDone returns true if the enumeration should be started or is not yet complete.
9446func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
9447	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9448}
9449
9450// Response returns the raw server response from the last page request.
9451func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
9452	return iter.page.Response()
9453}
9454
9455// Value returns the current value or a zero-initialized value if the
9456// iterator has advanced beyond the end of the collection.
9457func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
9458	if !iter.page.NotDone() {
9459		return ExpressRouteCrossConnectionPeering{}
9460	}
9461	return iter.page.Values()[iter.i]
9462}
9463
9464// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
9465func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
9466	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
9467}
9468
9469// IsEmpty returns true if the ListResult contains no values.
9470func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
9471	return erccpl.Value == nil || len(*erccpl.Value) == 0
9472}
9473
9474// hasNextLink returns true if the NextLink is not empty.
9475func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
9476	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
9477}
9478
9479// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
9480// It returns nil if no more results exist.
9481func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
9482	if !erccpl.hasNextLink() {
9483		return nil, nil
9484	}
9485	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9486		autorest.AsJSON(),
9487		autorest.AsGet(),
9488		autorest.WithBaseURL(to.String(erccpl.NextLink)))
9489}
9490
9491// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
9492type ExpressRouteCrossConnectionPeeringListPage struct {
9493	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
9494	erccpl ExpressRouteCrossConnectionPeeringList
9495}
9496
9497// NextWithContext advances to the next page of values.  If there was an error making
9498// the request the page does not advance and the error is returned.
9499func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
9500	if tracing.IsEnabled() {
9501		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
9502		defer func() {
9503			sc := -1
9504			if page.Response().Response.Response != nil {
9505				sc = page.Response().Response.Response.StatusCode
9506			}
9507			tracing.EndSpan(ctx, sc, err)
9508		}()
9509	}
9510	for {
9511		next, err := page.fn(ctx, page.erccpl)
9512		if err != nil {
9513			return err
9514		}
9515		page.erccpl = next
9516		if !next.hasNextLink() || !next.IsEmpty() {
9517			break
9518		}
9519	}
9520	return nil
9521}
9522
9523// Next advances to the next page of values.  If there was an error making
9524// the request the page does not advance and the error is returned.
9525// Deprecated: Use NextWithContext() instead.
9526func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
9527	return page.NextWithContext(context.Background())
9528}
9529
9530// NotDone returns true if the page enumeration should be started or is not yet complete.
9531func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
9532	return !page.erccpl.IsEmpty()
9533}
9534
9535// Response returns the raw server response from the last page request.
9536func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
9537	return page.erccpl
9538}
9539
9540// Values returns the slice of values for the current page or nil if there are no values.
9541func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
9542	if page.erccpl.IsEmpty() {
9543		return nil
9544	}
9545	return *page.erccpl.Value
9546}
9547
9548// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
9549func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
9550	return ExpressRouteCrossConnectionPeeringListPage{
9551		fn:     getNextPage,
9552		erccpl: cur,
9553	}
9554}
9555
9556// ExpressRouteCrossConnectionPeeringProperties ...
9557type ExpressRouteCrossConnectionPeeringProperties struct {
9558	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9559	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9560	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9561	State ExpressRoutePeeringState `json:"state,omitempty"`
9562	// AzureASN - READ-ONLY; The Azure ASN.
9563	AzureASN *int32 `json:"azureASN,omitempty"`
9564	// PeerASN - The peer ASN.
9565	PeerASN *int64 `json:"peerASN,omitempty"`
9566	// PrimaryPeerAddressPrefix - The primary address prefix.
9567	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9568	// SecondaryPeerAddressPrefix - The secondary address prefix.
9569	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9570	// PrimaryAzurePort - READ-ONLY; The primary port.
9571	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9572	// SecondaryAzurePort - READ-ONLY; The secondary port.
9573	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9574	// SharedKey - The shared key.
9575	SharedKey *string `json:"sharedKey,omitempty"`
9576	// VlanID - The VLAN ID.
9577	VlanID *int32 `json:"vlanId,omitempty"`
9578	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9579	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9580	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9581	ProvisioningState *string `json:"provisioningState,omitempty"`
9582	// GatewayManagerEtag - The GatewayManager Etag.
9583	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9584	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9585	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9586	// Ipv6PeeringConfig - The IPv6 peering configuration.
9587	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9588}
9589
9590// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
9591func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
9592	objectMap := make(map[string]interface{})
9593	if erccpp.PeeringType != "" {
9594		objectMap["peeringType"] = erccpp.PeeringType
9595	}
9596	if erccpp.State != "" {
9597		objectMap["state"] = erccpp.State
9598	}
9599	if erccpp.PeerASN != nil {
9600		objectMap["peerASN"] = erccpp.PeerASN
9601	}
9602	if erccpp.PrimaryPeerAddressPrefix != nil {
9603		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
9604	}
9605	if erccpp.SecondaryPeerAddressPrefix != nil {
9606		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
9607	}
9608	if erccpp.SharedKey != nil {
9609		objectMap["sharedKey"] = erccpp.SharedKey
9610	}
9611	if erccpp.VlanID != nil {
9612		objectMap["vlanId"] = erccpp.VlanID
9613	}
9614	if erccpp.MicrosoftPeeringConfig != nil {
9615		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
9616	}
9617	if erccpp.GatewayManagerEtag != nil {
9618		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
9619	}
9620	if erccpp.LastModifiedBy != nil {
9621		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
9622	}
9623	if erccpp.Ipv6PeeringConfig != nil {
9624		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
9625	}
9626	return json.Marshal(objectMap)
9627}
9628
9629// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9630// results of a long-running operation.
9631type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
9632	azure.FutureAPI
9633	// Result returns the result of the asynchronous operation.
9634	// If the operation has not completed it will return an error.
9635	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
9636}
9637
9638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9639func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9640	var azFuture azure.Future
9641	if err := json.Unmarshal(body, &azFuture); err != nil {
9642		return err
9643	}
9644	future.FutureAPI = &azFuture
9645	future.Result = future.result
9646	return nil
9647}
9648
9649// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
9650func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
9651	var done bool
9652	done, err = future.DoneWithContext(context.Background(), client)
9653	if err != nil {
9654		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9655		return
9656	}
9657	if !done {
9658		erccp.Response.Response = future.Response()
9659		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
9660		return
9661	}
9662	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9663	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
9664		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
9665		if err != nil {
9666			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
9667		}
9668	}
9669	return
9670}
9671
9672// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
9673// of a long-running operation.
9674type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
9675	azure.FutureAPI
9676	// Result returns the result of the asynchronous operation.
9677	// If the operation has not completed it will return an error.
9678	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
9679}
9680
9681// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9682func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
9683	var azFuture azure.Future
9684	if err := json.Unmarshal(body, &azFuture); err != nil {
9685		return err
9686	}
9687	future.FutureAPI = &azFuture
9688	future.Result = future.result
9689	return nil
9690}
9691
9692// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
9693func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
9694	var done bool
9695	done, err = future.DoneWithContext(context.Background(), client)
9696	if err != nil {
9697		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
9698		return
9699	}
9700	if !done {
9701		ar.Response = future.Response()
9702		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
9703		return
9704	}
9705	ar.Response = future.Response()
9706	return
9707}
9708
9709// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
9710type ExpressRouteCrossConnectionProperties struct {
9711	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
9712	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9713	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
9714	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9715	// STag - READ-ONLY; The identifier of the circuit traffic.
9716	STag *int32 `json:"sTag,omitempty"`
9717	// PeeringLocation - The peering location of the ExpressRoute circuit.
9718	PeeringLocation *string `json:"peeringLocation,omitempty"`
9719	// BandwidthInMbps - The circuit bandwidth In Mbps.
9720	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9721	// ExpressRouteCircuit - The ExpressRouteCircuit
9722	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
9723	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9724	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9725	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
9726	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9727	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9728	ProvisioningState *string `json:"provisioningState,omitempty"`
9729	// Peerings - The list of peerings.
9730	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
9731}
9732
9733// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
9734func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
9735	objectMap := make(map[string]interface{})
9736	if erccp.PeeringLocation != nil {
9737		objectMap["peeringLocation"] = erccp.PeeringLocation
9738	}
9739	if erccp.BandwidthInMbps != nil {
9740		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
9741	}
9742	if erccp.ExpressRouteCircuit != nil {
9743		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
9744	}
9745	if erccp.ServiceProviderProvisioningState != "" {
9746		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
9747	}
9748	if erccp.ServiceProviderNotes != nil {
9749		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
9750	}
9751	if erccp.Peerings != nil {
9752		objectMap["peerings"] = erccp.Peerings
9753	}
9754	return json.Marshal(objectMap)
9755}
9756
9757// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9758type ExpressRouteCrossConnectionRoutesTableSummary struct {
9759	// Neighbor - IP address of Neighbor router
9760	Neighbor *string `json:"neighbor,omitempty"`
9761	// Asn - Autonomous system number.
9762	Asn *int32 `json:"asn,omitempty"`
9763	// 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.
9764	UpDown *string `json:"upDown,omitempty"`
9765	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9766	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
9767}
9768
9769// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9770// results of a long-running operation.
9771type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
9772	azure.FutureAPI
9773	// Result returns the result of the asynchronous operation.
9774	// If the operation has not completed it will return an error.
9775	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9776}
9777
9778// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9779func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9780	var azFuture azure.Future
9781	if err := json.Unmarshal(body, &azFuture); err != nil {
9782		return err
9783	}
9784	future.FutureAPI = &azFuture
9785	future.Result = future.result
9786	return nil
9787}
9788
9789// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
9790func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
9791	var done bool
9792	done, err = future.DoneWithContext(context.Background(), client)
9793	if err != nil {
9794		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9795		return
9796	}
9797	if !done {
9798		ercc.Response.Response = future.Response()
9799		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
9800		return
9801	}
9802	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9803	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9804		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
9805		if err != nil {
9806			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
9807		}
9808	}
9809	return
9810}
9811
9812// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
9813// of a long-running operation.
9814type ExpressRouteCrossConnectionsListArpTableFuture struct {
9815	azure.FutureAPI
9816	// Result returns the result of the asynchronous operation.
9817	// If the operation has not completed it will return an error.
9818	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
9819}
9820
9821// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9822func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
9823	var azFuture azure.Future
9824	if err := json.Unmarshal(body, &azFuture); err != nil {
9825		return err
9826	}
9827	future.FutureAPI = &azFuture
9828	future.Result = future.result
9829	return nil
9830}
9831
9832// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
9833func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
9834	var done bool
9835	done, err = future.DoneWithContext(context.Background(), client)
9836	if err != nil {
9837		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
9838		return
9839	}
9840	if !done {
9841		ercatlr.Response.Response = future.Response()
9842		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
9843		return
9844	}
9845	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9846	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
9847		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
9848		if err != nil {
9849			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
9850		}
9851	}
9852	return
9853}
9854
9855// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
9856// results of a long-running operation.
9857type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
9858	azure.FutureAPI
9859	// Result returns the result of the asynchronous operation.
9860	// If the operation has not completed it will return an error.
9861	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9862}
9863
9864// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9865func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
9866	var azFuture azure.Future
9867	if err := json.Unmarshal(body, &azFuture); err != nil {
9868		return err
9869	}
9870	future.FutureAPI = &azFuture
9871	future.Result = future.result
9872	return nil
9873}
9874
9875// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
9876func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
9877	var done bool
9878	done, err = future.DoneWithContext(context.Background(), client)
9879	if err != nil {
9880		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
9881		return
9882	}
9883	if !done {
9884		ercrtlr.Response.Response = future.Response()
9885		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
9886		return
9887	}
9888	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9889	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
9890		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
9891		if err != nil {
9892			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
9893		}
9894	}
9895	return
9896}
9897
9898// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
9899// the results of a long-running operation.
9900type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
9901	azure.FutureAPI
9902	// Result returns the result of the asynchronous operation.
9903	// If the operation has not completed it will return an error.
9904	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
9905}
9906
9907// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9908func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
9909	var azFuture azure.Future
9910	if err := json.Unmarshal(body, &azFuture); err != nil {
9911		return err
9912	}
9913	future.FutureAPI = &azFuture
9914	future.Result = future.result
9915	return nil
9916}
9917
9918// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
9919func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
9920	var done bool
9921	done, err = future.DoneWithContext(context.Background(), client)
9922	if err != nil {
9923		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
9924		return
9925	}
9926	if !done {
9927		erccrtslr.Response.Response = future.Response()
9928		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
9929		return
9930	}
9931	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9932	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
9933		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
9934		if err != nil {
9935			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
9936		}
9937	}
9938	return
9939}
9940
9941// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
9942// the Express Route Cross Connections.
9943type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
9944	autorest.Response `json:"-"`
9945	// Value - A list of the routes table.
9946	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
9947	// NextLink - READ-ONLY; The URL to get the next set of results.
9948	NextLink *string `json:"nextLink,omitempty"`
9949}
9950
9951// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
9952func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
9953	objectMap := make(map[string]interface{})
9954	if erccrtslr.Value != nil {
9955		objectMap["value"] = erccrtslr.Value
9956	}
9957	return json.Marshal(objectMap)
9958}
9959
9960// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
9961// a long-running operation.
9962type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
9963	azure.FutureAPI
9964	// Result returns the result of the asynchronous operation.
9965	// If the operation has not completed it will return an error.
9966	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9967}
9968
9969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9970func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9971	var azFuture azure.Future
9972	if err := json.Unmarshal(body, &azFuture); err != nil {
9973		return err
9974	}
9975	future.FutureAPI = &azFuture
9976	future.Result = future.result
9977	return nil
9978}
9979
9980// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
9981func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
9982	var done bool
9983	done, err = future.DoneWithContext(context.Background(), client)
9984	if err != nil {
9985		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9986		return
9987	}
9988	if !done {
9989		ercc.Response.Response = future.Response()
9990		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
9991		return
9992	}
9993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9994	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9995		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
9996		if err != nil {
9997			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
9998		}
9999	}
10000	return
10001}
10002
10003// ExpressRouteGateway expressRoute gateway resource.
10004type ExpressRouteGateway struct {
10005	autorest.Response              `json:"-"`
10006	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
10007	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10008	Etag *string `json:"etag,omitempty"`
10009	// ID - Resource ID.
10010	ID *string `json:"id,omitempty"`
10011	// Name - READ-ONLY; Resource name.
10012	Name *string `json:"name,omitempty"`
10013	// Type - READ-ONLY; Resource type.
10014	Type *string `json:"type,omitempty"`
10015	// Location - Resource location.
10016	Location *string `json:"location,omitempty"`
10017	// Tags - Resource tags.
10018	Tags map[string]*string `json:"tags"`
10019}
10020
10021// MarshalJSON is the custom marshaler for ExpressRouteGateway.
10022func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
10023	objectMap := make(map[string]interface{})
10024	if erg.ExpressRouteGatewayProperties != nil {
10025		objectMap["properties"] = erg.ExpressRouteGatewayProperties
10026	}
10027	if erg.ID != nil {
10028		objectMap["id"] = erg.ID
10029	}
10030	if erg.Location != nil {
10031		objectMap["location"] = erg.Location
10032	}
10033	if erg.Tags != nil {
10034		objectMap["tags"] = erg.Tags
10035	}
10036	return json.Marshal(objectMap)
10037}
10038
10039// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
10040func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
10041	var m map[string]*json.RawMessage
10042	err := json.Unmarshal(body, &m)
10043	if err != nil {
10044		return err
10045	}
10046	for k, v := range m {
10047		switch k {
10048		case "properties":
10049			if v != nil {
10050				var expressRouteGatewayProperties ExpressRouteGatewayProperties
10051				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
10052				if err != nil {
10053					return err
10054				}
10055				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
10056			}
10057		case "etag":
10058			if v != nil {
10059				var etag string
10060				err = json.Unmarshal(*v, &etag)
10061				if err != nil {
10062					return err
10063				}
10064				erg.Etag = &etag
10065			}
10066		case "id":
10067			if v != nil {
10068				var ID string
10069				err = json.Unmarshal(*v, &ID)
10070				if err != nil {
10071					return err
10072				}
10073				erg.ID = &ID
10074			}
10075		case "name":
10076			if v != nil {
10077				var name string
10078				err = json.Unmarshal(*v, &name)
10079				if err != nil {
10080					return err
10081				}
10082				erg.Name = &name
10083			}
10084		case "type":
10085			if v != nil {
10086				var typeVar string
10087				err = json.Unmarshal(*v, &typeVar)
10088				if err != nil {
10089					return err
10090				}
10091				erg.Type = &typeVar
10092			}
10093		case "location":
10094			if v != nil {
10095				var location string
10096				err = json.Unmarshal(*v, &location)
10097				if err != nil {
10098					return err
10099				}
10100				erg.Location = &location
10101			}
10102		case "tags":
10103			if v != nil {
10104				var tags map[string]*string
10105				err = json.Unmarshal(*v, &tags)
10106				if err != nil {
10107					return err
10108				}
10109				erg.Tags = tags
10110			}
10111		}
10112	}
10113
10114	return nil
10115}
10116
10117// ExpressRouteGatewayList list of ExpressRoute gateways.
10118type ExpressRouteGatewayList struct {
10119	autorest.Response `json:"-"`
10120	// Value - List of ExpressRoute gateways.
10121	Value *[]ExpressRouteGateway `json:"value,omitempty"`
10122}
10123
10124// ExpressRouteGatewayProperties expressRoute gateway resource properties.
10125type ExpressRouteGatewayProperties struct {
10126	// AutoScaleConfiguration - Configuration for auto scaling.
10127	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
10128	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
10129	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
10130	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10131	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10132	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
10133	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
10134}
10135
10136// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
10137func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
10138	objectMap := make(map[string]interface{})
10139	if ergp.AutoScaleConfiguration != nil {
10140		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
10141	}
10142	if ergp.VirtualHub != nil {
10143		objectMap["virtualHub"] = ergp.VirtualHub
10144	}
10145	return json.Marshal(objectMap)
10146}
10147
10148// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
10149type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
10150	// Bounds - Minimum and maximum number of scale units to deploy.
10151	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
10152}
10153
10154// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
10155// deploy.
10156type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
10157	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
10158	Min *int32 `json:"min,omitempty"`
10159	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
10160	Max *int32 `json:"max,omitempty"`
10161}
10162
10163// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10164// long-running operation.
10165type ExpressRouteGatewaysCreateOrUpdateFuture struct {
10166	azure.FutureAPI
10167	// Result returns the result of the asynchronous operation.
10168	// If the operation has not completed it will return an error.
10169	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
10170}
10171
10172// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10173func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10174	var azFuture azure.Future
10175	if err := json.Unmarshal(body, &azFuture); err != nil {
10176		return err
10177	}
10178	future.FutureAPI = &azFuture
10179	future.Result = future.result
10180	return nil
10181}
10182
10183// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
10184func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
10185	var done bool
10186	done, err = future.DoneWithContext(context.Background(), client)
10187	if err != nil {
10188		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10189		return
10190	}
10191	if !done {
10192		erg.Response.Response = future.Response()
10193		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
10194		return
10195	}
10196	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10197	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
10198		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
10199		if err != nil {
10200			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
10201		}
10202	}
10203	return
10204}
10205
10206// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
10207// long-running operation.
10208type ExpressRouteGatewaysDeleteFuture struct {
10209	azure.FutureAPI
10210	// Result returns the result of the asynchronous operation.
10211	// If the operation has not completed it will return an error.
10212	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
10213}
10214
10215// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10216func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
10217	var azFuture azure.Future
10218	if err := json.Unmarshal(body, &azFuture); err != nil {
10219		return err
10220	}
10221	future.FutureAPI = &azFuture
10222	future.Result = future.result
10223	return nil
10224}
10225
10226// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
10227func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
10228	var done bool
10229	done, err = future.DoneWithContext(context.Background(), client)
10230	if err != nil {
10231		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
10232		return
10233	}
10234	if !done {
10235		ar.Response = future.Response()
10236		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
10237		return
10238	}
10239	ar.Response = future.Response()
10240	return
10241}
10242
10243// ExpressRouteLink expressRouteLink child resource definition.
10244type ExpressRouteLink struct {
10245	autorest.Response `json:"-"`
10246	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
10247	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
10248	// Name - Name of child port resource that is unique among child port resources of the parent.
10249	Name *string `json:"name,omitempty"`
10250	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10251	Etag *string `json:"etag,omitempty"`
10252	// ID - Resource ID.
10253	ID *string `json:"id,omitempty"`
10254}
10255
10256// MarshalJSON is the custom marshaler for ExpressRouteLink.
10257func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
10258	objectMap := make(map[string]interface{})
10259	if erl.ExpressRouteLinkPropertiesFormat != nil {
10260		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
10261	}
10262	if erl.Name != nil {
10263		objectMap["name"] = erl.Name
10264	}
10265	if erl.ID != nil {
10266		objectMap["id"] = erl.ID
10267	}
10268	return json.Marshal(objectMap)
10269}
10270
10271// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
10272func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
10273	var m map[string]*json.RawMessage
10274	err := json.Unmarshal(body, &m)
10275	if err != nil {
10276		return err
10277	}
10278	for k, v := range m {
10279		switch k {
10280		case "properties":
10281			if v != nil {
10282				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
10283				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
10284				if err != nil {
10285					return err
10286				}
10287				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
10288			}
10289		case "name":
10290			if v != nil {
10291				var name string
10292				err = json.Unmarshal(*v, &name)
10293				if err != nil {
10294					return err
10295				}
10296				erl.Name = &name
10297			}
10298		case "etag":
10299			if v != nil {
10300				var etag string
10301				err = json.Unmarshal(*v, &etag)
10302				if err != nil {
10303					return err
10304				}
10305				erl.Etag = &etag
10306			}
10307		case "id":
10308			if v != nil {
10309				var ID string
10310				err = json.Unmarshal(*v, &ID)
10311				if err != nil {
10312					return err
10313				}
10314				erl.ID = &ID
10315			}
10316		}
10317	}
10318
10319	return nil
10320}
10321
10322// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10323type ExpressRouteLinkListResult struct {
10324	autorest.Response `json:"-"`
10325	// Value - The list of ExpressRouteLink sub-resources.
10326	Value *[]ExpressRouteLink `json:"value,omitempty"`
10327	// NextLink - The URL to get the next set of results.
10328	NextLink *string `json:"nextLink,omitempty"`
10329}
10330
10331// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10332type ExpressRouteLinkListResultIterator struct {
10333	i    int
10334	page ExpressRouteLinkListResultPage
10335}
10336
10337// NextWithContext advances to the next value.  If there was an error making
10338// the request the iterator does not advance and the error is returned.
10339func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10340	if tracing.IsEnabled() {
10341		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10342		defer func() {
10343			sc := -1
10344			if iter.Response().Response.Response != nil {
10345				sc = iter.Response().Response.Response.StatusCode
10346			}
10347			tracing.EndSpan(ctx, sc, err)
10348		}()
10349	}
10350	iter.i++
10351	if iter.i < len(iter.page.Values()) {
10352		return nil
10353	}
10354	err = iter.page.NextWithContext(ctx)
10355	if err != nil {
10356		iter.i--
10357		return err
10358	}
10359	iter.i = 0
10360	return nil
10361}
10362
10363// Next advances to the next value.  If there was an error making
10364// the request the iterator does not advance and the error is returned.
10365// Deprecated: Use NextWithContext() instead.
10366func (iter *ExpressRouteLinkListResultIterator) Next() error {
10367	return iter.NextWithContext(context.Background())
10368}
10369
10370// NotDone returns true if the enumeration should be started or is not yet complete.
10371func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10372	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10373}
10374
10375// Response returns the raw server response from the last page request.
10376func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10377	return iter.page.Response()
10378}
10379
10380// Value returns the current value or a zero-initialized value if the
10381// iterator has advanced beyond the end of the collection.
10382func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10383	if !iter.page.NotDone() {
10384		return ExpressRouteLink{}
10385	}
10386	return iter.page.Values()[iter.i]
10387}
10388
10389// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10390func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10391	return ExpressRouteLinkListResultIterator{page: page}
10392}
10393
10394// IsEmpty returns true if the ListResult contains no values.
10395func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10396	return erllr.Value == nil || len(*erllr.Value) == 0
10397}
10398
10399// hasNextLink returns true if the NextLink is not empty.
10400func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10401	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10402}
10403
10404// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10405// It returns nil if no more results exist.
10406func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10407	if !erllr.hasNextLink() {
10408		return nil, nil
10409	}
10410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10411		autorest.AsJSON(),
10412		autorest.AsGet(),
10413		autorest.WithBaseURL(to.String(erllr.NextLink)))
10414}
10415
10416// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
10417type ExpressRouteLinkListResultPage struct {
10418	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
10419	erllr ExpressRouteLinkListResult
10420}
10421
10422// NextWithContext advances to the next page of values.  If there was an error making
10423// the request the page does not advance and the error is returned.
10424func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
10425	if tracing.IsEnabled() {
10426		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
10427		defer func() {
10428			sc := -1
10429			if page.Response().Response.Response != nil {
10430				sc = page.Response().Response.Response.StatusCode
10431			}
10432			tracing.EndSpan(ctx, sc, err)
10433		}()
10434	}
10435	for {
10436		next, err := page.fn(ctx, page.erllr)
10437		if err != nil {
10438			return err
10439		}
10440		page.erllr = next
10441		if !next.hasNextLink() || !next.IsEmpty() {
10442			break
10443		}
10444	}
10445	return nil
10446}
10447
10448// Next advances to the next page of values.  If there was an error making
10449// the request the page does not advance and the error is returned.
10450// Deprecated: Use NextWithContext() instead.
10451func (page *ExpressRouteLinkListResultPage) Next() error {
10452	return page.NextWithContext(context.Background())
10453}
10454
10455// NotDone returns true if the page enumeration should be started or is not yet complete.
10456func (page ExpressRouteLinkListResultPage) NotDone() bool {
10457	return !page.erllr.IsEmpty()
10458}
10459
10460// Response returns the raw server response from the last page request.
10461func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
10462	return page.erllr
10463}
10464
10465// Values returns the slice of values for the current page or nil if there are no values.
10466func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
10467	if page.erllr.IsEmpty() {
10468		return nil
10469	}
10470	return *page.erllr.Value
10471}
10472
10473// Creates a new instance of the ExpressRouteLinkListResultPage type.
10474func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
10475	return ExpressRouteLinkListResultPage{
10476		fn:    getNextPage,
10477		erllr: cur,
10478	}
10479}
10480
10481// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
10482type ExpressRouteLinkPropertiesFormat struct {
10483	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
10484	RouterName *string `json:"routerName,omitempty"`
10485	// InterfaceName - READ-ONLY; Name of Azure router interface.
10486	InterfaceName *string `json:"interfaceName,omitempty"`
10487	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
10488	PatchPanelID *string `json:"patchPanelId,omitempty"`
10489	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
10490	RackID *string `json:"rackId,omitempty"`
10491	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
10492	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
10493	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
10494	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
10495	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10496	ProvisioningState *string `json:"provisioningState,omitempty"`
10497}
10498
10499// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
10500func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
10501	objectMap := make(map[string]interface{})
10502	if erlpf.AdminState != "" {
10503		objectMap["adminState"] = erlpf.AdminState
10504	}
10505	return json.Marshal(objectMap)
10506}
10507
10508// ExpressRoutePort expressRoutePort resource definition.
10509type ExpressRoutePort struct {
10510	autorest.Response `json:"-"`
10511	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
10512	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
10513	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10514	Etag *string `json:"etag,omitempty"`
10515	// ID - Resource ID.
10516	ID *string `json:"id,omitempty"`
10517	// Name - READ-ONLY; Resource name.
10518	Name *string `json:"name,omitempty"`
10519	// Type - READ-ONLY; Resource type.
10520	Type *string `json:"type,omitempty"`
10521	// Location - Resource location.
10522	Location *string `json:"location,omitempty"`
10523	// Tags - Resource tags.
10524	Tags map[string]*string `json:"tags"`
10525}
10526
10527// MarshalJSON is the custom marshaler for ExpressRoutePort.
10528func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
10529	objectMap := make(map[string]interface{})
10530	if erp.ExpressRoutePortPropertiesFormat != nil {
10531		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
10532	}
10533	if erp.ID != nil {
10534		objectMap["id"] = erp.ID
10535	}
10536	if erp.Location != nil {
10537		objectMap["location"] = erp.Location
10538	}
10539	if erp.Tags != nil {
10540		objectMap["tags"] = erp.Tags
10541	}
10542	return json.Marshal(objectMap)
10543}
10544
10545// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
10546func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
10547	var m map[string]*json.RawMessage
10548	err := json.Unmarshal(body, &m)
10549	if err != nil {
10550		return err
10551	}
10552	for k, v := range m {
10553		switch k {
10554		case "properties":
10555			if v != nil {
10556				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
10557				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
10558				if err != nil {
10559					return err
10560				}
10561				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
10562			}
10563		case "etag":
10564			if v != nil {
10565				var etag string
10566				err = json.Unmarshal(*v, &etag)
10567				if err != nil {
10568					return err
10569				}
10570				erp.Etag = &etag
10571			}
10572		case "id":
10573			if v != nil {
10574				var ID string
10575				err = json.Unmarshal(*v, &ID)
10576				if err != nil {
10577					return err
10578				}
10579				erp.ID = &ID
10580			}
10581		case "name":
10582			if v != nil {
10583				var name string
10584				err = json.Unmarshal(*v, &name)
10585				if err != nil {
10586					return err
10587				}
10588				erp.Name = &name
10589			}
10590		case "type":
10591			if v != nil {
10592				var typeVar string
10593				err = json.Unmarshal(*v, &typeVar)
10594				if err != nil {
10595					return err
10596				}
10597				erp.Type = &typeVar
10598			}
10599		case "location":
10600			if v != nil {
10601				var location string
10602				err = json.Unmarshal(*v, &location)
10603				if err != nil {
10604					return err
10605				}
10606				erp.Location = &location
10607			}
10608		case "tags":
10609			if v != nil {
10610				var tags map[string]*string
10611				err = json.Unmarshal(*v, &tags)
10612				if err != nil {
10613					return err
10614				}
10615				erp.Tags = tags
10616			}
10617		}
10618	}
10619
10620	return nil
10621}
10622
10623// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
10624type ExpressRoutePortListResult struct {
10625	autorest.Response `json:"-"`
10626	// Value - A list of ExpressRoutePort resources.
10627	Value *[]ExpressRoutePort `json:"value,omitempty"`
10628	// NextLink - The URL to get the next set of results.
10629	NextLink *string `json:"nextLink,omitempty"`
10630}
10631
10632// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
10633type ExpressRoutePortListResultIterator struct {
10634	i    int
10635	page ExpressRoutePortListResultPage
10636}
10637
10638// NextWithContext advances to the next value.  If there was an error making
10639// the request the iterator does not advance and the error is returned.
10640func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
10641	if tracing.IsEnabled() {
10642		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
10643		defer func() {
10644			sc := -1
10645			if iter.Response().Response.Response != nil {
10646				sc = iter.Response().Response.Response.StatusCode
10647			}
10648			tracing.EndSpan(ctx, sc, err)
10649		}()
10650	}
10651	iter.i++
10652	if iter.i < len(iter.page.Values()) {
10653		return nil
10654	}
10655	err = iter.page.NextWithContext(ctx)
10656	if err != nil {
10657		iter.i--
10658		return err
10659	}
10660	iter.i = 0
10661	return nil
10662}
10663
10664// Next advances to the next value.  If there was an error making
10665// the request the iterator does not advance and the error is returned.
10666// Deprecated: Use NextWithContext() instead.
10667func (iter *ExpressRoutePortListResultIterator) Next() error {
10668	return iter.NextWithContext(context.Background())
10669}
10670
10671// NotDone returns true if the enumeration should be started or is not yet complete.
10672func (iter ExpressRoutePortListResultIterator) NotDone() bool {
10673	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10674}
10675
10676// Response returns the raw server response from the last page request.
10677func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
10678	return iter.page.Response()
10679}
10680
10681// Value returns the current value or a zero-initialized value if the
10682// iterator has advanced beyond the end of the collection.
10683func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
10684	if !iter.page.NotDone() {
10685		return ExpressRoutePort{}
10686	}
10687	return iter.page.Values()[iter.i]
10688}
10689
10690// Creates a new instance of the ExpressRoutePortListResultIterator type.
10691func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
10692	return ExpressRoutePortListResultIterator{page: page}
10693}
10694
10695// IsEmpty returns true if the ListResult contains no values.
10696func (erplr ExpressRoutePortListResult) IsEmpty() bool {
10697	return erplr.Value == nil || len(*erplr.Value) == 0
10698}
10699
10700// hasNextLink returns true if the NextLink is not empty.
10701func (erplr ExpressRoutePortListResult) hasNextLink() bool {
10702	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
10703}
10704
10705// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
10706// It returns nil if no more results exist.
10707func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
10708	if !erplr.hasNextLink() {
10709		return nil, nil
10710	}
10711	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10712		autorest.AsJSON(),
10713		autorest.AsGet(),
10714		autorest.WithBaseURL(to.String(erplr.NextLink)))
10715}
10716
10717// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
10718type ExpressRoutePortListResultPage struct {
10719	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
10720	erplr ExpressRoutePortListResult
10721}
10722
10723// NextWithContext advances to the next page of values.  If there was an error making
10724// the request the page does not advance and the error is returned.
10725func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
10726	if tracing.IsEnabled() {
10727		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
10728		defer func() {
10729			sc := -1
10730			if page.Response().Response.Response != nil {
10731				sc = page.Response().Response.Response.StatusCode
10732			}
10733			tracing.EndSpan(ctx, sc, err)
10734		}()
10735	}
10736	for {
10737		next, err := page.fn(ctx, page.erplr)
10738		if err != nil {
10739			return err
10740		}
10741		page.erplr = next
10742		if !next.hasNextLink() || !next.IsEmpty() {
10743			break
10744		}
10745	}
10746	return nil
10747}
10748
10749// Next advances to the next page of values.  If there was an error making
10750// the request the page does not advance and the error is returned.
10751// Deprecated: Use NextWithContext() instead.
10752func (page *ExpressRoutePortListResultPage) Next() error {
10753	return page.NextWithContext(context.Background())
10754}
10755
10756// NotDone returns true if the page enumeration should be started or is not yet complete.
10757func (page ExpressRoutePortListResultPage) NotDone() bool {
10758	return !page.erplr.IsEmpty()
10759}
10760
10761// Response returns the raw server response from the last page request.
10762func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
10763	return page.erplr
10764}
10765
10766// Values returns the slice of values for the current page or nil if there are no values.
10767func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
10768	if page.erplr.IsEmpty() {
10769		return nil
10770	}
10771	return *page.erplr.Value
10772}
10773
10774// Creates a new instance of the ExpressRoutePortListResultPage type.
10775func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
10776	return ExpressRoutePortListResultPage{
10777		fn:    getNextPage,
10778		erplr: cur,
10779	}
10780}
10781
10782// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
10783type ExpressRoutePortPropertiesFormat struct {
10784	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
10785	PeeringLocation *string `json:"peeringLocation,omitempty"`
10786	// BandwidthInGbps - Bandwidth of procured ports in Gbps
10787	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
10788	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
10789	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
10790	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
10791	Mtu *string `json:"mtu,omitempty"`
10792	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
10793	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
10794	// EtherType - READ-ONLY; Ether type of the physical port.
10795	EtherType *string `json:"etherType,omitempty"`
10796	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
10797	AllocationDate *string `json:"allocationDate,omitempty"`
10798	// Links - The set of physical links of the ExpressRoutePort resource
10799	Links *[]ExpressRouteLink `json:"links,omitempty"`
10800	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
10801	Circuits *[]SubResource `json:"circuits,omitempty"`
10802	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10803	ProvisioningState *string `json:"provisioningState,omitempty"`
10804	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
10805	ResourceGUID *string `json:"resourceGuid,omitempty"`
10806}
10807
10808// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
10809func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
10810	objectMap := make(map[string]interface{})
10811	if erppf.PeeringLocation != nil {
10812		objectMap["peeringLocation"] = erppf.PeeringLocation
10813	}
10814	if erppf.BandwidthInGbps != nil {
10815		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
10816	}
10817	if erppf.Encapsulation != "" {
10818		objectMap["encapsulation"] = erppf.Encapsulation
10819	}
10820	if erppf.Links != nil {
10821		objectMap["links"] = erppf.Links
10822	}
10823	if erppf.ResourceGUID != nil {
10824		objectMap["resourceGuid"] = erppf.ResourceGUID
10825	}
10826	return json.Marshal(objectMap)
10827}
10828
10829// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10830// long-running operation.
10831type ExpressRoutePortsCreateOrUpdateFuture struct {
10832	azure.FutureAPI
10833	// Result returns the result of the asynchronous operation.
10834	// If the operation has not completed it will return an error.
10835	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10836}
10837
10838// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10839func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10840	var azFuture azure.Future
10841	if err := json.Unmarshal(body, &azFuture); err != nil {
10842		return err
10843	}
10844	future.FutureAPI = &azFuture
10845	future.Result = future.result
10846	return nil
10847}
10848
10849// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
10850func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
10851	var done bool
10852	done, err = future.DoneWithContext(context.Background(), client)
10853	if err != nil {
10854		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10855		return
10856	}
10857	if !done {
10858		erp.Response.Response = future.Response()
10859		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
10860		return
10861	}
10862	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10863	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
10864		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
10865		if err != nil {
10866			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
10867		}
10868	}
10869	return
10870}
10871
10872// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10873// operation.
10874type ExpressRoutePortsDeleteFuture struct {
10875	azure.FutureAPI
10876	// Result returns the result of the asynchronous operation.
10877	// If the operation has not completed it will return an error.
10878	Result func(ExpressRoutePortsClient) (autorest.Response, error)
10879}
10880
10881// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10882func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
10883	var azFuture azure.Future
10884	if err := json.Unmarshal(body, &azFuture); err != nil {
10885		return err
10886	}
10887	future.FutureAPI = &azFuture
10888	future.Result = future.result
10889	return nil
10890}
10891
10892// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
10893func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
10894	var done bool
10895	done, err = future.DoneWithContext(context.Background(), client)
10896	if err != nil {
10897		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
10898		return
10899	}
10900	if !done {
10901		ar.Response = future.Response()
10902		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
10903		return
10904	}
10905	ar.Response = future.Response()
10906	return
10907}
10908
10909// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
10910type ExpressRoutePortsLocation struct {
10911	autorest.Response `json:"-"`
10912	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
10913	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
10914	// ID - Resource ID.
10915	ID *string `json:"id,omitempty"`
10916	// Name - READ-ONLY; Resource name.
10917	Name *string `json:"name,omitempty"`
10918	// Type - READ-ONLY; Resource type.
10919	Type *string `json:"type,omitempty"`
10920	// Location - Resource location.
10921	Location *string `json:"location,omitempty"`
10922	// Tags - Resource tags.
10923	Tags map[string]*string `json:"tags"`
10924}
10925
10926// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
10927func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
10928	objectMap := make(map[string]interface{})
10929	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
10930		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
10931	}
10932	if erpl.ID != nil {
10933		objectMap["id"] = erpl.ID
10934	}
10935	if erpl.Location != nil {
10936		objectMap["location"] = erpl.Location
10937	}
10938	if erpl.Tags != nil {
10939		objectMap["tags"] = erpl.Tags
10940	}
10941	return json.Marshal(objectMap)
10942}
10943
10944// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
10945func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
10946	var m map[string]*json.RawMessage
10947	err := json.Unmarshal(body, &m)
10948	if err != nil {
10949		return err
10950	}
10951	for k, v := range m {
10952		switch k {
10953		case "properties":
10954			if v != nil {
10955				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
10956				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
10957				if err != nil {
10958					return err
10959				}
10960				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
10961			}
10962		case "id":
10963			if v != nil {
10964				var ID string
10965				err = json.Unmarshal(*v, &ID)
10966				if err != nil {
10967					return err
10968				}
10969				erpl.ID = &ID
10970			}
10971		case "name":
10972			if v != nil {
10973				var name string
10974				err = json.Unmarshal(*v, &name)
10975				if err != nil {
10976					return err
10977				}
10978				erpl.Name = &name
10979			}
10980		case "type":
10981			if v != nil {
10982				var typeVar string
10983				err = json.Unmarshal(*v, &typeVar)
10984				if err != nil {
10985					return err
10986				}
10987				erpl.Type = &typeVar
10988			}
10989		case "location":
10990			if v != nil {
10991				var location string
10992				err = json.Unmarshal(*v, &location)
10993				if err != nil {
10994					return err
10995				}
10996				erpl.Location = &location
10997			}
10998		case "tags":
10999			if v != nil {
11000				var tags map[string]*string
11001				err = json.Unmarshal(*v, &tags)
11002				if err != nil {
11003					return err
11004				}
11005				erpl.Tags = tags
11006			}
11007		}
11008	}
11009
11010	return nil
11011}
11012
11013// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
11014type ExpressRoutePortsLocationBandwidths struct {
11015	// OfferName - READ-ONLY; Bandwidth descriptive name
11016	OfferName *string `json:"offerName,omitempty"`
11017	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
11018	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
11019}
11020
11021// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
11022func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
11023	objectMap := make(map[string]interface{})
11024	return json.Marshal(objectMap)
11025}
11026
11027// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
11028type ExpressRoutePortsLocationListResult struct {
11029	autorest.Response `json:"-"`
11030	// Value - The list of all ExpressRoutePort peering locations.
11031	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
11032	// NextLink - The URL to get the next set of results.
11033	NextLink *string `json:"nextLink,omitempty"`
11034}
11035
11036// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
11037// ExpressRoutePortsLocation values.
11038type ExpressRoutePortsLocationListResultIterator struct {
11039	i    int
11040	page ExpressRoutePortsLocationListResultPage
11041}
11042
11043// NextWithContext advances to the next value.  If there was an error making
11044// the request the iterator does not advance and the error is returned.
11045func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11046	if tracing.IsEnabled() {
11047		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
11048		defer func() {
11049			sc := -1
11050			if iter.Response().Response.Response != nil {
11051				sc = iter.Response().Response.Response.StatusCode
11052			}
11053			tracing.EndSpan(ctx, sc, err)
11054		}()
11055	}
11056	iter.i++
11057	if iter.i < len(iter.page.Values()) {
11058		return nil
11059	}
11060	err = iter.page.NextWithContext(ctx)
11061	if err != nil {
11062		iter.i--
11063		return err
11064	}
11065	iter.i = 0
11066	return nil
11067}
11068
11069// Next advances to the next value.  If there was an error making
11070// the request the iterator does not advance and the error is returned.
11071// Deprecated: Use NextWithContext() instead.
11072func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
11073	return iter.NextWithContext(context.Background())
11074}
11075
11076// NotDone returns true if the enumeration should be started or is not yet complete.
11077func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
11078	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11079}
11080
11081// Response returns the raw server response from the last page request.
11082func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
11083	return iter.page.Response()
11084}
11085
11086// Value returns the current value or a zero-initialized value if the
11087// iterator has advanced beyond the end of the collection.
11088func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
11089	if !iter.page.NotDone() {
11090		return ExpressRoutePortsLocation{}
11091	}
11092	return iter.page.Values()[iter.i]
11093}
11094
11095// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
11096func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
11097	return ExpressRoutePortsLocationListResultIterator{page: page}
11098}
11099
11100// IsEmpty returns true if the ListResult contains no values.
11101func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
11102	return erpllr.Value == nil || len(*erpllr.Value) == 0
11103}
11104
11105// hasNextLink returns true if the NextLink is not empty.
11106func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
11107	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
11108}
11109
11110// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
11111// It returns nil if no more results exist.
11112func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
11113	if !erpllr.hasNextLink() {
11114		return nil, nil
11115	}
11116	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11117		autorest.AsJSON(),
11118		autorest.AsGet(),
11119		autorest.WithBaseURL(to.String(erpllr.NextLink)))
11120}
11121
11122// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
11123type ExpressRoutePortsLocationListResultPage struct {
11124	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
11125	erpllr ExpressRoutePortsLocationListResult
11126}
11127
11128// NextWithContext advances to the next page of values.  If there was an error making
11129// the request the page does not advance and the error is returned.
11130func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
11131	if tracing.IsEnabled() {
11132		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
11133		defer func() {
11134			sc := -1
11135			if page.Response().Response.Response != nil {
11136				sc = page.Response().Response.Response.StatusCode
11137			}
11138			tracing.EndSpan(ctx, sc, err)
11139		}()
11140	}
11141	for {
11142		next, err := page.fn(ctx, page.erpllr)
11143		if err != nil {
11144			return err
11145		}
11146		page.erpllr = next
11147		if !next.hasNextLink() || !next.IsEmpty() {
11148			break
11149		}
11150	}
11151	return nil
11152}
11153
11154// Next advances to the next page of values.  If there was an error making
11155// the request the page does not advance and the error is returned.
11156// Deprecated: Use NextWithContext() instead.
11157func (page *ExpressRoutePortsLocationListResultPage) Next() error {
11158	return page.NextWithContext(context.Background())
11159}
11160
11161// NotDone returns true if the page enumeration should be started or is not yet complete.
11162func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
11163	return !page.erpllr.IsEmpty()
11164}
11165
11166// Response returns the raw server response from the last page request.
11167func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
11168	return page.erpllr
11169}
11170
11171// Values returns the slice of values for the current page or nil if there are no values.
11172func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
11173	if page.erpllr.IsEmpty() {
11174		return nil
11175	}
11176	return *page.erpllr.Value
11177}
11178
11179// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
11180func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
11181	return ExpressRoutePortsLocationListResultPage{
11182		fn:     getNextPage,
11183		erpllr: cur,
11184	}
11185}
11186
11187// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
11188// resources.
11189type ExpressRoutePortsLocationPropertiesFormat struct {
11190	// Address - READ-ONLY; Address of peering location.
11191	Address *string `json:"address,omitempty"`
11192	// Contact - READ-ONLY; Contact details of peering locations.
11193	Contact *string `json:"contact,omitempty"`
11194	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
11195	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
11196	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11197	ProvisioningState *string `json:"provisioningState,omitempty"`
11198}
11199
11200// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
11201func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
11202	objectMap := make(map[string]interface{})
11203	if erplpf.AvailableBandwidths != nil {
11204		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
11205	}
11206	return json.Marshal(objectMap)
11207}
11208
11209// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11210// long-running operation.
11211type ExpressRoutePortsUpdateTagsFuture struct {
11212	azure.FutureAPI
11213	// Result returns the result of the asynchronous operation.
11214	// If the operation has not completed it will return an error.
11215	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11216}
11217
11218// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11219func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11220	var azFuture azure.Future
11221	if err := json.Unmarshal(body, &azFuture); err != nil {
11222		return err
11223	}
11224	future.FutureAPI = &azFuture
11225	future.Result = future.result
11226	return nil
11227}
11228
11229// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
11230func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11231	var done bool
11232	done, err = future.DoneWithContext(context.Background(), client)
11233	if err != nil {
11234		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11235		return
11236	}
11237	if !done {
11238		erp.Response.Response = future.Response()
11239		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
11240		return
11241	}
11242	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11243	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11244		erp, err = client.UpdateTagsResponder(erp.Response.Response)
11245		if err != nil {
11246			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
11247		}
11248	}
11249	return
11250}
11251
11252// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
11253type ExpressRouteServiceProvider struct {
11254	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
11255	// ID - Resource ID.
11256	ID *string `json:"id,omitempty"`
11257	// Name - READ-ONLY; Resource name.
11258	Name *string `json:"name,omitempty"`
11259	// Type - READ-ONLY; Resource type.
11260	Type *string `json:"type,omitempty"`
11261	// Location - Resource location.
11262	Location *string `json:"location,omitempty"`
11263	// Tags - Resource tags.
11264	Tags map[string]*string `json:"tags"`
11265}
11266
11267// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
11268func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
11269	objectMap := make(map[string]interface{})
11270	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
11271		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
11272	}
11273	if ersp.ID != nil {
11274		objectMap["id"] = ersp.ID
11275	}
11276	if ersp.Location != nil {
11277		objectMap["location"] = ersp.Location
11278	}
11279	if ersp.Tags != nil {
11280		objectMap["tags"] = ersp.Tags
11281	}
11282	return json.Marshal(objectMap)
11283}
11284
11285// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
11286func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
11287	var m map[string]*json.RawMessage
11288	err := json.Unmarshal(body, &m)
11289	if err != nil {
11290		return err
11291	}
11292	for k, v := range m {
11293		switch k {
11294		case "properties":
11295			if v != nil {
11296				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
11297				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
11298				if err != nil {
11299					return err
11300				}
11301				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
11302			}
11303		case "id":
11304			if v != nil {
11305				var ID string
11306				err = json.Unmarshal(*v, &ID)
11307				if err != nil {
11308					return err
11309				}
11310				ersp.ID = &ID
11311			}
11312		case "name":
11313			if v != nil {
11314				var name string
11315				err = json.Unmarshal(*v, &name)
11316				if err != nil {
11317					return err
11318				}
11319				ersp.Name = &name
11320			}
11321		case "type":
11322			if v != nil {
11323				var typeVar string
11324				err = json.Unmarshal(*v, &typeVar)
11325				if err != nil {
11326					return err
11327				}
11328				ersp.Type = &typeVar
11329			}
11330		case "location":
11331			if v != nil {
11332				var location string
11333				err = json.Unmarshal(*v, &location)
11334				if err != nil {
11335					return err
11336				}
11337				ersp.Location = &location
11338			}
11339		case "tags":
11340			if v != nil {
11341				var tags map[string]*string
11342				err = json.Unmarshal(*v, &tags)
11343				if err != nil {
11344					return err
11345				}
11346				ersp.Tags = tags
11347			}
11348		}
11349	}
11350
11351	return nil
11352}
11353
11354// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11355// resources.
11356type ExpressRouteServiceProviderBandwidthsOffered struct {
11357	// OfferName - The OfferName.
11358	OfferName *string `json:"offerName,omitempty"`
11359	// ValueInMbps - The ValueInMbps.
11360	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11361}
11362
11363// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11364type ExpressRouteServiceProviderListResult struct {
11365	autorest.Response `json:"-"`
11366	// Value - A list of ExpressRouteResourceProvider resources.
11367	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11368	// NextLink - The URL to get the next set of results.
11369	NextLink *string `json:"nextLink,omitempty"`
11370}
11371
11372// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11373// ExpressRouteServiceProvider values.
11374type ExpressRouteServiceProviderListResultIterator struct {
11375	i    int
11376	page ExpressRouteServiceProviderListResultPage
11377}
11378
11379// NextWithContext advances to the next value.  If there was an error making
11380// the request the iterator does not advance and the error is returned.
11381func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11382	if tracing.IsEnabled() {
11383		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11384		defer func() {
11385			sc := -1
11386			if iter.Response().Response.Response != nil {
11387				sc = iter.Response().Response.Response.StatusCode
11388			}
11389			tracing.EndSpan(ctx, sc, err)
11390		}()
11391	}
11392	iter.i++
11393	if iter.i < len(iter.page.Values()) {
11394		return nil
11395	}
11396	err = iter.page.NextWithContext(ctx)
11397	if err != nil {
11398		iter.i--
11399		return err
11400	}
11401	iter.i = 0
11402	return nil
11403}
11404
11405// Next advances to the next value.  If there was an error making
11406// the request the iterator does not advance and the error is returned.
11407// Deprecated: Use NextWithContext() instead.
11408func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11409	return iter.NextWithContext(context.Background())
11410}
11411
11412// NotDone returns true if the enumeration should be started or is not yet complete.
11413func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
11414	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11415}
11416
11417// Response returns the raw server response from the last page request.
11418func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
11419	return iter.page.Response()
11420}
11421
11422// Value returns the current value or a zero-initialized value if the
11423// iterator has advanced beyond the end of the collection.
11424func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
11425	if !iter.page.NotDone() {
11426		return ExpressRouteServiceProvider{}
11427	}
11428	return iter.page.Values()[iter.i]
11429}
11430
11431// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
11432func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
11433	return ExpressRouteServiceProviderListResultIterator{page: page}
11434}
11435
11436// IsEmpty returns true if the ListResult contains no values.
11437func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
11438	return ersplr.Value == nil || len(*ersplr.Value) == 0
11439}
11440
11441// hasNextLink returns true if the NextLink is not empty.
11442func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
11443	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
11444}
11445
11446// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
11447// It returns nil if no more results exist.
11448func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
11449	if !ersplr.hasNextLink() {
11450		return nil, nil
11451	}
11452	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11453		autorest.AsJSON(),
11454		autorest.AsGet(),
11455		autorest.WithBaseURL(to.String(ersplr.NextLink)))
11456}
11457
11458// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
11459type ExpressRouteServiceProviderListResultPage struct {
11460	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
11461	ersplr ExpressRouteServiceProviderListResult
11462}
11463
11464// NextWithContext advances to the next page of values.  If there was an error making
11465// the request the page does not advance and the error is returned.
11466func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
11467	if tracing.IsEnabled() {
11468		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
11469		defer func() {
11470			sc := -1
11471			if page.Response().Response.Response != nil {
11472				sc = page.Response().Response.Response.StatusCode
11473			}
11474			tracing.EndSpan(ctx, sc, err)
11475		}()
11476	}
11477	for {
11478		next, err := page.fn(ctx, page.ersplr)
11479		if err != nil {
11480			return err
11481		}
11482		page.ersplr = next
11483		if !next.hasNextLink() || !next.IsEmpty() {
11484			break
11485		}
11486	}
11487	return nil
11488}
11489
11490// Next advances to the next page of values.  If there was an error making
11491// the request the page does not advance and the error is returned.
11492// Deprecated: Use NextWithContext() instead.
11493func (page *ExpressRouteServiceProviderListResultPage) Next() error {
11494	return page.NextWithContext(context.Background())
11495}
11496
11497// NotDone returns true if the page enumeration should be started or is not yet complete.
11498func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
11499	return !page.ersplr.IsEmpty()
11500}
11501
11502// Response returns the raw server response from the last page request.
11503func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
11504	return page.ersplr
11505}
11506
11507// Values returns the slice of values for the current page or nil if there are no values.
11508func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
11509	if page.ersplr.IsEmpty() {
11510		return nil
11511	}
11512	return *page.ersplr.Value
11513}
11514
11515// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
11516func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
11517	return ExpressRouteServiceProviderListResultPage{
11518		fn:     getNextPage,
11519		ersplr: cur,
11520	}
11521}
11522
11523// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
11524type ExpressRouteServiceProviderPropertiesFormat struct {
11525	// PeeringLocations - Get a list of peering locations.
11526	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
11527	// BandwidthsOffered - Gets bandwidths offered.
11528	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
11529	// ProvisioningState - Gets the provisioning state of the resource.
11530	ProvisioningState *string `json:"provisioningState,omitempty"`
11531}
11532
11533// FlowLogFormatParameters parameters that define the flow log format.
11534type FlowLogFormatParameters struct {
11535	// Type - The file type of flow log. Possible values include: 'JSON'
11536	Type FlowLogFormatType `json:"type,omitempty"`
11537	// Version - The version (revision) of the flow log.
11538	Version *int32 `json:"version,omitempty"`
11539}
11540
11541// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
11542type FlowLogInformation struct {
11543	autorest.Response `json:"-"`
11544	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
11545	TargetResourceID           *string `json:"targetResourceId,omitempty"`
11546	*FlowLogProperties         `json:"properties,omitempty"`
11547	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
11548}
11549
11550// MarshalJSON is the custom marshaler for FlowLogInformation.
11551func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
11552	objectMap := make(map[string]interface{})
11553	if fli.TargetResourceID != nil {
11554		objectMap["targetResourceId"] = fli.TargetResourceID
11555	}
11556	if fli.FlowLogProperties != nil {
11557		objectMap["properties"] = fli.FlowLogProperties
11558	}
11559	if fli.FlowAnalyticsConfiguration != nil {
11560		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
11561	}
11562	return json.Marshal(objectMap)
11563}
11564
11565// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
11566func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
11567	var m map[string]*json.RawMessage
11568	err := json.Unmarshal(body, &m)
11569	if err != nil {
11570		return err
11571	}
11572	for k, v := range m {
11573		switch k {
11574		case "targetResourceId":
11575			if v != nil {
11576				var targetResourceID string
11577				err = json.Unmarshal(*v, &targetResourceID)
11578				if err != nil {
11579					return err
11580				}
11581				fli.TargetResourceID = &targetResourceID
11582			}
11583		case "properties":
11584			if v != nil {
11585				var flowLogProperties FlowLogProperties
11586				err = json.Unmarshal(*v, &flowLogProperties)
11587				if err != nil {
11588					return err
11589				}
11590				fli.FlowLogProperties = &flowLogProperties
11591			}
11592		case "flowAnalyticsConfiguration":
11593			if v != nil {
11594				var flowAnalyticsConfiguration TrafficAnalyticsProperties
11595				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
11596				if err != nil {
11597					return err
11598				}
11599				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
11600			}
11601		}
11602	}
11603
11604	return nil
11605}
11606
11607// FlowLogProperties parameters that define the configuration of flow log.
11608type FlowLogProperties struct {
11609	// StorageID - ID of the storage account which is used to store the flow log.
11610	StorageID *string `json:"storageId,omitempty"`
11611	// Enabled - Flag to enable/disable flow logging.
11612	Enabled         *bool                      `json:"enabled,omitempty"`
11613	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
11614	Format          *FlowLogFormatParameters   `json:"format,omitempty"`
11615}
11616
11617// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
11618// (optional) status.
11619type FlowLogStatusParameters struct {
11620	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
11621	TargetResourceID *string `json:"targetResourceId,omitempty"`
11622}
11623
11624// FrontendIPConfiguration frontend IP address of the load balancer.
11625type FrontendIPConfiguration struct {
11626	autorest.Response `json:"-"`
11627	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
11628	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
11629	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11630	Name *string `json:"name,omitempty"`
11631	// Etag - A unique read-only string that changes whenever the resource is updated.
11632	Etag *string `json:"etag,omitempty"`
11633	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
11634	Zones *[]string `json:"zones,omitempty"`
11635	// ID - Resource ID.
11636	ID *string `json:"id,omitempty"`
11637}
11638
11639// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
11640func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
11641	objectMap := make(map[string]interface{})
11642	if fic.FrontendIPConfigurationPropertiesFormat != nil {
11643		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
11644	}
11645	if fic.Name != nil {
11646		objectMap["name"] = fic.Name
11647	}
11648	if fic.Etag != nil {
11649		objectMap["etag"] = fic.Etag
11650	}
11651	if fic.Zones != nil {
11652		objectMap["zones"] = fic.Zones
11653	}
11654	if fic.ID != nil {
11655		objectMap["id"] = fic.ID
11656	}
11657	return json.Marshal(objectMap)
11658}
11659
11660// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
11661func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
11662	var m map[string]*json.RawMessage
11663	err := json.Unmarshal(body, &m)
11664	if err != nil {
11665		return err
11666	}
11667	for k, v := range m {
11668		switch k {
11669		case "properties":
11670			if v != nil {
11671				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
11672				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
11673				if err != nil {
11674					return err
11675				}
11676				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
11677			}
11678		case "name":
11679			if v != nil {
11680				var name string
11681				err = json.Unmarshal(*v, &name)
11682				if err != nil {
11683					return err
11684				}
11685				fic.Name = &name
11686			}
11687		case "etag":
11688			if v != nil {
11689				var etag string
11690				err = json.Unmarshal(*v, &etag)
11691				if err != nil {
11692					return err
11693				}
11694				fic.Etag = &etag
11695			}
11696		case "zones":
11697			if v != nil {
11698				var zones []string
11699				err = json.Unmarshal(*v, &zones)
11700				if err != nil {
11701					return err
11702				}
11703				fic.Zones = &zones
11704			}
11705		case "id":
11706			if v != nil {
11707				var ID string
11708				err = json.Unmarshal(*v, &ID)
11709				if err != nil {
11710					return err
11711				}
11712				fic.ID = &ID
11713			}
11714		}
11715	}
11716
11717	return nil
11718}
11719
11720// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
11721type FrontendIPConfigurationPropertiesFormat struct {
11722	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
11723	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
11724	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
11725	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
11726	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
11727	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
11728	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
11729	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
11730	// PrivateIPAddress - The private IP address of the IP configuration.
11731	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
11732	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11733	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
11734	// Subnet - The reference of the subnet resource.
11735	Subnet *Subnet `json:"subnet,omitempty"`
11736	// PublicIPAddress - The reference of the Public IP resource.
11737	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
11738	// PublicIPPrefix - The reference of the Public IP Prefix resource.
11739	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
11740	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11741	ProvisioningState *string `json:"provisioningState,omitempty"`
11742}
11743
11744// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
11745func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
11746	objectMap := make(map[string]interface{})
11747	if ficpf.PrivateIPAddress != nil {
11748		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
11749	}
11750	if ficpf.PrivateIPAllocationMethod != "" {
11751		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
11752	}
11753	if ficpf.Subnet != nil {
11754		objectMap["subnet"] = ficpf.Subnet
11755	}
11756	if ficpf.PublicIPAddress != nil {
11757		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
11758	}
11759	if ficpf.PublicIPPrefix != nil {
11760		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
11761	}
11762	if ficpf.ProvisioningState != nil {
11763		objectMap["provisioningState"] = ficpf.ProvisioningState
11764	}
11765	return json.Marshal(objectMap)
11766}
11767
11768// GatewayRoute gateway routing details
11769type GatewayRoute struct {
11770	// LocalAddress - READ-ONLY; The gateway's local address
11771	LocalAddress *string `json:"localAddress,omitempty"`
11772	// NetworkProperty - READ-ONLY; The route's network prefix
11773	NetworkProperty *string `json:"network,omitempty"`
11774	// NextHop - READ-ONLY; The route's next hop
11775	NextHop *string `json:"nextHop,omitempty"`
11776	// SourcePeer - READ-ONLY; The peer this route was learned from
11777	SourcePeer *string `json:"sourcePeer,omitempty"`
11778	// Origin - READ-ONLY; The source this route was learned from
11779	Origin *string `json:"origin,omitempty"`
11780	// AsPath - READ-ONLY; The route's AS path sequence
11781	AsPath *string `json:"asPath,omitempty"`
11782	// Weight - READ-ONLY; The route's weight
11783	Weight *int32 `json:"weight,omitempty"`
11784}
11785
11786// MarshalJSON is the custom marshaler for GatewayRoute.
11787func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
11788	objectMap := make(map[string]interface{})
11789	return json.Marshal(objectMap)
11790}
11791
11792// GatewayRouteListResult list of virtual network gateway routes
11793type GatewayRouteListResult struct {
11794	autorest.Response `json:"-"`
11795	// Value - List of gateway routes
11796	Value *[]GatewayRoute `json:"value,omitempty"`
11797}
11798
11799// GetVpnSitesConfigurationRequest list of Vpn-Sites
11800type GetVpnSitesConfigurationRequest struct {
11801	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
11802	VpnSites *[]string `json:"vpnSites,omitempty"`
11803	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
11804	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
11805}
11806
11807// HTTPConfiguration HTTP configuration of the connectivity check.
11808type HTTPConfiguration struct {
11809	// Method - HTTP method. Possible values include: 'Get'
11810	Method HTTPMethod `json:"method,omitempty"`
11811	// Headers - List of HTTP headers.
11812	Headers *[]HTTPHeader `json:"headers,omitempty"`
11813	// ValidStatusCodes - Valid status codes.
11814	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
11815}
11816
11817// HTTPHeader describes the HTTP header.
11818type HTTPHeader struct {
11819	// Name - The name in HTTP header.
11820	Name *string `json:"name,omitempty"`
11821	// Value - The value in HTTP header.
11822	Value *string `json:"value,omitempty"`
11823}
11824
11825// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
11826type HubVirtualNetworkConnection struct {
11827	autorest.Response                      `json:"-"`
11828	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
11829	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11830	Name *string `json:"name,omitempty"`
11831	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11832	Etag *string `json:"etag,omitempty"`
11833	// ID - Resource ID.
11834	ID *string `json:"id,omitempty"`
11835}
11836
11837// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
11838func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
11839	objectMap := make(map[string]interface{})
11840	if hvnc.HubVirtualNetworkConnectionProperties != nil {
11841		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
11842	}
11843	if hvnc.Name != nil {
11844		objectMap["name"] = hvnc.Name
11845	}
11846	if hvnc.ID != nil {
11847		objectMap["id"] = hvnc.ID
11848	}
11849	return json.Marshal(objectMap)
11850}
11851
11852// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
11853func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
11854	var m map[string]*json.RawMessage
11855	err := json.Unmarshal(body, &m)
11856	if err != nil {
11857		return err
11858	}
11859	for k, v := range m {
11860		switch k {
11861		case "properties":
11862			if v != nil {
11863				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
11864				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
11865				if err != nil {
11866					return err
11867				}
11868				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
11869			}
11870		case "name":
11871			if v != nil {
11872				var name string
11873				err = json.Unmarshal(*v, &name)
11874				if err != nil {
11875					return err
11876				}
11877				hvnc.Name = &name
11878			}
11879		case "etag":
11880			if v != nil {
11881				var etag string
11882				err = json.Unmarshal(*v, &etag)
11883				if err != nil {
11884					return err
11885				}
11886				hvnc.Etag = &etag
11887			}
11888		case "id":
11889			if v != nil {
11890				var ID string
11891				err = json.Unmarshal(*v, &ID)
11892				if err != nil {
11893					return err
11894				}
11895				hvnc.ID = &ID
11896			}
11897		}
11898	}
11899
11900	return nil
11901}
11902
11903// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
11904type HubVirtualNetworkConnectionProperties struct {
11905	// RemoteVirtualNetwork - Reference to the remote virtual network.
11906	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
11907	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
11908	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
11909	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
11910	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
11911	// EnableInternetSecurity - Enable internet security
11912	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
11913	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11914	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11915}
11916
11917// InboundNatPool inbound NAT pool of the load balancer.
11918type InboundNatPool struct {
11919	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
11920	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
11921	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11922	Name *string `json:"name,omitempty"`
11923	// Etag - A unique read-only string that changes whenever the resource is updated.
11924	Etag *string `json:"etag,omitempty"`
11925	// ID - Resource ID.
11926	ID *string `json:"id,omitempty"`
11927}
11928
11929// MarshalJSON is the custom marshaler for InboundNatPool.
11930func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
11931	objectMap := make(map[string]interface{})
11932	if inp.InboundNatPoolPropertiesFormat != nil {
11933		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
11934	}
11935	if inp.Name != nil {
11936		objectMap["name"] = inp.Name
11937	}
11938	if inp.Etag != nil {
11939		objectMap["etag"] = inp.Etag
11940	}
11941	if inp.ID != nil {
11942		objectMap["id"] = inp.ID
11943	}
11944	return json.Marshal(objectMap)
11945}
11946
11947// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
11948func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
11949	var m map[string]*json.RawMessage
11950	err := json.Unmarshal(body, &m)
11951	if err != nil {
11952		return err
11953	}
11954	for k, v := range m {
11955		switch k {
11956		case "properties":
11957			if v != nil {
11958				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
11959				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
11960				if err != nil {
11961					return err
11962				}
11963				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
11964			}
11965		case "name":
11966			if v != nil {
11967				var name string
11968				err = json.Unmarshal(*v, &name)
11969				if err != nil {
11970					return err
11971				}
11972				inp.Name = &name
11973			}
11974		case "etag":
11975			if v != nil {
11976				var etag string
11977				err = json.Unmarshal(*v, &etag)
11978				if err != nil {
11979					return err
11980				}
11981				inp.Etag = &etag
11982			}
11983		case "id":
11984			if v != nil {
11985				var ID string
11986				err = json.Unmarshal(*v, &ID)
11987				if err != nil {
11988					return err
11989				}
11990				inp.ID = &ID
11991			}
11992		}
11993	}
11994
11995	return nil
11996}
11997
11998// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
11999type InboundNatPoolPropertiesFormat struct {
12000	// FrontendIPConfiguration - A reference to frontend IP addresses.
12001	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12002	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12003	Protocol TransportProtocol `json:"protocol,omitempty"`
12004	// 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.
12005	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
12006	// 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.
12007	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
12008	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
12009	BackendPort *int32 `json:"backendPort,omitempty"`
12010	// 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.
12011	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12012	// 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.
12013	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12014	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
12015	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12016	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12017	ProvisioningState *string `json:"provisioningState,omitempty"`
12018}
12019
12020// InboundNatRule inbound NAT rule of the load balancer.
12021type InboundNatRule struct {
12022	autorest.Response `json:"-"`
12023	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
12024	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
12025	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12026	Name *string `json:"name,omitempty"`
12027	// Etag - A unique read-only string that changes whenever the resource is updated.
12028	Etag *string `json:"etag,omitempty"`
12029	// ID - Resource ID.
12030	ID *string `json:"id,omitempty"`
12031}
12032
12033// MarshalJSON is the custom marshaler for InboundNatRule.
12034func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
12035	objectMap := make(map[string]interface{})
12036	if inr.InboundNatRulePropertiesFormat != nil {
12037		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
12038	}
12039	if inr.Name != nil {
12040		objectMap["name"] = inr.Name
12041	}
12042	if inr.Etag != nil {
12043		objectMap["etag"] = inr.Etag
12044	}
12045	if inr.ID != nil {
12046		objectMap["id"] = inr.ID
12047	}
12048	return json.Marshal(objectMap)
12049}
12050
12051// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
12052func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
12053	var m map[string]*json.RawMessage
12054	err := json.Unmarshal(body, &m)
12055	if err != nil {
12056		return err
12057	}
12058	for k, v := range m {
12059		switch k {
12060		case "properties":
12061			if v != nil {
12062				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
12063				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
12064				if err != nil {
12065					return err
12066				}
12067				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
12068			}
12069		case "name":
12070			if v != nil {
12071				var name string
12072				err = json.Unmarshal(*v, &name)
12073				if err != nil {
12074					return err
12075				}
12076				inr.Name = &name
12077			}
12078		case "etag":
12079			if v != nil {
12080				var etag string
12081				err = json.Unmarshal(*v, &etag)
12082				if err != nil {
12083					return err
12084				}
12085				inr.Etag = &etag
12086			}
12087		case "id":
12088			if v != nil {
12089				var ID string
12090				err = json.Unmarshal(*v, &ID)
12091				if err != nil {
12092					return err
12093				}
12094				inr.ID = &ID
12095			}
12096		}
12097	}
12098
12099	return nil
12100}
12101
12102// InboundNatRuleListResult response for ListInboundNatRule API service call.
12103type InboundNatRuleListResult struct {
12104	autorest.Response `json:"-"`
12105	// Value - A list of inbound nat rules in a load balancer.
12106	Value *[]InboundNatRule `json:"value,omitempty"`
12107	// NextLink - READ-ONLY; The URL to get the next set of results.
12108	NextLink *string `json:"nextLink,omitempty"`
12109}
12110
12111// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
12112func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
12113	objectMap := make(map[string]interface{})
12114	if inrlr.Value != nil {
12115		objectMap["value"] = inrlr.Value
12116	}
12117	return json.Marshal(objectMap)
12118}
12119
12120// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
12121type InboundNatRuleListResultIterator struct {
12122	i    int
12123	page InboundNatRuleListResultPage
12124}
12125
12126// NextWithContext advances to the next value.  If there was an error making
12127// the request the iterator does not advance and the error is returned.
12128func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12129	if tracing.IsEnabled() {
12130		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
12131		defer func() {
12132			sc := -1
12133			if iter.Response().Response.Response != nil {
12134				sc = iter.Response().Response.Response.StatusCode
12135			}
12136			tracing.EndSpan(ctx, sc, err)
12137		}()
12138	}
12139	iter.i++
12140	if iter.i < len(iter.page.Values()) {
12141		return nil
12142	}
12143	err = iter.page.NextWithContext(ctx)
12144	if err != nil {
12145		iter.i--
12146		return err
12147	}
12148	iter.i = 0
12149	return nil
12150}
12151
12152// Next advances to the next value.  If there was an error making
12153// the request the iterator does not advance and the error is returned.
12154// Deprecated: Use NextWithContext() instead.
12155func (iter *InboundNatRuleListResultIterator) Next() error {
12156	return iter.NextWithContext(context.Background())
12157}
12158
12159// NotDone returns true if the enumeration should be started or is not yet complete.
12160func (iter InboundNatRuleListResultIterator) NotDone() bool {
12161	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12162}
12163
12164// Response returns the raw server response from the last page request.
12165func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
12166	return iter.page.Response()
12167}
12168
12169// Value returns the current value or a zero-initialized value if the
12170// iterator has advanced beyond the end of the collection.
12171func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
12172	if !iter.page.NotDone() {
12173		return InboundNatRule{}
12174	}
12175	return iter.page.Values()[iter.i]
12176}
12177
12178// Creates a new instance of the InboundNatRuleListResultIterator type.
12179func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
12180	return InboundNatRuleListResultIterator{page: page}
12181}
12182
12183// IsEmpty returns true if the ListResult contains no values.
12184func (inrlr InboundNatRuleListResult) IsEmpty() bool {
12185	return inrlr.Value == nil || len(*inrlr.Value) == 0
12186}
12187
12188// hasNextLink returns true if the NextLink is not empty.
12189func (inrlr InboundNatRuleListResult) hasNextLink() bool {
12190	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
12191}
12192
12193// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
12194// It returns nil if no more results exist.
12195func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12196	if !inrlr.hasNextLink() {
12197		return nil, nil
12198	}
12199	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12200		autorest.AsJSON(),
12201		autorest.AsGet(),
12202		autorest.WithBaseURL(to.String(inrlr.NextLink)))
12203}
12204
12205// InboundNatRuleListResultPage contains a page of InboundNatRule values.
12206type InboundNatRuleListResultPage struct {
12207	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
12208	inrlr InboundNatRuleListResult
12209}
12210
12211// NextWithContext advances to the next page of values.  If there was an error making
12212// the request the page does not advance and the error is returned.
12213func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12214	if tracing.IsEnabled() {
12215		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
12216		defer func() {
12217			sc := -1
12218			if page.Response().Response.Response != nil {
12219				sc = page.Response().Response.Response.StatusCode
12220			}
12221			tracing.EndSpan(ctx, sc, err)
12222		}()
12223	}
12224	for {
12225		next, err := page.fn(ctx, page.inrlr)
12226		if err != nil {
12227			return err
12228		}
12229		page.inrlr = next
12230		if !next.hasNextLink() || !next.IsEmpty() {
12231			break
12232		}
12233	}
12234	return nil
12235}
12236
12237// Next advances to the next page of values.  If there was an error making
12238// the request the page does not advance and the error is returned.
12239// Deprecated: Use NextWithContext() instead.
12240func (page *InboundNatRuleListResultPage) Next() error {
12241	return page.NextWithContext(context.Background())
12242}
12243
12244// NotDone returns true if the page enumeration should be started or is not yet complete.
12245func (page InboundNatRuleListResultPage) NotDone() bool {
12246	return !page.inrlr.IsEmpty()
12247}
12248
12249// Response returns the raw server response from the last page request.
12250func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
12251	return page.inrlr
12252}
12253
12254// Values returns the slice of values for the current page or nil if there are no values.
12255func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
12256	if page.inrlr.IsEmpty() {
12257		return nil
12258	}
12259	return *page.inrlr.Value
12260}
12261
12262// Creates a new instance of the InboundNatRuleListResultPage type.
12263func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
12264	return InboundNatRuleListResultPage{
12265		fn:    getNextPage,
12266		inrlr: cur,
12267	}
12268}
12269
12270// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
12271type InboundNatRulePropertiesFormat struct {
12272	// FrontendIPConfiguration - A reference to frontend IP addresses.
12273	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12274	// 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.
12275	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
12276	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12277	Protocol TransportProtocol `json:"protocol,omitempty"`
12278	// 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.
12279	FrontendPort *int32 `json:"frontendPort,omitempty"`
12280	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
12281	BackendPort *int32 `json:"backendPort,omitempty"`
12282	// 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.
12283	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12284	// 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.
12285	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12286	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
12287	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12288	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12289	ProvisioningState *string `json:"provisioningState,omitempty"`
12290}
12291
12292// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
12293func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12294	objectMap := make(map[string]interface{})
12295	if inrpf.FrontendIPConfiguration != nil {
12296		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
12297	}
12298	if inrpf.Protocol != "" {
12299		objectMap["protocol"] = inrpf.Protocol
12300	}
12301	if inrpf.FrontendPort != nil {
12302		objectMap["frontendPort"] = inrpf.FrontendPort
12303	}
12304	if inrpf.BackendPort != nil {
12305		objectMap["backendPort"] = inrpf.BackendPort
12306	}
12307	if inrpf.IdleTimeoutInMinutes != nil {
12308		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
12309	}
12310	if inrpf.EnableFloatingIP != nil {
12311		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
12312	}
12313	if inrpf.EnableTCPReset != nil {
12314		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
12315	}
12316	if inrpf.ProvisioningState != nil {
12317		objectMap["provisioningState"] = inrpf.ProvisioningState
12318	}
12319	return json.Marshal(objectMap)
12320}
12321
12322// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12323// long-running operation.
12324type InboundNatRulesCreateOrUpdateFuture struct {
12325	azure.FutureAPI
12326	// Result returns the result of the asynchronous operation.
12327	// If the operation has not completed it will return an error.
12328	Result func(InboundNatRulesClient) (InboundNatRule, error)
12329}
12330
12331// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12332func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12333	var azFuture azure.Future
12334	if err := json.Unmarshal(body, &azFuture); err != nil {
12335		return err
12336	}
12337	future.FutureAPI = &azFuture
12338	future.Result = future.result
12339	return nil
12340}
12341
12342// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
12343func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
12344	var done bool
12345	done, err = future.DoneWithContext(context.Background(), client)
12346	if err != nil {
12347		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12348		return
12349	}
12350	if !done {
12351		inr.Response.Response = future.Response()
12352		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
12353		return
12354	}
12355	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12356	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
12357		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
12358		if err != nil {
12359			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
12360		}
12361	}
12362	return
12363}
12364
12365// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12366// operation.
12367type InboundNatRulesDeleteFuture struct {
12368	azure.FutureAPI
12369	// Result returns the result of the asynchronous operation.
12370	// If the operation has not completed it will return an error.
12371	Result func(InboundNatRulesClient) (autorest.Response, error)
12372}
12373
12374// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12375func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12376	var azFuture azure.Future
12377	if err := json.Unmarshal(body, &azFuture); err != nil {
12378		return err
12379	}
12380	future.FutureAPI = &azFuture
12381	future.Result = future.result
12382	return nil
12383}
12384
12385// result is the default implementation for InboundNatRulesDeleteFuture.Result.
12386func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
12387	var done bool
12388	done, err = future.DoneWithContext(context.Background(), client)
12389	if err != nil {
12390		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12391		return
12392	}
12393	if !done {
12394		ar.Response = future.Response()
12395		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
12396		return
12397	}
12398	ar.Response = future.Response()
12399	return
12400}
12401
12402// Interface a network interface in a resource group.
12403type Interface struct {
12404	autorest.Response `json:"-"`
12405	// InterfacePropertiesFormat - Properties of the network interface.
12406	*InterfacePropertiesFormat `json:"properties,omitempty"`
12407	// Etag - A unique read-only string that changes whenever the resource is updated.
12408	Etag *string `json:"etag,omitempty"`
12409	// ID - Resource ID.
12410	ID *string `json:"id,omitempty"`
12411	// Name - READ-ONLY; Resource name.
12412	Name *string `json:"name,omitempty"`
12413	// Type - READ-ONLY; Resource type.
12414	Type *string `json:"type,omitempty"`
12415	// Location - Resource location.
12416	Location *string `json:"location,omitempty"`
12417	// Tags - Resource tags.
12418	Tags map[string]*string `json:"tags"`
12419}
12420
12421// MarshalJSON is the custom marshaler for Interface.
12422func (i Interface) MarshalJSON() ([]byte, error) {
12423	objectMap := make(map[string]interface{})
12424	if i.InterfacePropertiesFormat != nil {
12425		objectMap["properties"] = i.InterfacePropertiesFormat
12426	}
12427	if i.Etag != nil {
12428		objectMap["etag"] = i.Etag
12429	}
12430	if i.ID != nil {
12431		objectMap["id"] = i.ID
12432	}
12433	if i.Location != nil {
12434		objectMap["location"] = i.Location
12435	}
12436	if i.Tags != nil {
12437		objectMap["tags"] = i.Tags
12438	}
12439	return json.Marshal(objectMap)
12440}
12441
12442// UnmarshalJSON is the custom unmarshaler for Interface struct.
12443func (i *Interface) UnmarshalJSON(body []byte) error {
12444	var m map[string]*json.RawMessage
12445	err := json.Unmarshal(body, &m)
12446	if err != nil {
12447		return err
12448	}
12449	for k, v := range m {
12450		switch k {
12451		case "properties":
12452			if v != nil {
12453				var interfacePropertiesFormat InterfacePropertiesFormat
12454				err = json.Unmarshal(*v, &interfacePropertiesFormat)
12455				if err != nil {
12456					return err
12457				}
12458				i.InterfacePropertiesFormat = &interfacePropertiesFormat
12459			}
12460		case "etag":
12461			if v != nil {
12462				var etag string
12463				err = json.Unmarshal(*v, &etag)
12464				if err != nil {
12465					return err
12466				}
12467				i.Etag = &etag
12468			}
12469		case "id":
12470			if v != nil {
12471				var ID string
12472				err = json.Unmarshal(*v, &ID)
12473				if err != nil {
12474					return err
12475				}
12476				i.ID = &ID
12477			}
12478		case "name":
12479			if v != nil {
12480				var name string
12481				err = json.Unmarshal(*v, &name)
12482				if err != nil {
12483					return err
12484				}
12485				i.Name = &name
12486			}
12487		case "type":
12488			if v != nil {
12489				var typeVar string
12490				err = json.Unmarshal(*v, &typeVar)
12491				if err != nil {
12492					return err
12493				}
12494				i.Type = &typeVar
12495			}
12496		case "location":
12497			if v != nil {
12498				var location string
12499				err = json.Unmarshal(*v, &location)
12500				if err != nil {
12501					return err
12502				}
12503				i.Location = &location
12504			}
12505		case "tags":
12506			if v != nil {
12507				var tags map[string]*string
12508				err = json.Unmarshal(*v, &tags)
12509				if err != nil {
12510					return err
12511				}
12512				i.Tags = tags
12513			}
12514		}
12515	}
12516
12517	return nil
12518}
12519
12520// InterfaceAssociation network interface and its custom security rules.
12521type InterfaceAssociation struct {
12522	// ID - READ-ONLY; Network interface ID.
12523	ID *string `json:"id,omitempty"`
12524	// SecurityRules - Collection of custom security rules.
12525	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
12526}
12527
12528// MarshalJSON is the custom marshaler for InterfaceAssociation.
12529func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
12530	objectMap := make(map[string]interface{})
12531	if ia.SecurityRules != nil {
12532		objectMap["securityRules"] = ia.SecurityRules
12533	}
12534	return json.Marshal(objectMap)
12535}
12536
12537// InterfaceDNSSettings DNS settings of a network interface.
12538type InterfaceDNSSettings struct {
12539	// 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.
12540	DNSServers *[]string `json:"dnsServers,omitempty"`
12541	// 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.
12542	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
12543	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
12544	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
12545	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
12546	InternalFqdn *string `json:"internalFqdn,omitempty"`
12547	// 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.
12548	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
12549}
12550
12551// InterfaceEndpoint interface endpoint resource.
12552type InterfaceEndpoint struct {
12553	autorest.Response `json:"-"`
12554	// InterfaceEndpointProperties - Properties of the interface endpoint.
12555	*InterfaceEndpointProperties `json:"properties,omitempty"`
12556	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12557	Etag *string `json:"etag,omitempty"`
12558	// ID - Resource ID.
12559	ID *string `json:"id,omitempty"`
12560	// Name - READ-ONLY; Resource name.
12561	Name *string `json:"name,omitempty"`
12562	// Type - READ-ONLY; Resource type.
12563	Type *string `json:"type,omitempty"`
12564	// Location - Resource location.
12565	Location *string `json:"location,omitempty"`
12566	// Tags - Resource tags.
12567	Tags map[string]*string `json:"tags"`
12568}
12569
12570// MarshalJSON is the custom marshaler for InterfaceEndpoint.
12571func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
12572	objectMap := make(map[string]interface{})
12573	if ie.InterfaceEndpointProperties != nil {
12574		objectMap["properties"] = ie.InterfaceEndpointProperties
12575	}
12576	if ie.Etag != nil {
12577		objectMap["etag"] = ie.Etag
12578	}
12579	if ie.ID != nil {
12580		objectMap["id"] = ie.ID
12581	}
12582	if ie.Location != nil {
12583		objectMap["location"] = ie.Location
12584	}
12585	if ie.Tags != nil {
12586		objectMap["tags"] = ie.Tags
12587	}
12588	return json.Marshal(objectMap)
12589}
12590
12591// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
12592func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
12593	var m map[string]*json.RawMessage
12594	err := json.Unmarshal(body, &m)
12595	if err != nil {
12596		return err
12597	}
12598	for k, v := range m {
12599		switch k {
12600		case "properties":
12601			if v != nil {
12602				var interfaceEndpointProperties InterfaceEndpointProperties
12603				err = json.Unmarshal(*v, &interfaceEndpointProperties)
12604				if err != nil {
12605					return err
12606				}
12607				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
12608			}
12609		case "etag":
12610			if v != nil {
12611				var etag string
12612				err = json.Unmarshal(*v, &etag)
12613				if err != nil {
12614					return err
12615				}
12616				ie.Etag = &etag
12617			}
12618		case "id":
12619			if v != nil {
12620				var ID string
12621				err = json.Unmarshal(*v, &ID)
12622				if err != nil {
12623					return err
12624				}
12625				ie.ID = &ID
12626			}
12627		case "name":
12628			if v != nil {
12629				var name string
12630				err = json.Unmarshal(*v, &name)
12631				if err != nil {
12632					return err
12633				}
12634				ie.Name = &name
12635			}
12636		case "type":
12637			if v != nil {
12638				var typeVar string
12639				err = json.Unmarshal(*v, &typeVar)
12640				if err != nil {
12641					return err
12642				}
12643				ie.Type = &typeVar
12644			}
12645		case "location":
12646			if v != nil {
12647				var location string
12648				err = json.Unmarshal(*v, &location)
12649				if err != nil {
12650					return err
12651				}
12652				ie.Location = &location
12653			}
12654		case "tags":
12655			if v != nil {
12656				var tags map[string]*string
12657				err = json.Unmarshal(*v, &tags)
12658				if err != nil {
12659					return err
12660				}
12661				ie.Tags = tags
12662			}
12663		}
12664	}
12665
12666	return nil
12667}
12668
12669// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
12670type InterfaceEndpointListResult struct {
12671	autorest.Response `json:"-"`
12672	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
12673	Value *[]InterfaceEndpoint `json:"value,omitempty"`
12674	// NextLink - READ-ONLY; The URL to get the next set of results.
12675	NextLink *string `json:"nextLink,omitempty"`
12676}
12677
12678// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
12679func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
12680	objectMap := make(map[string]interface{})
12681	if ielr.Value != nil {
12682		objectMap["value"] = ielr.Value
12683	}
12684	return json.Marshal(objectMap)
12685}
12686
12687// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
12688type InterfaceEndpointListResultIterator struct {
12689	i    int
12690	page InterfaceEndpointListResultPage
12691}
12692
12693// NextWithContext advances to the next value.  If there was an error making
12694// the request the iterator does not advance and the error is returned.
12695func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
12696	if tracing.IsEnabled() {
12697		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
12698		defer func() {
12699			sc := -1
12700			if iter.Response().Response.Response != nil {
12701				sc = iter.Response().Response.Response.StatusCode
12702			}
12703			tracing.EndSpan(ctx, sc, err)
12704		}()
12705	}
12706	iter.i++
12707	if iter.i < len(iter.page.Values()) {
12708		return nil
12709	}
12710	err = iter.page.NextWithContext(ctx)
12711	if err != nil {
12712		iter.i--
12713		return err
12714	}
12715	iter.i = 0
12716	return nil
12717}
12718
12719// Next advances to the next value.  If there was an error making
12720// the request the iterator does not advance and the error is returned.
12721// Deprecated: Use NextWithContext() instead.
12722func (iter *InterfaceEndpointListResultIterator) Next() error {
12723	return iter.NextWithContext(context.Background())
12724}
12725
12726// NotDone returns true if the enumeration should be started or is not yet complete.
12727func (iter InterfaceEndpointListResultIterator) NotDone() bool {
12728	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12729}
12730
12731// Response returns the raw server response from the last page request.
12732func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
12733	return iter.page.Response()
12734}
12735
12736// Value returns the current value or a zero-initialized value if the
12737// iterator has advanced beyond the end of the collection.
12738func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
12739	if !iter.page.NotDone() {
12740		return InterfaceEndpoint{}
12741	}
12742	return iter.page.Values()[iter.i]
12743}
12744
12745// Creates a new instance of the InterfaceEndpointListResultIterator type.
12746func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
12747	return InterfaceEndpointListResultIterator{page: page}
12748}
12749
12750// IsEmpty returns true if the ListResult contains no values.
12751func (ielr InterfaceEndpointListResult) IsEmpty() bool {
12752	return ielr.Value == nil || len(*ielr.Value) == 0
12753}
12754
12755// hasNextLink returns true if the NextLink is not empty.
12756func (ielr InterfaceEndpointListResult) hasNextLink() bool {
12757	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
12758}
12759
12760// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
12761// It returns nil if no more results exist.
12762func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
12763	if !ielr.hasNextLink() {
12764		return nil, nil
12765	}
12766	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12767		autorest.AsJSON(),
12768		autorest.AsGet(),
12769		autorest.WithBaseURL(to.String(ielr.NextLink)))
12770}
12771
12772// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
12773type InterfaceEndpointListResultPage struct {
12774	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
12775	ielr InterfaceEndpointListResult
12776}
12777
12778// NextWithContext advances to the next page of values.  If there was an error making
12779// the request the page does not advance and the error is returned.
12780func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
12781	if tracing.IsEnabled() {
12782		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
12783		defer func() {
12784			sc := -1
12785			if page.Response().Response.Response != nil {
12786				sc = page.Response().Response.Response.StatusCode
12787			}
12788			tracing.EndSpan(ctx, sc, err)
12789		}()
12790	}
12791	for {
12792		next, err := page.fn(ctx, page.ielr)
12793		if err != nil {
12794			return err
12795		}
12796		page.ielr = next
12797		if !next.hasNextLink() || !next.IsEmpty() {
12798			break
12799		}
12800	}
12801	return nil
12802}
12803
12804// Next advances to the next page of values.  If there was an error making
12805// the request the page does not advance and the error is returned.
12806// Deprecated: Use NextWithContext() instead.
12807func (page *InterfaceEndpointListResultPage) Next() error {
12808	return page.NextWithContext(context.Background())
12809}
12810
12811// NotDone returns true if the page enumeration should be started or is not yet complete.
12812func (page InterfaceEndpointListResultPage) NotDone() bool {
12813	return !page.ielr.IsEmpty()
12814}
12815
12816// Response returns the raw server response from the last page request.
12817func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
12818	return page.ielr
12819}
12820
12821// Values returns the slice of values for the current page or nil if there are no values.
12822func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
12823	if page.ielr.IsEmpty() {
12824		return nil
12825	}
12826	return *page.ielr.Value
12827}
12828
12829// Creates a new instance of the InterfaceEndpointListResultPage type.
12830func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
12831	return InterfaceEndpointListResultPage{
12832		fn:   getNextPage,
12833		ielr: cur,
12834	}
12835}
12836
12837// InterfaceEndpointProperties properties of the interface endpoint.
12838type InterfaceEndpointProperties struct {
12839	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
12840	Fqdn *string `json:"fqdn,omitempty"`
12841	// EndpointService - A reference to the service being brought into the virtual network.
12842	EndpointService *EndpointService `json:"endpointService,omitempty"`
12843	// Subnet - The ID of the subnet from which the private IP will be allocated.
12844	Subnet *Subnet `json:"subnet,omitempty"`
12845	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
12846	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
12847	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
12848	Owner *string `json:"owner,omitempty"`
12849	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12850	ProvisioningState *string `json:"provisioningState,omitempty"`
12851}
12852
12853// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
12854func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
12855	objectMap := make(map[string]interface{})
12856	if iep.Fqdn != nil {
12857		objectMap["fqdn"] = iep.Fqdn
12858	}
12859	if iep.EndpointService != nil {
12860		objectMap["endpointService"] = iep.EndpointService
12861	}
12862	if iep.Subnet != nil {
12863		objectMap["subnet"] = iep.Subnet
12864	}
12865	return json.Marshal(objectMap)
12866}
12867
12868// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12869// long-running operation.
12870type InterfaceEndpointsCreateOrUpdateFuture struct {
12871	azure.FutureAPI
12872	// Result returns the result of the asynchronous operation.
12873	// If the operation has not completed it will return an error.
12874	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
12875}
12876
12877// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12878func (future *InterfaceEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12879	var azFuture azure.Future
12880	if err := json.Unmarshal(body, &azFuture); err != nil {
12881		return err
12882	}
12883	future.FutureAPI = &azFuture
12884	future.Result = future.result
12885	return nil
12886}
12887
12888// result is the default implementation for InterfaceEndpointsCreateOrUpdateFuture.Result.
12889func (future *InterfaceEndpointsCreateOrUpdateFuture) result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
12890	var done bool
12891	done, err = future.DoneWithContext(context.Background(), client)
12892	if err != nil {
12893		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12894		return
12895	}
12896	if !done {
12897		ie.Response.Response = future.Response()
12898		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
12899		return
12900	}
12901	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12902	if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
12903		ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
12904		if err != nil {
12905			err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
12906		}
12907	}
12908	return
12909}
12910
12911// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
12912// long-running operation.
12913type InterfaceEndpointsDeleteFuture struct {
12914	azure.FutureAPI
12915	// Result returns the result of the asynchronous operation.
12916	// If the operation has not completed it will return an error.
12917	Result func(InterfaceEndpointsClient) (autorest.Response, error)
12918}
12919
12920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12921func (future *InterfaceEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
12922	var azFuture azure.Future
12923	if err := json.Unmarshal(body, &azFuture); err != nil {
12924		return err
12925	}
12926	future.FutureAPI = &azFuture
12927	future.Result = future.result
12928	return nil
12929}
12930
12931// result is the default implementation for InterfaceEndpointsDeleteFuture.Result.
12932func (future *InterfaceEndpointsDeleteFuture) result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
12933	var done bool
12934	done, err = future.DoneWithContext(context.Background(), client)
12935	if err != nil {
12936		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
12937		return
12938	}
12939	if !done {
12940		ar.Response = future.Response()
12941		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
12942		return
12943	}
12944	ar.Response = future.Response()
12945	return
12946}
12947
12948// InterfaceIPConfiguration iPConfiguration in a network interface.
12949type InterfaceIPConfiguration struct {
12950	autorest.Response `json:"-"`
12951	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
12952	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12953	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12954	Name *string `json:"name,omitempty"`
12955	// Etag - A unique read-only string that changes whenever the resource is updated.
12956	Etag *string `json:"etag,omitempty"`
12957	// ID - Resource ID.
12958	ID *string `json:"id,omitempty"`
12959}
12960
12961// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
12962func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
12963	objectMap := make(map[string]interface{})
12964	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
12965		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
12966	}
12967	if iic.Name != nil {
12968		objectMap["name"] = iic.Name
12969	}
12970	if iic.Etag != nil {
12971		objectMap["etag"] = iic.Etag
12972	}
12973	if iic.ID != nil {
12974		objectMap["id"] = iic.ID
12975	}
12976	return json.Marshal(objectMap)
12977}
12978
12979// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
12980func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
12981	var m map[string]*json.RawMessage
12982	err := json.Unmarshal(body, &m)
12983	if err != nil {
12984		return err
12985	}
12986	for k, v := range m {
12987		switch k {
12988		case "properties":
12989			if v != nil {
12990				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
12991				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
12992				if err != nil {
12993					return err
12994				}
12995				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
12996			}
12997		case "name":
12998			if v != nil {
12999				var name string
13000				err = json.Unmarshal(*v, &name)
13001				if err != nil {
13002					return err
13003				}
13004				iic.Name = &name
13005			}
13006		case "etag":
13007			if v != nil {
13008				var etag string
13009				err = json.Unmarshal(*v, &etag)
13010				if err != nil {
13011					return err
13012				}
13013				iic.Etag = &etag
13014			}
13015		case "id":
13016			if v != nil {
13017				var ID string
13018				err = json.Unmarshal(*v, &ID)
13019				if err != nil {
13020					return err
13021				}
13022				iic.ID = &ID
13023			}
13024		}
13025	}
13026
13027	return nil
13028}
13029
13030// InterfaceIPConfigurationListResult response for list ip configurations API service call.
13031type InterfaceIPConfigurationListResult struct {
13032	autorest.Response `json:"-"`
13033	// Value - A list of ip configurations.
13034	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
13035	// NextLink - READ-ONLY; The URL to get the next set of results.
13036	NextLink *string `json:"nextLink,omitempty"`
13037}
13038
13039// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
13040func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
13041	objectMap := make(map[string]interface{})
13042	if iiclr.Value != nil {
13043		objectMap["value"] = iiclr.Value
13044	}
13045	return json.Marshal(objectMap)
13046}
13047
13048// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
13049// InterfaceIPConfiguration values.
13050type InterfaceIPConfigurationListResultIterator struct {
13051	i    int
13052	page InterfaceIPConfigurationListResultPage
13053}
13054
13055// NextWithContext advances to the next value.  If there was an error making
13056// the request the iterator does not advance and the error is returned.
13057func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13058	if tracing.IsEnabled() {
13059		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
13060		defer func() {
13061			sc := -1
13062			if iter.Response().Response.Response != nil {
13063				sc = iter.Response().Response.Response.StatusCode
13064			}
13065			tracing.EndSpan(ctx, sc, err)
13066		}()
13067	}
13068	iter.i++
13069	if iter.i < len(iter.page.Values()) {
13070		return nil
13071	}
13072	err = iter.page.NextWithContext(ctx)
13073	if err != nil {
13074		iter.i--
13075		return err
13076	}
13077	iter.i = 0
13078	return nil
13079}
13080
13081// Next advances to the next value.  If there was an error making
13082// the request the iterator does not advance and the error is returned.
13083// Deprecated: Use NextWithContext() instead.
13084func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
13085	return iter.NextWithContext(context.Background())
13086}
13087
13088// NotDone returns true if the enumeration should be started or is not yet complete.
13089func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
13090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13091}
13092
13093// Response returns the raw server response from the last page request.
13094func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
13095	return iter.page.Response()
13096}
13097
13098// Value returns the current value or a zero-initialized value if the
13099// iterator has advanced beyond the end of the collection.
13100func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
13101	if !iter.page.NotDone() {
13102		return InterfaceIPConfiguration{}
13103	}
13104	return iter.page.Values()[iter.i]
13105}
13106
13107// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
13108func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
13109	return InterfaceIPConfigurationListResultIterator{page: page}
13110}
13111
13112// IsEmpty returns true if the ListResult contains no values.
13113func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
13114	return iiclr.Value == nil || len(*iiclr.Value) == 0
13115}
13116
13117// hasNextLink returns true if the NextLink is not empty.
13118func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
13119	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
13120}
13121
13122// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13123// It returns nil if no more results exist.
13124func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13125	if !iiclr.hasNextLink() {
13126		return nil, nil
13127	}
13128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13129		autorest.AsJSON(),
13130		autorest.AsGet(),
13131		autorest.WithBaseURL(to.String(iiclr.NextLink)))
13132}
13133
13134// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
13135type InterfaceIPConfigurationListResultPage struct {
13136	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
13137	iiclr InterfaceIPConfigurationListResult
13138}
13139
13140// NextWithContext advances to the next page of values.  If there was an error making
13141// the request the page does not advance and the error is returned.
13142func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13143	if tracing.IsEnabled() {
13144		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
13145		defer func() {
13146			sc := -1
13147			if page.Response().Response.Response != nil {
13148				sc = page.Response().Response.Response.StatusCode
13149			}
13150			tracing.EndSpan(ctx, sc, err)
13151		}()
13152	}
13153	for {
13154		next, err := page.fn(ctx, page.iiclr)
13155		if err != nil {
13156			return err
13157		}
13158		page.iiclr = next
13159		if !next.hasNextLink() || !next.IsEmpty() {
13160			break
13161		}
13162	}
13163	return nil
13164}
13165
13166// Next advances to the next page of values.  If there was an error making
13167// the request the page does not advance and the error is returned.
13168// Deprecated: Use NextWithContext() instead.
13169func (page *InterfaceIPConfigurationListResultPage) Next() error {
13170	return page.NextWithContext(context.Background())
13171}
13172
13173// NotDone returns true if the page enumeration should be started or is not yet complete.
13174func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
13175	return !page.iiclr.IsEmpty()
13176}
13177
13178// Response returns the raw server response from the last page request.
13179func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
13180	return page.iiclr
13181}
13182
13183// Values returns the slice of values for the current page or nil if there are no values.
13184func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
13185	if page.iiclr.IsEmpty() {
13186		return nil
13187	}
13188	return *page.iiclr.Value
13189}
13190
13191// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
13192func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
13193	return InterfaceIPConfigurationListResultPage{
13194		fn:    getNextPage,
13195		iiclr: cur,
13196	}
13197}
13198
13199// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
13200type InterfaceIPConfigurationPropertiesFormat struct {
13201	// VirtualNetworkTaps - The reference to Virtual Network Taps.
13202	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
13203	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
13204	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
13205	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
13206	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
13207	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
13208	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
13209	// PrivateIPAddress - Private IP address of the IP configuration.
13210	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13211	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
13212	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13213	// 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'
13214	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13215	// Subnet - Subnet bound to the IP configuration.
13216	Subnet *Subnet `json:"subnet,omitempty"`
13217	// Primary - Gets whether this is a primary customer address on the network interface.
13218	Primary *bool `json:"primary,omitempty"`
13219	// PublicIPAddress - Public IP address bound to the IP configuration.
13220	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13221	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
13222	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
13223	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13224	ProvisioningState *string `json:"provisioningState,omitempty"`
13225}
13226
13227// InterfaceListResult response for the ListNetworkInterface API service call.
13228type InterfaceListResult struct {
13229	autorest.Response `json:"-"`
13230	// Value - A list of network interfaces in a resource group.
13231	Value *[]Interface `json:"value,omitempty"`
13232	// NextLink - READ-ONLY; The URL to get the next set of results.
13233	NextLink *string `json:"nextLink,omitempty"`
13234}
13235
13236// MarshalJSON is the custom marshaler for InterfaceListResult.
13237func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
13238	objectMap := make(map[string]interface{})
13239	if ilr.Value != nil {
13240		objectMap["value"] = ilr.Value
13241	}
13242	return json.Marshal(objectMap)
13243}
13244
13245// InterfaceListResultIterator provides access to a complete listing of Interface values.
13246type InterfaceListResultIterator struct {
13247	i    int
13248	page InterfaceListResultPage
13249}
13250
13251// NextWithContext advances to the next value.  If there was an error making
13252// the request the iterator does not advance and the error is returned.
13253func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
13254	if tracing.IsEnabled() {
13255		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
13256		defer func() {
13257			sc := -1
13258			if iter.Response().Response.Response != nil {
13259				sc = iter.Response().Response.Response.StatusCode
13260			}
13261			tracing.EndSpan(ctx, sc, err)
13262		}()
13263	}
13264	iter.i++
13265	if iter.i < len(iter.page.Values()) {
13266		return nil
13267	}
13268	err = iter.page.NextWithContext(ctx)
13269	if err != nil {
13270		iter.i--
13271		return err
13272	}
13273	iter.i = 0
13274	return nil
13275}
13276
13277// Next advances to the next value.  If there was an error making
13278// the request the iterator does not advance and the error is returned.
13279// Deprecated: Use NextWithContext() instead.
13280func (iter *InterfaceListResultIterator) Next() error {
13281	return iter.NextWithContext(context.Background())
13282}
13283
13284// NotDone returns true if the enumeration should be started or is not yet complete.
13285func (iter InterfaceListResultIterator) NotDone() bool {
13286	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13287}
13288
13289// Response returns the raw server response from the last page request.
13290func (iter InterfaceListResultIterator) Response() InterfaceListResult {
13291	return iter.page.Response()
13292}
13293
13294// Value returns the current value or a zero-initialized value if the
13295// iterator has advanced beyond the end of the collection.
13296func (iter InterfaceListResultIterator) Value() Interface {
13297	if !iter.page.NotDone() {
13298		return Interface{}
13299	}
13300	return iter.page.Values()[iter.i]
13301}
13302
13303// Creates a new instance of the InterfaceListResultIterator type.
13304func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
13305	return InterfaceListResultIterator{page: page}
13306}
13307
13308// IsEmpty returns true if the ListResult contains no values.
13309func (ilr InterfaceListResult) IsEmpty() bool {
13310	return ilr.Value == nil || len(*ilr.Value) == 0
13311}
13312
13313// hasNextLink returns true if the NextLink is not empty.
13314func (ilr InterfaceListResult) hasNextLink() bool {
13315	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
13316}
13317
13318// interfaceListResultPreparer prepares a request to retrieve the next set of results.
13319// It returns nil if no more results exist.
13320func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
13321	if !ilr.hasNextLink() {
13322		return nil, nil
13323	}
13324	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13325		autorest.AsJSON(),
13326		autorest.AsGet(),
13327		autorest.WithBaseURL(to.String(ilr.NextLink)))
13328}
13329
13330// InterfaceListResultPage contains a page of Interface values.
13331type InterfaceListResultPage struct {
13332	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13333	ilr InterfaceListResult
13334}
13335
13336// NextWithContext advances to the next page of values.  If there was an error making
13337// the request the page does not advance and the error is returned.
13338func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13339	if tracing.IsEnabled() {
13340		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13341		defer func() {
13342			sc := -1
13343			if page.Response().Response.Response != nil {
13344				sc = page.Response().Response.Response.StatusCode
13345			}
13346			tracing.EndSpan(ctx, sc, err)
13347		}()
13348	}
13349	for {
13350		next, err := page.fn(ctx, page.ilr)
13351		if err != nil {
13352			return err
13353		}
13354		page.ilr = next
13355		if !next.hasNextLink() || !next.IsEmpty() {
13356			break
13357		}
13358	}
13359	return nil
13360}
13361
13362// Next advances to the next page of values.  If there was an error making
13363// the request the page does not advance and the error is returned.
13364// Deprecated: Use NextWithContext() instead.
13365func (page *InterfaceListResultPage) Next() error {
13366	return page.NextWithContext(context.Background())
13367}
13368
13369// NotDone returns true if the page enumeration should be started or is not yet complete.
13370func (page InterfaceListResultPage) NotDone() bool {
13371	return !page.ilr.IsEmpty()
13372}
13373
13374// Response returns the raw server response from the last page request.
13375func (page InterfaceListResultPage) Response() InterfaceListResult {
13376	return page.ilr
13377}
13378
13379// Values returns the slice of values for the current page or nil if there are no values.
13380func (page InterfaceListResultPage) Values() []Interface {
13381	if page.ilr.IsEmpty() {
13382		return nil
13383	}
13384	return *page.ilr.Value
13385}
13386
13387// Creates a new instance of the InterfaceListResultPage type.
13388func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
13389	return InterfaceListResultPage{
13390		fn:  getNextPage,
13391		ilr: cur,
13392	}
13393}
13394
13395// InterfaceLoadBalancerListResult response for list ip configurations API service call.
13396type InterfaceLoadBalancerListResult struct {
13397	autorest.Response `json:"-"`
13398	// Value - A list of load balancers.
13399	Value *[]LoadBalancer `json:"value,omitempty"`
13400	// NextLink - READ-ONLY; The URL to get the next set of results.
13401	NextLink *string `json:"nextLink,omitempty"`
13402}
13403
13404// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
13405func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
13406	objectMap := make(map[string]interface{})
13407	if ilblr.Value != nil {
13408		objectMap["value"] = ilblr.Value
13409	}
13410	return json.Marshal(objectMap)
13411}
13412
13413// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
13414type InterfaceLoadBalancerListResultIterator struct {
13415	i    int
13416	page InterfaceLoadBalancerListResultPage
13417}
13418
13419// NextWithContext advances to the next value.  If there was an error making
13420// the request the iterator does not advance and the error is returned.
13421func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
13422	if tracing.IsEnabled() {
13423		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
13424		defer func() {
13425			sc := -1
13426			if iter.Response().Response.Response != nil {
13427				sc = iter.Response().Response.Response.StatusCode
13428			}
13429			tracing.EndSpan(ctx, sc, err)
13430		}()
13431	}
13432	iter.i++
13433	if iter.i < len(iter.page.Values()) {
13434		return nil
13435	}
13436	err = iter.page.NextWithContext(ctx)
13437	if err != nil {
13438		iter.i--
13439		return err
13440	}
13441	iter.i = 0
13442	return nil
13443}
13444
13445// Next advances to the next value.  If there was an error making
13446// the request the iterator does not advance and the error is returned.
13447// Deprecated: Use NextWithContext() instead.
13448func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
13449	return iter.NextWithContext(context.Background())
13450}
13451
13452// NotDone returns true if the enumeration should be started or is not yet complete.
13453func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
13454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13455}
13456
13457// Response returns the raw server response from the last page request.
13458func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
13459	return iter.page.Response()
13460}
13461
13462// Value returns the current value or a zero-initialized value if the
13463// iterator has advanced beyond the end of the collection.
13464func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
13465	if !iter.page.NotDone() {
13466		return LoadBalancer{}
13467	}
13468	return iter.page.Values()[iter.i]
13469}
13470
13471// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
13472func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
13473	return InterfaceLoadBalancerListResultIterator{page: page}
13474}
13475
13476// IsEmpty returns true if the ListResult contains no values.
13477func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
13478	return ilblr.Value == nil || len(*ilblr.Value) == 0
13479}
13480
13481// hasNextLink returns true if the NextLink is not empty.
13482func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
13483	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
13484}
13485
13486// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
13487// It returns nil if no more results exist.
13488func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
13489	if !ilblr.hasNextLink() {
13490		return nil, nil
13491	}
13492	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13493		autorest.AsJSON(),
13494		autorest.AsGet(),
13495		autorest.WithBaseURL(to.String(ilblr.NextLink)))
13496}
13497
13498// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
13499type InterfaceLoadBalancerListResultPage struct {
13500	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
13501	ilblr InterfaceLoadBalancerListResult
13502}
13503
13504// NextWithContext advances to the next page of values.  If there was an error making
13505// the request the page does not advance and the error is returned.
13506func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
13507	if tracing.IsEnabled() {
13508		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
13509		defer func() {
13510			sc := -1
13511			if page.Response().Response.Response != nil {
13512				sc = page.Response().Response.Response.StatusCode
13513			}
13514			tracing.EndSpan(ctx, sc, err)
13515		}()
13516	}
13517	for {
13518		next, err := page.fn(ctx, page.ilblr)
13519		if err != nil {
13520			return err
13521		}
13522		page.ilblr = next
13523		if !next.hasNextLink() || !next.IsEmpty() {
13524			break
13525		}
13526	}
13527	return nil
13528}
13529
13530// Next advances to the next page of values.  If there was an error making
13531// the request the page does not advance and the error is returned.
13532// Deprecated: Use NextWithContext() instead.
13533func (page *InterfaceLoadBalancerListResultPage) Next() error {
13534	return page.NextWithContext(context.Background())
13535}
13536
13537// NotDone returns true if the page enumeration should be started or is not yet complete.
13538func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
13539	return !page.ilblr.IsEmpty()
13540}
13541
13542// Response returns the raw server response from the last page request.
13543func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
13544	return page.ilblr
13545}
13546
13547// Values returns the slice of values for the current page or nil if there are no values.
13548func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
13549	if page.ilblr.IsEmpty() {
13550		return nil
13551	}
13552	return *page.ilblr.Value
13553}
13554
13555// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
13556func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
13557	return InterfaceLoadBalancerListResultPage{
13558		fn:    getNextPage,
13559		ilblr: cur,
13560	}
13561}
13562
13563// InterfacePropertiesFormat networkInterface properties.
13564type InterfacePropertiesFormat struct {
13565	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
13566	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
13567	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
13568	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
13569	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
13570	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
13571	// IPConfigurations - A list of IPConfigurations of the network interface.
13572	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
13573	// TapConfigurations - A list of TapConfigurations of the network interface.
13574	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
13575	// DNSSettings - The DNS settings in network interface.
13576	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
13577	// MacAddress - The MAC address of the network interface.
13578	MacAddress *string `json:"macAddress,omitempty"`
13579	// Primary - Gets whether this is a primary network interface on a virtual machine.
13580	Primary *bool `json:"primary,omitempty"`
13581	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
13582	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
13583	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
13584	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
13585	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
13586	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
13587	// ResourceGUID - The resource GUID property of the network interface resource.
13588	ResourceGUID *string `json:"resourceGuid,omitempty"`
13589	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13590	ProvisioningState *string `json:"provisioningState,omitempty"`
13591}
13592
13593// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
13594func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
13595	objectMap := make(map[string]interface{})
13596	if ipf.NetworkSecurityGroup != nil {
13597		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
13598	}
13599	if ipf.IPConfigurations != nil {
13600		objectMap["ipConfigurations"] = ipf.IPConfigurations
13601	}
13602	if ipf.TapConfigurations != nil {
13603		objectMap["tapConfigurations"] = ipf.TapConfigurations
13604	}
13605	if ipf.DNSSettings != nil {
13606		objectMap["dnsSettings"] = ipf.DNSSettings
13607	}
13608	if ipf.MacAddress != nil {
13609		objectMap["macAddress"] = ipf.MacAddress
13610	}
13611	if ipf.Primary != nil {
13612		objectMap["primary"] = ipf.Primary
13613	}
13614	if ipf.EnableAcceleratedNetworking != nil {
13615		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
13616	}
13617	if ipf.EnableIPForwarding != nil {
13618		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
13619	}
13620	if ipf.ResourceGUID != nil {
13621		objectMap["resourceGuid"] = ipf.ResourceGUID
13622	}
13623	if ipf.ProvisioningState != nil {
13624		objectMap["provisioningState"] = ipf.ProvisioningState
13625	}
13626	return json.Marshal(objectMap)
13627}
13628
13629// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13630// long-running operation.
13631type InterfacesCreateOrUpdateFuture struct {
13632	azure.FutureAPI
13633	// Result returns the result of the asynchronous operation.
13634	// If the operation has not completed it will return an error.
13635	Result func(InterfacesClient) (Interface, error)
13636}
13637
13638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13639func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13640	var azFuture azure.Future
13641	if err := json.Unmarshal(body, &azFuture); err != nil {
13642		return err
13643	}
13644	future.FutureAPI = &azFuture
13645	future.Result = future.result
13646	return nil
13647}
13648
13649// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
13650func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
13651	var done bool
13652	done, err = future.DoneWithContext(context.Background(), client)
13653	if err != nil {
13654		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13655		return
13656	}
13657	if !done {
13658		i.Response.Response = future.Response()
13659		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
13660		return
13661	}
13662	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13663	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
13664		i, err = client.CreateOrUpdateResponder(i.Response.Response)
13665		if err != nil {
13666			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
13667		}
13668	}
13669	return
13670}
13671
13672// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13673// operation.
13674type InterfacesDeleteFuture struct {
13675	azure.FutureAPI
13676	// Result returns the result of the asynchronous operation.
13677	// If the operation has not completed it will return an error.
13678	Result func(InterfacesClient) (autorest.Response, error)
13679}
13680
13681// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13682func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
13683	var azFuture azure.Future
13684	if err := json.Unmarshal(body, &azFuture); err != nil {
13685		return err
13686	}
13687	future.FutureAPI = &azFuture
13688	future.Result = future.result
13689	return nil
13690}
13691
13692// result is the default implementation for InterfacesDeleteFuture.Result.
13693func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
13694	var done bool
13695	done, err = future.DoneWithContext(context.Background(), client)
13696	if err != nil {
13697		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
13698		return
13699	}
13700	if !done {
13701		ar.Response = future.Response()
13702		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
13703		return
13704	}
13705	ar.Response = future.Response()
13706	return
13707}
13708
13709// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
13710// long-running operation.
13711type InterfacesGetEffectiveRouteTableFuture struct {
13712	azure.FutureAPI
13713	// Result returns the result of the asynchronous operation.
13714	// If the operation has not completed it will return an error.
13715	Result func(InterfacesClient) (EffectiveRouteListResult, error)
13716}
13717
13718// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13719func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
13720	var azFuture azure.Future
13721	if err := json.Unmarshal(body, &azFuture); err != nil {
13722		return err
13723	}
13724	future.FutureAPI = &azFuture
13725	future.Result = future.result
13726	return nil
13727}
13728
13729// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
13730func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
13731	var done bool
13732	done, err = future.DoneWithContext(context.Background(), client)
13733	if err != nil {
13734		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
13735		return
13736	}
13737	if !done {
13738		erlr.Response.Response = future.Response()
13739		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
13740		return
13741	}
13742	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13743	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
13744		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
13745		if err != nil {
13746			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
13747		}
13748	}
13749	return
13750}
13751
13752// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
13753// results of a long-running operation.
13754type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
13755	azure.FutureAPI
13756	// Result returns the result of the asynchronous operation.
13757	// If the operation has not completed it will return an error.
13758	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
13759}
13760
13761// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13762func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
13763	var azFuture azure.Future
13764	if err := json.Unmarshal(body, &azFuture); err != nil {
13765		return err
13766	}
13767	future.FutureAPI = &azFuture
13768	future.Result = future.result
13769	return nil
13770}
13771
13772// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
13773func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
13774	var done bool
13775	done, err = future.DoneWithContext(context.Background(), client)
13776	if err != nil {
13777		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
13778		return
13779	}
13780	if !done {
13781		ensglr.Response.Response = future.Response()
13782		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
13783		return
13784	}
13785	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13786	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
13787		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
13788		if err != nil {
13789			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
13790		}
13791	}
13792	return
13793}
13794
13795// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
13796// operation.
13797type InterfacesUpdateTagsFuture struct {
13798	azure.FutureAPI
13799	// Result returns the result of the asynchronous operation.
13800	// If the operation has not completed it will return an error.
13801	Result func(InterfacesClient) (Interface, error)
13802}
13803
13804// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13805func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13806	var azFuture azure.Future
13807	if err := json.Unmarshal(body, &azFuture); err != nil {
13808		return err
13809	}
13810	future.FutureAPI = &azFuture
13811	future.Result = future.result
13812	return nil
13813}
13814
13815// result is the default implementation for InterfacesUpdateTagsFuture.Result.
13816func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
13817	var done bool
13818	done, err = future.DoneWithContext(context.Background(), client)
13819	if err != nil {
13820		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13821		return
13822	}
13823	if !done {
13824		i.Response.Response = future.Response()
13825		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
13826		return
13827	}
13828	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13829	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
13830		i, err = client.UpdateTagsResponder(i.Response.Response)
13831		if err != nil {
13832			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
13833		}
13834	}
13835	return
13836}
13837
13838// InterfaceTapConfiguration tap configuration in a Network Interface
13839type InterfaceTapConfiguration struct {
13840	autorest.Response `json:"-"`
13841	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
13842	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
13843	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13844	Name *string `json:"name,omitempty"`
13845	// Etag - A unique read-only string that changes whenever the resource is updated.
13846	Etag *string `json:"etag,omitempty"`
13847	// Type - READ-ONLY; Sub Resource type.
13848	Type *string `json:"type,omitempty"`
13849	// ID - Resource ID.
13850	ID *string `json:"id,omitempty"`
13851}
13852
13853// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
13854func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
13855	objectMap := make(map[string]interface{})
13856	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
13857		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
13858	}
13859	if itc.Name != nil {
13860		objectMap["name"] = itc.Name
13861	}
13862	if itc.Etag != nil {
13863		objectMap["etag"] = itc.Etag
13864	}
13865	if itc.ID != nil {
13866		objectMap["id"] = itc.ID
13867	}
13868	return json.Marshal(objectMap)
13869}
13870
13871// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
13872func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
13873	var m map[string]*json.RawMessage
13874	err := json.Unmarshal(body, &m)
13875	if err != nil {
13876		return err
13877	}
13878	for k, v := range m {
13879		switch k {
13880		case "properties":
13881			if v != nil {
13882				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
13883				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
13884				if err != nil {
13885					return err
13886				}
13887				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
13888			}
13889		case "name":
13890			if v != nil {
13891				var name string
13892				err = json.Unmarshal(*v, &name)
13893				if err != nil {
13894					return err
13895				}
13896				itc.Name = &name
13897			}
13898		case "etag":
13899			if v != nil {
13900				var etag string
13901				err = json.Unmarshal(*v, &etag)
13902				if err != nil {
13903					return err
13904				}
13905				itc.Etag = &etag
13906			}
13907		case "type":
13908			if v != nil {
13909				var typeVar string
13910				err = json.Unmarshal(*v, &typeVar)
13911				if err != nil {
13912					return err
13913				}
13914				itc.Type = &typeVar
13915			}
13916		case "id":
13917			if v != nil {
13918				var ID string
13919				err = json.Unmarshal(*v, &ID)
13920				if err != nil {
13921					return err
13922				}
13923				itc.ID = &ID
13924			}
13925		}
13926	}
13927
13928	return nil
13929}
13930
13931// InterfaceTapConfigurationListResult response for list tap configurations API service call.
13932type InterfaceTapConfigurationListResult struct {
13933	autorest.Response `json:"-"`
13934	// Value - A list of tap configurations.
13935	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
13936	// NextLink - READ-ONLY; The URL to get the next set of results.
13937	NextLink *string `json:"nextLink,omitempty"`
13938}
13939
13940// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
13941func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
13942	objectMap := make(map[string]interface{})
13943	if itclr.Value != nil {
13944		objectMap["value"] = itclr.Value
13945	}
13946	return json.Marshal(objectMap)
13947}
13948
13949// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
13950// InterfaceTapConfiguration values.
13951type InterfaceTapConfigurationListResultIterator struct {
13952	i    int
13953	page InterfaceTapConfigurationListResultPage
13954}
13955
13956// NextWithContext advances to the next value.  If there was an error making
13957// the request the iterator does not advance and the error is returned.
13958func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13959	if tracing.IsEnabled() {
13960		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
13961		defer func() {
13962			sc := -1
13963			if iter.Response().Response.Response != nil {
13964				sc = iter.Response().Response.Response.StatusCode
13965			}
13966			tracing.EndSpan(ctx, sc, err)
13967		}()
13968	}
13969	iter.i++
13970	if iter.i < len(iter.page.Values()) {
13971		return nil
13972	}
13973	err = iter.page.NextWithContext(ctx)
13974	if err != nil {
13975		iter.i--
13976		return err
13977	}
13978	iter.i = 0
13979	return nil
13980}
13981
13982// Next advances to the next value.  If there was an error making
13983// the request the iterator does not advance and the error is returned.
13984// Deprecated: Use NextWithContext() instead.
13985func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
13986	return iter.NextWithContext(context.Background())
13987}
13988
13989// NotDone returns true if the enumeration should be started or is not yet complete.
13990func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
13991	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13992}
13993
13994// Response returns the raw server response from the last page request.
13995func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
13996	return iter.page.Response()
13997}
13998
13999// Value returns the current value or a zero-initialized value if the
14000// iterator has advanced beyond the end of the collection.
14001func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
14002	if !iter.page.NotDone() {
14003		return InterfaceTapConfiguration{}
14004	}
14005	return iter.page.Values()[iter.i]
14006}
14007
14008// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
14009func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
14010	return InterfaceTapConfigurationListResultIterator{page: page}
14011}
14012
14013// IsEmpty returns true if the ListResult contains no values.
14014func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
14015	return itclr.Value == nil || len(*itclr.Value) == 0
14016}
14017
14018// hasNextLink returns true if the NextLink is not empty.
14019func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
14020	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
14021}
14022
14023// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14024// It returns nil if no more results exist.
14025func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14026	if !itclr.hasNextLink() {
14027		return nil, nil
14028	}
14029	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14030		autorest.AsJSON(),
14031		autorest.AsGet(),
14032		autorest.WithBaseURL(to.String(itclr.NextLink)))
14033}
14034
14035// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
14036type InterfaceTapConfigurationListResultPage struct {
14037	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
14038	itclr InterfaceTapConfigurationListResult
14039}
14040
14041// NextWithContext advances to the next page of values.  If there was an error making
14042// the request the page does not advance and the error is returned.
14043func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14044	if tracing.IsEnabled() {
14045		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
14046		defer func() {
14047			sc := -1
14048			if page.Response().Response.Response != nil {
14049				sc = page.Response().Response.Response.StatusCode
14050			}
14051			tracing.EndSpan(ctx, sc, err)
14052		}()
14053	}
14054	for {
14055		next, err := page.fn(ctx, page.itclr)
14056		if err != nil {
14057			return err
14058		}
14059		page.itclr = next
14060		if !next.hasNextLink() || !next.IsEmpty() {
14061			break
14062		}
14063	}
14064	return nil
14065}
14066
14067// Next advances to the next page of values.  If there was an error making
14068// the request the page does not advance and the error is returned.
14069// Deprecated: Use NextWithContext() instead.
14070func (page *InterfaceTapConfigurationListResultPage) Next() error {
14071	return page.NextWithContext(context.Background())
14072}
14073
14074// NotDone returns true if the page enumeration should be started or is not yet complete.
14075func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
14076	return !page.itclr.IsEmpty()
14077}
14078
14079// Response returns the raw server response from the last page request.
14080func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
14081	return page.itclr
14082}
14083
14084// Values returns the slice of values for the current page or nil if there are no values.
14085func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
14086	if page.itclr.IsEmpty() {
14087		return nil
14088	}
14089	return *page.itclr.Value
14090}
14091
14092// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
14093func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
14094	return InterfaceTapConfigurationListResultPage{
14095		fn:    getNextPage,
14096		itclr: cur,
14097	}
14098}
14099
14100// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
14101type InterfaceTapConfigurationPropertiesFormat struct {
14102	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
14103	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
14104	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14105	ProvisioningState *string `json:"provisioningState,omitempty"`
14106}
14107
14108// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
14109func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14110	objectMap := make(map[string]interface{})
14111	if itcpf.VirtualNetworkTap != nil {
14112		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
14113	}
14114	return json.Marshal(objectMap)
14115}
14116
14117// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14118// of a long-running operation.
14119type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
14120	azure.FutureAPI
14121	// Result returns the result of the asynchronous operation.
14122	// If the operation has not completed it will return an error.
14123	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
14124}
14125
14126// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14127func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14128	var azFuture azure.Future
14129	if err := json.Unmarshal(body, &azFuture); err != nil {
14130		return err
14131	}
14132	future.FutureAPI = &azFuture
14133	future.Result = future.result
14134	return nil
14135}
14136
14137// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
14138func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
14139	var done bool
14140	done, err = future.DoneWithContext(context.Background(), client)
14141	if err != nil {
14142		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14143		return
14144	}
14145	if !done {
14146		itc.Response.Response = future.Response()
14147		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
14148		return
14149	}
14150	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14151	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
14152		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
14153		if err != nil {
14154			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
14155		}
14156	}
14157	return
14158}
14159
14160// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
14161// long-running operation.
14162type InterfaceTapConfigurationsDeleteFuture struct {
14163	azure.FutureAPI
14164	// Result returns the result of the asynchronous operation.
14165	// If the operation has not completed it will return an error.
14166	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
14167}
14168
14169// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14170func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
14171	var azFuture azure.Future
14172	if err := json.Unmarshal(body, &azFuture); err != nil {
14173		return err
14174	}
14175	future.FutureAPI = &azFuture
14176	future.Result = future.result
14177	return nil
14178}
14179
14180// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
14181func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
14182	var done bool
14183	done, err = future.DoneWithContext(context.Background(), client)
14184	if err != nil {
14185		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
14186		return
14187	}
14188	if !done {
14189		ar.Response = future.Response()
14190		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
14191		return
14192	}
14193	ar.Response = future.Response()
14194	return
14195}
14196
14197// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
14198type IPAddressAvailabilityResult struct {
14199	autorest.Response `json:"-"`
14200	// Available - Private IP address availability.
14201	Available *bool `json:"available,omitempty"`
14202	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
14203	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
14204}
14205
14206// IPConfiguration IP configuration
14207type IPConfiguration struct {
14208	// IPConfigurationPropertiesFormat - Properties of the IP configuration
14209	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
14210	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14211	Name *string `json:"name,omitempty"`
14212	// Etag - A unique read-only string that changes whenever the resource is updated.
14213	Etag *string `json:"etag,omitempty"`
14214	// ID - Resource ID.
14215	ID *string `json:"id,omitempty"`
14216}
14217
14218// MarshalJSON is the custom marshaler for IPConfiguration.
14219func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
14220	objectMap := make(map[string]interface{})
14221	if ic.IPConfigurationPropertiesFormat != nil {
14222		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
14223	}
14224	if ic.Name != nil {
14225		objectMap["name"] = ic.Name
14226	}
14227	if ic.Etag != nil {
14228		objectMap["etag"] = ic.Etag
14229	}
14230	if ic.ID != nil {
14231		objectMap["id"] = ic.ID
14232	}
14233	return json.Marshal(objectMap)
14234}
14235
14236// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
14237func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
14238	var m map[string]*json.RawMessage
14239	err := json.Unmarshal(body, &m)
14240	if err != nil {
14241		return err
14242	}
14243	for k, v := range m {
14244		switch k {
14245		case "properties":
14246			if v != nil {
14247				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
14248				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
14249				if err != nil {
14250					return err
14251				}
14252				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
14253			}
14254		case "name":
14255			if v != nil {
14256				var name string
14257				err = json.Unmarshal(*v, &name)
14258				if err != nil {
14259					return err
14260				}
14261				ic.Name = &name
14262			}
14263		case "etag":
14264			if v != nil {
14265				var etag string
14266				err = json.Unmarshal(*v, &etag)
14267				if err != nil {
14268					return err
14269				}
14270				ic.Etag = &etag
14271			}
14272		case "id":
14273			if v != nil {
14274				var ID string
14275				err = json.Unmarshal(*v, &ID)
14276				if err != nil {
14277					return err
14278				}
14279				ic.ID = &ID
14280			}
14281		}
14282	}
14283
14284	return nil
14285}
14286
14287// IPConfigurationProfile IP configuration profile child resource.
14288type IPConfigurationProfile struct {
14289	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
14290	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
14291	// Name - The name of the resource. This name can be used to access the resource.
14292	Name *string `json:"name,omitempty"`
14293	// Type - READ-ONLY; Sub Resource type.
14294	Type *string `json:"type,omitempty"`
14295	// Etag - A unique read-only string that changes whenever the resource is updated.
14296	Etag *string `json:"etag,omitempty"`
14297	// ID - Resource ID.
14298	ID *string `json:"id,omitempty"`
14299}
14300
14301// MarshalJSON is the custom marshaler for IPConfigurationProfile.
14302func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
14303	objectMap := make(map[string]interface{})
14304	if icp.IPConfigurationProfilePropertiesFormat != nil {
14305		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
14306	}
14307	if icp.Name != nil {
14308		objectMap["name"] = icp.Name
14309	}
14310	if icp.Etag != nil {
14311		objectMap["etag"] = icp.Etag
14312	}
14313	if icp.ID != nil {
14314		objectMap["id"] = icp.ID
14315	}
14316	return json.Marshal(objectMap)
14317}
14318
14319// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
14320func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
14321	var m map[string]*json.RawMessage
14322	err := json.Unmarshal(body, &m)
14323	if err != nil {
14324		return err
14325	}
14326	for k, v := range m {
14327		switch k {
14328		case "properties":
14329			if v != nil {
14330				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14331				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14332				if err != nil {
14333					return err
14334				}
14335				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14336			}
14337		case "name":
14338			if v != nil {
14339				var name string
14340				err = json.Unmarshal(*v, &name)
14341				if err != nil {
14342					return err
14343				}
14344				icp.Name = &name
14345			}
14346		case "type":
14347			if v != nil {
14348				var typeVar string
14349				err = json.Unmarshal(*v, &typeVar)
14350				if err != nil {
14351					return err
14352				}
14353				icp.Type = &typeVar
14354			}
14355		case "etag":
14356			if v != nil {
14357				var etag string
14358				err = json.Unmarshal(*v, &etag)
14359				if err != nil {
14360					return err
14361				}
14362				icp.Etag = &etag
14363			}
14364		case "id":
14365			if v != nil {
14366				var ID string
14367				err = json.Unmarshal(*v, &ID)
14368				if err != nil {
14369					return err
14370				}
14371				icp.ID = &ID
14372			}
14373		}
14374	}
14375
14376	return nil
14377}
14378
14379// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
14380type IPConfigurationProfilePropertiesFormat struct {
14381	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
14382	Subnet *Subnet `json:"subnet,omitempty"`
14383	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
14384	ProvisioningState *string `json:"provisioningState,omitempty"`
14385}
14386
14387// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
14388func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
14389	objectMap := make(map[string]interface{})
14390	if icppf.Subnet != nil {
14391		objectMap["subnet"] = icppf.Subnet
14392	}
14393	return json.Marshal(objectMap)
14394}
14395
14396// IPConfigurationPropertiesFormat properties of IP configuration.
14397type IPConfigurationPropertiesFormat struct {
14398	// PrivateIPAddress - The private IP address of the IP configuration.
14399	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14400	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14401	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14402	// Subnet - The reference of the subnet resource.
14403	Subnet *Subnet `json:"subnet,omitempty"`
14404	// PublicIPAddress - The reference of the public IP resource.
14405	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14406	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14407	ProvisioningState *string `json:"provisioningState,omitempty"`
14408}
14409
14410// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
14411type IpsecPolicy struct {
14412	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
14413	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
14414	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
14415	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
14416	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
14417	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
14418	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
14419	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
14420	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
14421	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
14422	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
14423	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
14424	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
14425	DhGroup DhGroup `json:"dhGroup,omitempty"`
14426	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
14427	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
14428}
14429
14430// IPTag contains the IpTag associated with the object
14431type IPTag struct {
14432	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
14433	IPTagType *string `json:"ipTagType,omitempty"`
14434	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
14435	Tag *string `json:"tag,omitempty"`
14436}
14437
14438// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
14439type Ipv6ExpressRouteCircuitPeeringConfig struct {
14440	// PrimaryPeerAddressPrefix - The primary address prefix.
14441	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14442	// SecondaryPeerAddressPrefix - The secondary address prefix.
14443	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14444	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14445	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14446	// RouteFilter - The reference of the RouteFilter resource.
14447	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
14448	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
14449	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
14450}
14451
14452// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
14453// the next set of results.
14454type ListHubVirtualNetworkConnectionsResult struct {
14455	autorest.Response `json:"-"`
14456	// Value - List of HubVirtualNetworkConnections.
14457	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
14458	// NextLink - URL to get the next set of operation list results if there are any.
14459	NextLink *string `json:"nextLink,omitempty"`
14460}
14461
14462// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
14463// HubVirtualNetworkConnection values.
14464type ListHubVirtualNetworkConnectionsResultIterator struct {
14465	i    int
14466	page ListHubVirtualNetworkConnectionsResultPage
14467}
14468
14469// NextWithContext advances to the next value.  If there was an error making
14470// the request the iterator does not advance and the error is returned.
14471func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14472	if tracing.IsEnabled() {
14473		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
14474		defer func() {
14475			sc := -1
14476			if iter.Response().Response.Response != nil {
14477				sc = iter.Response().Response.Response.StatusCode
14478			}
14479			tracing.EndSpan(ctx, sc, err)
14480		}()
14481	}
14482	iter.i++
14483	if iter.i < len(iter.page.Values()) {
14484		return nil
14485	}
14486	err = iter.page.NextWithContext(ctx)
14487	if err != nil {
14488		iter.i--
14489		return err
14490	}
14491	iter.i = 0
14492	return nil
14493}
14494
14495// Next advances to the next value.  If there was an error making
14496// the request the iterator does not advance and the error is returned.
14497// Deprecated: Use NextWithContext() instead.
14498func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
14499	return iter.NextWithContext(context.Background())
14500}
14501
14502// NotDone returns true if the enumeration should be started or is not yet complete.
14503func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
14504	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14505}
14506
14507// Response returns the raw server response from the last page request.
14508func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
14509	return iter.page.Response()
14510}
14511
14512// Value returns the current value or a zero-initialized value if the
14513// iterator has advanced beyond the end of the collection.
14514func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
14515	if !iter.page.NotDone() {
14516		return HubVirtualNetworkConnection{}
14517	}
14518	return iter.page.Values()[iter.i]
14519}
14520
14521// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
14522func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
14523	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
14524}
14525
14526// IsEmpty returns true if the ListResult contains no values.
14527func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
14528	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
14529}
14530
14531// hasNextLink returns true if the NextLink is not empty.
14532func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
14533	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
14534}
14535
14536// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
14537// It returns nil if no more results exist.
14538func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14539	if !lhvncr.hasNextLink() {
14540		return nil, nil
14541	}
14542	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14543		autorest.AsJSON(),
14544		autorest.AsGet(),
14545		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
14546}
14547
14548// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
14549type ListHubVirtualNetworkConnectionsResultPage struct {
14550	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
14551	lhvncr ListHubVirtualNetworkConnectionsResult
14552}
14553
14554// NextWithContext advances to the next page of values.  If there was an error making
14555// the request the page does not advance and the error is returned.
14556func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14557	if tracing.IsEnabled() {
14558		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
14559		defer func() {
14560			sc := -1
14561			if page.Response().Response.Response != nil {
14562				sc = page.Response().Response.Response.StatusCode
14563			}
14564			tracing.EndSpan(ctx, sc, err)
14565		}()
14566	}
14567	for {
14568		next, err := page.fn(ctx, page.lhvncr)
14569		if err != nil {
14570			return err
14571		}
14572		page.lhvncr = next
14573		if !next.hasNextLink() || !next.IsEmpty() {
14574			break
14575		}
14576	}
14577	return nil
14578}
14579
14580// Next advances to the next page of values.  If there was an error making
14581// the request the page does not advance and the error is returned.
14582// Deprecated: Use NextWithContext() instead.
14583func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
14584	return page.NextWithContext(context.Background())
14585}
14586
14587// NotDone returns true if the page enumeration should be started or is not yet complete.
14588func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
14589	return !page.lhvncr.IsEmpty()
14590}
14591
14592// Response returns the raw server response from the last page request.
14593func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
14594	return page.lhvncr
14595}
14596
14597// Values returns the slice of values for the current page or nil if there are no values.
14598func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
14599	if page.lhvncr.IsEmpty() {
14600		return nil
14601	}
14602	return *page.lhvncr.Value
14603}
14604
14605// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
14606func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
14607	return ListHubVirtualNetworkConnectionsResultPage{
14608		fn:     getNextPage,
14609		lhvncr: cur,
14610	}
14611}
14612
14613// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
14614// P2SVpnGateways and a URL nextLink to get the next set of results.
14615type ListP2SVpnGatewaysResult struct {
14616	autorest.Response `json:"-"`
14617	// Value - List of P2SVpnGateways.
14618	Value *[]P2SVpnGateway `json:"value,omitempty"`
14619	// NextLink - URL to get the next set of operation list results if there are any.
14620	NextLink *string `json:"nextLink,omitempty"`
14621}
14622
14623// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
14624type ListP2SVpnGatewaysResultIterator struct {
14625	i    int
14626	page ListP2SVpnGatewaysResultPage
14627}
14628
14629// NextWithContext advances to the next value.  If there was an error making
14630// the request the iterator does not advance and the error is returned.
14631func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
14632	if tracing.IsEnabled() {
14633		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
14634		defer func() {
14635			sc := -1
14636			if iter.Response().Response.Response != nil {
14637				sc = iter.Response().Response.Response.StatusCode
14638			}
14639			tracing.EndSpan(ctx, sc, err)
14640		}()
14641	}
14642	iter.i++
14643	if iter.i < len(iter.page.Values()) {
14644		return nil
14645	}
14646	err = iter.page.NextWithContext(ctx)
14647	if err != nil {
14648		iter.i--
14649		return err
14650	}
14651	iter.i = 0
14652	return nil
14653}
14654
14655// Next advances to the next value.  If there was an error making
14656// the request the iterator does not advance and the error is returned.
14657// Deprecated: Use NextWithContext() instead.
14658func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
14659	return iter.NextWithContext(context.Background())
14660}
14661
14662// NotDone returns true if the enumeration should be started or is not yet complete.
14663func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
14664	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14665}
14666
14667// Response returns the raw server response from the last page request.
14668func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
14669	return iter.page.Response()
14670}
14671
14672// Value returns the current value or a zero-initialized value if the
14673// iterator has advanced beyond the end of the collection.
14674func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
14675	if !iter.page.NotDone() {
14676		return P2SVpnGateway{}
14677	}
14678	return iter.page.Values()[iter.i]
14679}
14680
14681// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
14682func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
14683	return ListP2SVpnGatewaysResultIterator{page: page}
14684}
14685
14686// IsEmpty returns true if the ListResult contains no values.
14687func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
14688	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
14689}
14690
14691// hasNextLink returns true if the NextLink is not empty.
14692func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
14693	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
14694}
14695
14696// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
14697// It returns nil if no more results exist.
14698func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
14699	if !lpvgr.hasNextLink() {
14700		return nil, nil
14701	}
14702	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14703		autorest.AsJSON(),
14704		autorest.AsGet(),
14705		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
14706}
14707
14708// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
14709type ListP2SVpnGatewaysResultPage struct {
14710	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
14711	lpvgr ListP2SVpnGatewaysResult
14712}
14713
14714// NextWithContext advances to the next page of values.  If there was an error making
14715// the request the page does not advance and the error is returned.
14716func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
14717	if tracing.IsEnabled() {
14718		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
14719		defer func() {
14720			sc := -1
14721			if page.Response().Response.Response != nil {
14722				sc = page.Response().Response.Response.StatusCode
14723			}
14724			tracing.EndSpan(ctx, sc, err)
14725		}()
14726	}
14727	for {
14728		next, err := page.fn(ctx, page.lpvgr)
14729		if err != nil {
14730			return err
14731		}
14732		page.lpvgr = next
14733		if !next.hasNextLink() || !next.IsEmpty() {
14734			break
14735		}
14736	}
14737	return nil
14738}
14739
14740// Next advances to the next page of values.  If there was an error making
14741// the request the page does not advance and the error is returned.
14742// Deprecated: Use NextWithContext() instead.
14743func (page *ListP2SVpnGatewaysResultPage) Next() error {
14744	return page.NextWithContext(context.Background())
14745}
14746
14747// NotDone returns true if the page enumeration should be started or is not yet complete.
14748func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
14749	return !page.lpvgr.IsEmpty()
14750}
14751
14752// Response returns the raw server response from the last page request.
14753func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
14754	return page.lpvgr
14755}
14756
14757// Values returns the slice of values for the current page or nil if there are no values.
14758func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
14759	if page.lpvgr.IsEmpty() {
14760		return nil
14761	}
14762	return *page.lpvgr.Value
14763}
14764
14765// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
14766func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
14767	return ListP2SVpnGatewaysResultPage{
14768		fn:    getNextPage,
14769		lpvgr: cur,
14770	}
14771}
14772
14773// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
14774// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
14775// the next set of results.
14776type ListP2SVpnServerConfigurationsResult struct {
14777	autorest.Response `json:"-"`
14778	// Value - List of P2SVpnServerConfigurations.
14779	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
14780	// NextLink - URL to get the next set of operation list results if there are any.
14781	NextLink *string `json:"nextLink,omitempty"`
14782}
14783
14784// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
14785// P2SVpnServerConfiguration values.
14786type ListP2SVpnServerConfigurationsResultIterator struct {
14787	i    int
14788	page ListP2SVpnServerConfigurationsResultPage
14789}
14790
14791// NextWithContext advances to the next value.  If there was an error making
14792// the request the iterator does not advance and the error is returned.
14793func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
14794	if tracing.IsEnabled() {
14795		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
14796		defer func() {
14797			sc := -1
14798			if iter.Response().Response.Response != nil {
14799				sc = iter.Response().Response.Response.StatusCode
14800			}
14801			tracing.EndSpan(ctx, sc, err)
14802		}()
14803	}
14804	iter.i++
14805	if iter.i < len(iter.page.Values()) {
14806		return nil
14807	}
14808	err = iter.page.NextWithContext(ctx)
14809	if err != nil {
14810		iter.i--
14811		return err
14812	}
14813	iter.i = 0
14814	return nil
14815}
14816
14817// Next advances to the next value.  If there was an error making
14818// the request the iterator does not advance and the error is returned.
14819// Deprecated: Use NextWithContext() instead.
14820func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
14821	return iter.NextWithContext(context.Background())
14822}
14823
14824// NotDone returns true if the enumeration should be started or is not yet complete.
14825func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
14826	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14827}
14828
14829// Response returns the raw server response from the last page request.
14830func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
14831	return iter.page.Response()
14832}
14833
14834// Value returns the current value or a zero-initialized value if the
14835// iterator has advanced beyond the end of the collection.
14836func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
14837	if !iter.page.NotDone() {
14838		return P2SVpnServerConfiguration{}
14839	}
14840	return iter.page.Values()[iter.i]
14841}
14842
14843// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
14844func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
14845	return ListP2SVpnServerConfigurationsResultIterator{page: page}
14846}
14847
14848// IsEmpty returns true if the ListResult contains no values.
14849func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
14850	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
14851}
14852
14853// hasNextLink returns true if the NextLink is not empty.
14854func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
14855	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
14856}
14857
14858// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
14859// It returns nil if no more results exist.
14860func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
14861	if !lpvscr.hasNextLink() {
14862		return nil, nil
14863	}
14864	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14865		autorest.AsJSON(),
14866		autorest.AsGet(),
14867		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
14868}
14869
14870// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
14871type ListP2SVpnServerConfigurationsResultPage struct {
14872	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
14873	lpvscr ListP2SVpnServerConfigurationsResult
14874}
14875
14876// NextWithContext advances to the next page of values.  If there was an error making
14877// the request the page does not advance and the error is returned.
14878func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
14879	if tracing.IsEnabled() {
14880		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
14881		defer func() {
14882			sc := -1
14883			if page.Response().Response.Response != nil {
14884				sc = page.Response().Response.Response.StatusCode
14885			}
14886			tracing.EndSpan(ctx, sc, err)
14887		}()
14888	}
14889	for {
14890		next, err := page.fn(ctx, page.lpvscr)
14891		if err != nil {
14892			return err
14893		}
14894		page.lpvscr = next
14895		if !next.hasNextLink() || !next.IsEmpty() {
14896			break
14897		}
14898	}
14899	return nil
14900}
14901
14902// Next advances to the next page of values.  If there was an error making
14903// the request the page does not advance and the error is returned.
14904// Deprecated: Use NextWithContext() instead.
14905func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
14906	return page.NextWithContext(context.Background())
14907}
14908
14909// NotDone returns true if the page enumeration should be started or is not yet complete.
14910func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
14911	return !page.lpvscr.IsEmpty()
14912}
14913
14914// Response returns the raw server response from the last page request.
14915func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
14916	return page.lpvscr
14917}
14918
14919// Values returns the slice of values for the current page or nil if there are no values.
14920func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
14921	if page.lpvscr.IsEmpty() {
14922		return nil
14923	}
14924	return *page.lpvscr.Value
14925}
14926
14927// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
14928func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
14929	return ListP2SVpnServerConfigurationsResultPage{
14930		fn:     getNextPage,
14931		lpvscr: cur,
14932	}
14933}
14934
14935// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
14936// URL nextLink to get the next set of results.
14937type ListVirtualHubsResult struct {
14938	autorest.Response `json:"-"`
14939	// Value - List of VirtualHubs.
14940	Value *[]VirtualHub `json:"value,omitempty"`
14941	// NextLink - URL to get the next set of operation list results if there are any.
14942	NextLink *string `json:"nextLink,omitempty"`
14943}
14944
14945// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
14946type ListVirtualHubsResultIterator struct {
14947	i    int
14948	page ListVirtualHubsResultPage
14949}
14950
14951// NextWithContext advances to the next value.  If there was an error making
14952// the request the iterator does not advance and the error is returned.
14953func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
14954	if tracing.IsEnabled() {
14955		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
14956		defer func() {
14957			sc := -1
14958			if iter.Response().Response.Response != nil {
14959				sc = iter.Response().Response.Response.StatusCode
14960			}
14961			tracing.EndSpan(ctx, sc, err)
14962		}()
14963	}
14964	iter.i++
14965	if iter.i < len(iter.page.Values()) {
14966		return nil
14967	}
14968	err = iter.page.NextWithContext(ctx)
14969	if err != nil {
14970		iter.i--
14971		return err
14972	}
14973	iter.i = 0
14974	return nil
14975}
14976
14977// Next advances to the next value.  If there was an error making
14978// the request the iterator does not advance and the error is returned.
14979// Deprecated: Use NextWithContext() instead.
14980func (iter *ListVirtualHubsResultIterator) Next() error {
14981	return iter.NextWithContext(context.Background())
14982}
14983
14984// NotDone returns true if the enumeration should be started or is not yet complete.
14985func (iter ListVirtualHubsResultIterator) NotDone() bool {
14986	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14987}
14988
14989// Response returns the raw server response from the last page request.
14990func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
14991	return iter.page.Response()
14992}
14993
14994// Value returns the current value or a zero-initialized value if the
14995// iterator has advanced beyond the end of the collection.
14996func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
14997	if !iter.page.NotDone() {
14998		return VirtualHub{}
14999	}
15000	return iter.page.Values()[iter.i]
15001}
15002
15003// Creates a new instance of the ListVirtualHubsResultIterator type.
15004func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
15005	return ListVirtualHubsResultIterator{page: page}
15006}
15007
15008// IsEmpty returns true if the ListResult contains no values.
15009func (lvhr ListVirtualHubsResult) IsEmpty() bool {
15010	return lvhr.Value == nil || len(*lvhr.Value) == 0
15011}
15012
15013// hasNextLink returns true if the NextLink is not empty.
15014func (lvhr ListVirtualHubsResult) hasNextLink() bool {
15015	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
15016}
15017
15018// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
15019// It returns nil if no more results exist.
15020func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
15021	if !lvhr.hasNextLink() {
15022		return nil, nil
15023	}
15024	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15025		autorest.AsJSON(),
15026		autorest.AsGet(),
15027		autorest.WithBaseURL(to.String(lvhr.NextLink)))
15028}
15029
15030// ListVirtualHubsResultPage contains a page of VirtualHub values.
15031type ListVirtualHubsResultPage struct {
15032	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
15033	lvhr ListVirtualHubsResult
15034}
15035
15036// NextWithContext advances to the next page of values.  If there was an error making
15037// the request the page does not advance and the error is returned.
15038func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
15039	if tracing.IsEnabled() {
15040		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
15041		defer func() {
15042			sc := -1
15043			if page.Response().Response.Response != nil {
15044				sc = page.Response().Response.Response.StatusCode
15045			}
15046			tracing.EndSpan(ctx, sc, err)
15047		}()
15048	}
15049	for {
15050		next, err := page.fn(ctx, page.lvhr)
15051		if err != nil {
15052			return err
15053		}
15054		page.lvhr = next
15055		if !next.hasNextLink() || !next.IsEmpty() {
15056			break
15057		}
15058	}
15059	return nil
15060}
15061
15062// Next advances to the next page of values.  If there was an error making
15063// the request the page does not advance and the error is returned.
15064// Deprecated: Use NextWithContext() instead.
15065func (page *ListVirtualHubsResultPage) Next() error {
15066	return page.NextWithContext(context.Background())
15067}
15068
15069// NotDone returns true if the page enumeration should be started or is not yet complete.
15070func (page ListVirtualHubsResultPage) NotDone() bool {
15071	return !page.lvhr.IsEmpty()
15072}
15073
15074// Response returns the raw server response from the last page request.
15075func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
15076	return page.lvhr
15077}
15078
15079// Values returns the slice of values for the current page or nil if there are no values.
15080func (page ListVirtualHubsResultPage) Values() []VirtualHub {
15081	if page.lvhr.IsEmpty() {
15082		return nil
15083	}
15084	return *page.lvhr.Value
15085}
15086
15087// Creates a new instance of the ListVirtualHubsResultPage type.
15088func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
15089	return ListVirtualHubsResultPage{
15090		fn:   getNextPage,
15091		lvhr: cur,
15092	}
15093}
15094
15095// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
15096// URL nextLink to get the next set of results.
15097type ListVirtualWANsResult struct {
15098	autorest.Response `json:"-"`
15099	// Value - List of VirtualWANs.
15100	Value *[]VirtualWAN `json:"value,omitempty"`
15101	// NextLink - URL to get the next set of operation list results if there are any.
15102	NextLink *string `json:"nextLink,omitempty"`
15103}
15104
15105// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
15106type ListVirtualWANsResultIterator struct {
15107	i    int
15108	page ListVirtualWANsResultPage
15109}
15110
15111// NextWithContext advances to the next value.  If there was an error making
15112// the request the iterator does not advance and the error is returned.
15113func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
15114	if tracing.IsEnabled() {
15115		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
15116		defer func() {
15117			sc := -1
15118			if iter.Response().Response.Response != nil {
15119				sc = iter.Response().Response.Response.StatusCode
15120			}
15121			tracing.EndSpan(ctx, sc, err)
15122		}()
15123	}
15124	iter.i++
15125	if iter.i < len(iter.page.Values()) {
15126		return nil
15127	}
15128	err = iter.page.NextWithContext(ctx)
15129	if err != nil {
15130		iter.i--
15131		return err
15132	}
15133	iter.i = 0
15134	return nil
15135}
15136
15137// Next advances to the next value.  If there was an error making
15138// the request the iterator does not advance and the error is returned.
15139// Deprecated: Use NextWithContext() instead.
15140func (iter *ListVirtualWANsResultIterator) Next() error {
15141	return iter.NextWithContext(context.Background())
15142}
15143
15144// NotDone returns true if the enumeration should be started or is not yet complete.
15145func (iter ListVirtualWANsResultIterator) NotDone() bool {
15146	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15147}
15148
15149// Response returns the raw server response from the last page request.
15150func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
15151	return iter.page.Response()
15152}
15153
15154// Value returns the current value or a zero-initialized value if the
15155// iterator has advanced beyond the end of the collection.
15156func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
15157	if !iter.page.NotDone() {
15158		return VirtualWAN{}
15159	}
15160	return iter.page.Values()[iter.i]
15161}
15162
15163// Creates a new instance of the ListVirtualWANsResultIterator type.
15164func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
15165	return ListVirtualWANsResultIterator{page: page}
15166}
15167
15168// IsEmpty returns true if the ListResult contains no values.
15169func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
15170	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
15171}
15172
15173// hasNextLink returns true if the NextLink is not empty.
15174func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
15175	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
15176}
15177
15178// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
15179// It returns nil if no more results exist.
15180func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
15181	if !lvwnr.hasNextLink() {
15182		return nil, nil
15183	}
15184	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15185		autorest.AsJSON(),
15186		autorest.AsGet(),
15187		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
15188}
15189
15190// ListVirtualWANsResultPage contains a page of VirtualWAN values.
15191type ListVirtualWANsResultPage struct {
15192	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
15193	lvwnr ListVirtualWANsResult
15194}
15195
15196// NextWithContext advances to the next page of values.  If there was an error making
15197// the request the page does not advance and the error is returned.
15198func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
15199	if tracing.IsEnabled() {
15200		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
15201		defer func() {
15202			sc := -1
15203			if page.Response().Response.Response != nil {
15204				sc = page.Response().Response.Response.StatusCode
15205			}
15206			tracing.EndSpan(ctx, sc, err)
15207		}()
15208	}
15209	for {
15210		next, err := page.fn(ctx, page.lvwnr)
15211		if err != nil {
15212			return err
15213		}
15214		page.lvwnr = next
15215		if !next.hasNextLink() || !next.IsEmpty() {
15216			break
15217		}
15218	}
15219	return nil
15220}
15221
15222// Next advances to the next page of values.  If there was an error making
15223// the request the page does not advance and the error is returned.
15224// Deprecated: Use NextWithContext() instead.
15225func (page *ListVirtualWANsResultPage) Next() error {
15226	return page.NextWithContext(context.Background())
15227}
15228
15229// NotDone returns true if the page enumeration should be started or is not yet complete.
15230func (page ListVirtualWANsResultPage) NotDone() bool {
15231	return !page.lvwnr.IsEmpty()
15232}
15233
15234// Response returns the raw server response from the last page request.
15235func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
15236	return page.lvwnr
15237}
15238
15239// Values returns the slice of values for the current page or nil if there are no values.
15240func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
15241	if page.lvwnr.IsEmpty() {
15242		return nil
15243	}
15244	return *page.lvwnr.Value
15245}
15246
15247// Creates a new instance of the ListVirtualWANsResultPage type.
15248func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
15249	return ListVirtualWANsResultPage{
15250		fn:    getNextPage,
15251		lvwnr: cur,
15252	}
15253}
15254
15255// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
15256// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
15257type ListVpnConnectionsResult struct {
15258	autorest.Response `json:"-"`
15259	// Value - List of Vpn Connections.
15260	Value *[]VpnConnection `json:"value,omitempty"`
15261	// NextLink - URL to get the next set of operation list results if there are any.
15262	NextLink *string `json:"nextLink,omitempty"`
15263}
15264
15265// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
15266type ListVpnConnectionsResultIterator struct {
15267	i    int
15268	page ListVpnConnectionsResultPage
15269}
15270
15271// NextWithContext advances to the next value.  If there was an error making
15272// the request the iterator does not advance and the error is returned.
15273func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15274	if tracing.IsEnabled() {
15275		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
15276		defer func() {
15277			sc := -1
15278			if iter.Response().Response.Response != nil {
15279				sc = iter.Response().Response.Response.StatusCode
15280			}
15281			tracing.EndSpan(ctx, sc, err)
15282		}()
15283	}
15284	iter.i++
15285	if iter.i < len(iter.page.Values()) {
15286		return nil
15287	}
15288	err = iter.page.NextWithContext(ctx)
15289	if err != nil {
15290		iter.i--
15291		return err
15292	}
15293	iter.i = 0
15294	return nil
15295}
15296
15297// Next advances to the next value.  If there was an error making
15298// the request the iterator does not advance and the error is returned.
15299// Deprecated: Use NextWithContext() instead.
15300func (iter *ListVpnConnectionsResultIterator) Next() error {
15301	return iter.NextWithContext(context.Background())
15302}
15303
15304// NotDone returns true if the enumeration should be started or is not yet complete.
15305func (iter ListVpnConnectionsResultIterator) NotDone() bool {
15306	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15307}
15308
15309// Response returns the raw server response from the last page request.
15310func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
15311	return iter.page.Response()
15312}
15313
15314// Value returns the current value or a zero-initialized value if the
15315// iterator has advanced beyond the end of the collection.
15316func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
15317	if !iter.page.NotDone() {
15318		return VpnConnection{}
15319	}
15320	return iter.page.Values()[iter.i]
15321}
15322
15323// Creates a new instance of the ListVpnConnectionsResultIterator type.
15324func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
15325	return ListVpnConnectionsResultIterator{page: page}
15326}
15327
15328// IsEmpty returns true if the ListResult contains no values.
15329func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
15330	return lvcr.Value == nil || len(*lvcr.Value) == 0
15331}
15332
15333// hasNextLink returns true if the NextLink is not empty.
15334func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15335	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15336}
15337
15338// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15339// It returns nil if no more results exist.
15340func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15341	if !lvcr.hasNextLink() {
15342		return nil, nil
15343	}
15344	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15345		autorest.AsJSON(),
15346		autorest.AsGet(),
15347		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15348}
15349
15350// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15351type ListVpnConnectionsResultPage struct {
15352	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15353	lvcr ListVpnConnectionsResult
15354}
15355
15356// NextWithContext advances to the next page of values.  If there was an error making
15357// the request the page does not advance and the error is returned.
15358func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15359	if tracing.IsEnabled() {
15360		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
15361		defer func() {
15362			sc := -1
15363			if page.Response().Response.Response != nil {
15364				sc = page.Response().Response.Response.StatusCode
15365			}
15366			tracing.EndSpan(ctx, sc, err)
15367		}()
15368	}
15369	for {
15370		next, err := page.fn(ctx, page.lvcr)
15371		if err != nil {
15372			return err
15373		}
15374		page.lvcr = next
15375		if !next.hasNextLink() || !next.IsEmpty() {
15376			break
15377		}
15378	}
15379	return nil
15380}
15381
15382// Next advances to the next page of values.  If there was an error making
15383// the request the page does not advance and the error is returned.
15384// Deprecated: Use NextWithContext() instead.
15385func (page *ListVpnConnectionsResultPage) Next() error {
15386	return page.NextWithContext(context.Background())
15387}
15388
15389// NotDone returns true if the page enumeration should be started or is not yet complete.
15390func (page ListVpnConnectionsResultPage) NotDone() bool {
15391	return !page.lvcr.IsEmpty()
15392}
15393
15394// Response returns the raw server response from the last page request.
15395func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
15396	return page.lvcr
15397}
15398
15399// Values returns the slice of values for the current page or nil if there are no values.
15400func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
15401	if page.lvcr.IsEmpty() {
15402		return nil
15403	}
15404	return *page.lvcr.Value
15405}
15406
15407// Creates a new instance of the ListVpnConnectionsResultPage type.
15408func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
15409	return ListVpnConnectionsResultPage{
15410		fn:   getNextPage,
15411		lvcr: cur,
15412	}
15413}
15414
15415// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
15416// URL nextLink to get the next set of results.
15417type ListVpnGatewaysResult struct {
15418	autorest.Response `json:"-"`
15419	// Value - List of VpnGateways.
15420	Value *[]VpnGateway `json:"value,omitempty"`
15421	// NextLink - URL to get the next set of operation list results if there are any.
15422	NextLink *string `json:"nextLink,omitempty"`
15423}
15424
15425// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
15426type ListVpnGatewaysResultIterator struct {
15427	i    int
15428	page ListVpnGatewaysResultPage
15429}
15430
15431// NextWithContext advances to the next value.  If there was an error making
15432// the request the iterator does not advance and the error is returned.
15433func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15434	if tracing.IsEnabled() {
15435		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
15436		defer func() {
15437			sc := -1
15438			if iter.Response().Response.Response != nil {
15439				sc = iter.Response().Response.Response.StatusCode
15440			}
15441			tracing.EndSpan(ctx, sc, err)
15442		}()
15443	}
15444	iter.i++
15445	if iter.i < len(iter.page.Values()) {
15446		return nil
15447	}
15448	err = iter.page.NextWithContext(ctx)
15449	if err != nil {
15450		iter.i--
15451		return err
15452	}
15453	iter.i = 0
15454	return nil
15455}
15456
15457// Next advances to the next value.  If there was an error making
15458// the request the iterator does not advance and the error is returned.
15459// Deprecated: Use NextWithContext() instead.
15460func (iter *ListVpnGatewaysResultIterator) Next() error {
15461	return iter.NextWithContext(context.Background())
15462}
15463
15464// NotDone returns true if the enumeration should be started or is not yet complete.
15465func (iter ListVpnGatewaysResultIterator) NotDone() bool {
15466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15467}
15468
15469// Response returns the raw server response from the last page request.
15470func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
15471	return iter.page.Response()
15472}
15473
15474// Value returns the current value or a zero-initialized value if the
15475// iterator has advanced beyond the end of the collection.
15476func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
15477	if !iter.page.NotDone() {
15478		return VpnGateway{}
15479	}
15480	return iter.page.Values()[iter.i]
15481}
15482
15483// Creates a new instance of the ListVpnGatewaysResultIterator type.
15484func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
15485	return ListVpnGatewaysResultIterator{page: page}
15486}
15487
15488// IsEmpty returns true if the ListResult contains no values.
15489func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
15490	return lvgr.Value == nil || len(*lvgr.Value) == 0
15491}
15492
15493// hasNextLink returns true if the NextLink is not empty.
15494func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
15495	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
15496}
15497
15498// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15499// It returns nil if no more results exist.
15500func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15501	if !lvgr.hasNextLink() {
15502		return nil, nil
15503	}
15504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15505		autorest.AsJSON(),
15506		autorest.AsGet(),
15507		autorest.WithBaseURL(to.String(lvgr.NextLink)))
15508}
15509
15510// ListVpnGatewaysResultPage contains a page of VpnGateway values.
15511type ListVpnGatewaysResultPage struct {
15512	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
15513	lvgr ListVpnGatewaysResult
15514}
15515
15516// NextWithContext advances to the next page of values.  If there was an error making
15517// the request the page does not advance and the error is returned.
15518func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15519	if tracing.IsEnabled() {
15520		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
15521		defer func() {
15522			sc := -1
15523			if page.Response().Response.Response != nil {
15524				sc = page.Response().Response.Response.StatusCode
15525			}
15526			tracing.EndSpan(ctx, sc, err)
15527		}()
15528	}
15529	for {
15530		next, err := page.fn(ctx, page.lvgr)
15531		if err != nil {
15532			return err
15533		}
15534		page.lvgr = next
15535		if !next.hasNextLink() || !next.IsEmpty() {
15536			break
15537		}
15538	}
15539	return nil
15540}
15541
15542// Next advances to the next page of values.  If there was an error making
15543// the request the page does not advance and the error is returned.
15544// Deprecated: Use NextWithContext() instead.
15545func (page *ListVpnGatewaysResultPage) Next() error {
15546	return page.NextWithContext(context.Background())
15547}
15548
15549// NotDone returns true if the page enumeration should be started or is not yet complete.
15550func (page ListVpnGatewaysResultPage) NotDone() bool {
15551	return !page.lvgr.IsEmpty()
15552}
15553
15554// Response returns the raw server response from the last page request.
15555func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
15556	return page.lvgr
15557}
15558
15559// Values returns the slice of values for the current page or nil if there are no values.
15560func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
15561	if page.lvgr.IsEmpty() {
15562		return nil
15563	}
15564	return *page.lvgr.Value
15565}
15566
15567// Creates a new instance of the ListVpnGatewaysResultPage type.
15568func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
15569	return ListVpnGatewaysResultPage{
15570		fn:   getNextPage,
15571		lvgr: cur,
15572	}
15573}
15574
15575// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
15576// nextLink to get the next set of results.
15577type ListVpnSitesResult struct {
15578	autorest.Response `json:"-"`
15579	// Value - List of VpnSites.
15580	Value *[]VpnSite `json:"value,omitempty"`
15581	// NextLink - URL to get the next set of operation list results if there are any.
15582	NextLink *string `json:"nextLink,omitempty"`
15583}
15584
15585// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
15586type ListVpnSitesResultIterator struct {
15587	i    int
15588	page ListVpnSitesResultPage
15589}
15590
15591// NextWithContext advances to the next value.  If there was an error making
15592// the request the iterator does not advance and the error is returned.
15593func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
15594	if tracing.IsEnabled() {
15595		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
15596		defer func() {
15597			sc := -1
15598			if iter.Response().Response.Response != nil {
15599				sc = iter.Response().Response.Response.StatusCode
15600			}
15601			tracing.EndSpan(ctx, sc, err)
15602		}()
15603	}
15604	iter.i++
15605	if iter.i < len(iter.page.Values()) {
15606		return nil
15607	}
15608	err = iter.page.NextWithContext(ctx)
15609	if err != nil {
15610		iter.i--
15611		return err
15612	}
15613	iter.i = 0
15614	return nil
15615}
15616
15617// Next advances to the next value.  If there was an error making
15618// the request the iterator does not advance and the error is returned.
15619// Deprecated: Use NextWithContext() instead.
15620func (iter *ListVpnSitesResultIterator) Next() error {
15621	return iter.NextWithContext(context.Background())
15622}
15623
15624// NotDone returns true if the enumeration should be started or is not yet complete.
15625func (iter ListVpnSitesResultIterator) NotDone() bool {
15626	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15627}
15628
15629// Response returns the raw server response from the last page request.
15630func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
15631	return iter.page.Response()
15632}
15633
15634// Value returns the current value or a zero-initialized value if the
15635// iterator has advanced beyond the end of the collection.
15636func (iter ListVpnSitesResultIterator) Value() VpnSite {
15637	if !iter.page.NotDone() {
15638		return VpnSite{}
15639	}
15640	return iter.page.Values()[iter.i]
15641}
15642
15643// Creates a new instance of the ListVpnSitesResultIterator type.
15644func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
15645	return ListVpnSitesResultIterator{page: page}
15646}
15647
15648// IsEmpty returns true if the ListResult contains no values.
15649func (lvsr ListVpnSitesResult) IsEmpty() bool {
15650	return lvsr.Value == nil || len(*lvsr.Value) == 0
15651}
15652
15653// hasNextLink returns true if the NextLink is not empty.
15654func (lvsr ListVpnSitesResult) hasNextLink() bool {
15655	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
15656}
15657
15658// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
15659// It returns nil if no more results exist.
15660func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
15661	if !lvsr.hasNextLink() {
15662		return nil, nil
15663	}
15664	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15665		autorest.AsJSON(),
15666		autorest.AsGet(),
15667		autorest.WithBaseURL(to.String(lvsr.NextLink)))
15668}
15669
15670// ListVpnSitesResultPage contains a page of VpnSite values.
15671type ListVpnSitesResultPage struct {
15672	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
15673	lvsr ListVpnSitesResult
15674}
15675
15676// NextWithContext advances to the next page of values.  If there was an error making
15677// the request the page does not advance and the error is returned.
15678func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
15679	if tracing.IsEnabled() {
15680		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
15681		defer func() {
15682			sc := -1
15683			if page.Response().Response.Response != nil {
15684				sc = page.Response().Response.Response.StatusCode
15685			}
15686			tracing.EndSpan(ctx, sc, err)
15687		}()
15688	}
15689	for {
15690		next, err := page.fn(ctx, page.lvsr)
15691		if err != nil {
15692			return err
15693		}
15694		page.lvsr = next
15695		if !next.hasNextLink() || !next.IsEmpty() {
15696			break
15697		}
15698	}
15699	return nil
15700}
15701
15702// Next advances to the next page of values.  If there was an error making
15703// the request the page does not advance and the error is returned.
15704// Deprecated: Use NextWithContext() instead.
15705func (page *ListVpnSitesResultPage) Next() error {
15706	return page.NextWithContext(context.Background())
15707}
15708
15709// NotDone returns true if the page enumeration should be started or is not yet complete.
15710func (page ListVpnSitesResultPage) NotDone() bool {
15711	return !page.lvsr.IsEmpty()
15712}
15713
15714// Response returns the raw server response from the last page request.
15715func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
15716	return page.lvsr
15717}
15718
15719// Values returns the slice of values for the current page or nil if there are no values.
15720func (page ListVpnSitesResultPage) Values() []VpnSite {
15721	if page.lvsr.IsEmpty() {
15722		return nil
15723	}
15724	return *page.lvsr.Value
15725}
15726
15727// Creates a new instance of the ListVpnSitesResultPage type.
15728func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
15729	return ListVpnSitesResultPage{
15730		fn:   getNextPage,
15731		lvsr: cur,
15732	}
15733}
15734
15735// LoadBalancer loadBalancer resource
15736type LoadBalancer struct {
15737	autorest.Response `json:"-"`
15738	// Sku - The load balancer SKU.
15739	Sku *LoadBalancerSku `json:"sku,omitempty"`
15740	// LoadBalancerPropertiesFormat - Properties of load balancer.
15741	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
15742	// Etag - A unique read-only string that changes whenever the resource is updated.
15743	Etag *string `json:"etag,omitempty"`
15744	// ID - Resource ID.
15745	ID *string `json:"id,omitempty"`
15746	// Name - READ-ONLY; Resource name.
15747	Name *string `json:"name,omitempty"`
15748	// Type - READ-ONLY; Resource type.
15749	Type *string `json:"type,omitempty"`
15750	// Location - Resource location.
15751	Location *string `json:"location,omitempty"`
15752	// Tags - Resource tags.
15753	Tags map[string]*string `json:"tags"`
15754}
15755
15756// MarshalJSON is the custom marshaler for LoadBalancer.
15757func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
15758	objectMap := make(map[string]interface{})
15759	if lb.Sku != nil {
15760		objectMap["sku"] = lb.Sku
15761	}
15762	if lb.LoadBalancerPropertiesFormat != nil {
15763		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
15764	}
15765	if lb.Etag != nil {
15766		objectMap["etag"] = lb.Etag
15767	}
15768	if lb.ID != nil {
15769		objectMap["id"] = lb.ID
15770	}
15771	if lb.Location != nil {
15772		objectMap["location"] = lb.Location
15773	}
15774	if lb.Tags != nil {
15775		objectMap["tags"] = lb.Tags
15776	}
15777	return json.Marshal(objectMap)
15778}
15779
15780// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
15781func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
15782	var m map[string]*json.RawMessage
15783	err := json.Unmarshal(body, &m)
15784	if err != nil {
15785		return err
15786	}
15787	for k, v := range m {
15788		switch k {
15789		case "sku":
15790			if v != nil {
15791				var sku LoadBalancerSku
15792				err = json.Unmarshal(*v, &sku)
15793				if err != nil {
15794					return err
15795				}
15796				lb.Sku = &sku
15797			}
15798		case "properties":
15799			if v != nil {
15800				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
15801				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
15802				if err != nil {
15803					return err
15804				}
15805				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
15806			}
15807		case "etag":
15808			if v != nil {
15809				var etag string
15810				err = json.Unmarshal(*v, &etag)
15811				if err != nil {
15812					return err
15813				}
15814				lb.Etag = &etag
15815			}
15816		case "id":
15817			if v != nil {
15818				var ID string
15819				err = json.Unmarshal(*v, &ID)
15820				if err != nil {
15821					return err
15822				}
15823				lb.ID = &ID
15824			}
15825		case "name":
15826			if v != nil {
15827				var name string
15828				err = json.Unmarshal(*v, &name)
15829				if err != nil {
15830					return err
15831				}
15832				lb.Name = &name
15833			}
15834		case "type":
15835			if v != nil {
15836				var typeVar string
15837				err = json.Unmarshal(*v, &typeVar)
15838				if err != nil {
15839					return err
15840				}
15841				lb.Type = &typeVar
15842			}
15843		case "location":
15844			if v != nil {
15845				var location string
15846				err = json.Unmarshal(*v, &location)
15847				if err != nil {
15848					return err
15849				}
15850				lb.Location = &location
15851			}
15852		case "tags":
15853			if v != nil {
15854				var tags map[string]*string
15855				err = json.Unmarshal(*v, &tags)
15856				if err != nil {
15857					return err
15858				}
15859				lb.Tags = tags
15860			}
15861		}
15862	}
15863
15864	return nil
15865}
15866
15867// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
15868type LoadBalancerBackendAddressPoolListResult struct {
15869	autorest.Response `json:"-"`
15870	// Value - A list of backend address pools in a load balancer.
15871	Value *[]BackendAddressPool `json:"value,omitempty"`
15872	// NextLink - READ-ONLY; The URL to get the next set of results.
15873	NextLink *string `json:"nextLink,omitempty"`
15874}
15875
15876// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
15877func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
15878	objectMap := make(map[string]interface{})
15879	if lbbaplr.Value != nil {
15880		objectMap["value"] = lbbaplr.Value
15881	}
15882	return json.Marshal(objectMap)
15883}
15884
15885// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
15886// BackendAddressPool values.
15887type LoadBalancerBackendAddressPoolListResultIterator struct {
15888	i    int
15889	page LoadBalancerBackendAddressPoolListResultPage
15890}
15891
15892// NextWithContext advances to the next value.  If there was an error making
15893// the request the iterator does not advance and the error is returned.
15894func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
15895	if tracing.IsEnabled() {
15896		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
15897		defer func() {
15898			sc := -1
15899			if iter.Response().Response.Response != nil {
15900				sc = iter.Response().Response.Response.StatusCode
15901			}
15902			tracing.EndSpan(ctx, sc, err)
15903		}()
15904	}
15905	iter.i++
15906	if iter.i < len(iter.page.Values()) {
15907		return nil
15908	}
15909	err = iter.page.NextWithContext(ctx)
15910	if err != nil {
15911		iter.i--
15912		return err
15913	}
15914	iter.i = 0
15915	return nil
15916}
15917
15918// Next advances to the next value.  If there was an error making
15919// the request the iterator does not advance and the error is returned.
15920// Deprecated: Use NextWithContext() instead.
15921func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
15922	return iter.NextWithContext(context.Background())
15923}
15924
15925// NotDone returns true if the enumeration should be started or is not yet complete.
15926func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
15927	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15928}
15929
15930// Response returns the raw server response from the last page request.
15931func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
15932	return iter.page.Response()
15933}
15934
15935// Value returns the current value or a zero-initialized value if the
15936// iterator has advanced beyond the end of the collection.
15937func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
15938	if !iter.page.NotDone() {
15939		return BackendAddressPool{}
15940	}
15941	return iter.page.Values()[iter.i]
15942}
15943
15944// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
15945func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
15946	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
15947}
15948
15949// IsEmpty returns true if the ListResult contains no values.
15950func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
15951	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
15952}
15953
15954// hasNextLink returns true if the NextLink is not empty.
15955func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
15956	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
15957}
15958
15959// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
15960// It returns nil if no more results exist.
15961func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
15962	if !lbbaplr.hasNextLink() {
15963		return nil, nil
15964	}
15965	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15966		autorest.AsJSON(),
15967		autorest.AsGet(),
15968		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
15969}
15970
15971// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
15972type LoadBalancerBackendAddressPoolListResultPage struct {
15973	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
15974	lbbaplr LoadBalancerBackendAddressPoolListResult
15975}
15976
15977// NextWithContext advances to the next page of values.  If there was an error making
15978// the request the page does not advance and the error is returned.
15979func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
15980	if tracing.IsEnabled() {
15981		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
15982		defer func() {
15983			sc := -1
15984			if page.Response().Response.Response != nil {
15985				sc = page.Response().Response.Response.StatusCode
15986			}
15987			tracing.EndSpan(ctx, sc, err)
15988		}()
15989	}
15990	for {
15991		next, err := page.fn(ctx, page.lbbaplr)
15992		if err != nil {
15993			return err
15994		}
15995		page.lbbaplr = next
15996		if !next.hasNextLink() || !next.IsEmpty() {
15997			break
15998		}
15999	}
16000	return nil
16001}
16002
16003// Next advances to the next page of values.  If there was an error making
16004// the request the page does not advance and the error is returned.
16005// Deprecated: Use NextWithContext() instead.
16006func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
16007	return page.NextWithContext(context.Background())
16008}
16009
16010// NotDone returns true if the page enumeration should be started or is not yet complete.
16011func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
16012	return !page.lbbaplr.IsEmpty()
16013}
16014
16015// Response returns the raw server response from the last page request.
16016func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
16017	return page.lbbaplr
16018}
16019
16020// Values returns the slice of values for the current page or nil if there are no values.
16021func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
16022	if page.lbbaplr.IsEmpty() {
16023		return nil
16024	}
16025	return *page.lbbaplr.Value
16026}
16027
16028// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
16029func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
16030	return LoadBalancerBackendAddressPoolListResultPage{
16031		fn:      getNextPage,
16032		lbbaplr: cur,
16033	}
16034}
16035
16036// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
16037type LoadBalancerFrontendIPConfigurationListResult struct {
16038	autorest.Response `json:"-"`
16039	// Value - A list of frontend IP configurations in a load balancer.
16040	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
16041	// NextLink - READ-ONLY; The URL to get the next set of results.
16042	NextLink *string `json:"nextLink,omitempty"`
16043}
16044
16045// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
16046func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16047	objectMap := make(map[string]interface{})
16048	if lbficlr.Value != nil {
16049		objectMap["value"] = lbficlr.Value
16050	}
16051	return json.Marshal(objectMap)
16052}
16053
16054// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
16055// FrontendIPConfiguration values.
16056type LoadBalancerFrontendIPConfigurationListResultIterator struct {
16057	i    int
16058	page LoadBalancerFrontendIPConfigurationListResultPage
16059}
16060
16061// NextWithContext advances to the next value.  If there was an error making
16062// the request the iterator does not advance and the error is returned.
16063func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16064	if tracing.IsEnabled() {
16065		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
16066		defer func() {
16067			sc := -1
16068			if iter.Response().Response.Response != nil {
16069				sc = iter.Response().Response.Response.StatusCode
16070			}
16071			tracing.EndSpan(ctx, sc, err)
16072		}()
16073	}
16074	iter.i++
16075	if iter.i < len(iter.page.Values()) {
16076		return nil
16077	}
16078	err = iter.page.NextWithContext(ctx)
16079	if err != nil {
16080		iter.i--
16081		return err
16082	}
16083	iter.i = 0
16084	return nil
16085}
16086
16087// Next advances to the next value.  If there was an error making
16088// the request the iterator does not advance and the error is returned.
16089// Deprecated: Use NextWithContext() instead.
16090func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
16091	return iter.NextWithContext(context.Background())
16092}
16093
16094// NotDone returns true if the enumeration should be started or is not yet complete.
16095func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
16096	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16097}
16098
16099// Response returns the raw server response from the last page request.
16100func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
16101	return iter.page.Response()
16102}
16103
16104// Value returns the current value or a zero-initialized value if the
16105// iterator has advanced beyond the end of the collection.
16106func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
16107	if !iter.page.NotDone() {
16108		return FrontendIPConfiguration{}
16109	}
16110	return iter.page.Values()[iter.i]
16111}
16112
16113// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
16114func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
16115	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
16116}
16117
16118// IsEmpty returns true if the ListResult contains no values.
16119func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
16120	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
16121}
16122
16123// hasNextLink returns true if the NextLink is not empty.
16124func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
16125	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
16126}
16127
16128// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16129// It returns nil if no more results exist.
16130func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16131	if !lbficlr.hasNextLink() {
16132		return nil, nil
16133	}
16134	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16135		autorest.AsJSON(),
16136		autorest.AsGet(),
16137		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
16138}
16139
16140// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
16141type LoadBalancerFrontendIPConfigurationListResultPage struct {
16142	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
16143	lbficlr LoadBalancerFrontendIPConfigurationListResult
16144}
16145
16146// NextWithContext advances to the next page of values.  If there was an error making
16147// the request the page does not advance and the error is returned.
16148func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16149	if tracing.IsEnabled() {
16150		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
16151		defer func() {
16152			sc := -1
16153			if page.Response().Response.Response != nil {
16154				sc = page.Response().Response.Response.StatusCode
16155			}
16156			tracing.EndSpan(ctx, sc, err)
16157		}()
16158	}
16159	for {
16160		next, err := page.fn(ctx, page.lbficlr)
16161		if err != nil {
16162			return err
16163		}
16164		page.lbficlr = next
16165		if !next.hasNextLink() || !next.IsEmpty() {
16166			break
16167		}
16168	}
16169	return nil
16170}
16171
16172// Next advances to the next page of values.  If there was an error making
16173// the request the page does not advance and the error is returned.
16174// Deprecated: Use NextWithContext() instead.
16175func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
16176	return page.NextWithContext(context.Background())
16177}
16178
16179// NotDone returns true if the page enumeration should be started or is not yet complete.
16180func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
16181	return !page.lbficlr.IsEmpty()
16182}
16183
16184// Response returns the raw server response from the last page request.
16185func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
16186	return page.lbficlr
16187}
16188
16189// Values returns the slice of values for the current page or nil if there are no values.
16190func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
16191	if page.lbficlr.IsEmpty() {
16192		return nil
16193	}
16194	return *page.lbficlr.Value
16195}
16196
16197// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
16198func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
16199	return LoadBalancerFrontendIPConfigurationListResultPage{
16200		fn:      getNextPage,
16201		lbficlr: cur,
16202	}
16203}
16204
16205// LoadBalancerListResult response for ListLoadBalancers API service call.
16206type LoadBalancerListResult struct {
16207	autorest.Response `json:"-"`
16208	// Value - A list of load balancers in a resource group.
16209	Value *[]LoadBalancer `json:"value,omitempty"`
16210	// NextLink - READ-ONLY; The URL to get the next set of results.
16211	NextLink *string `json:"nextLink,omitempty"`
16212}
16213
16214// MarshalJSON is the custom marshaler for LoadBalancerListResult.
16215func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
16216	objectMap := make(map[string]interface{})
16217	if lblr.Value != nil {
16218		objectMap["value"] = lblr.Value
16219	}
16220	return json.Marshal(objectMap)
16221}
16222
16223// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16224type LoadBalancerListResultIterator struct {
16225	i    int
16226	page LoadBalancerListResultPage
16227}
16228
16229// NextWithContext advances to the next value.  If there was an error making
16230// the request the iterator does not advance and the error is returned.
16231func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16232	if tracing.IsEnabled() {
16233		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
16234		defer func() {
16235			sc := -1
16236			if iter.Response().Response.Response != nil {
16237				sc = iter.Response().Response.Response.StatusCode
16238			}
16239			tracing.EndSpan(ctx, sc, err)
16240		}()
16241	}
16242	iter.i++
16243	if iter.i < len(iter.page.Values()) {
16244		return nil
16245	}
16246	err = iter.page.NextWithContext(ctx)
16247	if err != nil {
16248		iter.i--
16249		return err
16250	}
16251	iter.i = 0
16252	return nil
16253}
16254
16255// Next advances to the next value.  If there was an error making
16256// the request the iterator does not advance and the error is returned.
16257// Deprecated: Use NextWithContext() instead.
16258func (iter *LoadBalancerListResultIterator) Next() error {
16259	return iter.NextWithContext(context.Background())
16260}
16261
16262// NotDone returns true if the enumeration should be started or is not yet complete.
16263func (iter LoadBalancerListResultIterator) NotDone() bool {
16264	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16265}
16266
16267// Response returns the raw server response from the last page request.
16268func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
16269	return iter.page.Response()
16270}
16271
16272// Value returns the current value or a zero-initialized value if the
16273// iterator has advanced beyond the end of the collection.
16274func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
16275	if !iter.page.NotDone() {
16276		return LoadBalancer{}
16277	}
16278	return iter.page.Values()[iter.i]
16279}
16280
16281// Creates a new instance of the LoadBalancerListResultIterator type.
16282func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
16283	return LoadBalancerListResultIterator{page: page}
16284}
16285
16286// IsEmpty returns true if the ListResult contains no values.
16287func (lblr LoadBalancerListResult) IsEmpty() bool {
16288	return lblr.Value == nil || len(*lblr.Value) == 0
16289}
16290
16291// hasNextLink returns true if the NextLink is not empty.
16292func (lblr LoadBalancerListResult) hasNextLink() bool {
16293	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
16294}
16295
16296// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16297// It returns nil if no more results exist.
16298func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16299	if !lblr.hasNextLink() {
16300		return nil, nil
16301	}
16302	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16303		autorest.AsJSON(),
16304		autorest.AsGet(),
16305		autorest.WithBaseURL(to.String(lblr.NextLink)))
16306}
16307
16308// LoadBalancerListResultPage contains a page of LoadBalancer values.
16309type LoadBalancerListResultPage struct {
16310	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
16311	lblr LoadBalancerListResult
16312}
16313
16314// NextWithContext advances to the next page of values.  If there was an error making
16315// the request the page does not advance and the error is returned.
16316func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16317	if tracing.IsEnabled() {
16318		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
16319		defer func() {
16320			sc := -1
16321			if page.Response().Response.Response != nil {
16322				sc = page.Response().Response.Response.StatusCode
16323			}
16324			tracing.EndSpan(ctx, sc, err)
16325		}()
16326	}
16327	for {
16328		next, err := page.fn(ctx, page.lblr)
16329		if err != nil {
16330			return err
16331		}
16332		page.lblr = next
16333		if !next.hasNextLink() || !next.IsEmpty() {
16334			break
16335		}
16336	}
16337	return nil
16338}
16339
16340// Next advances to the next page of values.  If there was an error making
16341// the request the page does not advance and the error is returned.
16342// Deprecated: Use NextWithContext() instead.
16343func (page *LoadBalancerListResultPage) Next() error {
16344	return page.NextWithContext(context.Background())
16345}
16346
16347// NotDone returns true if the page enumeration should be started or is not yet complete.
16348func (page LoadBalancerListResultPage) NotDone() bool {
16349	return !page.lblr.IsEmpty()
16350}
16351
16352// Response returns the raw server response from the last page request.
16353func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
16354	return page.lblr
16355}
16356
16357// Values returns the slice of values for the current page or nil if there are no values.
16358func (page LoadBalancerListResultPage) Values() []LoadBalancer {
16359	if page.lblr.IsEmpty() {
16360		return nil
16361	}
16362	return *page.lblr.Value
16363}
16364
16365// Creates a new instance of the LoadBalancerListResultPage type.
16366func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
16367	return LoadBalancerListResultPage{
16368		fn:   getNextPage,
16369		lblr: cur,
16370	}
16371}
16372
16373// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
16374type LoadBalancerLoadBalancingRuleListResult struct {
16375	autorest.Response `json:"-"`
16376	// Value - A list of load balancing rules in a load balancer.
16377	Value *[]LoadBalancingRule `json:"value,omitempty"`
16378	// NextLink - READ-ONLY; The URL to get the next set of results.
16379	NextLink *string `json:"nextLink,omitempty"`
16380}
16381
16382// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
16383func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
16384	objectMap := make(map[string]interface{})
16385	if lblbrlr.Value != nil {
16386		objectMap["value"] = lblbrlr.Value
16387	}
16388	return json.Marshal(objectMap)
16389}
16390
16391// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
16392// LoadBalancingRule values.
16393type LoadBalancerLoadBalancingRuleListResultIterator struct {
16394	i    int
16395	page LoadBalancerLoadBalancingRuleListResultPage
16396}
16397
16398// NextWithContext advances to the next value.  If there was an error making
16399// the request the iterator does not advance and the error is returned.
16400func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16401	if tracing.IsEnabled() {
16402		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
16403		defer func() {
16404			sc := -1
16405			if iter.Response().Response.Response != nil {
16406				sc = iter.Response().Response.Response.StatusCode
16407			}
16408			tracing.EndSpan(ctx, sc, err)
16409		}()
16410	}
16411	iter.i++
16412	if iter.i < len(iter.page.Values()) {
16413		return nil
16414	}
16415	err = iter.page.NextWithContext(ctx)
16416	if err != nil {
16417		iter.i--
16418		return err
16419	}
16420	iter.i = 0
16421	return nil
16422}
16423
16424// Next advances to the next value.  If there was an error making
16425// the request the iterator does not advance and the error is returned.
16426// Deprecated: Use NextWithContext() instead.
16427func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
16428	return iter.NextWithContext(context.Background())
16429}
16430
16431// NotDone returns true if the enumeration should be started or is not yet complete.
16432func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
16433	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16434}
16435
16436// Response returns the raw server response from the last page request.
16437func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
16438	return iter.page.Response()
16439}
16440
16441// Value returns the current value or a zero-initialized value if the
16442// iterator has advanced beyond the end of the collection.
16443func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
16444	if !iter.page.NotDone() {
16445		return LoadBalancingRule{}
16446	}
16447	return iter.page.Values()[iter.i]
16448}
16449
16450// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
16451func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
16452	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
16453}
16454
16455// IsEmpty returns true if the ListResult contains no values.
16456func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
16457	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
16458}
16459
16460// hasNextLink returns true if the NextLink is not empty.
16461func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
16462	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
16463}
16464
16465// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
16466// It returns nil if no more results exist.
16467func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16468	if !lblbrlr.hasNextLink() {
16469		return nil, nil
16470	}
16471	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16472		autorest.AsJSON(),
16473		autorest.AsGet(),
16474		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
16475}
16476
16477// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
16478type LoadBalancerLoadBalancingRuleListResultPage struct {
16479	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
16480	lblbrlr LoadBalancerLoadBalancingRuleListResult
16481}
16482
16483// NextWithContext advances to the next page of values.  If there was an error making
16484// the request the page does not advance and the error is returned.
16485func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16486	if tracing.IsEnabled() {
16487		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
16488		defer func() {
16489			sc := -1
16490			if page.Response().Response.Response != nil {
16491				sc = page.Response().Response.Response.StatusCode
16492			}
16493			tracing.EndSpan(ctx, sc, err)
16494		}()
16495	}
16496	for {
16497		next, err := page.fn(ctx, page.lblbrlr)
16498		if err != nil {
16499			return err
16500		}
16501		page.lblbrlr = next
16502		if !next.hasNextLink() || !next.IsEmpty() {
16503			break
16504		}
16505	}
16506	return nil
16507}
16508
16509// Next advances to the next page of values.  If there was an error making
16510// the request the page does not advance and the error is returned.
16511// Deprecated: Use NextWithContext() instead.
16512func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
16513	return page.NextWithContext(context.Background())
16514}
16515
16516// NotDone returns true if the page enumeration should be started or is not yet complete.
16517func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
16518	return !page.lblbrlr.IsEmpty()
16519}
16520
16521// Response returns the raw server response from the last page request.
16522func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
16523	return page.lblbrlr
16524}
16525
16526// Values returns the slice of values for the current page or nil if there are no values.
16527func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
16528	if page.lblbrlr.IsEmpty() {
16529		return nil
16530	}
16531	return *page.lblbrlr.Value
16532}
16533
16534// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
16535func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
16536	return LoadBalancerLoadBalancingRuleListResultPage{
16537		fn:      getNextPage,
16538		lblbrlr: cur,
16539	}
16540}
16541
16542// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
16543type LoadBalancerOutboundRuleListResult struct {
16544	autorest.Response `json:"-"`
16545	// Value - A list of outbound rules in a load balancer.
16546	Value *[]OutboundRule `json:"value,omitempty"`
16547	// NextLink - READ-ONLY; The URL to get the next set of results.
16548	NextLink *string `json:"nextLink,omitempty"`
16549}
16550
16551// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
16552func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
16553	objectMap := make(map[string]interface{})
16554	if lborlr.Value != nil {
16555		objectMap["value"] = lborlr.Value
16556	}
16557	return json.Marshal(objectMap)
16558}
16559
16560// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
16561type LoadBalancerOutboundRuleListResultIterator struct {
16562	i    int
16563	page LoadBalancerOutboundRuleListResultPage
16564}
16565
16566// NextWithContext advances to the next value.  If there was an error making
16567// the request the iterator does not advance and the error is returned.
16568func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16569	if tracing.IsEnabled() {
16570		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
16571		defer func() {
16572			sc := -1
16573			if iter.Response().Response.Response != nil {
16574				sc = iter.Response().Response.Response.StatusCode
16575			}
16576			tracing.EndSpan(ctx, sc, err)
16577		}()
16578	}
16579	iter.i++
16580	if iter.i < len(iter.page.Values()) {
16581		return nil
16582	}
16583	err = iter.page.NextWithContext(ctx)
16584	if err != nil {
16585		iter.i--
16586		return err
16587	}
16588	iter.i = 0
16589	return nil
16590}
16591
16592// Next advances to the next value.  If there was an error making
16593// the request the iterator does not advance and the error is returned.
16594// Deprecated: Use NextWithContext() instead.
16595func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
16596	return iter.NextWithContext(context.Background())
16597}
16598
16599// NotDone returns true if the enumeration should be started or is not yet complete.
16600func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
16601	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16602}
16603
16604// Response returns the raw server response from the last page request.
16605func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
16606	return iter.page.Response()
16607}
16608
16609// Value returns the current value or a zero-initialized value if the
16610// iterator has advanced beyond the end of the collection.
16611func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
16612	if !iter.page.NotDone() {
16613		return OutboundRule{}
16614	}
16615	return iter.page.Values()[iter.i]
16616}
16617
16618// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
16619func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
16620	return LoadBalancerOutboundRuleListResultIterator{page: page}
16621}
16622
16623// IsEmpty returns true if the ListResult contains no values.
16624func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
16625	return lborlr.Value == nil || len(*lborlr.Value) == 0
16626}
16627
16628// hasNextLink returns true if the NextLink is not empty.
16629func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
16630	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
16631}
16632
16633// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
16634// It returns nil if no more results exist.
16635func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16636	if !lborlr.hasNextLink() {
16637		return nil, nil
16638	}
16639	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16640		autorest.AsJSON(),
16641		autorest.AsGet(),
16642		autorest.WithBaseURL(to.String(lborlr.NextLink)))
16643}
16644
16645// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
16646type LoadBalancerOutboundRuleListResultPage struct {
16647	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
16648	lborlr LoadBalancerOutboundRuleListResult
16649}
16650
16651// NextWithContext advances to the next page of values.  If there was an error making
16652// the request the page does not advance and the error is returned.
16653func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16654	if tracing.IsEnabled() {
16655		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
16656		defer func() {
16657			sc := -1
16658			if page.Response().Response.Response != nil {
16659				sc = page.Response().Response.Response.StatusCode
16660			}
16661			tracing.EndSpan(ctx, sc, err)
16662		}()
16663	}
16664	for {
16665		next, err := page.fn(ctx, page.lborlr)
16666		if err != nil {
16667			return err
16668		}
16669		page.lborlr = next
16670		if !next.hasNextLink() || !next.IsEmpty() {
16671			break
16672		}
16673	}
16674	return nil
16675}
16676
16677// Next advances to the next page of values.  If there was an error making
16678// the request the page does not advance and the error is returned.
16679// Deprecated: Use NextWithContext() instead.
16680func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
16681	return page.NextWithContext(context.Background())
16682}
16683
16684// NotDone returns true if the page enumeration should be started or is not yet complete.
16685func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
16686	return !page.lborlr.IsEmpty()
16687}
16688
16689// Response returns the raw server response from the last page request.
16690func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
16691	return page.lborlr
16692}
16693
16694// Values returns the slice of values for the current page or nil if there are no values.
16695func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
16696	if page.lborlr.IsEmpty() {
16697		return nil
16698	}
16699	return *page.lborlr.Value
16700}
16701
16702// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
16703func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
16704	return LoadBalancerOutboundRuleListResultPage{
16705		fn:     getNextPage,
16706		lborlr: cur,
16707	}
16708}
16709
16710// LoadBalancerProbeListResult response for ListProbe API service call.
16711type LoadBalancerProbeListResult struct {
16712	autorest.Response `json:"-"`
16713	// Value - A list of probes in a load balancer.
16714	Value *[]Probe `json:"value,omitempty"`
16715	// NextLink - READ-ONLY; The URL to get the next set of results.
16716	NextLink *string `json:"nextLink,omitempty"`
16717}
16718
16719// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
16720func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
16721	objectMap := make(map[string]interface{})
16722	if lbplr.Value != nil {
16723		objectMap["value"] = lbplr.Value
16724	}
16725	return json.Marshal(objectMap)
16726}
16727
16728// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
16729type LoadBalancerProbeListResultIterator struct {
16730	i    int
16731	page LoadBalancerProbeListResultPage
16732}
16733
16734// NextWithContext advances to the next value.  If there was an error making
16735// the request the iterator does not advance and the error is returned.
16736func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
16737	if tracing.IsEnabled() {
16738		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
16739		defer func() {
16740			sc := -1
16741			if iter.Response().Response.Response != nil {
16742				sc = iter.Response().Response.Response.StatusCode
16743			}
16744			tracing.EndSpan(ctx, sc, err)
16745		}()
16746	}
16747	iter.i++
16748	if iter.i < len(iter.page.Values()) {
16749		return nil
16750	}
16751	err = iter.page.NextWithContext(ctx)
16752	if err != nil {
16753		iter.i--
16754		return err
16755	}
16756	iter.i = 0
16757	return nil
16758}
16759
16760// Next advances to the next value.  If there was an error making
16761// the request the iterator does not advance and the error is returned.
16762// Deprecated: Use NextWithContext() instead.
16763func (iter *LoadBalancerProbeListResultIterator) Next() error {
16764	return iter.NextWithContext(context.Background())
16765}
16766
16767// NotDone returns true if the enumeration should be started or is not yet complete.
16768func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
16769	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16770}
16771
16772// Response returns the raw server response from the last page request.
16773func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
16774	return iter.page.Response()
16775}
16776
16777// Value returns the current value or a zero-initialized value if the
16778// iterator has advanced beyond the end of the collection.
16779func (iter LoadBalancerProbeListResultIterator) Value() Probe {
16780	if !iter.page.NotDone() {
16781		return Probe{}
16782	}
16783	return iter.page.Values()[iter.i]
16784}
16785
16786// Creates a new instance of the LoadBalancerProbeListResultIterator type.
16787func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
16788	return LoadBalancerProbeListResultIterator{page: page}
16789}
16790
16791// IsEmpty returns true if the ListResult contains no values.
16792func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
16793	return lbplr.Value == nil || len(*lbplr.Value) == 0
16794}
16795
16796// hasNextLink returns true if the NextLink is not empty.
16797func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
16798	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
16799}
16800
16801// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
16802// It returns nil if no more results exist.
16803func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
16804	if !lbplr.hasNextLink() {
16805		return nil, nil
16806	}
16807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16808		autorest.AsJSON(),
16809		autorest.AsGet(),
16810		autorest.WithBaseURL(to.String(lbplr.NextLink)))
16811}
16812
16813// LoadBalancerProbeListResultPage contains a page of Probe values.
16814type LoadBalancerProbeListResultPage struct {
16815	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
16816	lbplr LoadBalancerProbeListResult
16817}
16818
16819// NextWithContext advances to the next page of values.  If there was an error making
16820// the request the page does not advance and the error is returned.
16821func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
16822	if tracing.IsEnabled() {
16823		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
16824		defer func() {
16825			sc := -1
16826			if page.Response().Response.Response != nil {
16827				sc = page.Response().Response.Response.StatusCode
16828			}
16829			tracing.EndSpan(ctx, sc, err)
16830		}()
16831	}
16832	for {
16833		next, err := page.fn(ctx, page.lbplr)
16834		if err != nil {
16835			return err
16836		}
16837		page.lbplr = next
16838		if !next.hasNextLink() || !next.IsEmpty() {
16839			break
16840		}
16841	}
16842	return nil
16843}
16844
16845// Next advances to the next page of values.  If there was an error making
16846// the request the page does not advance and the error is returned.
16847// Deprecated: Use NextWithContext() instead.
16848func (page *LoadBalancerProbeListResultPage) Next() error {
16849	return page.NextWithContext(context.Background())
16850}
16851
16852// NotDone returns true if the page enumeration should be started or is not yet complete.
16853func (page LoadBalancerProbeListResultPage) NotDone() bool {
16854	return !page.lbplr.IsEmpty()
16855}
16856
16857// Response returns the raw server response from the last page request.
16858func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
16859	return page.lbplr
16860}
16861
16862// Values returns the slice of values for the current page or nil if there are no values.
16863func (page LoadBalancerProbeListResultPage) Values() []Probe {
16864	if page.lbplr.IsEmpty() {
16865		return nil
16866	}
16867	return *page.lbplr.Value
16868}
16869
16870// Creates a new instance of the LoadBalancerProbeListResultPage type.
16871func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
16872	return LoadBalancerProbeListResultPage{
16873		fn:    getNextPage,
16874		lbplr: cur,
16875	}
16876}
16877
16878// LoadBalancerPropertiesFormat properties of the load balancer.
16879type LoadBalancerPropertiesFormat struct {
16880	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
16881	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
16882	// BackendAddressPools - Collection of backend address pools used by a load balancer
16883	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
16884	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
16885	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
16886	// Probes - Collection of probe objects used in the load balancer
16887	Probes *[]Probe `json:"probes,omitempty"`
16888	// 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.
16889	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
16890	// 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.
16891	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
16892	// OutboundRules - The outbound rules.
16893	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
16894	// ResourceGUID - The resource GUID property of the load balancer resource.
16895	ResourceGUID *string `json:"resourceGuid,omitempty"`
16896	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16897	ProvisioningState *string `json:"provisioningState,omitempty"`
16898}
16899
16900// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16901// long-running operation.
16902type LoadBalancersCreateOrUpdateFuture struct {
16903	azure.FutureAPI
16904	// Result returns the result of the asynchronous operation.
16905	// If the operation has not completed it will return an error.
16906	Result func(LoadBalancersClient) (LoadBalancer, error)
16907}
16908
16909// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16910func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16911	var azFuture azure.Future
16912	if err := json.Unmarshal(body, &azFuture); err != nil {
16913		return err
16914	}
16915	future.FutureAPI = &azFuture
16916	future.Result = future.result
16917	return nil
16918}
16919
16920// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
16921func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
16922	var done bool
16923	done, err = future.DoneWithContext(context.Background(), client)
16924	if err != nil {
16925		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16926		return
16927	}
16928	if !done {
16929		lb.Response.Response = future.Response()
16930		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
16931		return
16932	}
16933	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16934	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
16935		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
16936		if err != nil {
16937			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
16938		}
16939	}
16940	return
16941}
16942
16943// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16944// operation.
16945type LoadBalancersDeleteFuture struct {
16946	azure.FutureAPI
16947	// Result returns the result of the asynchronous operation.
16948	// If the operation has not completed it will return an error.
16949	Result func(LoadBalancersClient) (autorest.Response, error)
16950}
16951
16952// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16953func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
16954	var azFuture azure.Future
16955	if err := json.Unmarshal(body, &azFuture); err != nil {
16956		return err
16957	}
16958	future.FutureAPI = &azFuture
16959	future.Result = future.result
16960	return nil
16961}
16962
16963// result is the default implementation for LoadBalancersDeleteFuture.Result.
16964func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
16965	var done bool
16966	done, err = future.DoneWithContext(context.Background(), client)
16967	if err != nil {
16968		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
16969		return
16970	}
16971	if !done {
16972		ar.Response = future.Response()
16973		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
16974		return
16975	}
16976	ar.Response = future.Response()
16977	return
16978}
16979
16980// LoadBalancerSku SKU of a load balancer
16981type LoadBalancerSku struct {
16982	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
16983	Name LoadBalancerSkuName `json:"name,omitempty"`
16984}
16985
16986// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16987// operation.
16988type LoadBalancersUpdateTagsFuture struct {
16989	azure.FutureAPI
16990	// Result returns the result of the asynchronous operation.
16991	// If the operation has not completed it will return an error.
16992	Result func(LoadBalancersClient) (LoadBalancer, error)
16993}
16994
16995// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16996func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16997	var azFuture azure.Future
16998	if err := json.Unmarshal(body, &azFuture); err != nil {
16999		return err
17000	}
17001	future.FutureAPI = &azFuture
17002	future.Result = future.result
17003	return nil
17004}
17005
17006// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
17007func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17008	var done bool
17009	done, err = future.DoneWithContext(context.Background(), client)
17010	if err != nil {
17011		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17012		return
17013	}
17014	if !done {
17015		lb.Response.Response = future.Response()
17016		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
17017		return
17018	}
17019	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17020	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17021		lb, err = client.UpdateTagsResponder(lb.Response.Response)
17022		if err != nil {
17023			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
17024		}
17025	}
17026	return
17027}
17028
17029// LoadBalancingRule a load balancing rule for a load balancer.
17030type LoadBalancingRule struct {
17031	autorest.Response `json:"-"`
17032	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
17033	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
17034	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17035	Name *string `json:"name,omitempty"`
17036	// Etag - A unique read-only string that changes whenever the resource is updated.
17037	Etag *string `json:"etag,omitempty"`
17038	// ID - Resource ID.
17039	ID *string `json:"id,omitempty"`
17040}
17041
17042// MarshalJSON is the custom marshaler for LoadBalancingRule.
17043func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
17044	objectMap := make(map[string]interface{})
17045	if lbr.LoadBalancingRulePropertiesFormat != nil {
17046		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
17047	}
17048	if lbr.Name != nil {
17049		objectMap["name"] = lbr.Name
17050	}
17051	if lbr.Etag != nil {
17052		objectMap["etag"] = lbr.Etag
17053	}
17054	if lbr.ID != nil {
17055		objectMap["id"] = lbr.ID
17056	}
17057	return json.Marshal(objectMap)
17058}
17059
17060// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
17061func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
17062	var m map[string]*json.RawMessage
17063	err := json.Unmarshal(body, &m)
17064	if err != nil {
17065		return err
17066	}
17067	for k, v := range m {
17068		switch k {
17069		case "properties":
17070			if v != nil {
17071				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
17072				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
17073				if err != nil {
17074					return err
17075				}
17076				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
17077			}
17078		case "name":
17079			if v != nil {
17080				var name string
17081				err = json.Unmarshal(*v, &name)
17082				if err != nil {
17083					return err
17084				}
17085				lbr.Name = &name
17086			}
17087		case "etag":
17088			if v != nil {
17089				var etag string
17090				err = json.Unmarshal(*v, &etag)
17091				if err != nil {
17092					return err
17093				}
17094				lbr.Etag = &etag
17095			}
17096		case "id":
17097			if v != nil {
17098				var ID string
17099				err = json.Unmarshal(*v, &ID)
17100				if err != nil {
17101					return err
17102				}
17103				lbr.ID = &ID
17104			}
17105		}
17106	}
17107
17108	return nil
17109}
17110
17111// LoadBalancingRulePropertiesFormat properties of the load balancer.
17112type LoadBalancingRulePropertiesFormat struct {
17113	// FrontendIPConfiguration - A reference to frontend IP addresses.
17114	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17115	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
17116	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17117	// Probe - The reference of the load balancer probe used by the load balancing rule.
17118	Probe *SubResource `json:"probe,omitempty"`
17119	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17120	Protocol TransportProtocol `json:"protocol,omitempty"`
17121	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
17122	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
17123	// 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"
17124	FrontendPort *int32 `json:"frontendPort,omitempty"`
17125	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
17126	BackendPort *int32 `json:"backendPort,omitempty"`
17127	// 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.
17128	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17129	// 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.
17130	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17131	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
17132	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17133	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
17134	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
17135	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17136	ProvisioningState *string `json:"provisioningState,omitempty"`
17137}
17138
17139// LocalNetworkGateway a common class for general resource information
17140type LocalNetworkGateway struct {
17141	autorest.Response `json:"-"`
17142	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
17143	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17144	// Etag - A unique read-only string that changes whenever the resource is updated.
17145	Etag *string `json:"etag,omitempty"`
17146	// ID - Resource ID.
17147	ID *string `json:"id,omitempty"`
17148	// Name - READ-ONLY; Resource name.
17149	Name *string `json:"name,omitempty"`
17150	// Type - READ-ONLY; Resource type.
17151	Type *string `json:"type,omitempty"`
17152	// Location - Resource location.
17153	Location *string `json:"location,omitempty"`
17154	// Tags - Resource tags.
17155	Tags map[string]*string `json:"tags"`
17156}
17157
17158// MarshalJSON is the custom marshaler for LocalNetworkGateway.
17159func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
17160	objectMap := make(map[string]interface{})
17161	if lng.LocalNetworkGatewayPropertiesFormat != nil {
17162		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
17163	}
17164	if lng.Etag != nil {
17165		objectMap["etag"] = lng.Etag
17166	}
17167	if lng.ID != nil {
17168		objectMap["id"] = lng.ID
17169	}
17170	if lng.Location != nil {
17171		objectMap["location"] = lng.Location
17172	}
17173	if lng.Tags != nil {
17174		objectMap["tags"] = lng.Tags
17175	}
17176	return json.Marshal(objectMap)
17177}
17178
17179// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
17180func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
17181	var m map[string]*json.RawMessage
17182	err := json.Unmarshal(body, &m)
17183	if err != nil {
17184		return err
17185	}
17186	for k, v := range m {
17187		switch k {
17188		case "properties":
17189			if v != nil {
17190				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
17191				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
17192				if err != nil {
17193					return err
17194				}
17195				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
17196			}
17197		case "etag":
17198			if v != nil {
17199				var etag string
17200				err = json.Unmarshal(*v, &etag)
17201				if err != nil {
17202					return err
17203				}
17204				lng.Etag = &etag
17205			}
17206		case "id":
17207			if v != nil {
17208				var ID string
17209				err = json.Unmarshal(*v, &ID)
17210				if err != nil {
17211					return err
17212				}
17213				lng.ID = &ID
17214			}
17215		case "name":
17216			if v != nil {
17217				var name string
17218				err = json.Unmarshal(*v, &name)
17219				if err != nil {
17220					return err
17221				}
17222				lng.Name = &name
17223			}
17224		case "type":
17225			if v != nil {
17226				var typeVar string
17227				err = json.Unmarshal(*v, &typeVar)
17228				if err != nil {
17229					return err
17230				}
17231				lng.Type = &typeVar
17232			}
17233		case "location":
17234			if v != nil {
17235				var location string
17236				err = json.Unmarshal(*v, &location)
17237				if err != nil {
17238					return err
17239				}
17240				lng.Location = &location
17241			}
17242		case "tags":
17243			if v != nil {
17244				var tags map[string]*string
17245				err = json.Unmarshal(*v, &tags)
17246				if err != nil {
17247					return err
17248				}
17249				lng.Tags = tags
17250			}
17251		}
17252	}
17253
17254	return nil
17255}
17256
17257// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
17258type LocalNetworkGatewayListResult struct {
17259	autorest.Response `json:"-"`
17260	// Value - A list of local network gateways that exists in a resource group.
17261	Value *[]LocalNetworkGateway `json:"value,omitempty"`
17262	// NextLink - READ-ONLY; The URL to get the next set of results.
17263	NextLink *string `json:"nextLink,omitempty"`
17264}
17265
17266// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
17267func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17268	objectMap := make(map[string]interface{})
17269	if lnglr.Value != nil {
17270		objectMap["value"] = lnglr.Value
17271	}
17272	return json.Marshal(objectMap)
17273}
17274
17275// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
17276// values.
17277type LocalNetworkGatewayListResultIterator struct {
17278	i    int
17279	page LocalNetworkGatewayListResultPage
17280}
17281
17282// NextWithContext advances to the next value.  If there was an error making
17283// the request the iterator does not advance and the error is returned.
17284func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17285	if tracing.IsEnabled() {
17286		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
17287		defer func() {
17288			sc := -1
17289			if iter.Response().Response.Response != nil {
17290				sc = iter.Response().Response.Response.StatusCode
17291			}
17292			tracing.EndSpan(ctx, sc, err)
17293		}()
17294	}
17295	iter.i++
17296	if iter.i < len(iter.page.Values()) {
17297		return nil
17298	}
17299	err = iter.page.NextWithContext(ctx)
17300	if err != nil {
17301		iter.i--
17302		return err
17303	}
17304	iter.i = 0
17305	return nil
17306}
17307
17308// Next advances to the next value.  If there was an error making
17309// the request the iterator does not advance and the error is returned.
17310// Deprecated: Use NextWithContext() instead.
17311func (iter *LocalNetworkGatewayListResultIterator) Next() error {
17312	return iter.NextWithContext(context.Background())
17313}
17314
17315// NotDone returns true if the enumeration should be started or is not yet complete.
17316func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
17317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17318}
17319
17320// Response returns the raw server response from the last page request.
17321func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
17322	return iter.page.Response()
17323}
17324
17325// Value returns the current value or a zero-initialized value if the
17326// iterator has advanced beyond the end of the collection.
17327func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
17328	if !iter.page.NotDone() {
17329		return LocalNetworkGateway{}
17330	}
17331	return iter.page.Values()[iter.i]
17332}
17333
17334// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
17335func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
17336	return LocalNetworkGatewayListResultIterator{page: page}
17337}
17338
17339// IsEmpty returns true if the ListResult contains no values.
17340func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
17341	return lnglr.Value == nil || len(*lnglr.Value) == 0
17342}
17343
17344// hasNextLink returns true if the NextLink is not empty.
17345func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
17346	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
17347}
17348
17349// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17350// It returns nil if no more results exist.
17351func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17352	if !lnglr.hasNextLink() {
17353		return nil, nil
17354	}
17355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17356		autorest.AsJSON(),
17357		autorest.AsGet(),
17358		autorest.WithBaseURL(to.String(lnglr.NextLink)))
17359}
17360
17361// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
17362type LocalNetworkGatewayListResultPage struct {
17363	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
17364	lnglr LocalNetworkGatewayListResult
17365}
17366
17367// NextWithContext advances to the next page of values.  If there was an error making
17368// the request the page does not advance and the error is returned.
17369func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17370	if tracing.IsEnabled() {
17371		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
17372		defer func() {
17373			sc := -1
17374			if page.Response().Response.Response != nil {
17375				sc = page.Response().Response.Response.StatusCode
17376			}
17377			tracing.EndSpan(ctx, sc, err)
17378		}()
17379	}
17380	for {
17381		next, err := page.fn(ctx, page.lnglr)
17382		if err != nil {
17383			return err
17384		}
17385		page.lnglr = next
17386		if !next.hasNextLink() || !next.IsEmpty() {
17387			break
17388		}
17389	}
17390	return nil
17391}
17392
17393// Next advances to the next page of values.  If there was an error making
17394// the request the page does not advance and the error is returned.
17395// Deprecated: Use NextWithContext() instead.
17396func (page *LocalNetworkGatewayListResultPage) Next() error {
17397	return page.NextWithContext(context.Background())
17398}
17399
17400// NotDone returns true if the page enumeration should be started or is not yet complete.
17401func (page LocalNetworkGatewayListResultPage) NotDone() bool {
17402	return !page.lnglr.IsEmpty()
17403}
17404
17405// Response returns the raw server response from the last page request.
17406func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
17407	return page.lnglr
17408}
17409
17410// Values returns the slice of values for the current page or nil if there are no values.
17411func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
17412	if page.lnglr.IsEmpty() {
17413		return nil
17414	}
17415	return *page.lnglr.Value
17416}
17417
17418// Creates a new instance of the LocalNetworkGatewayListResultPage type.
17419func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
17420	return LocalNetworkGatewayListResultPage{
17421		fn:    getNextPage,
17422		lnglr: cur,
17423	}
17424}
17425
17426// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
17427type LocalNetworkGatewayPropertiesFormat struct {
17428	// LocalNetworkAddressSpace - Local network site address space.
17429	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
17430	// GatewayIPAddress - IP address of local network gateway.
17431	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
17432	// BgpSettings - Local network gateway's BGP speaker settings.
17433	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17434	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
17435	ResourceGUID *string `json:"resourceGuid,omitempty"`
17436	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17437	ProvisioningState *string `json:"provisioningState,omitempty"`
17438}
17439
17440// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
17441func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17442	objectMap := make(map[string]interface{})
17443	if lngpf.LocalNetworkAddressSpace != nil {
17444		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
17445	}
17446	if lngpf.GatewayIPAddress != nil {
17447		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
17448	}
17449	if lngpf.BgpSettings != nil {
17450		objectMap["bgpSettings"] = lngpf.BgpSettings
17451	}
17452	if lngpf.ResourceGUID != nil {
17453		objectMap["resourceGuid"] = lngpf.ResourceGUID
17454	}
17455	return json.Marshal(objectMap)
17456}
17457
17458// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17459// long-running operation.
17460type LocalNetworkGatewaysCreateOrUpdateFuture struct {
17461	azure.FutureAPI
17462	// Result returns the result of the asynchronous operation.
17463	// If the operation has not completed it will return an error.
17464	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17465}
17466
17467// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17468func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17469	var azFuture azure.Future
17470	if err := json.Unmarshal(body, &azFuture); err != nil {
17471		return err
17472	}
17473	future.FutureAPI = &azFuture
17474	future.Result = future.result
17475	return nil
17476}
17477
17478// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
17479func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17480	var done bool
17481	done, err = future.DoneWithContext(context.Background(), client)
17482	if err != nil {
17483		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17484		return
17485	}
17486	if !done {
17487		lng.Response.Response = future.Response()
17488		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
17489		return
17490	}
17491	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17492	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17493		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
17494		if err != nil {
17495			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
17496		}
17497	}
17498	return
17499}
17500
17501// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
17502// long-running operation.
17503type LocalNetworkGatewaysDeleteFuture struct {
17504	azure.FutureAPI
17505	// Result returns the result of the asynchronous operation.
17506	// If the operation has not completed it will return an error.
17507	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
17508}
17509
17510// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17511func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
17512	var azFuture azure.Future
17513	if err := json.Unmarshal(body, &azFuture); err != nil {
17514		return err
17515	}
17516	future.FutureAPI = &azFuture
17517	future.Result = future.result
17518	return nil
17519}
17520
17521// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
17522func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
17523	var done bool
17524	done, err = future.DoneWithContext(context.Background(), client)
17525	if err != nil {
17526		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
17527		return
17528	}
17529	if !done {
17530		ar.Response = future.Response()
17531		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
17532		return
17533	}
17534	ar.Response = future.Response()
17535	return
17536}
17537
17538// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17539// long-running operation.
17540type LocalNetworkGatewaysUpdateTagsFuture struct {
17541	azure.FutureAPI
17542	// Result returns the result of the asynchronous operation.
17543	// If the operation has not completed it will return an error.
17544	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17545}
17546
17547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17548func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17549	var azFuture azure.Future
17550	if err := json.Unmarshal(body, &azFuture); err != nil {
17551		return err
17552	}
17553	future.FutureAPI = &azFuture
17554	future.Result = future.result
17555	return nil
17556}
17557
17558// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
17559func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17560	var done bool
17561	done, err = future.DoneWithContext(context.Background(), client)
17562	if err != nil {
17563		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17564		return
17565	}
17566	if !done {
17567		lng.Response.Response = future.Response()
17568		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
17569		return
17570	}
17571	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17572	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17573		lng, err = client.UpdateTagsResponder(lng.Response.Response)
17574		if err != nil {
17575			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
17576		}
17577	}
17578	return
17579}
17580
17581// LogSpecification description of logging specification.
17582type LogSpecification struct {
17583	// Name - The name of the specification.
17584	Name *string `json:"name,omitempty"`
17585	// DisplayName - The display name of the specification.
17586	DisplayName *string `json:"displayName,omitempty"`
17587	// BlobDuration - Duration of the blob.
17588	BlobDuration *string `json:"blobDuration,omitempty"`
17589}
17590
17591// ManagedServiceIdentity identity for the resource.
17592type ManagedServiceIdentity struct {
17593	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
17594	PrincipalID *string `json:"principalId,omitempty"`
17595	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
17596	TenantID *string `json:"tenantId,omitempty"`
17597	// Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
17598	Type ResourceIdentityType `json:"type,omitempty"`
17599	// UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
17600	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
17601}
17602
17603// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
17604func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
17605	objectMap := make(map[string]interface{})
17606	if msi.Type != "" {
17607		objectMap["type"] = msi.Type
17608	}
17609	if msi.UserAssignedIdentities != nil {
17610		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
17611	}
17612	return json.Marshal(objectMap)
17613}
17614
17615// ManagedServiceIdentityUserAssignedIdentitiesValue ...
17616type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
17617	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
17618	PrincipalID *string `json:"principalId,omitempty"`
17619	// ClientID - READ-ONLY; The client id of user assigned identity.
17620	ClientID *string `json:"clientId,omitempty"`
17621}
17622
17623// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
17624func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
17625	objectMap := make(map[string]interface{})
17626	return json.Marshal(objectMap)
17627}
17628
17629// MatchedRule matched rule.
17630type MatchedRule struct {
17631	// RuleName - Name of the matched network security rule.
17632	RuleName *string `json:"ruleName,omitempty"`
17633	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
17634	Action *string `json:"action,omitempty"`
17635}
17636
17637// MetricSpecification description of metrics specification.
17638type MetricSpecification struct {
17639	// Name - The name of the metric.
17640	Name *string `json:"name,omitempty"`
17641	// DisplayName - The display name of the metric.
17642	DisplayName *string `json:"displayName,omitempty"`
17643	// DisplayDescription - The description of the metric.
17644	DisplayDescription *string `json:"displayDescription,omitempty"`
17645	// Unit - Units the metric to be displayed in.
17646	Unit *string `json:"unit,omitempty"`
17647	// AggregationType - The aggregation type.
17648	AggregationType *string `json:"aggregationType,omitempty"`
17649	// Availabilities - List of availability.
17650	Availabilities *[]Availability `json:"availabilities,omitempty"`
17651	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
17652	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
17653	// FillGapWithZero - Whether gaps would be filled with zeros.
17654	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
17655	// MetricFilterPattern - Pattern for the filter of the metric.
17656	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
17657	// Dimensions - List of dimensions.
17658	Dimensions *[]Dimension `json:"dimensions,omitempty"`
17659	// IsInternal - Whether the metric is internal.
17660	IsInternal *bool `json:"isInternal,omitempty"`
17661	// SourceMdmAccount - The source MDM account.
17662	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
17663	// SourceMdmNamespace - The source MDM namespace.
17664	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
17665	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
17666	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
17667}
17668
17669// NextHopParameters parameters that define the source and destination endpoint.
17670type NextHopParameters struct {
17671	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
17672	TargetResourceID *string `json:"targetResourceId,omitempty"`
17673	// SourceIPAddress - The source IP address.
17674	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
17675	// DestinationIPAddress - The destination IP address.
17676	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
17677	// 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).
17678	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
17679}
17680
17681// NextHopResult the information about next hop from the specified VM.
17682type NextHopResult struct {
17683	autorest.Response `json:"-"`
17684	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
17685	NextHopType NextHopType `json:"nextHopType,omitempty"`
17686	// NextHopIPAddress - Next hop IP Address
17687	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
17688	// 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'.
17689	RouteTableID *string `json:"routeTableId,omitempty"`
17690}
17691
17692// Operation network REST API operation definition.
17693type Operation struct {
17694	// Name - Operation name: {provider}/{resource}/{operation}
17695	Name *string `json:"name,omitempty"`
17696	// Display - Display metadata associated with the operation.
17697	Display *OperationDisplay `json:"display,omitempty"`
17698	// Origin - Origin of the operation.
17699	Origin *string `json:"origin,omitempty"`
17700	// OperationPropertiesFormat - Operation properties format.
17701	*OperationPropertiesFormat `json:"properties,omitempty"`
17702}
17703
17704// MarshalJSON is the custom marshaler for Operation.
17705func (o Operation) MarshalJSON() ([]byte, error) {
17706	objectMap := make(map[string]interface{})
17707	if o.Name != nil {
17708		objectMap["name"] = o.Name
17709	}
17710	if o.Display != nil {
17711		objectMap["display"] = o.Display
17712	}
17713	if o.Origin != nil {
17714		objectMap["origin"] = o.Origin
17715	}
17716	if o.OperationPropertiesFormat != nil {
17717		objectMap["properties"] = o.OperationPropertiesFormat
17718	}
17719	return json.Marshal(objectMap)
17720}
17721
17722// UnmarshalJSON is the custom unmarshaler for Operation struct.
17723func (o *Operation) UnmarshalJSON(body []byte) error {
17724	var m map[string]*json.RawMessage
17725	err := json.Unmarshal(body, &m)
17726	if err != nil {
17727		return err
17728	}
17729	for k, v := range m {
17730		switch k {
17731		case "name":
17732			if v != nil {
17733				var name string
17734				err = json.Unmarshal(*v, &name)
17735				if err != nil {
17736					return err
17737				}
17738				o.Name = &name
17739			}
17740		case "display":
17741			if v != nil {
17742				var display OperationDisplay
17743				err = json.Unmarshal(*v, &display)
17744				if err != nil {
17745					return err
17746				}
17747				o.Display = &display
17748			}
17749		case "origin":
17750			if v != nil {
17751				var origin string
17752				err = json.Unmarshal(*v, &origin)
17753				if err != nil {
17754					return err
17755				}
17756				o.Origin = &origin
17757			}
17758		case "properties":
17759			if v != nil {
17760				var operationPropertiesFormat OperationPropertiesFormat
17761				err = json.Unmarshal(*v, &operationPropertiesFormat)
17762				if err != nil {
17763					return err
17764				}
17765				o.OperationPropertiesFormat = &operationPropertiesFormat
17766			}
17767		}
17768	}
17769
17770	return nil
17771}
17772
17773// OperationDisplay display metadata associated with the operation.
17774type OperationDisplay struct {
17775	// Provider - Service provider: Microsoft Network.
17776	Provider *string `json:"provider,omitempty"`
17777	// Resource - Resource on which the operation is performed.
17778	Resource *string `json:"resource,omitempty"`
17779	// Operation - Type of the operation: get, read, delete, etc.
17780	Operation *string `json:"operation,omitempty"`
17781	// Description - Description of the operation.
17782	Description *string `json:"description,omitempty"`
17783}
17784
17785// OperationListResult result of the request to list Network operations. It contains a list of operations
17786// and a URL link to get the next set of results.
17787type OperationListResult struct {
17788	autorest.Response `json:"-"`
17789	// Value - List of Network operations supported by the Network resource provider.
17790	Value *[]Operation `json:"value,omitempty"`
17791	// NextLink - URL to get the next set of operation list results if there are any.
17792	NextLink *string `json:"nextLink,omitempty"`
17793}
17794
17795// OperationListResultIterator provides access to a complete listing of Operation values.
17796type OperationListResultIterator struct {
17797	i    int
17798	page OperationListResultPage
17799}
17800
17801// NextWithContext advances to the next value.  If there was an error making
17802// the request the iterator does not advance and the error is returned.
17803func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17804	if tracing.IsEnabled() {
17805		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
17806		defer func() {
17807			sc := -1
17808			if iter.Response().Response.Response != nil {
17809				sc = iter.Response().Response.Response.StatusCode
17810			}
17811			tracing.EndSpan(ctx, sc, err)
17812		}()
17813	}
17814	iter.i++
17815	if iter.i < len(iter.page.Values()) {
17816		return nil
17817	}
17818	err = iter.page.NextWithContext(ctx)
17819	if err != nil {
17820		iter.i--
17821		return err
17822	}
17823	iter.i = 0
17824	return nil
17825}
17826
17827// Next advances to the next value.  If there was an error making
17828// the request the iterator does not advance and the error is returned.
17829// Deprecated: Use NextWithContext() instead.
17830func (iter *OperationListResultIterator) Next() error {
17831	return iter.NextWithContext(context.Background())
17832}
17833
17834// NotDone returns true if the enumeration should be started or is not yet complete.
17835func (iter OperationListResultIterator) NotDone() bool {
17836	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17837}
17838
17839// Response returns the raw server response from the last page request.
17840func (iter OperationListResultIterator) Response() OperationListResult {
17841	return iter.page.Response()
17842}
17843
17844// Value returns the current value or a zero-initialized value if the
17845// iterator has advanced beyond the end of the collection.
17846func (iter OperationListResultIterator) Value() Operation {
17847	if !iter.page.NotDone() {
17848		return Operation{}
17849	}
17850	return iter.page.Values()[iter.i]
17851}
17852
17853// Creates a new instance of the OperationListResultIterator type.
17854func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
17855	return OperationListResultIterator{page: page}
17856}
17857
17858// IsEmpty returns true if the ListResult contains no values.
17859func (olr OperationListResult) IsEmpty() bool {
17860	return olr.Value == nil || len(*olr.Value) == 0
17861}
17862
17863// hasNextLink returns true if the NextLink is not empty.
17864func (olr OperationListResult) hasNextLink() bool {
17865	return olr.NextLink != nil && len(*olr.NextLink) != 0
17866}
17867
17868// operationListResultPreparer prepares a request to retrieve the next set of results.
17869// It returns nil if no more results exist.
17870func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
17871	if !olr.hasNextLink() {
17872		return nil, nil
17873	}
17874	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17875		autorest.AsJSON(),
17876		autorest.AsGet(),
17877		autorest.WithBaseURL(to.String(olr.NextLink)))
17878}
17879
17880// OperationListResultPage contains a page of Operation values.
17881type OperationListResultPage struct {
17882	fn  func(context.Context, OperationListResult) (OperationListResult, error)
17883	olr OperationListResult
17884}
17885
17886// NextWithContext advances to the next page of values.  If there was an error making
17887// the request the page does not advance and the error is returned.
17888func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
17889	if tracing.IsEnabled() {
17890		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
17891		defer func() {
17892			sc := -1
17893			if page.Response().Response.Response != nil {
17894				sc = page.Response().Response.Response.StatusCode
17895			}
17896			tracing.EndSpan(ctx, sc, err)
17897		}()
17898	}
17899	for {
17900		next, err := page.fn(ctx, page.olr)
17901		if err != nil {
17902			return err
17903		}
17904		page.olr = next
17905		if !next.hasNextLink() || !next.IsEmpty() {
17906			break
17907		}
17908	}
17909	return nil
17910}
17911
17912// Next advances to the next page of values.  If there was an error making
17913// the request the page does not advance and the error is returned.
17914// Deprecated: Use NextWithContext() instead.
17915func (page *OperationListResultPage) Next() error {
17916	return page.NextWithContext(context.Background())
17917}
17918
17919// NotDone returns true if the page enumeration should be started or is not yet complete.
17920func (page OperationListResultPage) NotDone() bool {
17921	return !page.olr.IsEmpty()
17922}
17923
17924// Response returns the raw server response from the last page request.
17925func (page OperationListResultPage) Response() OperationListResult {
17926	return page.olr
17927}
17928
17929// Values returns the slice of values for the current page or nil if there are no values.
17930func (page OperationListResultPage) Values() []Operation {
17931	if page.olr.IsEmpty() {
17932		return nil
17933	}
17934	return *page.olr.Value
17935}
17936
17937// Creates a new instance of the OperationListResultPage type.
17938func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
17939	return OperationListResultPage{
17940		fn:  getNextPage,
17941		olr: cur,
17942	}
17943}
17944
17945// OperationPropertiesFormat description of operation properties format.
17946type OperationPropertiesFormat struct {
17947	// ServiceSpecification - Specification of the service.
17948	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
17949}
17950
17951// OperationPropertiesFormatServiceSpecification specification of the service.
17952type OperationPropertiesFormatServiceSpecification struct {
17953	// MetricSpecifications - Operation service specification.
17954	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
17955	// LogSpecifications - Operation log specification.
17956	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
17957}
17958
17959// OutboundRule outbound rule of the load balancer.
17960type OutboundRule struct {
17961	autorest.Response `json:"-"`
17962	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
17963	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
17964	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17965	Name *string `json:"name,omitempty"`
17966	// Etag - A unique read-only string that changes whenever the resource is updated.
17967	Etag *string `json:"etag,omitempty"`
17968	// ID - Resource ID.
17969	ID *string `json:"id,omitempty"`
17970}
17971
17972// MarshalJSON is the custom marshaler for OutboundRule.
17973func (or OutboundRule) MarshalJSON() ([]byte, error) {
17974	objectMap := make(map[string]interface{})
17975	if or.OutboundRulePropertiesFormat != nil {
17976		objectMap["properties"] = or.OutboundRulePropertiesFormat
17977	}
17978	if or.Name != nil {
17979		objectMap["name"] = or.Name
17980	}
17981	if or.Etag != nil {
17982		objectMap["etag"] = or.Etag
17983	}
17984	if or.ID != nil {
17985		objectMap["id"] = or.ID
17986	}
17987	return json.Marshal(objectMap)
17988}
17989
17990// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
17991func (or *OutboundRule) UnmarshalJSON(body []byte) error {
17992	var m map[string]*json.RawMessage
17993	err := json.Unmarshal(body, &m)
17994	if err != nil {
17995		return err
17996	}
17997	for k, v := range m {
17998		switch k {
17999		case "properties":
18000			if v != nil {
18001				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
18002				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
18003				if err != nil {
18004					return err
18005				}
18006				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
18007			}
18008		case "name":
18009			if v != nil {
18010				var name string
18011				err = json.Unmarshal(*v, &name)
18012				if err != nil {
18013					return err
18014				}
18015				or.Name = &name
18016			}
18017		case "etag":
18018			if v != nil {
18019				var etag string
18020				err = json.Unmarshal(*v, &etag)
18021				if err != nil {
18022					return err
18023				}
18024				or.Etag = &etag
18025			}
18026		case "id":
18027			if v != nil {
18028				var ID string
18029				err = json.Unmarshal(*v, &ID)
18030				if err != nil {
18031					return err
18032				}
18033				or.ID = &ID
18034			}
18035		}
18036	}
18037
18038	return nil
18039}
18040
18041// OutboundRulePropertiesFormat outbound rule of the load balancer.
18042type OutboundRulePropertiesFormat struct {
18043	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
18044	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
18045	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
18046	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
18047	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
18048	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
18049	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18050	ProvisioningState *string `json:"provisioningState,omitempty"`
18051	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
18052	Protocol Protocol1 `json:"protocol,omitempty"`
18053	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
18054	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
18055	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
18056	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18057}
18058
18059// P2SVpnGateway p2SVpnGateway Resource.
18060type P2SVpnGateway struct {
18061	autorest.Response        `json:"-"`
18062	*P2SVpnGatewayProperties `json:"properties,omitempty"`
18063	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18064	Etag *string `json:"etag,omitempty"`
18065	// ID - Resource ID.
18066	ID *string `json:"id,omitempty"`
18067	// Name - READ-ONLY; Resource name.
18068	Name *string `json:"name,omitempty"`
18069	// Type - READ-ONLY; Resource type.
18070	Type *string `json:"type,omitempty"`
18071	// Location - Resource location.
18072	Location *string `json:"location,omitempty"`
18073	// Tags - Resource tags.
18074	Tags map[string]*string `json:"tags"`
18075}
18076
18077// MarshalJSON is the custom marshaler for P2SVpnGateway.
18078func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
18079	objectMap := make(map[string]interface{})
18080	if pvg.P2SVpnGatewayProperties != nil {
18081		objectMap["properties"] = pvg.P2SVpnGatewayProperties
18082	}
18083	if pvg.ID != nil {
18084		objectMap["id"] = pvg.ID
18085	}
18086	if pvg.Location != nil {
18087		objectMap["location"] = pvg.Location
18088	}
18089	if pvg.Tags != nil {
18090		objectMap["tags"] = pvg.Tags
18091	}
18092	return json.Marshal(objectMap)
18093}
18094
18095// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
18096func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
18097	var m map[string]*json.RawMessage
18098	err := json.Unmarshal(body, &m)
18099	if err != nil {
18100		return err
18101	}
18102	for k, v := range m {
18103		switch k {
18104		case "properties":
18105			if v != nil {
18106				var p2SVpnGatewayProperties P2SVpnGatewayProperties
18107				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
18108				if err != nil {
18109					return err
18110				}
18111				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
18112			}
18113		case "etag":
18114			if v != nil {
18115				var etag string
18116				err = json.Unmarshal(*v, &etag)
18117				if err != nil {
18118					return err
18119				}
18120				pvg.Etag = &etag
18121			}
18122		case "id":
18123			if v != nil {
18124				var ID string
18125				err = json.Unmarshal(*v, &ID)
18126				if err != nil {
18127					return err
18128				}
18129				pvg.ID = &ID
18130			}
18131		case "name":
18132			if v != nil {
18133				var name string
18134				err = json.Unmarshal(*v, &name)
18135				if err != nil {
18136					return err
18137				}
18138				pvg.Name = &name
18139			}
18140		case "type":
18141			if v != nil {
18142				var typeVar string
18143				err = json.Unmarshal(*v, &typeVar)
18144				if err != nil {
18145					return err
18146				}
18147				pvg.Type = &typeVar
18148			}
18149		case "location":
18150			if v != nil {
18151				var location string
18152				err = json.Unmarshal(*v, &location)
18153				if err != nil {
18154					return err
18155				}
18156				pvg.Location = &location
18157			}
18158		case "tags":
18159			if v != nil {
18160				var tags map[string]*string
18161				err = json.Unmarshal(*v, &tags)
18162				if err != nil {
18163					return err
18164				}
18165				pvg.Tags = tags
18166			}
18167		}
18168	}
18169
18170	return nil
18171}
18172
18173// P2SVpnGatewayProperties parameters for P2SVpnGateway
18174type P2SVpnGatewayProperties struct {
18175	// VirtualHub - The VirtualHub to which the gateway belongs
18176	VirtualHub *SubResource `json:"virtualHub,omitempty"`
18177	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18178	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18179	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
18180	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
18181	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
18182	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
18183	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
18184	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
18185	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
18186	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
18187}
18188
18189// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
18190func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
18191	objectMap := make(map[string]interface{})
18192	if pvgp.VirtualHub != nil {
18193		objectMap["virtualHub"] = pvgp.VirtualHub
18194	}
18195	if pvgp.ProvisioningState != "" {
18196		objectMap["provisioningState"] = pvgp.ProvisioningState
18197	}
18198	if pvgp.VpnGatewayScaleUnit != nil {
18199		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
18200	}
18201	if pvgp.P2SVpnServerConfiguration != nil {
18202		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
18203	}
18204	if pvgp.VpnClientAddressPool != nil {
18205		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
18206	}
18207	return json.Marshal(objectMap)
18208}
18209
18210// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18211// long-running operation.
18212type P2sVpnGatewaysCreateOrUpdateFuture struct {
18213	azure.FutureAPI
18214	// Result returns the result of the asynchronous operation.
18215	// If the operation has not completed it will return an error.
18216	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18217}
18218
18219// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18220func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18221	var azFuture azure.Future
18222	if err := json.Unmarshal(body, &azFuture); err != nil {
18223		return err
18224	}
18225	future.FutureAPI = &azFuture
18226	future.Result = future.result
18227	return nil
18228}
18229
18230// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
18231func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18232	var done bool
18233	done, err = future.DoneWithContext(context.Background(), client)
18234	if err != nil {
18235		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18236		return
18237	}
18238	if !done {
18239		pvg.Response.Response = future.Response()
18240		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
18241		return
18242	}
18243	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18244	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18245		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
18246		if err != nil {
18247			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
18248		}
18249	}
18250	return
18251}
18252
18253// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18254// operation.
18255type P2sVpnGatewaysDeleteFuture struct {
18256	azure.FutureAPI
18257	// Result returns the result of the asynchronous operation.
18258	// If the operation has not completed it will return an error.
18259	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
18260}
18261
18262// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18263func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18264	var azFuture azure.Future
18265	if err := json.Unmarshal(body, &azFuture); err != nil {
18266		return err
18267	}
18268	future.FutureAPI = &azFuture
18269	future.Result = future.result
18270	return nil
18271}
18272
18273// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
18274func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
18275	var done bool
18276	done, err = future.DoneWithContext(context.Background(), client)
18277	if err != nil {
18278		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18279		return
18280	}
18281	if !done {
18282		ar.Response = future.Response()
18283		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
18284		return
18285	}
18286	ar.Response = future.Response()
18287	return
18288}
18289
18290// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
18291// long-running operation.
18292type P2sVpnGatewaysGenerateVpnProfileFuture struct {
18293	azure.FutureAPI
18294	// Result returns the result of the asynchronous operation.
18295	// If the operation has not completed it will return an error.
18296	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
18297}
18298
18299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18300func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
18301	var azFuture azure.Future
18302	if err := json.Unmarshal(body, &azFuture); err != nil {
18303		return err
18304	}
18305	future.FutureAPI = &azFuture
18306	future.Result = future.result
18307	return nil
18308}
18309
18310// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
18311func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
18312	var done bool
18313	done, err = future.DoneWithContext(context.Background(), client)
18314	if err != nil {
18315		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
18316		return
18317	}
18318	if !done {
18319		vpr.Response.Response = future.Response()
18320		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
18321		return
18322	}
18323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18324	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
18325		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
18326		if err != nil {
18327			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
18328		}
18329	}
18330	return
18331}
18332
18333// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18334// long-running operation.
18335type P2sVpnGatewaysUpdateTagsFuture struct {
18336	azure.FutureAPI
18337	// Result returns the result of the asynchronous operation.
18338	// If the operation has not completed it will return an error.
18339	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18340}
18341
18342// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18343func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18344	var azFuture azure.Future
18345	if err := json.Unmarshal(body, &azFuture); err != nil {
18346		return err
18347	}
18348	future.FutureAPI = &azFuture
18349	future.Result = future.result
18350	return nil
18351}
18352
18353// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
18354func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18355	var done bool
18356	done, err = future.DoneWithContext(context.Background(), client)
18357	if err != nil {
18358		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18359		return
18360	}
18361	if !done {
18362		pvg.Response.Response = future.Response()
18363		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
18364		return
18365	}
18366	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18367	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18368		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
18369		if err != nil {
18370			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
18371		}
18372	}
18373	return
18374}
18375
18376// P2SVpnProfileParameters vpn Client Parameters for package generation
18377type P2SVpnProfileParameters struct {
18378	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
18379	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
18380}
18381
18382// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
18383// P2SVpnServerConfiguration.
18384type P2SVpnServerConfigRadiusClientRootCertificate struct {
18385	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
18386	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18387	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18388	Name *string `json:"name,omitempty"`
18389	// Etag - A unique read-only string that changes whenever the resource is updated.
18390	Etag *string `json:"etag,omitempty"`
18391	// ID - Resource ID.
18392	ID *string `json:"id,omitempty"`
18393}
18394
18395// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
18396func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
18397	objectMap := make(map[string]interface{})
18398	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
18399		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18400	}
18401	if pvscrcrc.Name != nil {
18402		objectMap["name"] = pvscrcrc.Name
18403	}
18404	if pvscrcrc.Etag != nil {
18405		objectMap["etag"] = pvscrcrc.Etag
18406	}
18407	if pvscrcrc.ID != nil {
18408		objectMap["id"] = pvscrcrc.ID
18409	}
18410	return json.Marshal(objectMap)
18411}
18412
18413// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
18414func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
18415	var m map[string]*json.RawMessage
18416	err := json.Unmarshal(body, &m)
18417	if err != nil {
18418		return err
18419	}
18420	for k, v := range m {
18421		switch k {
18422		case "properties":
18423			if v != nil {
18424				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18425				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
18426				if err != nil {
18427					return err
18428				}
18429				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18430			}
18431		case "name":
18432			if v != nil {
18433				var name string
18434				err = json.Unmarshal(*v, &name)
18435				if err != nil {
18436					return err
18437				}
18438				pvscrcrc.Name = &name
18439			}
18440		case "etag":
18441			if v != nil {
18442				var etag string
18443				err = json.Unmarshal(*v, &etag)
18444				if err != nil {
18445					return err
18446				}
18447				pvscrcrc.Etag = &etag
18448			}
18449		case "id":
18450			if v != nil {
18451				var ID string
18452				err = json.Unmarshal(*v, &ID)
18453				if err != nil {
18454					return err
18455				}
18456				pvscrcrc.ID = &ID
18457			}
18458		}
18459	}
18460
18461	return nil
18462}
18463
18464// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
18465// certificate of P2SVpnServerConfiguration.
18466type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
18467	// Thumbprint - The Radius client root certificate thumbprint.
18468	Thumbprint *string `json:"thumbprint,omitempty"`
18469	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18470	ProvisioningState *string `json:"provisioningState,omitempty"`
18471}
18472
18473// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
18474func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18475	objectMap := make(map[string]interface{})
18476	if pvscrcrcpf.Thumbprint != nil {
18477		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
18478	}
18479	return json.Marshal(objectMap)
18480}
18481
18482// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
18483// P2SVpnServerConfiguration.
18484type P2SVpnServerConfigRadiusServerRootCertificate struct {
18485	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
18486	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
18487	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18488	Name *string `json:"name,omitempty"`
18489	// Etag - A unique read-only string that changes whenever the resource is updated.
18490	Etag *string `json:"etag,omitempty"`
18491	// ID - Resource ID.
18492	ID *string `json:"id,omitempty"`
18493}
18494
18495// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
18496func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
18497	objectMap := make(map[string]interface{})
18498	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
18499		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18500	}
18501	if pvscrsrc.Name != nil {
18502		objectMap["name"] = pvscrsrc.Name
18503	}
18504	if pvscrsrc.Etag != nil {
18505		objectMap["etag"] = pvscrsrc.Etag
18506	}
18507	if pvscrsrc.ID != nil {
18508		objectMap["id"] = pvscrsrc.ID
18509	}
18510	return json.Marshal(objectMap)
18511}
18512
18513// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
18514func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
18515	var m map[string]*json.RawMessage
18516	err := json.Unmarshal(body, &m)
18517	if err != nil {
18518		return err
18519	}
18520	for k, v := range m {
18521		switch k {
18522		case "properties":
18523			if v != nil {
18524				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18525				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
18526				if err != nil {
18527					return err
18528				}
18529				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18530			}
18531		case "name":
18532			if v != nil {
18533				var name string
18534				err = json.Unmarshal(*v, &name)
18535				if err != nil {
18536					return err
18537				}
18538				pvscrsrc.Name = &name
18539			}
18540		case "etag":
18541			if v != nil {
18542				var etag string
18543				err = json.Unmarshal(*v, &etag)
18544				if err != nil {
18545					return err
18546				}
18547				pvscrsrc.Etag = &etag
18548			}
18549		case "id":
18550			if v != nil {
18551				var ID string
18552				err = json.Unmarshal(*v, &ID)
18553				if err != nil {
18554					return err
18555				}
18556				pvscrsrc.ID = &ID
18557			}
18558		}
18559	}
18560
18561	return nil
18562}
18563
18564// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
18565// certificate of P2SVpnServerConfiguration.
18566type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
18567	// PublicCertData - The certificate public data.
18568	PublicCertData *string `json:"publicCertData,omitempty"`
18569	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18570	ProvisioningState *string `json:"provisioningState,omitempty"`
18571}
18572
18573// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
18574func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18575	objectMap := make(map[string]interface{})
18576	if pvscrsrcpf.PublicCertData != nil {
18577		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
18578	}
18579	return json.Marshal(objectMap)
18580}
18581
18582// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
18583type P2SVpnServerConfiguration struct {
18584	autorest.Response                    `json:"-"`
18585	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
18586	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18587	Name *string `json:"name,omitempty"`
18588	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18589	Etag *string `json:"etag,omitempty"`
18590	// ID - Resource ID.
18591	ID *string `json:"id,omitempty"`
18592}
18593
18594// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
18595func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
18596	objectMap := make(map[string]interface{})
18597	if pvsc.P2SVpnServerConfigurationProperties != nil {
18598		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
18599	}
18600	if pvsc.Name != nil {
18601		objectMap["name"] = pvsc.Name
18602	}
18603	if pvsc.ID != nil {
18604		objectMap["id"] = pvsc.ID
18605	}
18606	return json.Marshal(objectMap)
18607}
18608
18609// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
18610func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
18611	var m map[string]*json.RawMessage
18612	err := json.Unmarshal(body, &m)
18613	if err != nil {
18614		return err
18615	}
18616	for k, v := range m {
18617		switch k {
18618		case "properties":
18619			if v != nil {
18620				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
18621				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
18622				if err != nil {
18623					return err
18624				}
18625				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
18626			}
18627		case "name":
18628			if v != nil {
18629				var name string
18630				err = json.Unmarshal(*v, &name)
18631				if err != nil {
18632					return err
18633				}
18634				pvsc.Name = &name
18635			}
18636		case "etag":
18637			if v != nil {
18638				var etag string
18639				err = json.Unmarshal(*v, &etag)
18640				if err != nil {
18641					return err
18642				}
18643				pvsc.Etag = &etag
18644			}
18645		case "id":
18646			if v != nil {
18647				var ID string
18648				err = json.Unmarshal(*v, &ID)
18649				if err != nil {
18650					return err
18651				}
18652				pvsc.ID = &ID
18653			}
18654		}
18655	}
18656
18657	return nil
18658}
18659
18660// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
18661type P2SVpnServerConfigurationProperties struct {
18662	// Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Parent VirtualWan resource name.
18663	Name *string `json:"name,omitempty"`
18664	// VpnProtocols - vpnProtocols for the P2SVpnServerConfiguration.
18665	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
18666	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
18667	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
18668	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
18669	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
18670	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
18671	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
18672	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
18673	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
18674	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
18675	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
18676	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
18677	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
18678	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
18679	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
18680	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18681	ProvisioningState *string `json:"provisioningState,omitempty"`
18682	// P2SVpnGateways - READ-ONLY
18683	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
18684	// Etag - A unique read-only string that changes whenever the resource is updated.
18685	Etag *string `json:"etag,omitempty"`
18686}
18687
18688// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
18689func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
18690	objectMap := make(map[string]interface{})
18691	if pvscp.Name != nil {
18692		objectMap["name"] = pvscp.Name
18693	}
18694	if pvscp.VpnProtocols != nil {
18695		objectMap["vpnProtocols"] = pvscp.VpnProtocols
18696	}
18697	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
18698		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
18699	}
18700	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
18701		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
18702	}
18703	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
18704		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
18705	}
18706	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
18707		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
18708	}
18709	if pvscp.VpnClientIpsecPolicies != nil {
18710		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
18711	}
18712	if pvscp.RadiusServerAddress != nil {
18713		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
18714	}
18715	if pvscp.RadiusServerSecret != nil {
18716		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
18717	}
18718	if pvscp.Etag != nil {
18719		objectMap["etag"] = pvscp.Etag
18720	}
18721	return json.Marshal(objectMap)
18722}
18723
18724// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
18725// of a long-running operation.
18726type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
18727	azure.FutureAPI
18728	// Result returns the result of the asynchronous operation.
18729	// If the operation has not completed it will return an error.
18730	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
18731}
18732
18733// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18734func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18735	var azFuture azure.Future
18736	if err := json.Unmarshal(body, &azFuture); err != nil {
18737		return err
18738	}
18739	future.FutureAPI = &azFuture
18740	future.Result = future.result
18741	return nil
18742}
18743
18744// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
18745func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
18746	var done bool
18747	done, err = future.DoneWithContext(context.Background(), client)
18748	if err != nil {
18749		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18750		return
18751	}
18752	if !done {
18753		pvsc.Response.Response = future.Response()
18754		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
18755		return
18756	}
18757	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18758	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
18759		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
18760		if err != nil {
18761			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
18762		}
18763	}
18764	return
18765}
18766
18767// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
18768// long-running operation.
18769type P2sVpnServerConfigurationsDeleteFuture struct {
18770	azure.FutureAPI
18771	// Result returns the result of the asynchronous operation.
18772	// If the operation has not completed it will return an error.
18773	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
18774}
18775
18776// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18777func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
18778	var azFuture azure.Future
18779	if err := json.Unmarshal(body, &azFuture); err != nil {
18780		return err
18781	}
18782	future.FutureAPI = &azFuture
18783	future.Result = future.result
18784	return nil
18785}
18786
18787// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
18788func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
18789	var done bool
18790	done, err = future.DoneWithContext(context.Background(), client)
18791	if err != nil {
18792		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
18793		return
18794	}
18795	if !done {
18796		ar.Response = future.Response()
18797		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
18798		return
18799	}
18800	ar.Response = future.Response()
18801	return
18802}
18803
18804// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
18805// P2SVpnServerConfiguration.
18806type P2SVpnServerConfigVpnClientRevokedCertificate struct {
18807	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
18808	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
18809	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18810	Name *string `json:"name,omitempty"`
18811	// Etag - A unique read-only string that changes whenever the resource is updated.
18812	Etag *string `json:"etag,omitempty"`
18813	// ID - Resource ID.
18814	ID *string `json:"id,omitempty"`
18815}
18816
18817// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
18818func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
18819	objectMap := make(map[string]interface{})
18820	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
18821		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18822	}
18823	if pvscvcrc.Name != nil {
18824		objectMap["name"] = pvscvcrc.Name
18825	}
18826	if pvscvcrc.Etag != nil {
18827		objectMap["etag"] = pvscvcrc.Etag
18828	}
18829	if pvscvcrc.ID != nil {
18830		objectMap["id"] = pvscvcrc.ID
18831	}
18832	return json.Marshal(objectMap)
18833}
18834
18835// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
18836func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
18837	var m map[string]*json.RawMessage
18838	err := json.Unmarshal(body, &m)
18839	if err != nil {
18840		return err
18841	}
18842	for k, v := range m {
18843		switch k {
18844		case "properties":
18845			if v != nil {
18846				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18847				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
18848				if err != nil {
18849					return err
18850				}
18851				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18852			}
18853		case "name":
18854			if v != nil {
18855				var name string
18856				err = json.Unmarshal(*v, &name)
18857				if err != nil {
18858					return err
18859				}
18860				pvscvcrc.Name = &name
18861			}
18862		case "etag":
18863			if v != nil {
18864				var etag string
18865				err = json.Unmarshal(*v, &etag)
18866				if err != nil {
18867					return err
18868				}
18869				pvscvcrc.Etag = &etag
18870			}
18871		case "id":
18872			if v != nil {
18873				var ID string
18874				err = json.Unmarshal(*v, &ID)
18875				if err != nil {
18876					return err
18877				}
18878				pvscvcrc.ID = &ID
18879			}
18880		}
18881	}
18882
18883	return nil
18884}
18885
18886// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
18887// certificate of P2SVpnServerConfiguration.
18888type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
18889	// Thumbprint - The revoked VPN client certificate thumbprint.
18890	Thumbprint *string `json:"thumbprint,omitempty"`
18891	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18892	ProvisioningState *string `json:"provisioningState,omitempty"`
18893}
18894
18895// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
18896func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18897	objectMap := make(map[string]interface{})
18898	if pvscvcrcpf.Thumbprint != nil {
18899		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
18900	}
18901	return json.Marshal(objectMap)
18902}
18903
18904// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
18905type P2SVpnServerConfigVpnClientRootCertificate struct {
18906	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
18907	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18908	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18909	Name *string `json:"name,omitempty"`
18910	// Etag - A unique read-only string that changes whenever the resource is updated.
18911	Etag *string `json:"etag,omitempty"`
18912	// ID - Resource ID.
18913	ID *string `json:"id,omitempty"`
18914}
18915
18916// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
18917func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
18918	objectMap := make(map[string]interface{})
18919	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
18920		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18921	}
18922	if pvscvcrc.Name != nil {
18923		objectMap["name"] = pvscvcrc.Name
18924	}
18925	if pvscvcrc.Etag != nil {
18926		objectMap["etag"] = pvscvcrc.Etag
18927	}
18928	if pvscvcrc.ID != nil {
18929		objectMap["id"] = pvscvcrc.ID
18930	}
18931	return json.Marshal(objectMap)
18932}
18933
18934// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
18935func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
18936	var m map[string]*json.RawMessage
18937	err := json.Unmarshal(body, &m)
18938	if err != nil {
18939		return err
18940	}
18941	for k, v := range m {
18942		switch k {
18943		case "properties":
18944			if v != nil {
18945				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18946				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
18947				if err != nil {
18948					return err
18949				}
18950				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18951			}
18952		case "name":
18953			if v != nil {
18954				var name string
18955				err = json.Unmarshal(*v, &name)
18956				if err != nil {
18957					return err
18958				}
18959				pvscvcrc.Name = &name
18960			}
18961		case "etag":
18962			if v != nil {
18963				var etag string
18964				err = json.Unmarshal(*v, &etag)
18965				if err != nil {
18966					return err
18967				}
18968				pvscvcrc.Etag = &etag
18969			}
18970		case "id":
18971			if v != nil {
18972				var ID string
18973				err = json.Unmarshal(*v, &ID)
18974				if err != nil {
18975					return err
18976				}
18977				pvscvcrc.ID = &ID
18978			}
18979		}
18980	}
18981
18982	return nil
18983}
18984
18985// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
18986// P2SVpnServerConfiguration.
18987type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
18988	// PublicCertData - The certificate public data.
18989	PublicCertData *string `json:"publicCertData,omitempty"`
18990	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18991	ProvisioningState *string `json:"provisioningState,omitempty"`
18992}
18993
18994// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
18995func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18996	objectMap := make(map[string]interface{})
18997	if pvscvcrcpf.PublicCertData != nil {
18998		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
18999	}
19000	return json.Marshal(objectMap)
19001}
19002
19003// PacketCapture parameters that define the create packet capture operation.
19004type PacketCapture struct {
19005	*PacketCaptureParameters `json:"properties,omitempty"`
19006}
19007
19008// MarshalJSON is the custom marshaler for PacketCapture.
19009func (pc PacketCapture) MarshalJSON() ([]byte, error) {
19010	objectMap := make(map[string]interface{})
19011	if pc.PacketCaptureParameters != nil {
19012		objectMap["properties"] = pc.PacketCaptureParameters
19013	}
19014	return json.Marshal(objectMap)
19015}
19016
19017// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
19018func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
19019	var m map[string]*json.RawMessage
19020	err := json.Unmarshal(body, &m)
19021	if err != nil {
19022		return err
19023	}
19024	for k, v := range m {
19025		switch k {
19026		case "properties":
19027			if v != nil {
19028				var packetCaptureParameters PacketCaptureParameters
19029				err = json.Unmarshal(*v, &packetCaptureParameters)
19030				if err != nil {
19031					return err
19032				}
19033				pc.PacketCaptureParameters = &packetCaptureParameters
19034			}
19035		}
19036	}
19037
19038	return nil
19039}
19040
19041// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
19042type PacketCaptureFilter struct {
19043	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
19044	Protocol PcProtocol `json:"protocol,omitempty"`
19045	// 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.
19046	LocalIPAddress *string `json:"localIPAddress,omitempty"`
19047	// 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.
19048	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
19049	// 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.
19050	LocalPort *string `json:"localPort,omitempty"`
19051	// 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.
19052	RemotePort *string `json:"remotePort,omitempty"`
19053}
19054
19055// PacketCaptureListResult list of packet capture sessions.
19056type PacketCaptureListResult struct {
19057	autorest.Response `json:"-"`
19058	// Value - Information about packet capture sessions.
19059	Value *[]PacketCaptureResult `json:"value,omitempty"`
19060}
19061
19062// PacketCaptureParameters parameters that define the create packet capture operation.
19063type PacketCaptureParameters struct {
19064	// Target - The ID of the targeted resource, only VM is currently supported.
19065	Target *string `json:"target,omitempty"`
19066	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19067	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19068	// TotalBytesPerSession - Maximum size of the capture output.
19069	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19070	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19071	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19072	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19073	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19074}
19075
19076// PacketCaptureQueryStatusResult status of packet capture session.
19077type PacketCaptureQueryStatusResult struct {
19078	autorest.Response `json:"-"`
19079	// Name - The name of the packet capture resource.
19080	Name *string `json:"name,omitempty"`
19081	// ID - The ID of the packet capture resource.
19082	ID *string `json:"id,omitempty"`
19083	// CaptureStartTime - The start time of the packet capture session.
19084	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
19085	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
19086	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
19087	// StopReason - The reason the current packet capture session was stopped.
19088	StopReason *string `json:"stopReason,omitempty"`
19089	// PacketCaptureError - List of errors of packet capture session.
19090	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
19091}
19092
19093// PacketCaptureResult information about packet capture session.
19094type PacketCaptureResult struct {
19095	autorest.Response `json:"-"`
19096	// Name - READ-ONLY; Name of the packet capture session.
19097	Name *string `json:"name,omitempty"`
19098	// ID - READ-ONLY; ID of the packet capture operation.
19099	ID                             *string `json:"id,omitempty"`
19100	Etag                           *string `json:"etag,omitempty"`
19101	*PacketCaptureResultProperties `json:"properties,omitempty"`
19102}
19103
19104// MarshalJSON is the custom marshaler for PacketCaptureResult.
19105func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
19106	objectMap := make(map[string]interface{})
19107	if pcr.Etag != nil {
19108		objectMap["etag"] = pcr.Etag
19109	}
19110	if pcr.PacketCaptureResultProperties != nil {
19111		objectMap["properties"] = pcr.PacketCaptureResultProperties
19112	}
19113	return json.Marshal(objectMap)
19114}
19115
19116// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
19117func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
19118	var m map[string]*json.RawMessage
19119	err := json.Unmarshal(body, &m)
19120	if err != nil {
19121		return err
19122	}
19123	for k, v := range m {
19124		switch k {
19125		case "name":
19126			if v != nil {
19127				var name string
19128				err = json.Unmarshal(*v, &name)
19129				if err != nil {
19130					return err
19131				}
19132				pcr.Name = &name
19133			}
19134		case "id":
19135			if v != nil {
19136				var ID string
19137				err = json.Unmarshal(*v, &ID)
19138				if err != nil {
19139					return err
19140				}
19141				pcr.ID = &ID
19142			}
19143		case "etag":
19144			if v != nil {
19145				var etag string
19146				err = json.Unmarshal(*v, &etag)
19147				if err != nil {
19148					return err
19149				}
19150				pcr.Etag = &etag
19151			}
19152		case "properties":
19153			if v != nil {
19154				var packetCaptureResultProperties PacketCaptureResultProperties
19155				err = json.Unmarshal(*v, &packetCaptureResultProperties)
19156				if err != nil {
19157					return err
19158				}
19159				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
19160			}
19161		}
19162	}
19163
19164	return nil
19165}
19166
19167// PacketCaptureResultProperties describes the properties of a packet capture session.
19168type PacketCaptureResultProperties struct {
19169	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19170	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19171	// Target - The ID of the targeted resource, only VM is currently supported.
19172	Target *string `json:"target,omitempty"`
19173	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19174	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19175	// TotalBytesPerSession - Maximum size of the capture output.
19176	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19177	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19178	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19179	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19180	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19181}
19182
19183// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
19184// operation.
19185type PacketCapturesCreateFuture struct {
19186	azure.FutureAPI
19187	// Result returns the result of the asynchronous operation.
19188	// If the operation has not completed it will return an error.
19189	Result func(PacketCapturesClient) (PacketCaptureResult, error)
19190}
19191
19192// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19193func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
19194	var azFuture azure.Future
19195	if err := json.Unmarshal(body, &azFuture); err != nil {
19196		return err
19197	}
19198	future.FutureAPI = &azFuture
19199	future.Result = future.result
19200	return nil
19201}
19202
19203// result is the default implementation for PacketCapturesCreateFuture.Result.
19204func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
19205	var done bool
19206	done, err = future.DoneWithContext(context.Background(), client)
19207	if err != nil {
19208		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
19209		return
19210	}
19211	if !done {
19212		pcr.Response.Response = future.Response()
19213		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
19214		return
19215	}
19216	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19217	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
19218		pcr, err = client.CreateResponder(pcr.Response.Response)
19219		if err != nil {
19220			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
19221		}
19222	}
19223	return
19224}
19225
19226// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19227// operation.
19228type PacketCapturesDeleteFuture struct {
19229	azure.FutureAPI
19230	// Result returns the result of the asynchronous operation.
19231	// If the operation has not completed it will return an error.
19232	Result func(PacketCapturesClient) (autorest.Response, error)
19233}
19234
19235// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19236func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
19237	var azFuture azure.Future
19238	if err := json.Unmarshal(body, &azFuture); err != nil {
19239		return err
19240	}
19241	future.FutureAPI = &azFuture
19242	future.Result = future.result
19243	return nil
19244}
19245
19246// result is the default implementation for PacketCapturesDeleteFuture.Result.
19247func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19248	var done bool
19249	done, err = future.DoneWithContext(context.Background(), client)
19250	if err != nil {
19251		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
19252		return
19253	}
19254	if !done {
19255		ar.Response = future.Response()
19256		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
19257		return
19258	}
19259	ar.Response = future.Response()
19260	return
19261}
19262
19263// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
19264// operation.
19265type PacketCapturesGetStatusFuture struct {
19266	azure.FutureAPI
19267	// Result returns the result of the asynchronous operation.
19268	// If the operation has not completed it will return an error.
19269	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
19270}
19271
19272// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19273func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
19274	var azFuture azure.Future
19275	if err := json.Unmarshal(body, &azFuture); err != nil {
19276		return err
19277	}
19278	future.FutureAPI = &azFuture
19279	future.Result = future.result
19280	return nil
19281}
19282
19283// result is the default implementation for PacketCapturesGetStatusFuture.Result.
19284func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
19285	var done bool
19286	done, err = future.DoneWithContext(context.Background(), client)
19287	if err != nil {
19288		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
19289		return
19290	}
19291	if !done {
19292		pcqsr.Response.Response = future.Response()
19293		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
19294		return
19295	}
19296	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19297	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
19298		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
19299		if err != nil {
19300			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
19301		}
19302	}
19303	return
19304}
19305
19306// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
19307// operation.
19308type PacketCapturesStopFuture struct {
19309	azure.FutureAPI
19310	// Result returns the result of the asynchronous operation.
19311	// If the operation has not completed it will return an error.
19312	Result func(PacketCapturesClient) (autorest.Response, error)
19313}
19314
19315// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19316func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
19317	var azFuture azure.Future
19318	if err := json.Unmarshal(body, &azFuture); err != nil {
19319		return err
19320	}
19321	future.FutureAPI = &azFuture
19322	future.Result = future.result
19323	return nil
19324}
19325
19326// result is the default implementation for PacketCapturesStopFuture.Result.
19327func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19328	var done bool
19329	done, err = future.DoneWithContext(context.Background(), client)
19330	if err != nil {
19331		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
19332		return
19333	}
19334	if !done {
19335		ar.Response = future.Response()
19336		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
19337		return
19338	}
19339	ar.Response = future.Response()
19340	return
19341}
19342
19343// PacketCaptureStorageLocation describes the storage location for a packet capture session.
19344type PacketCaptureStorageLocation struct {
19345	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
19346	StorageID *string `json:"storageId,omitempty"`
19347	// 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.
19348	StoragePath *string `json:"storagePath,omitempty"`
19349	// 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.
19350	FilePath *string `json:"filePath,omitempty"`
19351}
19352
19353// PatchRouteFilter route Filter Resource.
19354type PatchRouteFilter struct {
19355	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
19356	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19357	Name *string `json:"name,omitempty"`
19358	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19359	Etag *string `json:"etag,omitempty"`
19360	// Type - READ-ONLY; Resource type.
19361	Type *string `json:"type,omitempty"`
19362	// Tags - Resource tags.
19363	Tags map[string]*string `json:"tags"`
19364	// ID - Resource ID.
19365	ID *string `json:"id,omitempty"`
19366}
19367
19368// MarshalJSON is the custom marshaler for PatchRouteFilter.
19369func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
19370	objectMap := make(map[string]interface{})
19371	if prf.RouteFilterPropertiesFormat != nil {
19372		objectMap["properties"] = prf.RouteFilterPropertiesFormat
19373	}
19374	if prf.Tags != nil {
19375		objectMap["tags"] = prf.Tags
19376	}
19377	if prf.ID != nil {
19378		objectMap["id"] = prf.ID
19379	}
19380	return json.Marshal(objectMap)
19381}
19382
19383// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
19384func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
19385	var m map[string]*json.RawMessage
19386	err := json.Unmarshal(body, &m)
19387	if err != nil {
19388		return err
19389	}
19390	for k, v := range m {
19391		switch k {
19392		case "properties":
19393			if v != nil {
19394				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
19395				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
19396				if err != nil {
19397					return err
19398				}
19399				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
19400			}
19401		case "name":
19402			if v != nil {
19403				var name string
19404				err = json.Unmarshal(*v, &name)
19405				if err != nil {
19406					return err
19407				}
19408				prf.Name = &name
19409			}
19410		case "etag":
19411			if v != nil {
19412				var etag string
19413				err = json.Unmarshal(*v, &etag)
19414				if err != nil {
19415					return err
19416				}
19417				prf.Etag = &etag
19418			}
19419		case "type":
19420			if v != nil {
19421				var typeVar string
19422				err = json.Unmarshal(*v, &typeVar)
19423				if err != nil {
19424					return err
19425				}
19426				prf.Type = &typeVar
19427			}
19428		case "tags":
19429			if v != nil {
19430				var tags map[string]*string
19431				err = json.Unmarshal(*v, &tags)
19432				if err != nil {
19433					return err
19434				}
19435				prf.Tags = tags
19436			}
19437		case "id":
19438			if v != nil {
19439				var ID string
19440				err = json.Unmarshal(*v, &ID)
19441				if err != nil {
19442					return err
19443				}
19444				prf.ID = &ID
19445			}
19446		}
19447	}
19448
19449	return nil
19450}
19451
19452// PatchRouteFilterRule route Filter Rule Resource
19453type PatchRouteFilterRule struct {
19454	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
19455	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19456	Name *string `json:"name,omitempty"`
19457	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19458	Etag *string `json:"etag,omitempty"`
19459	// ID - Resource ID.
19460	ID *string `json:"id,omitempty"`
19461}
19462
19463// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
19464func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
19465	objectMap := make(map[string]interface{})
19466	if prfr.RouteFilterRulePropertiesFormat != nil {
19467		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
19468	}
19469	if prfr.ID != nil {
19470		objectMap["id"] = prfr.ID
19471	}
19472	return json.Marshal(objectMap)
19473}
19474
19475// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
19476func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
19477	var m map[string]*json.RawMessage
19478	err := json.Unmarshal(body, &m)
19479	if err != nil {
19480		return err
19481	}
19482	for k, v := range m {
19483		switch k {
19484		case "properties":
19485			if v != nil {
19486				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
19487				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
19488				if err != nil {
19489					return err
19490				}
19491				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
19492			}
19493		case "name":
19494			if v != nil {
19495				var name string
19496				err = json.Unmarshal(*v, &name)
19497				if err != nil {
19498					return err
19499				}
19500				prfr.Name = &name
19501			}
19502		case "etag":
19503			if v != nil {
19504				var etag string
19505				err = json.Unmarshal(*v, &etag)
19506				if err != nil {
19507					return err
19508				}
19509				prfr.Etag = &etag
19510			}
19511		case "id":
19512			if v != nil {
19513				var ID string
19514				err = json.Unmarshal(*v, &ID)
19515				if err != nil {
19516					return err
19517				}
19518				prfr.ID = &ID
19519			}
19520		}
19521	}
19522
19523	return nil
19524}
19525
19526// Probe a load balancer probe.
19527type Probe struct {
19528	autorest.Response `json:"-"`
19529	// ProbePropertiesFormat - Properties of load balancer probe.
19530	*ProbePropertiesFormat `json:"properties,omitempty"`
19531	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
19532	Name *string `json:"name,omitempty"`
19533	// Etag - A unique read-only string that changes whenever the resource is updated.
19534	Etag *string `json:"etag,omitempty"`
19535	// ID - Resource ID.
19536	ID *string `json:"id,omitempty"`
19537}
19538
19539// MarshalJSON is the custom marshaler for Probe.
19540func (p Probe) MarshalJSON() ([]byte, error) {
19541	objectMap := make(map[string]interface{})
19542	if p.ProbePropertiesFormat != nil {
19543		objectMap["properties"] = p.ProbePropertiesFormat
19544	}
19545	if p.Name != nil {
19546		objectMap["name"] = p.Name
19547	}
19548	if p.Etag != nil {
19549		objectMap["etag"] = p.Etag
19550	}
19551	if p.ID != nil {
19552		objectMap["id"] = p.ID
19553	}
19554	return json.Marshal(objectMap)
19555}
19556
19557// UnmarshalJSON is the custom unmarshaler for Probe struct.
19558func (p *Probe) UnmarshalJSON(body []byte) error {
19559	var m map[string]*json.RawMessage
19560	err := json.Unmarshal(body, &m)
19561	if err != nil {
19562		return err
19563	}
19564	for k, v := range m {
19565		switch k {
19566		case "properties":
19567			if v != nil {
19568				var probePropertiesFormat ProbePropertiesFormat
19569				err = json.Unmarshal(*v, &probePropertiesFormat)
19570				if err != nil {
19571					return err
19572				}
19573				p.ProbePropertiesFormat = &probePropertiesFormat
19574			}
19575		case "name":
19576			if v != nil {
19577				var name string
19578				err = json.Unmarshal(*v, &name)
19579				if err != nil {
19580					return err
19581				}
19582				p.Name = &name
19583			}
19584		case "etag":
19585			if v != nil {
19586				var etag string
19587				err = json.Unmarshal(*v, &etag)
19588				if err != nil {
19589					return err
19590				}
19591				p.Etag = &etag
19592			}
19593		case "id":
19594			if v != nil {
19595				var ID string
19596				err = json.Unmarshal(*v, &ID)
19597				if err != nil {
19598					return err
19599				}
19600				p.ID = &ID
19601			}
19602		}
19603	}
19604
19605	return nil
19606}
19607
19608// ProbePropertiesFormat load balancer probe resource.
19609type ProbePropertiesFormat struct {
19610	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
19611	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
19612	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
19613	Protocol ProbeProtocol `json:"protocol,omitempty"`
19614	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
19615	Port *int32 `json:"port,omitempty"`
19616	// 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.
19617	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
19618	// 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.
19619	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
19620	// 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.
19621	RequestPath *string `json:"requestPath,omitempty"`
19622	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19623	ProvisioningState *string `json:"provisioningState,omitempty"`
19624}
19625
19626// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
19627func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
19628	objectMap := make(map[string]interface{})
19629	if ppf.Protocol != "" {
19630		objectMap["protocol"] = ppf.Protocol
19631	}
19632	if ppf.Port != nil {
19633		objectMap["port"] = ppf.Port
19634	}
19635	if ppf.IntervalInSeconds != nil {
19636		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
19637	}
19638	if ppf.NumberOfProbes != nil {
19639		objectMap["numberOfProbes"] = ppf.NumberOfProbes
19640	}
19641	if ppf.RequestPath != nil {
19642		objectMap["requestPath"] = ppf.RequestPath
19643	}
19644	if ppf.ProvisioningState != nil {
19645		objectMap["provisioningState"] = ppf.ProvisioningState
19646	}
19647	return json.Marshal(objectMap)
19648}
19649
19650// Profile network profile resource.
19651type Profile struct {
19652	autorest.Response `json:"-"`
19653	// ProfilePropertiesFormat - Network profile properties.
19654	*ProfilePropertiesFormat `json:"properties,omitempty"`
19655	// Etag - A unique read-only string that changes whenever the resource is updated.
19656	Etag *string `json:"etag,omitempty"`
19657	// ID - Resource ID.
19658	ID *string `json:"id,omitempty"`
19659	// Name - READ-ONLY; Resource name.
19660	Name *string `json:"name,omitempty"`
19661	// Type - READ-ONLY; Resource type.
19662	Type *string `json:"type,omitempty"`
19663	// Location - Resource location.
19664	Location *string `json:"location,omitempty"`
19665	// Tags - Resource tags.
19666	Tags map[string]*string `json:"tags"`
19667}
19668
19669// MarshalJSON is the custom marshaler for Profile.
19670func (p Profile) MarshalJSON() ([]byte, error) {
19671	objectMap := make(map[string]interface{})
19672	if p.ProfilePropertiesFormat != nil {
19673		objectMap["properties"] = p.ProfilePropertiesFormat
19674	}
19675	if p.Etag != nil {
19676		objectMap["etag"] = p.Etag
19677	}
19678	if p.ID != nil {
19679		objectMap["id"] = p.ID
19680	}
19681	if p.Location != nil {
19682		objectMap["location"] = p.Location
19683	}
19684	if p.Tags != nil {
19685		objectMap["tags"] = p.Tags
19686	}
19687	return json.Marshal(objectMap)
19688}
19689
19690// UnmarshalJSON is the custom unmarshaler for Profile struct.
19691func (p *Profile) UnmarshalJSON(body []byte) error {
19692	var m map[string]*json.RawMessage
19693	err := json.Unmarshal(body, &m)
19694	if err != nil {
19695		return err
19696	}
19697	for k, v := range m {
19698		switch k {
19699		case "properties":
19700			if v != nil {
19701				var profilePropertiesFormat ProfilePropertiesFormat
19702				err = json.Unmarshal(*v, &profilePropertiesFormat)
19703				if err != nil {
19704					return err
19705				}
19706				p.ProfilePropertiesFormat = &profilePropertiesFormat
19707			}
19708		case "etag":
19709			if v != nil {
19710				var etag string
19711				err = json.Unmarshal(*v, &etag)
19712				if err != nil {
19713					return err
19714				}
19715				p.Etag = &etag
19716			}
19717		case "id":
19718			if v != nil {
19719				var ID string
19720				err = json.Unmarshal(*v, &ID)
19721				if err != nil {
19722					return err
19723				}
19724				p.ID = &ID
19725			}
19726		case "name":
19727			if v != nil {
19728				var name string
19729				err = json.Unmarshal(*v, &name)
19730				if err != nil {
19731					return err
19732				}
19733				p.Name = &name
19734			}
19735		case "type":
19736			if v != nil {
19737				var typeVar string
19738				err = json.Unmarshal(*v, &typeVar)
19739				if err != nil {
19740					return err
19741				}
19742				p.Type = &typeVar
19743			}
19744		case "location":
19745			if v != nil {
19746				var location string
19747				err = json.Unmarshal(*v, &location)
19748				if err != nil {
19749					return err
19750				}
19751				p.Location = &location
19752			}
19753		case "tags":
19754			if v != nil {
19755				var tags map[string]*string
19756				err = json.Unmarshal(*v, &tags)
19757				if err != nil {
19758					return err
19759				}
19760				p.Tags = tags
19761			}
19762		}
19763	}
19764
19765	return nil
19766}
19767
19768// ProfileListResult response for ListNetworkProfiles API service call.
19769type ProfileListResult struct {
19770	autorest.Response `json:"-"`
19771	// Value - A list of network profiles that exist in a resource group.
19772	Value *[]Profile `json:"value,omitempty"`
19773	// NextLink - The URL to get the next set of results.
19774	NextLink *string `json:"nextLink,omitempty"`
19775}
19776
19777// ProfileListResultIterator provides access to a complete listing of Profile values.
19778type ProfileListResultIterator struct {
19779	i    int
19780	page ProfileListResultPage
19781}
19782
19783// NextWithContext advances to the next value.  If there was an error making
19784// the request the iterator does not advance and the error is returned.
19785func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
19786	if tracing.IsEnabled() {
19787		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
19788		defer func() {
19789			sc := -1
19790			if iter.Response().Response.Response != nil {
19791				sc = iter.Response().Response.Response.StatusCode
19792			}
19793			tracing.EndSpan(ctx, sc, err)
19794		}()
19795	}
19796	iter.i++
19797	if iter.i < len(iter.page.Values()) {
19798		return nil
19799	}
19800	err = iter.page.NextWithContext(ctx)
19801	if err != nil {
19802		iter.i--
19803		return err
19804	}
19805	iter.i = 0
19806	return nil
19807}
19808
19809// Next advances to the next value.  If there was an error making
19810// the request the iterator does not advance and the error is returned.
19811// Deprecated: Use NextWithContext() instead.
19812func (iter *ProfileListResultIterator) Next() error {
19813	return iter.NextWithContext(context.Background())
19814}
19815
19816// NotDone returns true if the enumeration should be started or is not yet complete.
19817func (iter ProfileListResultIterator) NotDone() bool {
19818	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19819}
19820
19821// Response returns the raw server response from the last page request.
19822func (iter ProfileListResultIterator) Response() ProfileListResult {
19823	return iter.page.Response()
19824}
19825
19826// Value returns the current value or a zero-initialized value if the
19827// iterator has advanced beyond the end of the collection.
19828func (iter ProfileListResultIterator) Value() Profile {
19829	if !iter.page.NotDone() {
19830		return Profile{}
19831	}
19832	return iter.page.Values()[iter.i]
19833}
19834
19835// Creates a new instance of the ProfileListResultIterator type.
19836func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
19837	return ProfileListResultIterator{page: page}
19838}
19839
19840// IsEmpty returns true if the ListResult contains no values.
19841func (plr ProfileListResult) IsEmpty() bool {
19842	return plr.Value == nil || len(*plr.Value) == 0
19843}
19844
19845// hasNextLink returns true if the NextLink is not empty.
19846func (plr ProfileListResult) hasNextLink() bool {
19847	return plr.NextLink != nil && len(*plr.NextLink) != 0
19848}
19849
19850// profileListResultPreparer prepares a request to retrieve the next set of results.
19851// It returns nil if no more results exist.
19852func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
19853	if !plr.hasNextLink() {
19854		return nil, nil
19855	}
19856	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19857		autorest.AsJSON(),
19858		autorest.AsGet(),
19859		autorest.WithBaseURL(to.String(plr.NextLink)))
19860}
19861
19862// ProfileListResultPage contains a page of Profile values.
19863type ProfileListResultPage struct {
19864	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
19865	plr ProfileListResult
19866}
19867
19868// NextWithContext advances to the next page of values.  If there was an error making
19869// the request the page does not advance and the error is returned.
19870func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
19871	if tracing.IsEnabled() {
19872		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
19873		defer func() {
19874			sc := -1
19875			if page.Response().Response.Response != nil {
19876				sc = page.Response().Response.Response.StatusCode
19877			}
19878			tracing.EndSpan(ctx, sc, err)
19879		}()
19880	}
19881	for {
19882		next, err := page.fn(ctx, page.plr)
19883		if err != nil {
19884			return err
19885		}
19886		page.plr = next
19887		if !next.hasNextLink() || !next.IsEmpty() {
19888			break
19889		}
19890	}
19891	return nil
19892}
19893
19894// Next advances to the next page of values.  If there was an error making
19895// the request the page does not advance and the error is returned.
19896// Deprecated: Use NextWithContext() instead.
19897func (page *ProfileListResultPage) Next() error {
19898	return page.NextWithContext(context.Background())
19899}
19900
19901// NotDone returns true if the page enumeration should be started or is not yet complete.
19902func (page ProfileListResultPage) NotDone() bool {
19903	return !page.plr.IsEmpty()
19904}
19905
19906// Response returns the raw server response from the last page request.
19907func (page ProfileListResultPage) Response() ProfileListResult {
19908	return page.plr
19909}
19910
19911// Values returns the slice of values for the current page or nil if there are no values.
19912func (page ProfileListResultPage) Values() []Profile {
19913	if page.plr.IsEmpty() {
19914		return nil
19915	}
19916	return *page.plr.Value
19917}
19918
19919// Creates a new instance of the ProfileListResultPage type.
19920func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
19921	return ProfileListResultPage{
19922		fn:  getNextPage,
19923		plr: cur,
19924	}
19925}
19926
19927// ProfilePropertiesFormat network profile properties.
19928type ProfilePropertiesFormat struct {
19929	// ContainerNetworkInterfaces - List of child container network interfaces.
19930	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
19931	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
19932	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
19933	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
19934	ResourceGUID *string `json:"resourceGuid,omitempty"`
19935	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
19936	ProvisioningState *string `json:"provisioningState,omitempty"`
19937}
19938
19939// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
19940func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
19941	objectMap := make(map[string]interface{})
19942	if ppf.ContainerNetworkInterfaces != nil {
19943		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
19944	}
19945	if ppf.ContainerNetworkInterfaceConfigurations != nil {
19946		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
19947	}
19948	return json.Marshal(objectMap)
19949}
19950
19951// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19952// operation.
19953type ProfilesDeleteFuture struct {
19954	azure.FutureAPI
19955	// Result returns the result of the asynchronous operation.
19956	// If the operation has not completed it will return an error.
19957	Result func(ProfilesClient) (autorest.Response, error)
19958}
19959
19960// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19961func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
19962	var azFuture azure.Future
19963	if err := json.Unmarshal(body, &azFuture); err != nil {
19964		return err
19965	}
19966	future.FutureAPI = &azFuture
19967	future.Result = future.result
19968	return nil
19969}
19970
19971// result is the default implementation for ProfilesDeleteFuture.Result.
19972func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
19973	var done bool
19974	done, err = future.DoneWithContext(context.Background(), client)
19975	if err != nil {
19976		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
19977		return
19978	}
19979	if !done {
19980		ar.Response = future.Response()
19981		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
19982		return
19983	}
19984	ar.Response = future.Response()
19985	return
19986}
19987
19988// ProtocolConfiguration configuration of the protocol.
19989type ProtocolConfiguration struct {
19990	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
19991}
19992
19993// PublicIPAddress public IP address resource.
19994type PublicIPAddress struct {
19995	autorest.Response `json:"-"`
19996	// Sku - The public IP address SKU.
19997	Sku *PublicIPAddressSku `json:"sku,omitempty"`
19998	// PublicIPAddressPropertiesFormat - Public IP address properties.
19999	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
20000	// Etag - A unique read-only string that changes whenever the resource is updated.
20001	Etag *string `json:"etag,omitempty"`
20002	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20003	Zones *[]string `json:"zones,omitempty"`
20004	// ID - Resource ID.
20005	ID *string `json:"id,omitempty"`
20006	// Name - READ-ONLY; Resource name.
20007	Name *string `json:"name,omitempty"`
20008	// Type - READ-ONLY; Resource type.
20009	Type *string `json:"type,omitempty"`
20010	// Location - Resource location.
20011	Location *string `json:"location,omitempty"`
20012	// Tags - Resource tags.
20013	Tags map[string]*string `json:"tags"`
20014}
20015
20016// MarshalJSON is the custom marshaler for PublicIPAddress.
20017func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
20018	objectMap := make(map[string]interface{})
20019	if pia.Sku != nil {
20020		objectMap["sku"] = pia.Sku
20021	}
20022	if pia.PublicIPAddressPropertiesFormat != nil {
20023		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
20024	}
20025	if pia.Etag != nil {
20026		objectMap["etag"] = pia.Etag
20027	}
20028	if pia.Zones != nil {
20029		objectMap["zones"] = pia.Zones
20030	}
20031	if pia.ID != nil {
20032		objectMap["id"] = pia.ID
20033	}
20034	if pia.Location != nil {
20035		objectMap["location"] = pia.Location
20036	}
20037	if pia.Tags != nil {
20038		objectMap["tags"] = pia.Tags
20039	}
20040	return json.Marshal(objectMap)
20041}
20042
20043// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
20044func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
20045	var m map[string]*json.RawMessage
20046	err := json.Unmarshal(body, &m)
20047	if err != nil {
20048		return err
20049	}
20050	for k, v := range m {
20051		switch k {
20052		case "sku":
20053			if v != nil {
20054				var sku PublicIPAddressSku
20055				err = json.Unmarshal(*v, &sku)
20056				if err != nil {
20057					return err
20058				}
20059				pia.Sku = &sku
20060			}
20061		case "properties":
20062			if v != nil {
20063				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
20064				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
20065				if err != nil {
20066					return err
20067				}
20068				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
20069			}
20070		case "etag":
20071			if v != nil {
20072				var etag string
20073				err = json.Unmarshal(*v, &etag)
20074				if err != nil {
20075					return err
20076				}
20077				pia.Etag = &etag
20078			}
20079		case "zones":
20080			if v != nil {
20081				var zones []string
20082				err = json.Unmarshal(*v, &zones)
20083				if err != nil {
20084					return err
20085				}
20086				pia.Zones = &zones
20087			}
20088		case "id":
20089			if v != nil {
20090				var ID string
20091				err = json.Unmarshal(*v, &ID)
20092				if err != nil {
20093					return err
20094				}
20095				pia.ID = &ID
20096			}
20097		case "name":
20098			if v != nil {
20099				var name string
20100				err = json.Unmarshal(*v, &name)
20101				if err != nil {
20102					return err
20103				}
20104				pia.Name = &name
20105			}
20106		case "type":
20107			if v != nil {
20108				var typeVar string
20109				err = json.Unmarshal(*v, &typeVar)
20110				if err != nil {
20111					return err
20112				}
20113				pia.Type = &typeVar
20114			}
20115		case "location":
20116			if v != nil {
20117				var location string
20118				err = json.Unmarshal(*v, &location)
20119				if err != nil {
20120					return err
20121				}
20122				pia.Location = &location
20123			}
20124		case "tags":
20125			if v != nil {
20126				var tags map[string]*string
20127				err = json.Unmarshal(*v, &tags)
20128				if err != nil {
20129					return err
20130				}
20131				pia.Tags = tags
20132			}
20133		}
20134	}
20135
20136	return nil
20137}
20138
20139// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
20140type PublicIPAddressDNSSettings struct {
20141	// 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.
20142	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
20143	// 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.
20144	Fqdn *string `json:"fqdn,omitempty"`
20145	// 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.
20146	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
20147}
20148
20149// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20150// long-running operation.
20151type PublicIPAddressesCreateOrUpdateFuture struct {
20152	azure.FutureAPI
20153	// Result returns the result of the asynchronous operation.
20154	// If the operation has not completed it will return an error.
20155	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
20156}
20157
20158// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20159func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20160	var azFuture azure.Future
20161	if err := json.Unmarshal(body, &azFuture); err != nil {
20162		return err
20163	}
20164	future.FutureAPI = &azFuture
20165	future.Result = future.result
20166	return nil
20167}
20168
20169// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
20170func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
20171	var done bool
20172	done, err = future.DoneWithContext(context.Background(), client)
20173	if err != nil {
20174		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20175		return
20176	}
20177	if !done {
20178		pia.Response.Response = future.Response()
20179		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
20180		return
20181	}
20182	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20183	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
20184		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
20185		if err != nil {
20186			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
20187		}
20188	}
20189	return
20190}
20191
20192// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20193// operation.
20194type PublicIPAddressesDeleteFuture struct {
20195	azure.FutureAPI
20196	// Result returns the result of the asynchronous operation.
20197	// If the operation has not completed it will return an error.
20198	Result func(PublicIPAddressesClient) (autorest.Response, error)
20199}
20200
20201// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20202func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
20203	var azFuture azure.Future
20204	if err := json.Unmarshal(body, &azFuture); err != nil {
20205		return err
20206	}
20207	future.FutureAPI = &azFuture
20208	future.Result = future.result
20209	return nil
20210}
20211
20212// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
20213func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
20214	var done bool
20215	done, err = future.DoneWithContext(context.Background(), client)
20216	if err != nil {
20217		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
20218		return
20219	}
20220	if !done {
20221		ar.Response = future.Response()
20222		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
20223		return
20224	}
20225	ar.Response = future.Response()
20226	return
20227}
20228
20229// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20230// long-running operation.
20231type PublicIPAddressesUpdateTagsFuture struct {
20232	azure.FutureAPI
20233	// Result returns the result of the asynchronous operation.
20234	// If the operation has not completed it will return an error.
20235	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
20236}
20237
20238// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20239func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20240	var azFuture azure.Future
20241	if err := json.Unmarshal(body, &azFuture); err != nil {
20242		return err
20243	}
20244	future.FutureAPI = &azFuture
20245	future.Result = future.result
20246	return nil
20247}
20248
20249// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
20250func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
20251	var done bool
20252	done, err = future.DoneWithContext(context.Background(), client)
20253	if err != nil {
20254		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20255		return
20256	}
20257	if !done {
20258		pia.Response.Response = future.Response()
20259		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
20260		return
20261	}
20262	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20263	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
20264		pia, err = client.UpdateTagsResponder(pia.Response.Response)
20265		if err != nil {
20266			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
20267		}
20268	}
20269	return
20270}
20271
20272// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
20273type PublicIPAddressListResult struct {
20274	autorest.Response `json:"-"`
20275	// Value - A list of public IP addresses that exists in a resource group.
20276	Value *[]PublicIPAddress `json:"value,omitempty"`
20277	// NextLink - The URL to get the next set of results.
20278	NextLink *string `json:"nextLink,omitempty"`
20279}
20280
20281// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
20282type PublicIPAddressListResultIterator struct {
20283	i    int
20284	page PublicIPAddressListResultPage
20285}
20286
20287// NextWithContext advances to the next value.  If there was an error making
20288// the request the iterator does not advance and the error is returned.
20289func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
20290	if tracing.IsEnabled() {
20291		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
20292		defer func() {
20293			sc := -1
20294			if iter.Response().Response.Response != nil {
20295				sc = iter.Response().Response.Response.StatusCode
20296			}
20297			tracing.EndSpan(ctx, sc, err)
20298		}()
20299	}
20300	iter.i++
20301	if iter.i < len(iter.page.Values()) {
20302		return nil
20303	}
20304	err = iter.page.NextWithContext(ctx)
20305	if err != nil {
20306		iter.i--
20307		return err
20308	}
20309	iter.i = 0
20310	return nil
20311}
20312
20313// Next advances to the next value.  If there was an error making
20314// the request the iterator does not advance and the error is returned.
20315// Deprecated: Use NextWithContext() instead.
20316func (iter *PublicIPAddressListResultIterator) Next() error {
20317	return iter.NextWithContext(context.Background())
20318}
20319
20320// NotDone returns true if the enumeration should be started or is not yet complete.
20321func (iter PublicIPAddressListResultIterator) NotDone() bool {
20322	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20323}
20324
20325// Response returns the raw server response from the last page request.
20326func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
20327	return iter.page.Response()
20328}
20329
20330// Value returns the current value or a zero-initialized value if the
20331// iterator has advanced beyond the end of the collection.
20332func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
20333	if !iter.page.NotDone() {
20334		return PublicIPAddress{}
20335	}
20336	return iter.page.Values()[iter.i]
20337}
20338
20339// Creates a new instance of the PublicIPAddressListResultIterator type.
20340func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
20341	return PublicIPAddressListResultIterator{page: page}
20342}
20343
20344// IsEmpty returns true if the ListResult contains no values.
20345func (pialr PublicIPAddressListResult) IsEmpty() bool {
20346	return pialr.Value == nil || len(*pialr.Value) == 0
20347}
20348
20349// hasNextLink returns true if the NextLink is not empty.
20350func (pialr PublicIPAddressListResult) hasNextLink() bool {
20351	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
20352}
20353
20354// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
20355// It returns nil if no more results exist.
20356func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
20357	if !pialr.hasNextLink() {
20358		return nil, nil
20359	}
20360	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20361		autorest.AsJSON(),
20362		autorest.AsGet(),
20363		autorest.WithBaseURL(to.String(pialr.NextLink)))
20364}
20365
20366// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
20367type PublicIPAddressListResultPage struct {
20368	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
20369	pialr PublicIPAddressListResult
20370}
20371
20372// NextWithContext advances to the next page of values.  If there was an error making
20373// the request the page does not advance and the error is returned.
20374func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
20375	if tracing.IsEnabled() {
20376		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
20377		defer func() {
20378			sc := -1
20379			if page.Response().Response.Response != nil {
20380				sc = page.Response().Response.Response.StatusCode
20381			}
20382			tracing.EndSpan(ctx, sc, err)
20383		}()
20384	}
20385	for {
20386		next, err := page.fn(ctx, page.pialr)
20387		if err != nil {
20388			return err
20389		}
20390		page.pialr = next
20391		if !next.hasNextLink() || !next.IsEmpty() {
20392			break
20393		}
20394	}
20395	return nil
20396}
20397
20398// Next advances to the next page of values.  If there was an error making
20399// the request the page does not advance and the error is returned.
20400// Deprecated: Use NextWithContext() instead.
20401func (page *PublicIPAddressListResultPage) Next() error {
20402	return page.NextWithContext(context.Background())
20403}
20404
20405// NotDone returns true if the page enumeration should be started or is not yet complete.
20406func (page PublicIPAddressListResultPage) NotDone() bool {
20407	return !page.pialr.IsEmpty()
20408}
20409
20410// Response returns the raw server response from the last page request.
20411func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
20412	return page.pialr
20413}
20414
20415// Values returns the slice of values for the current page or nil if there are no values.
20416func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
20417	if page.pialr.IsEmpty() {
20418		return nil
20419	}
20420	return *page.pialr.Value
20421}
20422
20423// Creates a new instance of the PublicIPAddressListResultPage type.
20424func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
20425	return PublicIPAddressListResultPage{
20426		fn:    getNextPage,
20427		pialr: cur,
20428	}
20429}
20430
20431// PublicIPAddressPropertiesFormat public IP address properties.
20432type PublicIPAddressPropertiesFormat struct {
20433	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
20434	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
20435	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
20436	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
20437	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
20438	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
20439	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
20440	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
20441	// IPTags - The list of tags associated with the public IP address.
20442	IPTags *[]IPTag `json:"ipTags,omitempty"`
20443	// IPAddress - The IP address associated with the public IP address resource.
20444	IPAddress *string `json:"ipAddress,omitempty"`
20445	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
20446	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
20447	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
20448	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20449	// ResourceGUID - The resource GUID property of the public IP resource.
20450	ResourceGUID *string `json:"resourceGuid,omitempty"`
20451	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20452	ProvisioningState *string `json:"provisioningState,omitempty"`
20453}
20454
20455// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
20456func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
20457	objectMap := make(map[string]interface{})
20458	if piapf.PublicIPAllocationMethod != "" {
20459		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
20460	}
20461	if piapf.PublicIPAddressVersion != "" {
20462		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
20463	}
20464	if piapf.DNSSettings != nil {
20465		objectMap["dnsSettings"] = piapf.DNSSettings
20466	}
20467	if piapf.IPTags != nil {
20468		objectMap["ipTags"] = piapf.IPTags
20469	}
20470	if piapf.IPAddress != nil {
20471		objectMap["ipAddress"] = piapf.IPAddress
20472	}
20473	if piapf.PublicIPPrefix != nil {
20474		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
20475	}
20476	if piapf.IdleTimeoutInMinutes != nil {
20477		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
20478	}
20479	if piapf.ResourceGUID != nil {
20480		objectMap["resourceGuid"] = piapf.ResourceGUID
20481	}
20482	if piapf.ProvisioningState != nil {
20483		objectMap["provisioningState"] = piapf.ProvisioningState
20484	}
20485	return json.Marshal(objectMap)
20486}
20487
20488// PublicIPAddressSku SKU of a public IP address
20489type PublicIPAddressSku struct {
20490	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
20491	Name PublicIPAddressSkuName `json:"name,omitempty"`
20492}
20493
20494// PublicIPPrefix public IP prefix resource.
20495type PublicIPPrefix struct {
20496	autorest.Response `json:"-"`
20497	// Sku - The public IP prefix SKU.
20498	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
20499	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
20500	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
20501	// Etag - A unique read-only string that changes whenever the resource is updated.
20502	Etag *string `json:"etag,omitempty"`
20503	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20504	Zones *[]string `json:"zones,omitempty"`
20505	// ID - Resource ID.
20506	ID *string `json:"id,omitempty"`
20507	// Name - READ-ONLY; Resource name.
20508	Name *string `json:"name,omitempty"`
20509	// Type - READ-ONLY; Resource type.
20510	Type *string `json:"type,omitempty"`
20511	// Location - Resource location.
20512	Location *string `json:"location,omitempty"`
20513	// Tags - Resource tags.
20514	Tags map[string]*string `json:"tags"`
20515}
20516
20517// MarshalJSON is the custom marshaler for PublicIPPrefix.
20518func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
20519	objectMap := make(map[string]interface{})
20520	if pip.Sku != nil {
20521		objectMap["sku"] = pip.Sku
20522	}
20523	if pip.PublicIPPrefixPropertiesFormat != nil {
20524		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
20525	}
20526	if pip.Etag != nil {
20527		objectMap["etag"] = pip.Etag
20528	}
20529	if pip.Zones != nil {
20530		objectMap["zones"] = pip.Zones
20531	}
20532	if pip.ID != nil {
20533		objectMap["id"] = pip.ID
20534	}
20535	if pip.Location != nil {
20536		objectMap["location"] = pip.Location
20537	}
20538	if pip.Tags != nil {
20539		objectMap["tags"] = pip.Tags
20540	}
20541	return json.Marshal(objectMap)
20542}
20543
20544// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
20545func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
20546	var m map[string]*json.RawMessage
20547	err := json.Unmarshal(body, &m)
20548	if err != nil {
20549		return err
20550	}
20551	for k, v := range m {
20552		switch k {
20553		case "sku":
20554			if v != nil {
20555				var sku PublicIPPrefixSku
20556				err = json.Unmarshal(*v, &sku)
20557				if err != nil {
20558					return err
20559				}
20560				pip.Sku = &sku
20561			}
20562		case "properties":
20563			if v != nil {
20564				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
20565				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
20566				if err != nil {
20567					return err
20568				}
20569				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
20570			}
20571		case "etag":
20572			if v != nil {
20573				var etag string
20574				err = json.Unmarshal(*v, &etag)
20575				if err != nil {
20576					return err
20577				}
20578				pip.Etag = &etag
20579			}
20580		case "zones":
20581			if v != nil {
20582				var zones []string
20583				err = json.Unmarshal(*v, &zones)
20584				if err != nil {
20585					return err
20586				}
20587				pip.Zones = &zones
20588			}
20589		case "id":
20590			if v != nil {
20591				var ID string
20592				err = json.Unmarshal(*v, &ID)
20593				if err != nil {
20594					return err
20595				}
20596				pip.ID = &ID
20597			}
20598		case "name":
20599			if v != nil {
20600				var name string
20601				err = json.Unmarshal(*v, &name)
20602				if err != nil {
20603					return err
20604				}
20605				pip.Name = &name
20606			}
20607		case "type":
20608			if v != nil {
20609				var typeVar string
20610				err = json.Unmarshal(*v, &typeVar)
20611				if err != nil {
20612					return err
20613				}
20614				pip.Type = &typeVar
20615			}
20616		case "location":
20617			if v != nil {
20618				var location string
20619				err = json.Unmarshal(*v, &location)
20620				if err != nil {
20621					return err
20622				}
20623				pip.Location = &location
20624			}
20625		case "tags":
20626			if v != nil {
20627				var tags map[string]*string
20628				err = json.Unmarshal(*v, &tags)
20629				if err != nil {
20630					return err
20631				}
20632				pip.Tags = tags
20633			}
20634		}
20635	}
20636
20637	return nil
20638}
20639
20640// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20641// long-running operation.
20642type PublicIPPrefixesCreateOrUpdateFuture struct {
20643	azure.FutureAPI
20644	// Result returns the result of the asynchronous operation.
20645	// If the operation has not completed it will return an error.
20646	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
20647}
20648
20649// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20650func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20651	var azFuture azure.Future
20652	if err := json.Unmarshal(body, &azFuture); err != nil {
20653		return err
20654	}
20655	future.FutureAPI = &azFuture
20656	future.Result = future.result
20657	return nil
20658}
20659
20660// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
20661func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
20662	var done bool
20663	done, err = future.DoneWithContext(context.Background(), client)
20664	if err != nil {
20665		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20666		return
20667	}
20668	if !done {
20669		pip.Response.Response = future.Response()
20670		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
20671		return
20672	}
20673	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20674	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
20675		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
20676		if err != nil {
20677			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
20678		}
20679	}
20680	return
20681}
20682
20683// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20684// operation.
20685type PublicIPPrefixesDeleteFuture struct {
20686	azure.FutureAPI
20687	// Result returns the result of the asynchronous operation.
20688	// If the operation has not completed it will return an error.
20689	Result func(PublicIPPrefixesClient) (autorest.Response, error)
20690}
20691
20692// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20693func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
20694	var azFuture azure.Future
20695	if err := json.Unmarshal(body, &azFuture); err != nil {
20696		return err
20697	}
20698	future.FutureAPI = &azFuture
20699	future.Result = future.result
20700	return nil
20701}
20702
20703// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
20704func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
20705	var done bool
20706	done, err = future.DoneWithContext(context.Background(), client)
20707	if err != nil {
20708		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
20709		return
20710	}
20711	if !done {
20712		ar.Response = future.Response()
20713		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
20714		return
20715	}
20716	ar.Response = future.Response()
20717	return
20718}
20719
20720// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20721// long-running operation.
20722type PublicIPPrefixesUpdateTagsFuture struct {
20723	azure.FutureAPI
20724	// Result returns the result of the asynchronous operation.
20725	// If the operation has not completed it will return an error.
20726	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
20727}
20728
20729// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20730func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20731	var azFuture azure.Future
20732	if err := json.Unmarshal(body, &azFuture); err != nil {
20733		return err
20734	}
20735	future.FutureAPI = &azFuture
20736	future.Result = future.result
20737	return nil
20738}
20739
20740// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
20741func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
20742	var done bool
20743	done, err = future.DoneWithContext(context.Background(), client)
20744	if err != nil {
20745		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20746		return
20747	}
20748	if !done {
20749		pip.Response.Response = future.Response()
20750		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
20751		return
20752	}
20753	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20754	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
20755		pip, err = client.UpdateTagsResponder(pip.Response.Response)
20756		if err != nil {
20757			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
20758		}
20759	}
20760	return
20761}
20762
20763// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
20764type PublicIPPrefixListResult struct {
20765	autorest.Response `json:"-"`
20766	// Value - A list of public IP prefixes that exists in a resource group.
20767	Value *[]PublicIPPrefix `json:"value,omitempty"`
20768	// NextLink - The URL to get the next set of results.
20769	NextLink *string `json:"nextLink,omitempty"`
20770}
20771
20772// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
20773type PublicIPPrefixListResultIterator struct {
20774	i    int
20775	page PublicIPPrefixListResultPage
20776}
20777
20778// NextWithContext advances to the next value.  If there was an error making
20779// the request the iterator does not advance and the error is returned.
20780func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
20781	if tracing.IsEnabled() {
20782		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
20783		defer func() {
20784			sc := -1
20785			if iter.Response().Response.Response != nil {
20786				sc = iter.Response().Response.Response.StatusCode
20787			}
20788			tracing.EndSpan(ctx, sc, err)
20789		}()
20790	}
20791	iter.i++
20792	if iter.i < len(iter.page.Values()) {
20793		return nil
20794	}
20795	err = iter.page.NextWithContext(ctx)
20796	if err != nil {
20797		iter.i--
20798		return err
20799	}
20800	iter.i = 0
20801	return nil
20802}
20803
20804// Next advances to the next value.  If there was an error making
20805// the request the iterator does not advance and the error is returned.
20806// Deprecated: Use NextWithContext() instead.
20807func (iter *PublicIPPrefixListResultIterator) Next() error {
20808	return iter.NextWithContext(context.Background())
20809}
20810
20811// NotDone returns true if the enumeration should be started or is not yet complete.
20812func (iter PublicIPPrefixListResultIterator) NotDone() bool {
20813	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20814}
20815
20816// Response returns the raw server response from the last page request.
20817func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
20818	return iter.page.Response()
20819}
20820
20821// Value returns the current value or a zero-initialized value if the
20822// iterator has advanced beyond the end of the collection.
20823func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
20824	if !iter.page.NotDone() {
20825		return PublicIPPrefix{}
20826	}
20827	return iter.page.Values()[iter.i]
20828}
20829
20830// Creates a new instance of the PublicIPPrefixListResultIterator type.
20831func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
20832	return PublicIPPrefixListResultIterator{page: page}
20833}
20834
20835// IsEmpty returns true if the ListResult contains no values.
20836func (piplr PublicIPPrefixListResult) IsEmpty() bool {
20837	return piplr.Value == nil || len(*piplr.Value) == 0
20838}
20839
20840// hasNextLink returns true if the NextLink is not empty.
20841func (piplr PublicIPPrefixListResult) hasNextLink() bool {
20842	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
20843}
20844
20845// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
20846// It returns nil if no more results exist.
20847func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
20848	if !piplr.hasNextLink() {
20849		return nil, nil
20850	}
20851	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20852		autorest.AsJSON(),
20853		autorest.AsGet(),
20854		autorest.WithBaseURL(to.String(piplr.NextLink)))
20855}
20856
20857// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
20858type PublicIPPrefixListResultPage struct {
20859	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
20860	piplr PublicIPPrefixListResult
20861}
20862
20863// NextWithContext advances to the next page of values.  If there was an error making
20864// the request the page does not advance and the error is returned.
20865func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
20866	if tracing.IsEnabled() {
20867		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
20868		defer func() {
20869			sc := -1
20870			if page.Response().Response.Response != nil {
20871				sc = page.Response().Response.Response.StatusCode
20872			}
20873			tracing.EndSpan(ctx, sc, err)
20874		}()
20875	}
20876	for {
20877		next, err := page.fn(ctx, page.piplr)
20878		if err != nil {
20879			return err
20880		}
20881		page.piplr = next
20882		if !next.hasNextLink() || !next.IsEmpty() {
20883			break
20884		}
20885	}
20886	return nil
20887}
20888
20889// Next advances to the next page of values.  If there was an error making
20890// the request the page does not advance and the error is returned.
20891// Deprecated: Use NextWithContext() instead.
20892func (page *PublicIPPrefixListResultPage) Next() error {
20893	return page.NextWithContext(context.Background())
20894}
20895
20896// NotDone returns true if the page enumeration should be started or is not yet complete.
20897func (page PublicIPPrefixListResultPage) NotDone() bool {
20898	return !page.piplr.IsEmpty()
20899}
20900
20901// Response returns the raw server response from the last page request.
20902func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
20903	return page.piplr
20904}
20905
20906// Values returns the slice of values for the current page or nil if there are no values.
20907func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
20908	if page.piplr.IsEmpty() {
20909		return nil
20910	}
20911	return *page.piplr.Value
20912}
20913
20914// Creates a new instance of the PublicIPPrefixListResultPage type.
20915func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
20916	return PublicIPPrefixListResultPage{
20917		fn:    getNextPage,
20918		piplr: cur,
20919	}
20920}
20921
20922// PublicIPPrefixPropertiesFormat public IP prefix properties.
20923type PublicIPPrefixPropertiesFormat struct {
20924	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
20925	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
20926	// IPTags - The list of tags associated with the public IP prefix.
20927	IPTags *[]IPTag `json:"ipTags,omitempty"`
20928	// PrefixLength - The Length of the Public IP Prefix.
20929	PrefixLength *int32 `json:"prefixLength,omitempty"`
20930	// IPPrefix - The allocated Prefix
20931	IPPrefix *string `json:"ipPrefix,omitempty"`
20932	// PublicIPAddresses - The list of all referenced PublicIPAddresses
20933	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
20934	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
20935	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
20936	// ResourceGUID - The resource GUID property of the public IP prefix resource.
20937	ResourceGUID *string `json:"resourceGuid,omitempty"`
20938	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20939	ProvisioningState *string `json:"provisioningState,omitempty"`
20940}
20941
20942// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
20943func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
20944	objectMap := make(map[string]interface{})
20945	if pippf.PublicIPAddressVersion != "" {
20946		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
20947	}
20948	if pippf.IPTags != nil {
20949		objectMap["ipTags"] = pippf.IPTags
20950	}
20951	if pippf.PrefixLength != nil {
20952		objectMap["prefixLength"] = pippf.PrefixLength
20953	}
20954	if pippf.IPPrefix != nil {
20955		objectMap["ipPrefix"] = pippf.IPPrefix
20956	}
20957	if pippf.PublicIPAddresses != nil {
20958		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
20959	}
20960	if pippf.ResourceGUID != nil {
20961		objectMap["resourceGuid"] = pippf.ResourceGUID
20962	}
20963	if pippf.ProvisioningState != nil {
20964		objectMap["provisioningState"] = pippf.ProvisioningState
20965	}
20966	return json.Marshal(objectMap)
20967}
20968
20969// PublicIPPrefixSku SKU of a public IP prefix
20970type PublicIPPrefixSku struct {
20971	// Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
20972	Name PublicIPPrefixSkuName `json:"name,omitempty"`
20973}
20974
20975// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
20976type QueryTroubleshootingParameters struct {
20977	// TargetResourceID - The target resource ID to query the troubleshooting result.
20978	TargetResourceID *string `json:"targetResourceId,omitempty"`
20979}
20980
20981// ReferencedPublicIPAddress ...
20982type ReferencedPublicIPAddress struct {
20983	// ID - The PublicIPAddress Reference
20984	ID *string `json:"id,omitempty"`
20985}
20986
20987// Resource common resource representation.
20988type Resource struct {
20989	// ID - Resource ID.
20990	ID *string `json:"id,omitempty"`
20991	// Name - READ-ONLY; Resource name.
20992	Name *string `json:"name,omitempty"`
20993	// Type - READ-ONLY; Resource type.
20994	Type *string `json:"type,omitempty"`
20995	// Location - Resource location.
20996	Location *string `json:"location,omitempty"`
20997	// Tags - Resource tags.
20998	Tags map[string]*string `json:"tags"`
20999}
21000
21001// MarshalJSON is the custom marshaler for Resource.
21002func (r Resource) MarshalJSON() ([]byte, error) {
21003	objectMap := make(map[string]interface{})
21004	if r.ID != nil {
21005		objectMap["id"] = r.ID
21006	}
21007	if r.Location != nil {
21008		objectMap["location"] = r.Location
21009	}
21010	if r.Tags != nil {
21011		objectMap["tags"] = r.Tags
21012	}
21013	return json.Marshal(objectMap)
21014}
21015
21016// ResourceNavigationLink resourceNavigationLink resource.
21017type ResourceNavigationLink struct {
21018	// ResourceNavigationLinkFormat - Resource navigation link properties format.
21019	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
21020	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
21021	Name *string `json:"name,omitempty"`
21022	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21023	Etag *string `json:"etag,omitempty"`
21024	// ID - Resource ID.
21025	ID *string `json:"id,omitempty"`
21026}
21027
21028// MarshalJSON is the custom marshaler for ResourceNavigationLink.
21029func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
21030	objectMap := make(map[string]interface{})
21031	if rnl.ResourceNavigationLinkFormat != nil {
21032		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
21033	}
21034	if rnl.Name != nil {
21035		objectMap["name"] = rnl.Name
21036	}
21037	if rnl.ID != nil {
21038		objectMap["id"] = rnl.ID
21039	}
21040	return json.Marshal(objectMap)
21041}
21042
21043// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
21044func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
21045	var m map[string]*json.RawMessage
21046	err := json.Unmarshal(body, &m)
21047	if err != nil {
21048		return err
21049	}
21050	for k, v := range m {
21051		switch k {
21052		case "properties":
21053			if v != nil {
21054				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
21055				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
21056				if err != nil {
21057					return err
21058				}
21059				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
21060			}
21061		case "name":
21062			if v != nil {
21063				var name string
21064				err = json.Unmarshal(*v, &name)
21065				if err != nil {
21066					return err
21067				}
21068				rnl.Name = &name
21069			}
21070		case "etag":
21071			if v != nil {
21072				var etag string
21073				err = json.Unmarshal(*v, &etag)
21074				if err != nil {
21075					return err
21076				}
21077				rnl.Etag = &etag
21078			}
21079		case "id":
21080			if v != nil {
21081				var ID string
21082				err = json.Unmarshal(*v, &ID)
21083				if err != nil {
21084					return err
21085				}
21086				rnl.ID = &ID
21087			}
21088		}
21089	}
21090
21091	return nil
21092}
21093
21094// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
21095type ResourceNavigationLinkFormat struct {
21096	// LinkedResourceType - Resource type of the linked resource.
21097	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
21098	// Link - Link to the external resource
21099	Link *string `json:"link,omitempty"`
21100	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
21101	ProvisioningState *string `json:"provisioningState,omitempty"`
21102}
21103
21104// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
21105func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
21106	objectMap := make(map[string]interface{})
21107	if rnlf.LinkedResourceType != nil {
21108		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
21109	}
21110	if rnlf.Link != nil {
21111		objectMap["link"] = rnlf.Link
21112	}
21113	return json.Marshal(objectMap)
21114}
21115
21116// RetentionPolicyParameters parameters that define the retention policy for flow log.
21117type RetentionPolicyParameters struct {
21118	// Days - Number of days to retain flow log records.
21119	Days *int32 `json:"days,omitempty"`
21120	// Enabled - Flag to enable/disable retention.
21121	Enabled *bool `json:"enabled,omitempty"`
21122}
21123
21124// Route route resource
21125type Route struct {
21126	autorest.Response `json:"-"`
21127	// RoutePropertiesFormat - Properties of the route.
21128	*RoutePropertiesFormat `json:"properties,omitempty"`
21129	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21130	Name *string `json:"name,omitempty"`
21131	// Etag - A unique read-only string that changes whenever the resource is updated.
21132	Etag *string `json:"etag,omitempty"`
21133	// ID - Resource ID.
21134	ID *string `json:"id,omitempty"`
21135}
21136
21137// MarshalJSON is the custom marshaler for Route.
21138func (r Route) MarshalJSON() ([]byte, error) {
21139	objectMap := make(map[string]interface{})
21140	if r.RoutePropertiesFormat != nil {
21141		objectMap["properties"] = r.RoutePropertiesFormat
21142	}
21143	if r.Name != nil {
21144		objectMap["name"] = r.Name
21145	}
21146	if r.Etag != nil {
21147		objectMap["etag"] = r.Etag
21148	}
21149	if r.ID != nil {
21150		objectMap["id"] = r.ID
21151	}
21152	return json.Marshal(objectMap)
21153}
21154
21155// UnmarshalJSON is the custom unmarshaler for Route struct.
21156func (r *Route) UnmarshalJSON(body []byte) error {
21157	var m map[string]*json.RawMessage
21158	err := json.Unmarshal(body, &m)
21159	if err != nil {
21160		return err
21161	}
21162	for k, v := range m {
21163		switch k {
21164		case "properties":
21165			if v != nil {
21166				var routePropertiesFormat RoutePropertiesFormat
21167				err = json.Unmarshal(*v, &routePropertiesFormat)
21168				if err != nil {
21169					return err
21170				}
21171				r.RoutePropertiesFormat = &routePropertiesFormat
21172			}
21173		case "name":
21174			if v != nil {
21175				var name string
21176				err = json.Unmarshal(*v, &name)
21177				if err != nil {
21178					return err
21179				}
21180				r.Name = &name
21181			}
21182		case "etag":
21183			if v != nil {
21184				var etag string
21185				err = json.Unmarshal(*v, &etag)
21186				if err != nil {
21187					return err
21188				}
21189				r.Etag = &etag
21190			}
21191		case "id":
21192			if v != nil {
21193				var ID string
21194				err = json.Unmarshal(*v, &ID)
21195				if err != nil {
21196					return err
21197				}
21198				r.ID = &ID
21199			}
21200		}
21201	}
21202
21203	return nil
21204}
21205
21206// RouteFilter route Filter Resource.
21207type RouteFilter struct {
21208	autorest.Response            `json:"-"`
21209	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
21210	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21211	Etag *string `json:"etag,omitempty"`
21212	// ID - Resource ID.
21213	ID *string `json:"id,omitempty"`
21214	// Name - READ-ONLY; Resource name.
21215	Name *string `json:"name,omitempty"`
21216	// Type - READ-ONLY; Resource type.
21217	Type *string `json:"type,omitempty"`
21218	// Location - Resource location.
21219	Location *string `json:"location,omitempty"`
21220	// Tags - Resource tags.
21221	Tags map[string]*string `json:"tags"`
21222}
21223
21224// MarshalJSON is the custom marshaler for RouteFilter.
21225func (rf RouteFilter) MarshalJSON() ([]byte, error) {
21226	objectMap := make(map[string]interface{})
21227	if rf.RouteFilterPropertiesFormat != nil {
21228		objectMap["properties"] = rf.RouteFilterPropertiesFormat
21229	}
21230	if rf.ID != nil {
21231		objectMap["id"] = rf.ID
21232	}
21233	if rf.Location != nil {
21234		objectMap["location"] = rf.Location
21235	}
21236	if rf.Tags != nil {
21237		objectMap["tags"] = rf.Tags
21238	}
21239	return json.Marshal(objectMap)
21240}
21241
21242// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
21243func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
21244	var m map[string]*json.RawMessage
21245	err := json.Unmarshal(body, &m)
21246	if err != nil {
21247		return err
21248	}
21249	for k, v := range m {
21250		switch k {
21251		case "properties":
21252			if v != nil {
21253				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
21254				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
21255				if err != nil {
21256					return err
21257				}
21258				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
21259			}
21260		case "etag":
21261			if v != nil {
21262				var etag string
21263				err = json.Unmarshal(*v, &etag)
21264				if err != nil {
21265					return err
21266				}
21267				rf.Etag = &etag
21268			}
21269		case "id":
21270			if v != nil {
21271				var ID string
21272				err = json.Unmarshal(*v, &ID)
21273				if err != nil {
21274					return err
21275				}
21276				rf.ID = &ID
21277			}
21278		case "name":
21279			if v != nil {
21280				var name string
21281				err = json.Unmarshal(*v, &name)
21282				if err != nil {
21283					return err
21284				}
21285				rf.Name = &name
21286			}
21287		case "type":
21288			if v != nil {
21289				var typeVar string
21290				err = json.Unmarshal(*v, &typeVar)
21291				if err != nil {
21292					return err
21293				}
21294				rf.Type = &typeVar
21295			}
21296		case "location":
21297			if v != nil {
21298				var location string
21299				err = json.Unmarshal(*v, &location)
21300				if err != nil {
21301					return err
21302				}
21303				rf.Location = &location
21304			}
21305		case "tags":
21306			if v != nil {
21307				var tags map[string]*string
21308				err = json.Unmarshal(*v, &tags)
21309				if err != nil {
21310					return err
21311				}
21312				rf.Tags = tags
21313			}
21314		}
21315	}
21316
21317	return nil
21318}
21319
21320// RouteFilterListResult response for the ListRouteFilters API service call.
21321type RouteFilterListResult struct {
21322	autorest.Response `json:"-"`
21323	// Value - Gets a list of route filters in a resource group.
21324	Value *[]RouteFilter `json:"value,omitempty"`
21325	// NextLink - The URL to get the next set of results.
21326	NextLink *string `json:"nextLink,omitempty"`
21327}
21328
21329// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
21330type RouteFilterListResultIterator struct {
21331	i    int
21332	page RouteFilterListResultPage
21333}
21334
21335// NextWithContext advances to the next value.  If there was an error making
21336// the request the iterator does not advance and the error is returned.
21337func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
21338	if tracing.IsEnabled() {
21339		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
21340		defer func() {
21341			sc := -1
21342			if iter.Response().Response.Response != nil {
21343				sc = iter.Response().Response.Response.StatusCode
21344			}
21345			tracing.EndSpan(ctx, sc, err)
21346		}()
21347	}
21348	iter.i++
21349	if iter.i < len(iter.page.Values()) {
21350		return nil
21351	}
21352	err = iter.page.NextWithContext(ctx)
21353	if err != nil {
21354		iter.i--
21355		return err
21356	}
21357	iter.i = 0
21358	return nil
21359}
21360
21361// Next advances to the next value.  If there was an error making
21362// the request the iterator does not advance and the error is returned.
21363// Deprecated: Use NextWithContext() instead.
21364func (iter *RouteFilterListResultIterator) Next() error {
21365	return iter.NextWithContext(context.Background())
21366}
21367
21368// NotDone returns true if the enumeration should be started or is not yet complete.
21369func (iter RouteFilterListResultIterator) NotDone() bool {
21370	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21371}
21372
21373// Response returns the raw server response from the last page request.
21374func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
21375	return iter.page.Response()
21376}
21377
21378// Value returns the current value or a zero-initialized value if the
21379// iterator has advanced beyond the end of the collection.
21380func (iter RouteFilterListResultIterator) Value() RouteFilter {
21381	if !iter.page.NotDone() {
21382		return RouteFilter{}
21383	}
21384	return iter.page.Values()[iter.i]
21385}
21386
21387// Creates a new instance of the RouteFilterListResultIterator type.
21388func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
21389	return RouteFilterListResultIterator{page: page}
21390}
21391
21392// IsEmpty returns true if the ListResult contains no values.
21393func (rflr RouteFilterListResult) IsEmpty() bool {
21394	return rflr.Value == nil || len(*rflr.Value) == 0
21395}
21396
21397// hasNextLink returns true if the NextLink is not empty.
21398func (rflr RouteFilterListResult) hasNextLink() bool {
21399	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
21400}
21401
21402// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
21403// It returns nil if no more results exist.
21404func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
21405	if !rflr.hasNextLink() {
21406		return nil, nil
21407	}
21408	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21409		autorest.AsJSON(),
21410		autorest.AsGet(),
21411		autorest.WithBaseURL(to.String(rflr.NextLink)))
21412}
21413
21414// RouteFilterListResultPage contains a page of RouteFilter values.
21415type RouteFilterListResultPage struct {
21416	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
21417	rflr RouteFilterListResult
21418}
21419
21420// NextWithContext advances to the next page of values.  If there was an error making
21421// the request the page does not advance and the error is returned.
21422func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
21423	if tracing.IsEnabled() {
21424		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
21425		defer func() {
21426			sc := -1
21427			if page.Response().Response.Response != nil {
21428				sc = page.Response().Response.Response.StatusCode
21429			}
21430			tracing.EndSpan(ctx, sc, err)
21431		}()
21432	}
21433	for {
21434		next, err := page.fn(ctx, page.rflr)
21435		if err != nil {
21436			return err
21437		}
21438		page.rflr = next
21439		if !next.hasNextLink() || !next.IsEmpty() {
21440			break
21441		}
21442	}
21443	return nil
21444}
21445
21446// Next advances to the next page of values.  If there was an error making
21447// the request the page does not advance and the error is returned.
21448// Deprecated: Use NextWithContext() instead.
21449func (page *RouteFilterListResultPage) Next() error {
21450	return page.NextWithContext(context.Background())
21451}
21452
21453// NotDone returns true if the page enumeration should be started or is not yet complete.
21454func (page RouteFilterListResultPage) NotDone() bool {
21455	return !page.rflr.IsEmpty()
21456}
21457
21458// Response returns the raw server response from the last page request.
21459func (page RouteFilterListResultPage) Response() RouteFilterListResult {
21460	return page.rflr
21461}
21462
21463// Values returns the slice of values for the current page or nil if there are no values.
21464func (page RouteFilterListResultPage) Values() []RouteFilter {
21465	if page.rflr.IsEmpty() {
21466		return nil
21467	}
21468	return *page.rflr.Value
21469}
21470
21471// Creates a new instance of the RouteFilterListResultPage type.
21472func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
21473	return RouteFilterListResultPage{
21474		fn:   getNextPage,
21475		rflr: cur,
21476	}
21477}
21478
21479// RouteFilterPropertiesFormat route Filter Resource
21480type RouteFilterPropertiesFormat struct {
21481	// Rules - Collection of RouteFilterRules contained within a route filter.
21482	Rules *[]RouteFilterRule `json:"rules,omitempty"`
21483	// Peerings - A collection of references to express route circuit peerings.
21484	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
21485	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
21486	ProvisioningState *string `json:"provisioningState,omitempty"`
21487}
21488
21489// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
21490func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
21491	objectMap := make(map[string]interface{})
21492	if rfpf.Rules != nil {
21493		objectMap["rules"] = rfpf.Rules
21494	}
21495	if rfpf.Peerings != nil {
21496		objectMap["peerings"] = rfpf.Peerings
21497	}
21498	return json.Marshal(objectMap)
21499}
21500
21501// RouteFilterRule route Filter Rule Resource
21502type RouteFilterRule struct {
21503	autorest.Response                `json:"-"`
21504	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
21505	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21506	Name *string `json:"name,omitempty"`
21507	// Location - Resource location.
21508	Location *string `json:"location,omitempty"`
21509	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21510	Etag *string `json:"etag,omitempty"`
21511	// ID - Resource ID.
21512	ID *string `json:"id,omitempty"`
21513}
21514
21515// MarshalJSON is the custom marshaler for RouteFilterRule.
21516func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
21517	objectMap := make(map[string]interface{})
21518	if rfr.RouteFilterRulePropertiesFormat != nil {
21519		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
21520	}
21521	if rfr.Name != nil {
21522		objectMap["name"] = rfr.Name
21523	}
21524	if rfr.Location != nil {
21525		objectMap["location"] = rfr.Location
21526	}
21527	if rfr.ID != nil {
21528		objectMap["id"] = rfr.ID
21529	}
21530	return json.Marshal(objectMap)
21531}
21532
21533// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
21534func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
21535	var m map[string]*json.RawMessage
21536	err := json.Unmarshal(body, &m)
21537	if err != nil {
21538		return err
21539	}
21540	for k, v := range m {
21541		switch k {
21542		case "properties":
21543			if v != nil {
21544				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
21545				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
21546				if err != nil {
21547					return err
21548				}
21549				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
21550			}
21551		case "name":
21552			if v != nil {
21553				var name string
21554				err = json.Unmarshal(*v, &name)
21555				if err != nil {
21556					return err
21557				}
21558				rfr.Name = &name
21559			}
21560		case "location":
21561			if v != nil {
21562				var location string
21563				err = json.Unmarshal(*v, &location)
21564				if err != nil {
21565					return err
21566				}
21567				rfr.Location = &location
21568			}
21569		case "etag":
21570			if v != nil {
21571				var etag string
21572				err = json.Unmarshal(*v, &etag)
21573				if err != nil {
21574					return err
21575				}
21576				rfr.Etag = &etag
21577			}
21578		case "id":
21579			if v != nil {
21580				var ID string
21581				err = json.Unmarshal(*v, &ID)
21582				if err != nil {
21583					return err
21584				}
21585				rfr.ID = &ID
21586			}
21587		}
21588	}
21589
21590	return nil
21591}
21592
21593// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
21594type RouteFilterRuleListResult struct {
21595	autorest.Response `json:"-"`
21596	// Value - Gets a list of RouteFilterRules in a resource group.
21597	Value *[]RouteFilterRule `json:"value,omitempty"`
21598	// NextLink - The URL to get the next set of results.
21599	NextLink *string `json:"nextLink,omitempty"`
21600}
21601
21602// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
21603type RouteFilterRuleListResultIterator struct {
21604	i    int
21605	page RouteFilterRuleListResultPage
21606}
21607
21608// NextWithContext advances to the next value.  If there was an error making
21609// the request the iterator does not advance and the error is returned.
21610func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21611	if tracing.IsEnabled() {
21612		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
21613		defer func() {
21614			sc := -1
21615			if iter.Response().Response.Response != nil {
21616				sc = iter.Response().Response.Response.StatusCode
21617			}
21618			tracing.EndSpan(ctx, sc, err)
21619		}()
21620	}
21621	iter.i++
21622	if iter.i < len(iter.page.Values()) {
21623		return nil
21624	}
21625	err = iter.page.NextWithContext(ctx)
21626	if err != nil {
21627		iter.i--
21628		return err
21629	}
21630	iter.i = 0
21631	return nil
21632}
21633
21634// Next advances to the next value.  If there was an error making
21635// the request the iterator does not advance and the error is returned.
21636// Deprecated: Use NextWithContext() instead.
21637func (iter *RouteFilterRuleListResultIterator) Next() error {
21638	return iter.NextWithContext(context.Background())
21639}
21640
21641// NotDone returns true if the enumeration should be started or is not yet complete.
21642func (iter RouteFilterRuleListResultIterator) NotDone() bool {
21643	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21644}
21645
21646// Response returns the raw server response from the last page request.
21647func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
21648	return iter.page.Response()
21649}
21650
21651// Value returns the current value or a zero-initialized value if the
21652// iterator has advanced beyond the end of the collection.
21653func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
21654	if !iter.page.NotDone() {
21655		return RouteFilterRule{}
21656	}
21657	return iter.page.Values()[iter.i]
21658}
21659
21660// Creates a new instance of the RouteFilterRuleListResultIterator type.
21661func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
21662	return RouteFilterRuleListResultIterator{page: page}
21663}
21664
21665// IsEmpty returns true if the ListResult contains no values.
21666func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
21667	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
21668}
21669
21670// hasNextLink returns true if the NextLink is not empty.
21671func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
21672	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
21673}
21674
21675// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
21676// It returns nil if no more results exist.
21677func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21678	if !rfrlr.hasNextLink() {
21679		return nil, nil
21680	}
21681	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21682		autorest.AsJSON(),
21683		autorest.AsGet(),
21684		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
21685}
21686
21687// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
21688type RouteFilterRuleListResultPage struct {
21689	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
21690	rfrlr RouteFilterRuleListResult
21691}
21692
21693// NextWithContext advances to the next page of values.  If there was an error making
21694// the request the page does not advance and the error is returned.
21695func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
21696	if tracing.IsEnabled() {
21697		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
21698		defer func() {
21699			sc := -1
21700			if page.Response().Response.Response != nil {
21701				sc = page.Response().Response.Response.StatusCode
21702			}
21703			tracing.EndSpan(ctx, sc, err)
21704		}()
21705	}
21706	for {
21707		next, err := page.fn(ctx, page.rfrlr)
21708		if err != nil {
21709			return err
21710		}
21711		page.rfrlr = next
21712		if !next.hasNextLink() || !next.IsEmpty() {
21713			break
21714		}
21715	}
21716	return nil
21717}
21718
21719// Next advances to the next page of values.  If there was an error making
21720// the request the page does not advance and the error is returned.
21721// Deprecated: Use NextWithContext() instead.
21722func (page *RouteFilterRuleListResultPage) Next() error {
21723	return page.NextWithContext(context.Background())
21724}
21725
21726// NotDone returns true if the page enumeration should be started or is not yet complete.
21727func (page RouteFilterRuleListResultPage) NotDone() bool {
21728	return !page.rfrlr.IsEmpty()
21729}
21730
21731// Response returns the raw server response from the last page request.
21732func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
21733	return page.rfrlr
21734}
21735
21736// Values returns the slice of values for the current page or nil if there are no values.
21737func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
21738	if page.rfrlr.IsEmpty() {
21739		return nil
21740	}
21741	return *page.rfrlr.Value
21742}
21743
21744// Creates a new instance of the RouteFilterRuleListResultPage type.
21745func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
21746	return RouteFilterRuleListResultPage{
21747		fn:    getNextPage,
21748		rfrlr: cur,
21749	}
21750}
21751
21752// RouteFilterRulePropertiesFormat route Filter Rule Resource
21753type RouteFilterRulePropertiesFormat struct {
21754	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
21755	Access Access `json:"access,omitempty"`
21756	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
21757	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
21758	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
21759	Communities *[]string `json:"communities,omitempty"`
21760	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
21761	ProvisioningState *string `json:"provisioningState,omitempty"`
21762}
21763
21764// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
21765func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
21766	objectMap := make(map[string]interface{})
21767	if rfrpf.Access != "" {
21768		objectMap["access"] = rfrpf.Access
21769	}
21770	if rfrpf.RouteFilterRuleType != nil {
21771		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
21772	}
21773	if rfrpf.Communities != nil {
21774		objectMap["communities"] = rfrpf.Communities
21775	}
21776	return json.Marshal(objectMap)
21777}
21778
21779// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21780// long-running operation.
21781type RouteFilterRulesCreateOrUpdateFuture struct {
21782	azure.FutureAPI
21783	// Result returns the result of the asynchronous operation.
21784	// If the operation has not completed it will return an error.
21785	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
21786}
21787
21788// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21789func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21790	var azFuture azure.Future
21791	if err := json.Unmarshal(body, &azFuture); err != nil {
21792		return err
21793	}
21794	future.FutureAPI = &azFuture
21795	future.Result = future.result
21796	return nil
21797}
21798
21799// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
21800func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
21801	var done bool
21802	done, err = future.DoneWithContext(context.Background(), client)
21803	if err != nil {
21804		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21805		return
21806	}
21807	if !done {
21808		rfr.Response.Response = future.Response()
21809		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
21810		return
21811	}
21812	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21813	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
21814		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
21815		if err != nil {
21816			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
21817		}
21818	}
21819	return
21820}
21821
21822// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21823// operation.
21824type RouteFilterRulesDeleteFuture struct {
21825	azure.FutureAPI
21826	// Result returns the result of the asynchronous operation.
21827	// If the operation has not completed it will return an error.
21828	Result func(RouteFilterRulesClient) (autorest.Response, error)
21829}
21830
21831// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21832func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
21833	var azFuture azure.Future
21834	if err := json.Unmarshal(body, &azFuture); err != nil {
21835		return err
21836	}
21837	future.FutureAPI = &azFuture
21838	future.Result = future.result
21839	return nil
21840}
21841
21842// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
21843func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
21844	var done bool
21845	done, err = future.DoneWithContext(context.Background(), client)
21846	if err != nil {
21847		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
21848		return
21849	}
21850	if !done {
21851		ar.Response = future.Response()
21852		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
21853		return
21854	}
21855	ar.Response = future.Response()
21856	return
21857}
21858
21859// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21860// operation.
21861type RouteFilterRulesUpdateFuture struct {
21862	azure.FutureAPI
21863	// Result returns the result of the asynchronous operation.
21864	// If the operation has not completed it will return an error.
21865	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
21866}
21867
21868// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21869func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
21870	var azFuture azure.Future
21871	if err := json.Unmarshal(body, &azFuture); err != nil {
21872		return err
21873	}
21874	future.FutureAPI = &azFuture
21875	future.Result = future.result
21876	return nil
21877}
21878
21879// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
21880func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
21881	var done bool
21882	done, err = future.DoneWithContext(context.Background(), client)
21883	if err != nil {
21884		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
21885		return
21886	}
21887	if !done {
21888		rfr.Response.Response = future.Response()
21889		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
21890		return
21891	}
21892	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21893	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
21894		rfr, err = client.UpdateResponder(rfr.Response.Response)
21895		if err != nil {
21896			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
21897		}
21898	}
21899	return
21900}
21901
21902// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21903// long-running operation.
21904type RouteFiltersCreateOrUpdateFuture struct {
21905	azure.FutureAPI
21906	// Result returns the result of the asynchronous operation.
21907	// If the operation has not completed it will return an error.
21908	Result func(RouteFiltersClient) (RouteFilter, error)
21909}
21910
21911// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21912func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21913	var azFuture azure.Future
21914	if err := json.Unmarshal(body, &azFuture); err != nil {
21915		return err
21916	}
21917	future.FutureAPI = &azFuture
21918	future.Result = future.result
21919	return nil
21920}
21921
21922// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
21923func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
21924	var done bool
21925	done, err = future.DoneWithContext(context.Background(), client)
21926	if err != nil {
21927		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21928		return
21929	}
21930	if !done {
21931		rf.Response.Response = future.Response()
21932		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
21933		return
21934	}
21935	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21936	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
21937		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
21938		if err != nil {
21939			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
21940		}
21941	}
21942	return
21943}
21944
21945// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21946// operation.
21947type RouteFiltersDeleteFuture struct {
21948	azure.FutureAPI
21949	// Result returns the result of the asynchronous operation.
21950	// If the operation has not completed it will return an error.
21951	Result func(RouteFiltersClient) (autorest.Response, error)
21952}
21953
21954// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21955func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
21956	var azFuture azure.Future
21957	if err := json.Unmarshal(body, &azFuture); err != nil {
21958		return err
21959	}
21960	future.FutureAPI = &azFuture
21961	future.Result = future.result
21962	return nil
21963}
21964
21965// result is the default implementation for RouteFiltersDeleteFuture.Result.
21966func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
21967	var done bool
21968	done, err = future.DoneWithContext(context.Background(), client)
21969	if err != nil {
21970		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
21971		return
21972	}
21973	if !done {
21974		ar.Response = future.Response()
21975		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
21976		return
21977	}
21978	ar.Response = future.Response()
21979	return
21980}
21981
21982// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21983// operation.
21984type RouteFiltersUpdateFuture struct {
21985	azure.FutureAPI
21986	// Result returns the result of the asynchronous operation.
21987	// If the operation has not completed it will return an error.
21988	Result func(RouteFiltersClient) (RouteFilter, error)
21989}
21990
21991// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21992func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
21993	var azFuture azure.Future
21994	if err := json.Unmarshal(body, &azFuture); err != nil {
21995		return err
21996	}
21997	future.FutureAPI = &azFuture
21998	future.Result = future.result
21999	return nil
22000}
22001
22002// result is the default implementation for RouteFiltersUpdateFuture.Result.
22003func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
22004	var done bool
22005	done, err = future.DoneWithContext(context.Background(), client)
22006	if err != nil {
22007		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
22008		return
22009	}
22010	if !done {
22011		rf.Response.Response = future.Response()
22012		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
22013		return
22014	}
22015	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22016	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
22017		rf, err = client.UpdateResponder(rf.Response.Response)
22018		if err != nil {
22019			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
22020		}
22021	}
22022	return
22023}
22024
22025// RouteListResult response for the ListRoute API service call
22026type RouteListResult struct {
22027	autorest.Response `json:"-"`
22028	// Value - Gets a list of routes in a resource group.
22029	Value *[]Route `json:"value,omitempty"`
22030	// NextLink - The URL to get the next set of results.
22031	NextLink *string `json:"nextLink,omitempty"`
22032}
22033
22034// RouteListResultIterator provides access to a complete listing of Route values.
22035type RouteListResultIterator struct {
22036	i    int
22037	page RouteListResultPage
22038}
22039
22040// NextWithContext advances to the next value.  If there was an error making
22041// the request the iterator does not advance and the error is returned.
22042func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
22043	if tracing.IsEnabled() {
22044		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
22045		defer func() {
22046			sc := -1
22047			if iter.Response().Response.Response != nil {
22048				sc = iter.Response().Response.Response.StatusCode
22049			}
22050			tracing.EndSpan(ctx, sc, err)
22051		}()
22052	}
22053	iter.i++
22054	if iter.i < len(iter.page.Values()) {
22055		return nil
22056	}
22057	err = iter.page.NextWithContext(ctx)
22058	if err != nil {
22059		iter.i--
22060		return err
22061	}
22062	iter.i = 0
22063	return nil
22064}
22065
22066// Next advances to the next value.  If there was an error making
22067// the request the iterator does not advance and the error is returned.
22068// Deprecated: Use NextWithContext() instead.
22069func (iter *RouteListResultIterator) Next() error {
22070	return iter.NextWithContext(context.Background())
22071}
22072
22073// NotDone returns true if the enumeration should be started or is not yet complete.
22074func (iter RouteListResultIterator) NotDone() bool {
22075	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22076}
22077
22078// Response returns the raw server response from the last page request.
22079func (iter RouteListResultIterator) Response() RouteListResult {
22080	return iter.page.Response()
22081}
22082
22083// Value returns the current value or a zero-initialized value if the
22084// iterator has advanced beyond the end of the collection.
22085func (iter RouteListResultIterator) Value() Route {
22086	if !iter.page.NotDone() {
22087		return Route{}
22088	}
22089	return iter.page.Values()[iter.i]
22090}
22091
22092// Creates a new instance of the RouteListResultIterator type.
22093func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
22094	return RouteListResultIterator{page: page}
22095}
22096
22097// IsEmpty returns true if the ListResult contains no values.
22098func (rlr RouteListResult) IsEmpty() bool {
22099	return rlr.Value == nil || len(*rlr.Value) == 0
22100}
22101
22102// hasNextLink returns true if the NextLink is not empty.
22103func (rlr RouteListResult) hasNextLink() bool {
22104	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
22105}
22106
22107// routeListResultPreparer prepares a request to retrieve the next set of results.
22108// It returns nil if no more results exist.
22109func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
22110	if !rlr.hasNextLink() {
22111		return nil, nil
22112	}
22113	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22114		autorest.AsJSON(),
22115		autorest.AsGet(),
22116		autorest.WithBaseURL(to.String(rlr.NextLink)))
22117}
22118
22119// RouteListResultPage contains a page of Route values.
22120type RouteListResultPage struct {
22121	fn  func(context.Context, RouteListResult) (RouteListResult, error)
22122	rlr RouteListResult
22123}
22124
22125// NextWithContext advances to the next page of values.  If there was an error making
22126// the request the page does not advance and the error is returned.
22127func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
22128	if tracing.IsEnabled() {
22129		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
22130		defer func() {
22131			sc := -1
22132			if page.Response().Response.Response != nil {
22133				sc = page.Response().Response.Response.StatusCode
22134			}
22135			tracing.EndSpan(ctx, sc, err)
22136		}()
22137	}
22138	for {
22139		next, err := page.fn(ctx, page.rlr)
22140		if err != nil {
22141			return err
22142		}
22143		page.rlr = next
22144		if !next.hasNextLink() || !next.IsEmpty() {
22145			break
22146		}
22147	}
22148	return nil
22149}
22150
22151// Next advances to the next page of values.  If there was an error making
22152// the request the page does not advance and the error is returned.
22153// Deprecated: Use NextWithContext() instead.
22154func (page *RouteListResultPage) Next() error {
22155	return page.NextWithContext(context.Background())
22156}
22157
22158// NotDone returns true if the page enumeration should be started or is not yet complete.
22159func (page RouteListResultPage) NotDone() bool {
22160	return !page.rlr.IsEmpty()
22161}
22162
22163// Response returns the raw server response from the last page request.
22164func (page RouteListResultPage) Response() RouteListResult {
22165	return page.rlr
22166}
22167
22168// Values returns the slice of values for the current page or nil if there are no values.
22169func (page RouteListResultPage) Values() []Route {
22170	if page.rlr.IsEmpty() {
22171		return nil
22172	}
22173	return *page.rlr.Value
22174}
22175
22176// Creates a new instance of the RouteListResultPage type.
22177func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
22178	return RouteListResultPage{
22179		fn:  getNextPage,
22180		rlr: cur,
22181	}
22182}
22183
22184// RoutePropertiesFormat route resource
22185type RoutePropertiesFormat struct {
22186	// AddressPrefix - The destination CIDR to which the route applies.
22187	AddressPrefix *string `json:"addressPrefix,omitempty"`
22188	// 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'
22189	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
22190	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
22191	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
22192	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22193	ProvisioningState *string `json:"provisioningState,omitempty"`
22194}
22195
22196// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22197// operation.
22198type RoutesCreateOrUpdateFuture struct {
22199	azure.FutureAPI
22200	// Result returns the result of the asynchronous operation.
22201	// If the operation has not completed it will return an error.
22202	Result func(RoutesClient) (Route, error)
22203}
22204
22205// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22206func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22207	var azFuture azure.Future
22208	if err := json.Unmarshal(body, &azFuture); err != nil {
22209		return err
22210	}
22211	future.FutureAPI = &azFuture
22212	future.Result = future.result
22213	return nil
22214}
22215
22216// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
22217func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
22218	var done bool
22219	done, err = future.DoneWithContext(context.Background(), client)
22220	if err != nil {
22221		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22222		return
22223	}
22224	if !done {
22225		r.Response.Response = future.Response()
22226		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
22227		return
22228	}
22229	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22230	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
22231		r, err = client.CreateOrUpdateResponder(r.Response.Response)
22232		if err != nil {
22233			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
22234		}
22235	}
22236	return
22237}
22238
22239// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
22240type RoutesDeleteFuture struct {
22241	azure.FutureAPI
22242	// Result returns the result of the asynchronous operation.
22243	// If the operation has not completed it will return an error.
22244	Result func(RoutesClient) (autorest.Response, error)
22245}
22246
22247// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22248func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
22249	var azFuture azure.Future
22250	if err := json.Unmarshal(body, &azFuture); err != nil {
22251		return err
22252	}
22253	future.FutureAPI = &azFuture
22254	future.Result = future.result
22255	return nil
22256}
22257
22258// result is the default implementation for RoutesDeleteFuture.Result.
22259func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
22260	var done bool
22261	done, err = future.DoneWithContext(context.Background(), client)
22262	if err != nil {
22263		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
22264		return
22265	}
22266	if !done {
22267		ar.Response = future.Response()
22268		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
22269		return
22270	}
22271	ar.Response = future.Response()
22272	return
22273}
22274
22275// RouteTable route table resource.
22276type RouteTable struct {
22277	autorest.Response `json:"-"`
22278	// RouteTablePropertiesFormat - Properties of the route table.
22279	*RouteTablePropertiesFormat `json:"properties,omitempty"`
22280	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22281	Etag *string `json:"etag,omitempty"`
22282	// ID - Resource ID.
22283	ID *string `json:"id,omitempty"`
22284	// Name - READ-ONLY; Resource name.
22285	Name *string `json:"name,omitempty"`
22286	// Type - READ-ONLY; Resource type.
22287	Type *string `json:"type,omitempty"`
22288	// Location - Resource location.
22289	Location *string `json:"location,omitempty"`
22290	// Tags - Resource tags.
22291	Tags map[string]*string `json:"tags"`
22292}
22293
22294// MarshalJSON is the custom marshaler for RouteTable.
22295func (rt RouteTable) MarshalJSON() ([]byte, error) {
22296	objectMap := make(map[string]interface{})
22297	if rt.RouteTablePropertiesFormat != nil {
22298		objectMap["properties"] = rt.RouteTablePropertiesFormat
22299	}
22300	if rt.Etag != nil {
22301		objectMap["etag"] = rt.Etag
22302	}
22303	if rt.ID != nil {
22304		objectMap["id"] = rt.ID
22305	}
22306	if rt.Location != nil {
22307		objectMap["location"] = rt.Location
22308	}
22309	if rt.Tags != nil {
22310		objectMap["tags"] = rt.Tags
22311	}
22312	return json.Marshal(objectMap)
22313}
22314
22315// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
22316func (rt *RouteTable) UnmarshalJSON(body []byte) error {
22317	var m map[string]*json.RawMessage
22318	err := json.Unmarshal(body, &m)
22319	if err != nil {
22320		return err
22321	}
22322	for k, v := range m {
22323		switch k {
22324		case "properties":
22325			if v != nil {
22326				var routeTablePropertiesFormat RouteTablePropertiesFormat
22327				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
22328				if err != nil {
22329					return err
22330				}
22331				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
22332			}
22333		case "etag":
22334			if v != nil {
22335				var etag string
22336				err = json.Unmarshal(*v, &etag)
22337				if err != nil {
22338					return err
22339				}
22340				rt.Etag = &etag
22341			}
22342		case "id":
22343			if v != nil {
22344				var ID string
22345				err = json.Unmarshal(*v, &ID)
22346				if err != nil {
22347					return err
22348				}
22349				rt.ID = &ID
22350			}
22351		case "name":
22352			if v != nil {
22353				var name string
22354				err = json.Unmarshal(*v, &name)
22355				if err != nil {
22356					return err
22357				}
22358				rt.Name = &name
22359			}
22360		case "type":
22361			if v != nil {
22362				var typeVar string
22363				err = json.Unmarshal(*v, &typeVar)
22364				if err != nil {
22365					return err
22366				}
22367				rt.Type = &typeVar
22368			}
22369		case "location":
22370			if v != nil {
22371				var location string
22372				err = json.Unmarshal(*v, &location)
22373				if err != nil {
22374					return err
22375				}
22376				rt.Location = &location
22377			}
22378		case "tags":
22379			if v != nil {
22380				var tags map[string]*string
22381				err = json.Unmarshal(*v, &tags)
22382				if err != nil {
22383					return err
22384				}
22385				rt.Tags = tags
22386			}
22387		}
22388	}
22389
22390	return nil
22391}
22392
22393// RouteTableListResult response for the ListRouteTable API service call.
22394type RouteTableListResult struct {
22395	autorest.Response `json:"-"`
22396	// Value - Gets a list of route tables in a resource group.
22397	Value *[]RouteTable `json:"value,omitempty"`
22398	// NextLink - The URL to get the next set of results.
22399	NextLink *string `json:"nextLink,omitempty"`
22400}
22401
22402// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
22403type RouteTableListResultIterator struct {
22404	i    int
22405	page RouteTableListResultPage
22406}
22407
22408// NextWithContext advances to the next value.  If there was an error making
22409// the request the iterator does not advance and the error is returned.
22410func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
22411	if tracing.IsEnabled() {
22412		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
22413		defer func() {
22414			sc := -1
22415			if iter.Response().Response.Response != nil {
22416				sc = iter.Response().Response.Response.StatusCode
22417			}
22418			tracing.EndSpan(ctx, sc, err)
22419		}()
22420	}
22421	iter.i++
22422	if iter.i < len(iter.page.Values()) {
22423		return nil
22424	}
22425	err = iter.page.NextWithContext(ctx)
22426	if err != nil {
22427		iter.i--
22428		return err
22429	}
22430	iter.i = 0
22431	return nil
22432}
22433
22434// Next advances to the next value.  If there was an error making
22435// the request the iterator does not advance and the error is returned.
22436// Deprecated: Use NextWithContext() instead.
22437func (iter *RouteTableListResultIterator) Next() error {
22438	return iter.NextWithContext(context.Background())
22439}
22440
22441// NotDone returns true if the enumeration should be started or is not yet complete.
22442func (iter RouteTableListResultIterator) NotDone() bool {
22443	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22444}
22445
22446// Response returns the raw server response from the last page request.
22447func (iter RouteTableListResultIterator) Response() RouteTableListResult {
22448	return iter.page.Response()
22449}
22450
22451// Value returns the current value or a zero-initialized value if the
22452// iterator has advanced beyond the end of the collection.
22453func (iter RouteTableListResultIterator) Value() RouteTable {
22454	if !iter.page.NotDone() {
22455		return RouteTable{}
22456	}
22457	return iter.page.Values()[iter.i]
22458}
22459
22460// Creates a new instance of the RouteTableListResultIterator type.
22461func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
22462	return RouteTableListResultIterator{page: page}
22463}
22464
22465// IsEmpty returns true if the ListResult contains no values.
22466func (rtlr RouteTableListResult) IsEmpty() bool {
22467	return rtlr.Value == nil || len(*rtlr.Value) == 0
22468}
22469
22470// hasNextLink returns true if the NextLink is not empty.
22471func (rtlr RouteTableListResult) hasNextLink() bool {
22472	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
22473}
22474
22475// routeTableListResultPreparer prepares a request to retrieve the next set of results.
22476// It returns nil if no more results exist.
22477func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
22478	if !rtlr.hasNextLink() {
22479		return nil, nil
22480	}
22481	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22482		autorest.AsJSON(),
22483		autorest.AsGet(),
22484		autorest.WithBaseURL(to.String(rtlr.NextLink)))
22485}
22486
22487// RouteTableListResultPage contains a page of RouteTable values.
22488type RouteTableListResultPage struct {
22489	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
22490	rtlr RouteTableListResult
22491}
22492
22493// NextWithContext advances to the next page of values.  If there was an error making
22494// the request the page does not advance and the error is returned.
22495func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
22496	if tracing.IsEnabled() {
22497		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
22498		defer func() {
22499			sc := -1
22500			if page.Response().Response.Response != nil {
22501				sc = page.Response().Response.Response.StatusCode
22502			}
22503			tracing.EndSpan(ctx, sc, err)
22504		}()
22505	}
22506	for {
22507		next, err := page.fn(ctx, page.rtlr)
22508		if err != nil {
22509			return err
22510		}
22511		page.rtlr = next
22512		if !next.hasNextLink() || !next.IsEmpty() {
22513			break
22514		}
22515	}
22516	return nil
22517}
22518
22519// Next advances to the next page of values.  If there was an error making
22520// the request the page does not advance and the error is returned.
22521// Deprecated: Use NextWithContext() instead.
22522func (page *RouteTableListResultPage) Next() error {
22523	return page.NextWithContext(context.Background())
22524}
22525
22526// NotDone returns true if the page enumeration should be started or is not yet complete.
22527func (page RouteTableListResultPage) NotDone() bool {
22528	return !page.rtlr.IsEmpty()
22529}
22530
22531// Response returns the raw server response from the last page request.
22532func (page RouteTableListResultPage) Response() RouteTableListResult {
22533	return page.rtlr
22534}
22535
22536// Values returns the slice of values for the current page or nil if there are no values.
22537func (page RouteTableListResultPage) Values() []RouteTable {
22538	if page.rtlr.IsEmpty() {
22539		return nil
22540	}
22541	return *page.rtlr.Value
22542}
22543
22544// Creates a new instance of the RouteTableListResultPage type.
22545func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
22546	return RouteTableListResultPage{
22547		fn:   getNextPage,
22548		rtlr: cur,
22549	}
22550}
22551
22552// RouteTablePropertiesFormat route Table resource
22553type RouteTablePropertiesFormat struct {
22554	// Routes - Collection of routes contained within a route table.
22555	Routes *[]Route `json:"routes,omitempty"`
22556	// Subnets - READ-ONLY; A collection of references to subnets.
22557	Subnets *[]Subnet `json:"subnets,omitempty"`
22558	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
22559	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
22560	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22561	ProvisioningState *string `json:"provisioningState,omitempty"`
22562}
22563
22564// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
22565func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
22566	objectMap := make(map[string]interface{})
22567	if rtpf.Routes != nil {
22568		objectMap["routes"] = rtpf.Routes
22569	}
22570	if rtpf.DisableBgpRoutePropagation != nil {
22571		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
22572	}
22573	if rtpf.ProvisioningState != nil {
22574		objectMap["provisioningState"] = rtpf.ProvisioningState
22575	}
22576	return json.Marshal(objectMap)
22577}
22578
22579// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22580// long-running operation.
22581type RouteTablesCreateOrUpdateFuture struct {
22582	azure.FutureAPI
22583	// Result returns the result of the asynchronous operation.
22584	// If the operation has not completed it will return an error.
22585	Result func(RouteTablesClient) (RouteTable, error)
22586}
22587
22588// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22589func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22590	var azFuture azure.Future
22591	if err := json.Unmarshal(body, &azFuture); err != nil {
22592		return err
22593	}
22594	future.FutureAPI = &azFuture
22595	future.Result = future.result
22596	return nil
22597}
22598
22599// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
22600func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
22601	var done bool
22602	done, err = future.DoneWithContext(context.Background(), client)
22603	if err != nil {
22604		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22605		return
22606	}
22607	if !done {
22608		rt.Response.Response = future.Response()
22609		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
22610		return
22611	}
22612	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22613	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
22614		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
22615		if err != nil {
22616			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
22617		}
22618	}
22619	return
22620}
22621
22622// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22623// operation.
22624type RouteTablesDeleteFuture struct {
22625	azure.FutureAPI
22626	// Result returns the result of the asynchronous operation.
22627	// If the operation has not completed it will return an error.
22628	Result func(RouteTablesClient) (autorest.Response, error)
22629}
22630
22631// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22632func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
22633	var azFuture azure.Future
22634	if err := json.Unmarshal(body, &azFuture); err != nil {
22635		return err
22636	}
22637	future.FutureAPI = &azFuture
22638	future.Result = future.result
22639	return nil
22640}
22641
22642// result is the default implementation for RouteTablesDeleteFuture.Result.
22643func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
22644	var done bool
22645	done, err = future.DoneWithContext(context.Background(), client)
22646	if err != nil {
22647		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
22648		return
22649	}
22650	if !done {
22651		ar.Response = future.Response()
22652		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
22653		return
22654	}
22655	ar.Response = future.Response()
22656	return
22657}
22658
22659// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22660// operation.
22661type RouteTablesUpdateTagsFuture struct {
22662	azure.FutureAPI
22663	// Result returns the result of the asynchronous operation.
22664	// If the operation has not completed it will return an error.
22665	Result func(RouteTablesClient) (RouteTable, error)
22666}
22667
22668// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22669func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22670	var azFuture azure.Future
22671	if err := json.Unmarshal(body, &azFuture); err != nil {
22672		return err
22673	}
22674	future.FutureAPI = &azFuture
22675	future.Result = future.result
22676	return nil
22677}
22678
22679// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
22680func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
22681	var done bool
22682	done, err = future.DoneWithContext(context.Background(), client)
22683	if err != nil {
22684		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22685		return
22686	}
22687	if !done {
22688		rt.Response.Response = future.Response()
22689		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
22690		return
22691	}
22692	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22693	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
22694		rt, err = client.UpdateTagsResponder(rt.Response.Response)
22695		if err != nil {
22696			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
22697		}
22698	}
22699	return
22700}
22701
22702// SecurityGroup networkSecurityGroup resource.
22703type SecurityGroup struct {
22704	autorest.Response `json:"-"`
22705	// SecurityGroupPropertiesFormat - Properties of the network security group
22706	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
22707	// Etag - A unique read-only string that changes whenever the resource is updated.
22708	Etag *string `json:"etag,omitempty"`
22709	// ID - Resource ID.
22710	ID *string `json:"id,omitempty"`
22711	// Name - READ-ONLY; Resource name.
22712	Name *string `json:"name,omitempty"`
22713	// Type - READ-ONLY; Resource type.
22714	Type *string `json:"type,omitempty"`
22715	// Location - Resource location.
22716	Location *string `json:"location,omitempty"`
22717	// Tags - Resource tags.
22718	Tags map[string]*string `json:"tags"`
22719}
22720
22721// MarshalJSON is the custom marshaler for SecurityGroup.
22722func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
22723	objectMap := make(map[string]interface{})
22724	if sg.SecurityGroupPropertiesFormat != nil {
22725		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
22726	}
22727	if sg.Etag != nil {
22728		objectMap["etag"] = sg.Etag
22729	}
22730	if sg.ID != nil {
22731		objectMap["id"] = sg.ID
22732	}
22733	if sg.Location != nil {
22734		objectMap["location"] = sg.Location
22735	}
22736	if sg.Tags != nil {
22737		objectMap["tags"] = sg.Tags
22738	}
22739	return json.Marshal(objectMap)
22740}
22741
22742// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
22743func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
22744	var m map[string]*json.RawMessage
22745	err := json.Unmarshal(body, &m)
22746	if err != nil {
22747		return err
22748	}
22749	for k, v := range m {
22750		switch k {
22751		case "properties":
22752			if v != nil {
22753				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
22754				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
22755				if err != nil {
22756					return err
22757				}
22758				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
22759			}
22760		case "etag":
22761			if v != nil {
22762				var etag string
22763				err = json.Unmarshal(*v, &etag)
22764				if err != nil {
22765					return err
22766				}
22767				sg.Etag = &etag
22768			}
22769		case "id":
22770			if v != nil {
22771				var ID string
22772				err = json.Unmarshal(*v, &ID)
22773				if err != nil {
22774					return err
22775				}
22776				sg.ID = &ID
22777			}
22778		case "name":
22779			if v != nil {
22780				var name string
22781				err = json.Unmarshal(*v, &name)
22782				if err != nil {
22783					return err
22784				}
22785				sg.Name = &name
22786			}
22787		case "type":
22788			if v != nil {
22789				var typeVar string
22790				err = json.Unmarshal(*v, &typeVar)
22791				if err != nil {
22792					return err
22793				}
22794				sg.Type = &typeVar
22795			}
22796		case "location":
22797			if v != nil {
22798				var location string
22799				err = json.Unmarshal(*v, &location)
22800				if err != nil {
22801					return err
22802				}
22803				sg.Location = &location
22804			}
22805		case "tags":
22806			if v != nil {
22807				var tags map[string]*string
22808				err = json.Unmarshal(*v, &tags)
22809				if err != nil {
22810					return err
22811				}
22812				sg.Tags = tags
22813			}
22814		}
22815	}
22816
22817	return nil
22818}
22819
22820// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
22821type SecurityGroupListResult struct {
22822	autorest.Response `json:"-"`
22823	// Value - A list of NetworkSecurityGroup resources.
22824	Value *[]SecurityGroup `json:"value,omitempty"`
22825	// NextLink - The URL to get the next set of results.
22826	NextLink *string `json:"nextLink,omitempty"`
22827}
22828
22829// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
22830type SecurityGroupListResultIterator struct {
22831	i    int
22832	page SecurityGroupListResultPage
22833}
22834
22835// NextWithContext advances to the next value.  If there was an error making
22836// the request the iterator does not advance and the error is returned.
22837func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
22838	if tracing.IsEnabled() {
22839		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
22840		defer func() {
22841			sc := -1
22842			if iter.Response().Response.Response != nil {
22843				sc = iter.Response().Response.Response.StatusCode
22844			}
22845			tracing.EndSpan(ctx, sc, err)
22846		}()
22847	}
22848	iter.i++
22849	if iter.i < len(iter.page.Values()) {
22850		return nil
22851	}
22852	err = iter.page.NextWithContext(ctx)
22853	if err != nil {
22854		iter.i--
22855		return err
22856	}
22857	iter.i = 0
22858	return nil
22859}
22860
22861// Next advances to the next value.  If there was an error making
22862// the request the iterator does not advance and the error is returned.
22863// Deprecated: Use NextWithContext() instead.
22864func (iter *SecurityGroupListResultIterator) Next() error {
22865	return iter.NextWithContext(context.Background())
22866}
22867
22868// NotDone returns true if the enumeration should be started or is not yet complete.
22869func (iter SecurityGroupListResultIterator) NotDone() bool {
22870	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22871}
22872
22873// Response returns the raw server response from the last page request.
22874func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
22875	return iter.page.Response()
22876}
22877
22878// Value returns the current value or a zero-initialized value if the
22879// iterator has advanced beyond the end of the collection.
22880func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
22881	if !iter.page.NotDone() {
22882		return SecurityGroup{}
22883	}
22884	return iter.page.Values()[iter.i]
22885}
22886
22887// Creates a new instance of the SecurityGroupListResultIterator type.
22888func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
22889	return SecurityGroupListResultIterator{page: page}
22890}
22891
22892// IsEmpty returns true if the ListResult contains no values.
22893func (sglr SecurityGroupListResult) IsEmpty() bool {
22894	return sglr.Value == nil || len(*sglr.Value) == 0
22895}
22896
22897// hasNextLink returns true if the NextLink is not empty.
22898func (sglr SecurityGroupListResult) hasNextLink() bool {
22899	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
22900}
22901
22902// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
22903// It returns nil if no more results exist.
22904func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
22905	if !sglr.hasNextLink() {
22906		return nil, nil
22907	}
22908	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22909		autorest.AsJSON(),
22910		autorest.AsGet(),
22911		autorest.WithBaseURL(to.String(sglr.NextLink)))
22912}
22913
22914// SecurityGroupListResultPage contains a page of SecurityGroup values.
22915type SecurityGroupListResultPage struct {
22916	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
22917	sglr SecurityGroupListResult
22918}
22919
22920// NextWithContext advances to the next page of values.  If there was an error making
22921// the request the page does not advance and the error is returned.
22922func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
22923	if tracing.IsEnabled() {
22924		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
22925		defer func() {
22926			sc := -1
22927			if page.Response().Response.Response != nil {
22928				sc = page.Response().Response.Response.StatusCode
22929			}
22930			tracing.EndSpan(ctx, sc, err)
22931		}()
22932	}
22933	for {
22934		next, err := page.fn(ctx, page.sglr)
22935		if err != nil {
22936			return err
22937		}
22938		page.sglr = next
22939		if !next.hasNextLink() || !next.IsEmpty() {
22940			break
22941		}
22942	}
22943	return nil
22944}
22945
22946// Next advances to the next page of values.  If there was an error making
22947// the request the page does not advance and the error is returned.
22948// Deprecated: Use NextWithContext() instead.
22949func (page *SecurityGroupListResultPage) Next() error {
22950	return page.NextWithContext(context.Background())
22951}
22952
22953// NotDone returns true if the page enumeration should be started or is not yet complete.
22954func (page SecurityGroupListResultPage) NotDone() bool {
22955	return !page.sglr.IsEmpty()
22956}
22957
22958// Response returns the raw server response from the last page request.
22959func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
22960	return page.sglr
22961}
22962
22963// Values returns the slice of values for the current page or nil if there are no values.
22964func (page SecurityGroupListResultPage) Values() []SecurityGroup {
22965	if page.sglr.IsEmpty() {
22966		return nil
22967	}
22968	return *page.sglr.Value
22969}
22970
22971// Creates a new instance of the SecurityGroupListResultPage type.
22972func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
22973	return SecurityGroupListResultPage{
22974		fn:   getNextPage,
22975		sglr: cur,
22976	}
22977}
22978
22979// SecurityGroupNetworkInterface network interface and all its associated security rules.
22980type SecurityGroupNetworkInterface struct {
22981	// ID - ID of the network interface.
22982	ID                       *string                   `json:"id,omitempty"`
22983	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
22984}
22985
22986// SecurityGroupPropertiesFormat network Security Group resource.
22987type SecurityGroupPropertiesFormat struct {
22988	// SecurityRules - A collection of security rules of the network security group.
22989	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
22990	// DefaultSecurityRules - The default security rules of network security group.
22991	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
22992	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
22993	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
22994	// Subnets - READ-ONLY; A collection of references to subnets.
22995	Subnets *[]Subnet `json:"subnets,omitempty"`
22996	// ResourceGUID - The resource GUID property of the network security group resource.
22997	ResourceGUID *string `json:"resourceGuid,omitempty"`
22998	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22999	ProvisioningState *string `json:"provisioningState,omitempty"`
23000}
23001
23002// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
23003func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
23004	objectMap := make(map[string]interface{})
23005	if sgpf.SecurityRules != nil {
23006		objectMap["securityRules"] = sgpf.SecurityRules
23007	}
23008	if sgpf.DefaultSecurityRules != nil {
23009		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
23010	}
23011	if sgpf.ResourceGUID != nil {
23012		objectMap["resourceGuid"] = sgpf.ResourceGUID
23013	}
23014	if sgpf.ProvisioningState != nil {
23015		objectMap["provisioningState"] = sgpf.ProvisioningState
23016	}
23017	return json.Marshal(objectMap)
23018}
23019
23020// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
23021type SecurityGroupResult struct {
23022	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23023	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
23024	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
23025	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
23026}
23027
23028// MarshalJSON is the custom marshaler for SecurityGroupResult.
23029func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
23030	objectMap := make(map[string]interface{})
23031	if sgr.SecurityRuleAccessResult != "" {
23032		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
23033	}
23034	return json.Marshal(objectMap)
23035}
23036
23037// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23038// long-running operation.
23039type SecurityGroupsCreateOrUpdateFuture struct {
23040	azure.FutureAPI
23041	// Result returns the result of the asynchronous operation.
23042	// If the operation has not completed it will return an error.
23043	Result func(SecurityGroupsClient) (SecurityGroup, error)
23044}
23045
23046// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23047func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23048	var azFuture azure.Future
23049	if err := json.Unmarshal(body, &azFuture); err != nil {
23050		return err
23051	}
23052	future.FutureAPI = &azFuture
23053	future.Result = future.result
23054	return nil
23055}
23056
23057// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
23058func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23059	var done bool
23060	done, err = future.DoneWithContext(context.Background(), client)
23061	if err != nil {
23062		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23063		return
23064	}
23065	if !done {
23066		sg.Response.Response = future.Response()
23067		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
23068		return
23069	}
23070	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23071	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
23072		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
23073		if err != nil {
23074			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
23075		}
23076	}
23077	return
23078}
23079
23080// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23081// operation.
23082type SecurityGroupsDeleteFuture struct {
23083	azure.FutureAPI
23084	// Result returns the result of the asynchronous operation.
23085	// If the operation has not completed it will return an error.
23086	Result func(SecurityGroupsClient) (autorest.Response, error)
23087}
23088
23089// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23090func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
23091	var azFuture azure.Future
23092	if err := json.Unmarshal(body, &azFuture); err != nil {
23093		return err
23094	}
23095	future.FutureAPI = &azFuture
23096	future.Result = future.result
23097	return nil
23098}
23099
23100// result is the default implementation for SecurityGroupsDeleteFuture.Result.
23101func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
23102	var done bool
23103	done, err = future.DoneWithContext(context.Background(), client)
23104	if err != nil {
23105		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
23106		return
23107	}
23108	if !done {
23109		ar.Response = future.Response()
23110		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
23111		return
23112	}
23113	ar.Response = future.Response()
23114	return
23115}
23116
23117// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
23118// long-running operation.
23119type SecurityGroupsUpdateTagsFuture struct {
23120	azure.FutureAPI
23121	// Result returns the result of the asynchronous operation.
23122	// If the operation has not completed it will return an error.
23123	Result func(SecurityGroupsClient) (SecurityGroup, error)
23124}
23125
23126// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23127func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23128	var azFuture azure.Future
23129	if err := json.Unmarshal(body, &azFuture); err != nil {
23130		return err
23131	}
23132	future.FutureAPI = &azFuture
23133	future.Result = future.result
23134	return nil
23135}
23136
23137// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
23138func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23139	var done bool
23140	done, err = future.DoneWithContext(context.Background(), client)
23141	if err != nil {
23142		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23143		return
23144	}
23145	if !done {
23146		sg.Response.Response = future.Response()
23147		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
23148		return
23149	}
23150	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23151	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
23152		sg, err = client.UpdateTagsResponder(sg.Response.Response)
23153		if err != nil {
23154			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
23155		}
23156	}
23157	return
23158}
23159
23160// SecurityGroupViewParameters parameters that define the VM to check security groups for.
23161type SecurityGroupViewParameters struct {
23162	// TargetResourceID - ID of the target VM.
23163	TargetResourceID *string `json:"targetResourceId,omitempty"`
23164}
23165
23166// SecurityGroupViewResult the information about security rules applied to the specified VM.
23167type SecurityGroupViewResult struct {
23168	autorest.Response `json:"-"`
23169	// NetworkInterfaces - List of network interfaces on the specified VM.
23170	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
23171}
23172
23173// SecurityRule network security rule.
23174type SecurityRule struct {
23175	autorest.Response `json:"-"`
23176	// SecurityRulePropertiesFormat - Properties of the security rule
23177	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
23178	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23179	Name *string `json:"name,omitempty"`
23180	// Etag - A unique read-only string that changes whenever the resource is updated.
23181	Etag *string `json:"etag,omitempty"`
23182	// ID - Resource ID.
23183	ID *string `json:"id,omitempty"`
23184}
23185
23186// MarshalJSON is the custom marshaler for SecurityRule.
23187func (sr SecurityRule) MarshalJSON() ([]byte, error) {
23188	objectMap := make(map[string]interface{})
23189	if sr.SecurityRulePropertiesFormat != nil {
23190		objectMap["properties"] = sr.SecurityRulePropertiesFormat
23191	}
23192	if sr.Name != nil {
23193		objectMap["name"] = sr.Name
23194	}
23195	if sr.Etag != nil {
23196		objectMap["etag"] = sr.Etag
23197	}
23198	if sr.ID != nil {
23199		objectMap["id"] = sr.ID
23200	}
23201	return json.Marshal(objectMap)
23202}
23203
23204// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
23205func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
23206	var m map[string]*json.RawMessage
23207	err := json.Unmarshal(body, &m)
23208	if err != nil {
23209		return err
23210	}
23211	for k, v := range m {
23212		switch k {
23213		case "properties":
23214			if v != nil {
23215				var securityRulePropertiesFormat SecurityRulePropertiesFormat
23216				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
23217				if err != nil {
23218					return err
23219				}
23220				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
23221			}
23222		case "name":
23223			if v != nil {
23224				var name string
23225				err = json.Unmarshal(*v, &name)
23226				if err != nil {
23227					return err
23228				}
23229				sr.Name = &name
23230			}
23231		case "etag":
23232			if v != nil {
23233				var etag string
23234				err = json.Unmarshal(*v, &etag)
23235				if err != nil {
23236					return err
23237				}
23238				sr.Etag = &etag
23239			}
23240		case "id":
23241			if v != nil {
23242				var ID string
23243				err = json.Unmarshal(*v, &ID)
23244				if err != nil {
23245					return err
23246				}
23247				sr.ID = &ID
23248			}
23249		}
23250	}
23251
23252	return nil
23253}
23254
23255// SecurityRuleAssociations all security rules associated with the network interface.
23256type SecurityRuleAssociations struct {
23257	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
23258	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
23259	// DefaultSecurityRules - Collection of default security rules of the network security group.
23260	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
23261	// EffectiveSecurityRules - Collection of effective security rules.
23262	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
23263}
23264
23265// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
23266// belongs to a network security group.
23267type SecurityRuleListResult struct {
23268	autorest.Response `json:"-"`
23269	// Value - The security rules in a network security group.
23270	Value *[]SecurityRule `json:"value,omitempty"`
23271	// NextLink - The URL to get the next set of results.
23272	NextLink *string `json:"nextLink,omitempty"`
23273}
23274
23275// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
23276type SecurityRuleListResultIterator struct {
23277	i    int
23278	page SecurityRuleListResultPage
23279}
23280
23281// NextWithContext advances to the next value.  If there was an error making
23282// the request the iterator does not advance and the error is returned.
23283func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23284	if tracing.IsEnabled() {
23285		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
23286		defer func() {
23287			sc := -1
23288			if iter.Response().Response.Response != nil {
23289				sc = iter.Response().Response.Response.StatusCode
23290			}
23291			tracing.EndSpan(ctx, sc, err)
23292		}()
23293	}
23294	iter.i++
23295	if iter.i < len(iter.page.Values()) {
23296		return nil
23297	}
23298	err = iter.page.NextWithContext(ctx)
23299	if err != nil {
23300		iter.i--
23301		return err
23302	}
23303	iter.i = 0
23304	return nil
23305}
23306
23307// Next advances to the next value.  If there was an error making
23308// the request the iterator does not advance and the error is returned.
23309// Deprecated: Use NextWithContext() instead.
23310func (iter *SecurityRuleListResultIterator) Next() error {
23311	return iter.NextWithContext(context.Background())
23312}
23313
23314// NotDone returns true if the enumeration should be started or is not yet complete.
23315func (iter SecurityRuleListResultIterator) NotDone() bool {
23316	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23317}
23318
23319// Response returns the raw server response from the last page request.
23320func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
23321	return iter.page.Response()
23322}
23323
23324// Value returns the current value or a zero-initialized value if the
23325// iterator has advanced beyond the end of the collection.
23326func (iter SecurityRuleListResultIterator) Value() SecurityRule {
23327	if !iter.page.NotDone() {
23328		return SecurityRule{}
23329	}
23330	return iter.page.Values()[iter.i]
23331}
23332
23333// Creates a new instance of the SecurityRuleListResultIterator type.
23334func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
23335	return SecurityRuleListResultIterator{page: page}
23336}
23337
23338// IsEmpty returns true if the ListResult contains no values.
23339func (srlr SecurityRuleListResult) IsEmpty() bool {
23340	return srlr.Value == nil || len(*srlr.Value) == 0
23341}
23342
23343// hasNextLink returns true if the NextLink is not empty.
23344func (srlr SecurityRuleListResult) hasNextLink() bool {
23345	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
23346}
23347
23348// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
23349// It returns nil if no more results exist.
23350func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23351	if !srlr.hasNextLink() {
23352		return nil, nil
23353	}
23354	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23355		autorest.AsJSON(),
23356		autorest.AsGet(),
23357		autorest.WithBaseURL(to.String(srlr.NextLink)))
23358}
23359
23360// SecurityRuleListResultPage contains a page of SecurityRule values.
23361type SecurityRuleListResultPage struct {
23362	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
23363	srlr SecurityRuleListResult
23364}
23365
23366// NextWithContext advances to the next page of values.  If there was an error making
23367// the request the page does not advance and the error is returned.
23368func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23369	if tracing.IsEnabled() {
23370		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
23371		defer func() {
23372			sc := -1
23373			if page.Response().Response.Response != nil {
23374				sc = page.Response().Response.Response.StatusCode
23375			}
23376			tracing.EndSpan(ctx, sc, err)
23377		}()
23378	}
23379	for {
23380		next, err := page.fn(ctx, page.srlr)
23381		if err != nil {
23382			return err
23383		}
23384		page.srlr = next
23385		if !next.hasNextLink() || !next.IsEmpty() {
23386			break
23387		}
23388	}
23389	return nil
23390}
23391
23392// Next advances to the next page of values.  If there was an error making
23393// the request the page does not advance and the error is returned.
23394// Deprecated: Use NextWithContext() instead.
23395func (page *SecurityRuleListResultPage) Next() error {
23396	return page.NextWithContext(context.Background())
23397}
23398
23399// NotDone returns true if the page enumeration should be started or is not yet complete.
23400func (page SecurityRuleListResultPage) NotDone() bool {
23401	return !page.srlr.IsEmpty()
23402}
23403
23404// Response returns the raw server response from the last page request.
23405func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
23406	return page.srlr
23407}
23408
23409// Values returns the slice of values for the current page or nil if there are no values.
23410func (page SecurityRuleListResultPage) Values() []SecurityRule {
23411	if page.srlr.IsEmpty() {
23412		return nil
23413	}
23414	return *page.srlr.Value
23415}
23416
23417// Creates a new instance of the SecurityRuleListResultPage type.
23418func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
23419	return SecurityRuleListResultPage{
23420		fn:   getNextPage,
23421		srlr: cur,
23422	}
23423}
23424
23425// SecurityRulePropertiesFormat security rule resource.
23426type SecurityRulePropertiesFormat struct {
23427	// Description - A description for this rule. Restricted to 140 chars.
23428	Description *string `json:"description,omitempty"`
23429	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
23430	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
23431	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
23432	SourcePortRange *string `json:"sourcePortRange,omitempty"`
23433	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
23434	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
23435	// 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.
23436	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
23437	// SourceAddressPrefixes - The CIDR or source IP ranges.
23438	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
23439	// SourceApplicationSecurityGroups - The application security group specified as source.
23440	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
23441	// 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.
23442	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
23443	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
23444	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
23445	// DestinationApplicationSecurityGroups - The application security group specified as destination.
23446	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
23447	// SourcePortRanges - The source port ranges.
23448	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
23449	// DestinationPortRanges - The destination port ranges.
23450	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
23451	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23452	Access SecurityRuleAccess `json:"access,omitempty"`
23453	// 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.
23454	Priority *int32 `json:"priority,omitempty"`
23455	// 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'
23456	Direction SecurityRuleDirection `json:"direction,omitempty"`
23457	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23458	ProvisioningState *string `json:"provisioningState,omitempty"`
23459}
23460
23461// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23462// long-running operation.
23463type SecurityRulesCreateOrUpdateFuture struct {
23464	azure.FutureAPI
23465	// Result returns the result of the asynchronous operation.
23466	// If the operation has not completed it will return an error.
23467	Result func(SecurityRulesClient) (SecurityRule, error)
23468}
23469
23470// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23471func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23472	var azFuture azure.Future
23473	if err := json.Unmarshal(body, &azFuture); err != nil {
23474		return err
23475	}
23476	future.FutureAPI = &azFuture
23477	future.Result = future.result
23478	return nil
23479}
23480
23481// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
23482func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
23483	var done bool
23484	done, err = future.DoneWithContext(context.Background(), client)
23485	if err != nil {
23486		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23487		return
23488	}
23489	if !done {
23490		sr.Response.Response = future.Response()
23491		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
23492		return
23493	}
23494	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23495	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
23496		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
23497		if err != nil {
23498			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
23499		}
23500	}
23501	return
23502}
23503
23504// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23505// operation.
23506type SecurityRulesDeleteFuture struct {
23507	azure.FutureAPI
23508	// Result returns the result of the asynchronous operation.
23509	// If the operation has not completed it will return an error.
23510	Result func(SecurityRulesClient) (autorest.Response, error)
23511}
23512
23513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23514func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
23515	var azFuture azure.Future
23516	if err := json.Unmarshal(body, &azFuture); err != nil {
23517		return err
23518	}
23519	future.FutureAPI = &azFuture
23520	future.Result = future.result
23521	return nil
23522}
23523
23524// result is the default implementation for SecurityRulesDeleteFuture.Result.
23525func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
23526	var done bool
23527	done, err = future.DoneWithContext(context.Background(), client)
23528	if err != nil {
23529		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
23530		return
23531	}
23532	if !done {
23533		ar.Response = future.Response()
23534		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
23535		return
23536	}
23537	ar.Response = future.Response()
23538	return
23539}
23540
23541// SecurityRulesEvaluationResult network security rules evaluation result.
23542type SecurityRulesEvaluationResult struct {
23543	// Name - Name of the network security rule.
23544	Name *string `json:"name,omitempty"`
23545	// ProtocolMatched - Value indicating whether protocol is matched.
23546	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
23547	// SourceMatched - Value indicating whether source is matched.
23548	SourceMatched *bool `json:"sourceMatched,omitempty"`
23549	// SourcePortMatched - Value indicating whether source port is matched.
23550	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
23551	// DestinationMatched - Value indicating whether destination is matched.
23552	DestinationMatched *bool `json:"destinationMatched,omitempty"`
23553	// DestinationPortMatched - Value indicating whether destination port is matched.
23554	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
23555}
23556
23557// ServiceAssociationLink serviceAssociationLink resource.
23558type ServiceAssociationLink struct {
23559	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
23560	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
23561	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
23562	Name *string `json:"name,omitempty"`
23563	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23564	Etag *string `json:"etag,omitempty"`
23565	// ID - Resource ID.
23566	ID *string `json:"id,omitempty"`
23567}
23568
23569// MarshalJSON is the custom marshaler for ServiceAssociationLink.
23570func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
23571	objectMap := make(map[string]interface{})
23572	if sal.ServiceAssociationLinkPropertiesFormat != nil {
23573		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
23574	}
23575	if sal.Name != nil {
23576		objectMap["name"] = sal.Name
23577	}
23578	if sal.ID != nil {
23579		objectMap["id"] = sal.ID
23580	}
23581	return json.Marshal(objectMap)
23582}
23583
23584// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
23585func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
23586	var m map[string]*json.RawMessage
23587	err := json.Unmarshal(body, &m)
23588	if err != nil {
23589		return err
23590	}
23591	for k, v := range m {
23592		switch k {
23593		case "properties":
23594			if v != nil {
23595				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
23596				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
23597				if err != nil {
23598					return err
23599				}
23600				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
23601			}
23602		case "name":
23603			if v != nil {
23604				var name string
23605				err = json.Unmarshal(*v, &name)
23606				if err != nil {
23607					return err
23608				}
23609				sal.Name = &name
23610			}
23611		case "etag":
23612			if v != nil {
23613				var etag string
23614				err = json.Unmarshal(*v, &etag)
23615				if err != nil {
23616					return err
23617				}
23618				sal.Etag = &etag
23619			}
23620		case "id":
23621			if v != nil {
23622				var ID string
23623				err = json.Unmarshal(*v, &ID)
23624				if err != nil {
23625					return err
23626				}
23627				sal.ID = &ID
23628			}
23629		}
23630	}
23631
23632	return nil
23633}
23634
23635// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
23636type ServiceAssociationLinkPropertiesFormat struct {
23637	// LinkedResourceType - Resource type of the linked resource.
23638	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
23639	// Link - Link to the external resource.
23640	Link *string `json:"link,omitempty"`
23641	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
23642	ProvisioningState *string `json:"provisioningState,omitempty"`
23643}
23644
23645// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
23646func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
23647	objectMap := make(map[string]interface{})
23648	if salpf.LinkedResourceType != nil {
23649		objectMap["linkedResourceType"] = salpf.LinkedResourceType
23650	}
23651	if salpf.Link != nil {
23652		objectMap["link"] = salpf.Link
23653	}
23654	return json.Marshal(objectMap)
23655}
23656
23657// ServiceDelegationPropertiesFormat properties of a service delegation.
23658type ServiceDelegationPropertiesFormat struct {
23659	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
23660	ServiceName *string `json:"serviceName,omitempty"`
23661	// Actions - Describes the actions permitted to the service upon delegation
23662	Actions *[]string `json:"actions,omitempty"`
23663	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
23664	ProvisioningState *string `json:"provisioningState,omitempty"`
23665}
23666
23667// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
23668func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
23669	objectMap := make(map[string]interface{})
23670	if sdpf.ServiceName != nil {
23671		objectMap["serviceName"] = sdpf.ServiceName
23672	}
23673	if sdpf.Actions != nil {
23674		objectMap["actions"] = sdpf.Actions
23675	}
23676	return json.Marshal(objectMap)
23677}
23678
23679// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
23680// a long-running operation.
23681type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
23682	azure.FutureAPI
23683	// Result returns the result of the asynchronous operation.
23684	// If the operation has not completed it will return an error.
23685	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
23686}
23687
23688// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23689func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23690	var azFuture azure.Future
23691	if err := json.Unmarshal(body, &azFuture); err != nil {
23692		return err
23693	}
23694	future.FutureAPI = &azFuture
23695	future.Result = future.result
23696	return nil
23697}
23698
23699// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
23700func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
23701	var done bool
23702	done, err = future.DoneWithContext(context.Background(), client)
23703	if err != nil {
23704		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23705		return
23706	}
23707	if !done {
23708		sep.Response.Response = future.Response()
23709		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
23710		return
23711	}
23712	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23713	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
23714		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
23715		if err != nil {
23716			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
23717		}
23718	}
23719	return
23720}
23721
23722// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
23723// long-running operation.
23724type ServiceEndpointPoliciesDeleteFuture struct {
23725	azure.FutureAPI
23726	// Result returns the result of the asynchronous operation.
23727	// If the operation has not completed it will return an error.
23728	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
23729}
23730
23731// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23732func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
23733	var azFuture azure.Future
23734	if err := json.Unmarshal(body, &azFuture); err != nil {
23735		return err
23736	}
23737	future.FutureAPI = &azFuture
23738	future.Result = future.result
23739	return nil
23740}
23741
23742// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
23743func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
23744	var done bool
23745	done, err = future.DoneWithContext(context.Background(), client)
23746	if err != nil {
23747		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
23748		return
23749	}
23750	if !done {
23751		ar.Response = future.Response()
23752		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
23753		return
23754	}
23755	ar.Response = future.Response()
23756	return
23757}
23758
23759// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
23760// long-running operation.
23761type ServiceEndpointPoliciesUpdateFuture struct {
23762	azure.FutureAPI
23763	// Result returns the result of the asynchronous operation.
23764	// If the operation has not completed it will return an error.
23765	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
23766}
23767
23768// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23769func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
23770	var azFuture azure.Future
23771	if err := json.Unmarshal(body, &azFuture); err != nil {
23772		return err
23773	}
23774	future.FutureAPI = &azFuture
23775	future.Result = future.result
23776	return nil
23777}
23778
23779// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
23780func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
23781	var done bool
23782	done, err = future.DoneWithContext(context.Background(), client)
23783	if err != nil {
23784		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
23785		return
23786	}
23787	if !done {
23788		sep.Response.Response = future.Response()
23789		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
23790		return
23791	}
23792	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23793	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
23794		sep, err = client.UpdateResponder(sep.Response.Response)
23795		if err != nil {
23796			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
23797		}
23798	}
23799	return
23800}
23801
23802// ServiceEndpointPolicy service End point policy resource.
23803type ServiceEndpointPolicy struct {
23804	autorest.Response `json:"-"`
23805	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
23806	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
23807	// Etag - A unique read-only string that changes whenever the resource is updated.
23808	Etag *string `json:"etag,omitempty"`
23809	// ID - Resource ID.
23810	ID *string `json:"id,omitempty"`
23811	// Name - READ-ONLY; Resource name.
23812	Name *string `json:"name,omitempty"`
23813	// Type - READ-ONLY; Resource type.
23814	Type *string `json:"type,omitempty"`
23815	// Location - Resource location.
23816	Location *string `json:"location,omitempty"`
23817	// Tags - Resource tags.
23818	Tags map[string]*string `json:"tags"`
23819}
23820
23821// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
23822func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
23823	objectMap := make(map[string]interface{})
23824	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
23825		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
23826	}
23827	if sep.Etag != nil {
23828		objectMap["etag"] = sep.Etag
23829	}
23830	if sep.ID != nil {
23831		objectMap["id"] = sep.ID
23832	}
23833	if sep.Location != nil {
23834		objectMap["location"] = sep.Location
23835	}
23836	if sep.Tags != nil {
23837		objectMap["tags"] = sep.Tags
23838	}
23839	return json.Marshal(objectMap)
23840}
23841
23842// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
23843func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
23844	var m map[string]*json.RawMessage
23845	err := json.Unmarshal(body, &m)
23846	if err != nil {
23847		return err
23848	}
23849	for k, v := range m {
23850		switch k {
23851		case "properties":
23852			if v != nil {
23853				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
23854				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
23855				if err != nil {
23856					return err
23857				}
23858				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
23859			}
23860		case "etag":
23861			if v != nil {
23862				var etag string
23863				err = json.Unmarshal(*v, &etag)
23864				if err != nil {
23865					return err
23866				}
23867				sep.Etag = &etag
23868			}
23869		case "id":
23870			if v != nil {
23871				var ID string
23872				err = json.Unmarshal(*v, &ID)
23873				if err != nil {
23874					return err
23875				}
23876				sep.ID = &ID
23877			}
23878		case "name":
23879			if v != nil {
23880				var name string
23881				err = json.Unmarshal(*v, &name)
23882				if err != nil {
23883					return err
23884				}
23885				sep.Name = &name
23886			}
23887		case "type":
23888			if v != nil {
23889				var typeVar string
23890				err = json.Unmarshal(*v, &typeVar)
23891				if err != nil {
23892					return err
23893				}
23894				sep.Type = &typeVar
23895			}
23896		case "location":
23897			if v != nil {
23898				var location string
23899				err = json.Unmarshal(*v, &location)
23900				if err != nil {
23901					return err
23902				}
23903				sep.Location = &location
23904			}
23905		case "tags":
23906			if v != nil {
23907				var tags map[string]*string
23908				err = json.Unmarshal(*v, &tags)
23909				if err != nil {
23910					return err
23911				}
23912				sep.Tags = tags
23913			}
23914		}
23915	}
23916
23917	return nil
23918}
23919
23920// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
23921type ServiceEndpointPolicyDefinition struct {
23922	autorest.Response `json:"-"`
23923	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
23924	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
23925	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23926	Name *string `json:"name,omitempty"`
23927	// Etag - A unique read-only string that changes whenever the resource is updated.
23928	Etag *string `json:"etag,omitempty"`
23929	// ID - Resource ID.
23930	ID *string `json:"id,omitempty"`
23931}
23932
23933// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
23934func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
23935	objectMap := make(map[string]interface{})
23936	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
23937		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
23938	}
23939	if sepd.Name != nil {
23940		objectMap["name"] = sepd.Name
23941	}
23942	if sepd.Etag != nil {
23943		objectMap["etag"] = sepd.Etag
23944	}
23945	if sepd.ID != nil {
23946		objectMap["id"] = sepd.ID
23947	}
23948	return json.Marshal(objectMap)
23949}
23950
23951// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
23952func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
23953	var m map[string]*json.RawMessage
23954	err := json.Unmarshal(body, &m)
23955	if err != nil {
23956		return err
23957	}
23958	for k, v := range m {
23959		switch k {
23960		case "properties":
23961			if v != nil {
23962				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
23963				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
23964				if err != nil {
23965					return err
23966				}
23967				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
23968			}
23969		case "name":
23970			if v != nil {
23971				var name string
23972				err = json.Unmarshal(*v, &name)
23973				if err != nil {
23974					return err
23975				}
23976				sepd.Name = &name
23977			}
23978		case "etag":
23979			if v != nil {
23980				var etag string
23981				err = json.Unmarshal(*v, &etag)
23982				if err != nil {
23983					return err
23984				}
23985				sepd.Etag = &etag
23986			}
23987		case "id":
23988			if v != nil {
23989				var ID string
23990				err = json.Unmarshal(*v, &ID)
23991				if err != nil {
23992					return err
23993				}
23994				sepd.ID = &ID
23995			}
23996		}
23997	}
23998
23999	return nil
24000}
24001
24002// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
24003// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
24004type ServiceEndpointPolicyDefinitionListResult struct {
24005	autorest.Response `json:"-"`
24006	// Value - The service endpoint policy definition in a service endpoint policy.
24007	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
24008	// NextLink - The URL to get the next set of results.
24009	NextLink *string `json:"nextLink,omitempty"`
24010}
24011
24012// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
24013// ServiceEndpointPolicyDefinition values.
24014type ServiceEndpointPolicyDefinitionListResultIterator struct {
24015	i    int
24016	page ServiceEndpointPolicyDefinitionListResultPage
24017}
24018
24019// NextWithContext advances to the next value.  If there was an error making
24020// the request the iterator does not advance and the error is returned.
24021func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
24022	if tracing.IsEnabled() {
24023		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
24024		defer func() {
24025			sc := -1
24026			if iter.Response().Response.Response != nil {
24027				sc = iter.Response().Response.Response.StatusCode
24028			}
24029			tracing.EndSpan(ctx, sc, err)
24030		}()
24031	}
24032	iter.i++
24033	if iter.i < len(iter.page.Values()) {
24034		return nil
24035	}
24036	err = iter.page.NextWithContext(ctx)
24037	if err != nil {
24038		iter.i--
24039		return err
24040	}
24041	iter.i = 0
24042	return nil
24043}
24044
24045// Next advances to the next value.  If there was an error making
24046// the request the iterator does not advance and the error is returned.
24047// Deprecated: Use NextWithContext() instead.
24048func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
24049	return iter.NextWithContext(context.Background())
24050}
24051
24052// NotDone returns true if the enumeration should be started or is not yet complete.
24053func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
24054	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24055}
24056
24057// Response returns the raw server response from the last page request.
24058func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
24059	return iter.page.Response()
24060}
24061
24062// Value returns the current value or a zero-initialized value if the
24063// iterator has advanced beyond the end of the collection.
24064func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
24065	if !iter.page.NotDone() {
24066		return ServiceEndpointPolicyDefinition{}
24067	}
24068	return iter.page.Values()[iter.i]
24069}
24070
24071// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
24072func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
24073	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
24074}
24075
24076// IsEmpty returns true if the ListResult contains no values.
24077func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
24078	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
24079}
24080
24081// hasNextLink returns true if the NextLink is not empty.
24082func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
24083	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
24084}
24085
24086// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
24087// It returns nil if no more results exist.
24088func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
24089	if !sepdlr.hasNextLink() {
24090		return nil, nil
24091	}
24092	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24093		autorest.AsJSON(),
24094		autorest.AsGet(),
24095		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
24096}
24097
24098// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
24099type ServiceEndpointPolicyDefinitionListResultPage struct {
24100	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
24101	sepdlr ServiceEndpointPolicyDefinitionListResult
24102}
24103
24104// NextWithContext advances to the next page of values.  If there was an error making
24105// the request the page does not advance and the error is returned.
24106func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
24107	if tracing.IsEnabled() {
24108		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
24109		defer func() {
24110			sc := -1
24111			if page.Response().Response.Response != nil {
24112				sc = page.Response().Response.Response.StatusCode
24113			}
24114			tracing.EndSpan(ctx, sc, err)
24115		}()
24116	}
24117	for {
24118		next, err := page.fn(ctx, page.sepdlr)
24119		if err != nil {
24120			return err
24121		}
24122		page.sepdlr = next
24123		if !next.hasNextLink() || !next.IsEmpty() {
24124			break
24125		}
24126	}
24127	return nil
24128}
24129
24130// Next advances to the next page of values.  If there was an error making
24131// the request the page does not advance and the error is returned.
24132// Deprecated: Use NextWithContext() instead.
24133func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
24134	return page.NextWithContext(context.Background())
24135}
24136
24137// NotDone returns true if the page enumeration should be started or is not yet complete.
24138func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
24139	return !page.sepdlr.IsEmpty()
24140}
24141
24142// Response returns the raw server response from the last page request.
24143func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
24144	return page.sepdlr
24145}
24146
24147// Values returns the slice of values for the current page or nil if there are no values.
24148func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
24149	if page.sepdlr.IsEmpty() {
24150		return nil
24151	}
24152	return *page.sepdlr.Value
24153}
24154
24155// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
24156func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
24157	return ServiceEndpointPolicyDefinitionListResultPage{
24158		fn:     getNextPage,
24159		sepdlr: cur,
24160	}
24161}
24162
24163// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
24164type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
24165	// Description - A description for this rule. Restricted to 140 chars.
24166	Description *string `json:"description,omitempty"`
24167	// Service - service endpoint name.
24168	Service *string `json:"service,omitempty"`
24169	// ServiceResources - A list of service resources.
24170	ServiceResources *[]string `json:"serviceResources,omitempty"`
24171	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24172	ProvisioningState *string `json:"provisioningState,omitempty"`
24173}
24174
24175// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
24176func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
24177	objectMap := make(map[string]interface{})
24178	if sepdpf.Description != nil {
24179		objectMap["description"] = sepdpf.Description
24180	}
24181	if sepdpf.Service != nil {
24182		objectMap["service"] = sepdpf.Service
24183	}
24184	if sepdpf.ServiceResources != nil {
24185		objectMap["serviceResources"] = sepdpf.ServiceResources
24186	}
24187	return json.Marshal(objectMap)
24188}
24189
24190// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
24191// results of a long-running operation.
24192type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
24193	azure.FutureAPI
24194	// Result returns the result of the asynchronous operation.
24195	// If the operation has not completed it will return an error.
24196	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
24197}
24198
24199// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24200func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24201	var azFuture azure.Future
24202	if err := json.Unmarshal(body, &azFuture); err != nil {
24203		return err
24204	}
24205	future.FutureAPI = &azFuture
24206	future.Result = future.result
24207	return nil
24208}
24209
24210// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
24211func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
24212	var done bool
24213	done, err = future.DoneWithContext(context.Background(), client)
24214	if err != nil {
24215		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24216		return
24217	}
24218	if !done {
24219		sepd.Response.Response = future.Response()
24220		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
24221		return
24222	}
24223	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24224	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
24225		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
24226		if err != nil {
24227			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
24228		}
24229	}
24230	return
24231}
24232
24233// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
24234// a long-running operation.
24235type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
24236	azure.FutureAPI
24237	// Result returns the result of the asynchronous operation.
24238	// If the operation has not completed it will return an error.
24239	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
24240}
24241
24242// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24243func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
24244	var azFuture azure.Future
24245	if err := json.Unmarshal(body, &azFuture); err != nil {
24246		return err
24247	}
24248	future.FutureAPI = &azFuture
24249	future.Result = future.result
24250	return nil
24251}
24252
24253// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
24254func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
24255	var done bool
24256	done, err = future.DoneWithContext(context.Background(), client)
24257	if err != nil {
24258		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
24259		return
24260	}
24261	if !done {
24262		ar.Response = future.Response()
24263		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
24264		return
24265	}
24266	ar.Response = future.Response()
24267	return
24268}
24269
24270// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
24271type ServiceEndpointPolicyListResult struct {
24272	autorest.Response `json:"-"`
24273	// Value - A list of ServiceEndpointPolicy resources.
24274	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
24275	// NextLink - READ-ONLY; The URL to get the next set of results.
24276	NextLink *string `json:"nextLink,omitempty"`
24277}
24278
24279// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
24280func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
24281	objectMap := make(map[string]interface{})
24282	if seplr.Value != nil {
24283		objectMap["value"] = seplr.Value
24284	}
24285	return json.Marshal(objectMap)
24286}
24287
24288// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
24289// values.
24290type ServiceEndpointPolicyListResultIterator struct {
24291	i    int
24292	page ServiceEndpointPolicyListResultPage
24293}
24294
24295// NextWithContext advances to the next value.  If there was an error making
24296// the request the iterator does not advance and the error is returned.
24297func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
24298	if tracing.IsEnabled() {
24299		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
24300		defer func() {
24301			sc := -1
24302			if iter.Response().Response.Response != nil {
24303				sc = iter.Response().Response.Response.StatusCode
24304			}
24305			tracing.EndSpan(ctx, sc, err)
24306		}()
24307	}
24308	iter.i++
24309	if iter.i < len(iter.page.Values()) {
24310		return nil
24311	}
24312	err = iter.page.NextWithContext(ctx)
24313	if err != nil {
24314		iter.i--
24315		return err
24316	}
24317	iter.i = 0
24318	return nil
24319}
24320
24321// Next advances to the next value.  If there was an error making
24322// the request the iterator does not advance and the error is returned.
24323// Deprecated: Use NextWithContext() instead.
24324func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
24325	return iter.NextWithContext(context.Background())
24326}
24327
24328// NotDone returns true if the enumeration should be started or is not yet complete.
24329func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
24330	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24331}
24332
24333// Response returns the raw server response from the last page request.
24334func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
24335	return iter.page.Response()
24336}
24337
24338// Value returns the current value or a zero-initialized value if the
24339// iterator has advanced beyond the end of the collection.
24340func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
24341	if !iter.page.NotDone() {
24342		return ServiceEndpointPolicy{}
24343	}
24344	return iter.page.Values()[iter.i]
24345}
24346
24347// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
24348func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
24349	return ServiceEndpointPolicyListResultIterator{page: page}
24350}
24351
24352// IsEmpty returns true if the ListResult contains no values.
24353func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
24354	return seplr.Value == nil || len(*seplr.Value) == 0
24355}
24356
24357// hasNextLink returns true if the NextLink is not empty.
24358func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
24359	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
24360}
24361
24362// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
24363// It returns nil if no more results exist.
24364func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
24365	if !seplr.hasNextLink() {
24366		return nil, nil
24367	}
24368	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24369		autorest.AsJSON(),
24370		autorest.AsGet(),
24371		autorest.WithBaseURL(to.String(seplr.NextLink)))
24372}
24373
24374// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
24375type ServiceEndpointPolicyListResultPage struct {
24376	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
24377	seplr ServiceEndpointPolicyListResult
24378}
24379
24380// NextWithContext advances to the next page of values.  If there was an error making
24381// the request the page does not advance and the error is returned.
24382func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
24383	if tracing.IsEnabled() {
24384		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
24385		defer func() {
24386			sc := -1
24387			if page.Response().Response.Response != nil {
24388				sc = page.Response().Response.Response.StatusCode
24389			}
24390			tracing.EndSpan(ctx, sc, err)
24391		}()
24392	}
24393	for {
24394		next, err := page.fn(ctx, page.seplr)
24395		if err != nil {
24396			return err
24397		}
24398		page.seplr = next
24399		if !next.hasNextLink() || !next.IsEmpty() {
24400			break
24401		}
24402	}
24403	return nil
24404}
24405
24406// Next advances to the next page of values.  If there was an error making
24407// the request the page does not advance and the error is returned.
24408// Deprecated: Use NextWithContext() instead.
24409func (page *ServiceEndpointPolicyListResultPage) Next() error {
24410	return page.NextWithContext(context.Background())
24411}
24412
24413// NotDone returns true if the page enumeration should be started or is not yet complete.
24414func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
24415	return !page.seplr.IsEmpty()
24416}
24417
24418// Response returns the raw server response from the last page request.
24419func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
24420	return page.seplr
24421}
24422
24423// Values returns the slice of values for the current page or nil if there are no values.
24424func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
24425	if page.seplr.IsEmpty() {
24426		return nil
24427	}
24428	return *page.seplr.Value
24429}
24430
24431// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
24432func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
24433	return ServiceEndpointPolicyListResultPage{
24434		fn:    getNextPage,
24435		seplr: cur,
24436	}
24437}
24438
24439// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
24440type ServiceEndpointPolicyPropertiesFormat struct {
24441	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
24442	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
24443	// Subnets - READ-ONLY; A collection of references to subnets.
24444	Subnets *[]Subnet `json:"subnets,omitempty"`
24445	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
24446	ResourceGUID *string `json:"resourceGuid,omitempty"`
24447	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24448	ProvisioningState *string `json:"provisioningState,omitempty"`
24449}
24450
24451// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
24452func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
24453	objectMap := make(map[string]interface{})
24454	if seppf.ServiceEndpointPolicyDefinitions != nil {
24455		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
24456	}
24457	return json.Marshal(objectMap)
24458}
24459
24460// ServiceEndpointPropertiesFormat the service endpoint properties.
24461type ServiceEndpointPropertiesFormat struct {
24462	// Service - The type of the endpoint service.
24463	Service *string `json:"service,omitempty"`
24464	// Locations - A list of locations.
24465	Locations *[]string `json:"locations,omitempty"`
24466	// ProvisioningState - The provisioning state of the resource.
24467	ProvisioningState *string `json:"provisioningState,omitempty"`
24468}
24469
24470// String ...
24471type String struct {
24472	autorest.Response `json:"-"`
24473	Value             *string `json:"value,omitempty"`
24474}
24475
24476// Subnet subnet in a virtual network resource.
24477type Subnet struct {
24478	autorest.Response `json:"-"`
24479	// SubnetPropertiesFormat - Properties of the subnet.
24480	*SubnetPropertiesFormat `json:"properties,omitempty"`
24481	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24482	Name *string `json:"name,omitempty"`
24483	// Etag - A unique read-only string that changes whenever the resource is updated.
24484	Etag *string `json:"etag,omitempty"`
24485	// ID - Resource ID.
24486	ID *string `json:"id,omitempty"`
24487}
24488
24489// MarshalJSON is the custom marshaler for Subnet.
24490func (s Subnet) MarshalJSON() ([]byte, error) {
24491	objectMap := make(map[string]interface{})
24492	if s.SubnetPropertiesFormat != nil {
24493		objectMap["properties"] = s.SubnetPropertiesFormat
24494	}
24495	if s.Name != nil {
24496		objectMap["name"] = s.Name
24497	}
24498	if s.Etag != nil {
24499		objectMap["etag"] = s.Etag
24500	}
24501	if s.ID != nil {
24502		objectMap["id"] = s.ID
24503	}
24504	return json.Marshal(objectMap)
24505}
24506
24507// UnmarshalJSON is the custom unmarshaler for Subnet struct.
24508func (s *Subnet) UnmarshalJSON(body []byte) error {
24509	var m map[string]*json.RawMessage
24510	err := json.Unmarshal(body, &m)
24511	if err != nil {
24512		return err
24513	}
24514	for k, v := range m {
24515		switch k {
24516		case "properties":
24517			if v != nil {
24518				var subnetPropertiesFormat SubnetPropertiesFormat
24519				err = json.Unmarshal(*v, &subnetPropertiesFormat)
24520				if err != nil {
24521					return err
24522				}
24523				s.SubnetPropertiesFormat = &subnetPropertiesFormat
24524			}
24525		case "name":
24526			if v != nil {
24527				var name string
24528				err = json.Unmarshal(*v, &name)
24529				if err != nil {
24530					return err
24531				}
24532				s.Name = &name
24533			}
24534		case "etag":
24535			if v != nil {
24536				var etag string
24537				err = json.Unmarshal(*v, &etag)
24538				if err != nil {
24539					return err
24540				}
24541				s.Etag = &etag
24542			}
24543		case "id":
24544			if v != nil {
24545				var ID string
24546				err = json.Unmarshal(*v, &ID)
24547				if err != nil {
24548					return err
24549				}
24550				s.ID = &ID
24551			}
24552		}
24553	}
24554
24555	return nil
24556}
24557
24558// SubnetAssociation network interface and its custom security rules.
24559type SubnetAssociation struct {
24560	// ID - READ-ONLY; Subnet ID.
24561	ID *string `json:"id,omitempty"`
24562	// SecurityRules - Collection of custom security rules.
24563	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
24564}
24565
24566// MarshalJSON is the custom marshaler for SubnetAssociation.
24567func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
24568	objectMap := make(map[string]interface{})
24569	if sa.SecurityRules != nil {
24570		objectMap["securityRules"] = sa.SecurityRules
24571	}
24572	return json.Marshal(objectMap)
24573}
24574
24575// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
24576// network
24577type SubnetListResult struct {
24578	autorest.Response `json:"-"`
24579	// Value - The subnets in a virtual network.
24580	Value *[]Subnet `json:"value,omitempty"`
24581	// NextLink - The URL to get the next set of results.
24582	NextLink *string `json:"nextLink,omitempty"`
24583}
24584
24585// SubnetListResultIterator provides access to a complete listing of Subnet values.
24586type SubnetListResultIterator struct {
24587	i    int
24588	page SubnetListResultPage
24589}
24590
24591// NextWithContext advances to the next value.  If there was an error making
24592// the request the iterator does not advance and the error is returned.
24593func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
24594	if tracing.IsEnabled() {
24595		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
24596		defer func() {
24597			sc := -1
24598			if iter.Response().Response.Response != nil {
24599				sc = iter.Response().Response.Response.StatusCode
24600			}
24601			tracing.EndSpan(ctx, sc, err)
24602		}()
24603	}
24604	iter.i++
24605	if iter.i < len(iter.page.Values()) {
24606		return nil
24607	}
24608	err = iter.page.NextWithContext(ctx)
24609	if err != nil {
24610		iter.i--
24611		return err
24612	}
24613	iter.i = 0
24614	return nil
24615}
24616
24617// Next advances to the next value.  If there was an error making
24618// the request the iterator does not advance and the error is returned.
24619// Deprecated: Use NextWithContext() instead.
24620func (iter *SubnetListResultIterator) Next() error {
24621	return iter.NextWithContext(context.Background())
24622}
24623
24624// NotDone returns true if the enumeration should be started or is not yet complete.
24625func (iter SubnetListResultIterator) NotDone() bool {
24626	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24627}
24628
24629// Response returns the raw server response from the last page request.
24630func (iter SubnetListResultIterator) Response() SubnetListResult {
24631	return iter.page.Response()
24632}
24633
24634// Value returns the current value or a zero-initialized value if the
24635// iterator has advanced beyond the end of the collection.
24636func (iter SubnetListResultIterator) Value() Subnet {
24637	if !iter.page.NotDone() {
24638		return Subnet{}
24639	}
24640	return iter.page.Values()[iter.i]
24641}
24642
24643// Creates a new instance of the SubnetListResultIterator type.
24644func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
24645	return SubnetListResultIterator{page: page}
24646}
24647
24648// IsEmpty returns true if the ListResult contains no values.
24649func (slr SubnetListResult) IsEmpty() bool {
24650	return slr.Value == nil || len(*slr.Value) == 0
24651}
24652
24653// hasNextLink returns true if the NextLink is not empty.
24654func (slr SubnetListResult) hasNextLink() bool {
24655	return slr.NextLink != nil && len(*slr.NextLink) != 0
24656}
24657
24658// subnetListResultPreparer prepares a request to retrieve the next set of results.
24659// It returns nil if no more results exist.
24660func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
24661	if !slr.hasNextLink() {
24662		return nil, nil
24663	}
24664	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24665		autorest.AsJSON(),
24666		autorest.AsGet(),
24667		autorest.WithBaseURL(to.String(slr.NextLink)))
24668}
24669
24670// SubnetListResultPage contains a page of Subnet values.
24671type SubnetListResultPage struct {
24672	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
24673	slr SubnetListResult
24674}
24675
24676// NextWithContext advances to the next page of values.  If there was an error making
24677// the request the page does not advance and the error is returned.
24678func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
24679	if tracing.IsEnabled() {
24680		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
24681		defer func() {
24682			sc := -1
24683			if page.Response().Response.Response != nil {
24684				sc = page.Response().Response.Response.StatusCode
24685			}
24686			tracing.EndSpan(ctx, sc, err)
24687		}()
24688	}
24689	for {
24690		next, err := page.fn(ctx, page.slr)
24691		if err != nil {
24692			return err
24693		}
24694		page.slr = next
24695		if !next.hasNextLink() || !next.IsEmpty() {
24696			break
24697		}
24698	}
24699	return nil
24700}
24701
24702// Next advances to the next page of values.  If there was an error making
24703// the request the page does not advance and the error is returned.
24704// Deprecated: Use NextWithContext() instead.
24705func (page *SubnetListResultPage) Next() error {
24706	return page.NextWithContext(context.Background())
24707}
24708
24709// NotDone returns true if the page enumeration should be started or is not yet complete.
24710func (page SubnetListResultPage) NotDone() bool {
24711	return !page.slr.IsEmpty()
24712}
24713
24714// Response returns the raw server response from the last page request.
24715func (page SubnetListResultPage) Response() SubnetListResult {
24716	return page.slr
24717}
24718
24719// Values returns the slice of values for the current page or nil if there are no values.
24720func (page SubnetListResultPage) Values() []Subnet {
24721	if page.slr.IsEmpty() {
24722		return nil
24723	}
24724	return *page.slr.Value
24725}
24726
24727// Creates a new instance of the SubnetListResultPage type.
24728func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
24729	return SubnetListResultPage{
24730		fn:  getNextPage,
24731		slr: cur,
24732	}
24733}
24734
24735// SubnetPropertiesFormat properties of the subnet.
24736type SubnetPropertiesFormat struct {
24737	// AddressPrefix - The address prefix for the subnet.
24738	AddressPrefix *string `json:"addressPrefix,omitempty"`
24739	// AddressPrefixes - List of  address prefixes for the subnet.
24740	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
24741	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
24742	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
24743	// RouteTable - The reference of the RouteTable resource.
24744	RouteTable *RouteTable `json:"routeTable,omitempty"`
24745	// ServiceEndpoints - An array of service endpoints.
24746	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
24747	// ServiceEndpointPolicies - An array of service endpoint policies.
24748	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
24749	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
24750	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
24751	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
24752	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
24753	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
24754	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
24755	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
24756	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
24757	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
24758	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
24759	// Delegations - Gets an array of references to the delegations on the subnet.
24760	Delegations *[]Delegation `json:"delegations,omitempty"`
24761	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
24762	Purpose *string `json:"purpose,omitempty"`
24763	// ProvisioningState - The provisioning state of the resource.
24764	ProvisioningState *string `json:"provisioningState,omitempty"`
24765}
24766
24767// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
24768func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
24769	objectMap := make(map[string]interface{})
24770	if spf.AddressPrefix != nil {
24771		objectMap["addressPrefix"] = spf.AddressPrefix
24772	}
24773	if spf.AddressPrefixes != nil {
24774		objectMap["addressPrefixes"] = spf.AddressPrefixes
24775	}
24776	if spf.NetworkSecurityGroup != nil {
24777		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
24778	}
24779	if spf.RouteTable != nil {
24780		objectMap["routeTable"] = spf.RouteTable
24781	}
24782	if spf.ServiceEndpoints != nil {
24783		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
24784	}
24785	if spf.ServiceEndpointPolicies != nil {
24786		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
24787	}
24788	if spf.ResourceNavigationLinks != nil {
24789		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
24790	}
24791	if spf.ServiceAssociationLinks != nil {
24792		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
24793	}
24794	if spf.Delegations != nil {
24795		objectMap["delegations"] = spf.Delegations
24796	}
24797	if spf.ProvisioningState != nil {
24798		objectMap["provisioningState"] = spf.ProvisioningState
24799	}
24800	return json.Marshal(objectMap)
24801}
24802
24803// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
24804// operation.
24805type SubnetsCreateOrUpdateFuture struct {
24806	azure.FutureAPI
24807	// Result returns the result of the asynchronous operation.
24808	// If the operation has not completed it will return an error.
24809	Result func(SubnetsClient) (Subnet, error)
24810}
24811
24812// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24813func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24814	var azFuture azure.Future
24815	if err := json.Unmarshal(body, &azFuture); err != nil {
24816		return err
24817	}
24818	future.FutureAPI = &azFuture
24819	future.Result = future.result
24820	return nil
24821}
24822
24823// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
24824func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
24825	var done bool
24826	done, err = future.DoneWithContext(context.Background(), client)
24827	if err != nil {
24828		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24829		return
24830	}
24831	if !done {
24832		s.Response.Response = future.Response()
24833		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
24834		return
24835	}
24836	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24837	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
24838		s, err = client.CreateOrUpdateResponder(s.Response.Response)
24839		if err != nil {
24840			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
24841		}
24842	}
24843	return
24844}
24845
24846// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24847// operation.
24848type SubnetsDeleteFuture struct {
24849	azure.FutureAPI
24850	// Result returns the result of the asynchronous operation.
24851	// If the operation has not completed it will return an error.
24852	Result func(SubnetsClient) (autorest.Response, error)
24853}
24854
24855// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24856func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
24857	var azFuture azure.Future
24858	if err := json.Unmarshal(body, &azFuture); err != nil {
24859		return err
24860	}
24861	future.FutureAPI = &azFuture
24862	future.Result = future.result
24863	return nil
24864}
24865
24866// result is the default implementation for SubnetsDeleteFuture.Result.
24867func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
24868	var done bool
24869	done, err = future.DoneWithContext(context.Background(), client)
24870	if err != nil {
24871		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
24872		return
24873	}
24874	if !done {
24875		ar.Response = future.Response()
24876		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
24877		return
24878	}
24879	ar.Response = future.Response()
24880	return
24881}
24882
24883// SubResource reference to another subresource.
24884type SubResource struct {
24885	// ID - Resource ID.
24886	ID *string `json:"id,omitempty"`
24887}
24888
24889// TagsObject tags object for patch operations.
24890type TagsObject struct {
24891	// Tags - Resource tags.
24892	Tags map[string]*string `json:"tags"`
24893}
24894
24895// MarshalJSON is the custom marshaler for TagsObject.
24896func (toVar TagsObject) MarshalJSON() ([]byte, error) {
24897	objectMap := make(map[string]interface{})
24898	if toVar.Tags != nil {
24899		objectMap["tags"] = toVar.Tags
24900	}
24901	return json.Marshal(objectMap)
24902}
24903
24904// Topology topology of the specified resource group.
24905type Topology struct {
24906	autorest.Response `json:"-"`
24907	// ID - READ-ONLY; GUID representing the operation id.
24908	ID *string `json:"id,omitempty"`
24909	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
24910	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
24911	// LastModified - READ-ONLY; The datetime when the topology was last modified.
24912	LastModified *date.Time          `json:"lastModified,omitempty"`
24913	Resources    *[]TopologyResource `json:"resources,omitempty"`
24914}
24915
24916// MarshalJSON is the custom marshaler for Topology.
24917func (t Topology) MarshalJSON() ([]byte, error) {
24918	objectMap := make(map[string]interface{})
24919	if t.Resources != nil {
24920		objectMap["resources"] = t.Resources
24921	}
24922	return json.Marshal(objectMap)
24923}
24924
24925// TopologyAssociation resources that have an association with the parent resource.
24926type TopologyAssociation struct {
24927	// Name - The name of the resource that is associated with the parent resource.
24928	Name *string `json:"name,omitempty"`
24929	// ResourceID - The ID of the resource that is associated with the parent resource.
24930	ResourceID *string `json:"resourceId,omitempty"`
24931	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
24932	AssociationType AssociationType `json:"associationType,omitempty"`
24933}
24934
24935// TopologyParameters parameters that define the representation of topology.
24936type TopologyParameters struct {
24937	// TargetResourceGroupName - The name of the target resource group to perform topology on.
24938	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
24939	// TargetVirtualNetwork - The reference of the Virtual Network resource.
24940	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
24941	// TargetSubnet - The reference of the Subnet resource.
24942	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
24943}
24944
24945// TopologyResource the network resource topology information for the given resource group.
24946type TopologyResource struct {
24947	// Name - Name of the resource.
24948	Name *string `json:"name,omitempty"`
24949	// ID - ID of the resource.
24950	ID *string `json:"id,omitempty"`
24951	// Location - Resource location.
24952	Location *string `json:"location,omitempty"`
24953	// Associations - Holds the associations the resource has with other resources in the resource group.
24954	Associations *[]TopologyAssociation `json:"associations,omitempty"`
24955}
24956
24957// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
24958type TrafficAnalyticsConfigurationProperties struct {
24959	// Enabled - Flag to enable/disable traffic analytics.
24960	Enabled *bool `json:"enabled,omitempty"`
24961	// WorkspaceID - The resource guid of the attached workspace
24962	WorkspaceID *string `json:"workspaceId,omitempty"`
24963	// WorkspaceRegion - The location of the attached workspace
24964	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
24965	// WorkspaceResourceID - Resource Id of the attached workspace
24966	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
24967	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
24968	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
24969}
24970
24971// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
24972type TrafficAnalyticsProperties struct {
24973	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
24974}
24975
24976// TroubleshootingDetails information gained from troubleshooting of specified resource.
24977type TroubleshootingDetails struct {
24978	// ID - The id of the get troubleshoot operation.
24979	ID *string `json:"id,omitempty"`
24980	// ReasonType - Reason type of failure.
24981	ReasonType *string `json:"reasonType,omitempty"`
24982	// Summary - A summary of troubleshooting.
24983	Summary *string `json:"summary,omitempty"`
24984	// Detail - Details on troubleshooting results.
24985	Detail *string `json:"detail,omitempty"`
24986	// RecommendedActions - List of recommended actions.
24987	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
24988}
24989
24990// TroubleshootingParameters parameters that define the resource to troubleshoot.
24991type TroubleshootingParameters struct {
24992	// TargetResourceID - The target resource to troubleshoot.
24993	TargetResourceID           *string `json:"targetResourceId,omitempty"`
24994	*TroubleshootingProperties `json:"properties,omitempty"`
24995}
24996
24997// MarshalJSON is the custom marshaler for TroubleshootingParameters.
24998func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
24999	objectMap := make(map[string]interface{})
25000	if tp.TargetResourceID != nil {
25001		objectMap["targetResourceId"] = tp.TargetResourceID
25002	}
25003	if tp.TroubleshootingProperties != nil {
25004		objectMap["properties"] = tp.TroubleshootingProperties
25005	}
25006	return json.Marshal(objectMap)
25007}
25008
25009// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
25010func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
25011	var m map[string]*json.RawMessage
25012	err := json.Unmarshal(body, &m)
25013	if err != nil {
25014		return err
25015	}
25016	for k, v := range m {
25017		switch k {
25018		case "targetResourceId":
25019			if v != nil {
25020				var targetResourceID string
25021				err = json.Unmarshal(*v, &targetResourceID)
25022				if err != nil {
25023					return err
25024				}
25025				tp.TargetResourceID = &targetResourceID
25026			}
25027		case "properties":
25028			if v != nil {
25029				var troubleshootingProperties TroubleshootingProperties
25030				err = json.Unmarshal(*v, &troubleshootingProperties)
25031				if err != nil {
25032					return err
25033				}
25034				tp.TroubleshootingProperties = &troubleshootingProperties
25035			}
25036		}
25037	}
25038
25039	return nil
25040}
25041
25042// TroubleshootingProperties storage location provided for troubleshoot.
25043type TroubleshootingProperties struct {
25044	// StorageID - The ID for the storage account to save the troubleshoot result.
25045	StorageID *string `json:"storageId,omitempty"`
25046	// StoragePath - The path to the blob to save the troubleshoot result in.
25047	StoragePath *string `json:"storagePath,omitempty"`
25048}
25049
25050// TroubleshootingRecommendedActions recommended actions based on discovered issues.
25051type TroubleshootingRecommendedActions struct {
25052	// ActionID - ID of the recommended action.
25053	ActionID *string `json:"actionId,omitempty"`
25054	// ActionText - Description of recommended actions.
25055	ActionText *string `json:"actionText,omitempty"`
25056	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
25057	ActionURI *string `json:"actionUri,omitempty"`
25058	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
25059	ActionURIText *string `json:"actionUriText,omitempty"`
25060}
25061
25062// TroubleshootingResult troubleshooting information gained from specified resource.
25063type TroubleshootingResult struct {
25064	autorest.Response `json:"-"`
25065	// StartTime - The start time of the troubleshooting.
25066	StartTime *date.Time `json:"startTime,omitempty"`
25067	// EndTime - The end time of the troubleshooting.
25068	EndTime *date.Time `json:"endTime,omitempty"`
25069	// Code - The result code of the troubleshooting.
25070	Code *string `json:"code,omitempty"`
25071	// Results - Information from troubleshooting.
25072	Results *[]TroubleshootingDetails `json:"results,omitempty"`
25073}
25074
25075// TunnelConnectionHealth virtualNetworkGatewayConnection properties
25076type TunnelConnectionHealth struct {
25077	// Tunnel - READ-ONLY; Tunnel name.
25078	Tunnel *string `json:"tunnel,omitempty"`
25079	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
25080	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
25081	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
25082	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25083	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
25084	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25085	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
25086	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
25087}
25088
25089// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
25090func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
25091	objectMap := make(map[string]interface{})
25092	return json.Marshal(objectMap)
25093}
25094
25095// Usage describes network resource usage.
25096type Usage struct {
25097	// ID - READ-ONLY; Resource identifier.
25098	ID *string `json:"id,omitempty"`
25099	// Unit - An enum describing the unit of measurement.
25100	Unit *string `json:"unit,omitempty"`
25101	// CurrentValue - The current value of the usage.
25102	CurrentValue *int64 `json:"currentValue,omitempty"`
25103	// Limit - The limit of usage.
25104	Limit *int64 `json:"limit,omitempty"`
25105	// Name - The name of the type of usage.
25106	Name *UsageName `json:"name,omitempty"`
25107}
25108
25109// MarshalJSON is the custom marshaler for Usage.
25110func (u Usage) MarshalJSON() ([]byte, error) {
25111	objectMap := make(map[string]interface{})
25112	if u.Unit != nil {
25113		objectMap["unit"] = u.Unit
25114	}
25115	if u.CurrentValue != nil {
25116		objectMap["currentValue"] = u.CurrentValue
25117	}
25118	if u.Limit != nil {
25119		objectMap["limit"] = u.Limit
25120	}
25121	if u.Name != nil {
25122		objectMap["name"] = u.Name
25123	}
25124	return json.Marshal(objectMap)
25125}
25126
25127// UsageName the usage names.
25128type UsageName struct {
25129	// Value - A string describing the resource name.
25130	Value *string `json:"value,omitempty"`
25131	// LocalizedValue - A localized string describing the resource name.
25132	LocalizedValue *string `json:"localizedValue,omitempty"`
25133}
25134
25135// UsagesListResult the list usages operation response.
25136type UsagesListResult struct {
25137	autorest.Response `json:"-"`
25138	// Value - The list network resource usages.
25139	Value *[]Usage `json:"value,omitempty"`
25140	// NextLink - URL to get the next set of results.
25141	NextLink *string `json:"nextLink,omitempty"`
25142}
25143
25144// UsagesListResultIterator provides access to a complete listing of Usage values.
25145type UsagesListResultIterator struct {
25146	i    int
25147	page UsagesListResultPage
25148}
25149
25150// NextWithContext advances to the next value.  If there was an error making
25151// the request the iterator does not advance and the error is returned.
25152func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
25153	if tracing.IsEnabled() {
25154		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
25155		defer func() {
25156			sc := -1
25157			if iter.Response().Response.Response != nil {
25158				sc = iter.Response().Response.Response.StatusCode
25159			}
25160			tracing.EndSpan(ctx, sc, err)
25161		}()
25162	}
25163	iter.i++
25164	if iter.i < len(iter.page.Values()) {
25165		return nil
25166	}
25167	err = iter.page.NextWithContext(ctx)
25168	if err != nil {
25169		iter.i--
25170		return err
25171	}
25172	iter.i = 0
25173	return nil
25174}
25175
25176// Next advances to the next value.  If there was an error making
25177// the request the iterator does not advance and the error is returned.
25178// Deprecated: Use NextWithContext() instead.
25179func (iter *UsagesListResultIterator) Next() error {
25180	return iter.NextWithContext(context.Background())
25181}
25182
25183// NotDone returns true if the enumeration should be started or is not yet complete.
25184func (iter UsagesListResultIterator) NotDone() bool {
25185	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25186}
25187
25188// Response returns the raw server response from the last page request.
25189func (iter UsagesListResultIterator) Response() UsagesListResult {
25190	return iter.page.Response()
25191}
25192
25193// Value returns the current value or a zero-initialized value if the
25194// iterator has advanced beyond the end of the collection.
25195func (iter UsagesListResultIterator) Value() Usage {
25196	if !iter.page.NotDone() {
25197		return Usage{}
25198	}
25199	return iter.page.Values()[iter.i]
25200}
25201
25202// Creates a new instance of the UsagesListResultIterator type.
25203func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
25204	return UsagesListResultIterator{page: page}
25205}
25206
25207// IsEmpty returns true if the ListResult contains no values.
25208func (ulr UsagesListResult) IsEmpty() bool {
25209	return ulr.Value == nil || len(*ulr.Value) == 0
25210}
25211
25212// hasNextLink returns true if the NextLink is not empty.
25213func (ulr UsagesListResult) hasNextLink() bool {
25214	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
25215}
25216
25217// usagesListResultPreparer prepares a request to retrieve the next set of results.
25218// It returns nil if no more results exist.
25219func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
25220	if !ulr.hasNextLink() {
25221		return nil, nil
25222	}
25223	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25224		autorest.AsJSON(),
25225		autorest.AsGet(),
25226		autorest.WithBaseURL(to.String(ulr.NextLink)))
25227}
25228
25229// UsagesListResultPage contains a page of Usage values.
25230type UsagesListResultPage struct {
25231	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
25232	ulr UsagesListResult
25233}
25234
25235// NextWithContext advances to the next page of values.  If there was an error making
25236// the request the page does not advance and the error is returned.
25237func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
25238	if tracing.IsEnabled() {
25239		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
25240		defer func() {
25241			sc := -1
25242			if page.Response().Response.Response != nil {
25243				sc = page.Response().Response.Response.StatusCode
25244			}
25245			tracing.EndSpan(ctx, sc, err)
25246		}()
25247	}
25248	for {
25249		next, err := page.fn(ctx, page.ulr)
25250		if err != nil {
25251			return err
25252		}
25253		page.ulr = next
25254		if !next.hasNextLink() || !next.IsEmpty() {
25255			break
25256		}
25257	}
25258	return nil
25259}
25260
25261// Next advances to the next page of values.  If there was an error making
25262// the request the page does not advance and the error is returned.
25263// Deprecated: Use NextWithContext() instead.
25264func (page *UsagesListResultPage) Next() error {
25265	return page.NextWithContext(context.Background())
25266}
25267
25268// NotDone returns true if the page enumeration should be started or is not yet complete.
25269func (page UsagesListResultPage) NotDone() bool {
25270	return !page.ulr.IsEmpty()
25271}
25272
25273// Response returns the raw server response from the last page request.
25274func (page UsagesListResultPage) Response() UsagesListResult {
25275	return page.ulr
25276}
25277
25278// Values returns the slice of values for the current page or nil if there are no values.
25279func (page UsagesListResultPage) Values() []Usage {
25280	if page.ulr.IsEmpty() {
25281		return nil
25282	}
25283	return *page.ulr.Value
25284}
25285
25286// Creates a new instance of the UsagesListResultPage type.
25287func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
25288	return UsagesListResultPage{
25289		fn:  getNextPage,
25290		ulr: cur,
25291	}
25292}
25293
25294// VerificationIPFlowParameters parameters that define the IP flow to be verified.
25295type VerificationIPFlowParameters struct {
25296	// TargetResourceID - The ID of the target resource to perform next-hop on.
25297	TargetResourceID *string `json:"targetResourceId,omitempty"`
25298	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
25299	Direction Direction `json:"direction,omitempty"`
25300	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
25301	Protocol IPFlowProtocol `json:"protocol,omitempty"`
25302	// 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.
25303	LocalPort *string `json:"localPort,omitempty"`
25304	// 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.
25305	RemotePort *string `json:"remotePort,omitempty"`
25306	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
25307	LocalIPAddress *string `json:"localIPAddress,omitempty"`
25308	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
25309	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
25310	// 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).
25311	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
25312}
25313
25314// VerificationIPFlowResult results of IP flow verification on the target resource.
25315type VerificationIPFlowResult struct {
25316	autorest.Response `json:"-"`
25317	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
25318	Access Access `json:"access,omitempty"`
25319	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
25320	RuleName *string `json:"ruleName,omitempty"`
25321}
25322
25323// VirtualHub virtualHub Resource.
25324type VirtualHub struct {
25325	autorest.Response     `json:"-"`
25326	*VirtualHubProperties `json:"properties,omitempty"`
25327	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25328	Etag *string `json:"etag,omitempty"`
25329	// ID - Resource ID.
25330	ID *string `json:"id,omitempty"`
25331	// Name - READ-ONLY; Resource name.
25332	Name *string `json:"name,omitempty"`
25333	// Type - READ-ONLY; Resource type.
25334	Type *string `json:"type,omitempty"`
25335	// Location - Resource location.
25336	Location *string `json:"location,omitempty"`
25337	// Tags - Resource tags.
25338	Tags map[string]*string `json:"tags"`
25339}
25340
25341// MarshalJSON is the custom marshaler for VirtualHub.
25342func (vh VirtualHub) MarshalJSON() ([]byte, error) {
25343	objectMap := make(map[string]interface{})
25344	if vh.VirtualHubProperties != nil {
25345		objectMap["properties"] = vh.VirtualHubProperties
25346	}
25347	if vh.ID != nil {
25348		objectMap["id"] = vh.ID
25349	}
25350	if vh.Location != nil {
25351		objectMap["location"] = vh.Location
25352	}
25353	if vh.Tags != nil {
25354		objectMap["tags"] = vh.Tags
25355	}
25356	return json.Marshal(objectMap)
25357}
25358
25359// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
25360func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
25361	var m map[string]*json.RawMessage
25362	err := json.Unmarshal(body, &m)
25363	if err != nil {
25364		return err
25365	}
25366	for k, v := range m {
25367		switch k {
25368		case "properties":
25369			if v != nil {
25370				var virtualHubProperties VirtualHubProperties
25371				err = json.Unmarshal(*v, &virtualHubProperties)
25372				if err != nil {
25373					return err
25374				}
25375				vh.VirtualHubProperties = &virtualHubProperties
25376			}
25377		case "etag":
25378			if v != nil {
25379				var etag string
25380				err = json.Unmarshal(*v, &etag)
25381				if err != nil {
25382					return err
25383				}
25384				vh.Etag = &etag
25385			}
25386		case "id":
25387			if v != nil {
25388				var ID string
25389				err = json.Unmarshal(*v, &ID)
25390				if err != nil {
25391					return err
25392				}
25393				vh.ID = &ID
25394			}
25395		case "name":
25396			if v != nil {
25397				var name string
25398				err = json.Unmarshal(*v, &name)
25399				if err != nil {
25400					return err
25401				}
25402				vh.Name = &name
25403			}
25404		case "type":
25405			if v != nil {
25406				var typeVar string
25407				err = json.Unmarshal(*v, &typeVar)
25408				if err != nil {
25409					return err
25410				}
25411				vh.Type = &typeVar
25412			}
25413		case "location":
25414			if v != nil {
25415				var location string
25416				err = json.Unmarshal(*v, &location)
25417				if err != nil {
25418					return err
25419				}
25420				vh.Location = &location
25421			}
25422		case "tags":
25423			if v != nil {
25424				var tags map[string]*string
25425				err = json.Unmarshal(*v, &tags)
25426				if err != nil {
25427					return err
25428				}
25429				vh.Tags = tags
25430			}
25431		}
25432	}
25433
25434	return nil
25435}
25436
25437// VirtualHubID virtual Hub identifier.
25438type VirtualHubID struct {
25439	// ID - The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription.
25440	ID *string `json:"id,omitempty"`
25441}
25442
25443// VirtualHubProperties parameters for VirtualHub
25444type VirtualHubProperties struct {
25445	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
25446	VirtualWan *SubResource `json:"virtualWan,omitempty"`
25447	// VpnGateway - The VpnGateway associated with this VirtualHub
25448	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
25449	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
25450	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
25451	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
25452	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
25453	// VirtualNetworkConnections - list of all vnet connections with this VirtualHub.
25454	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
25455	// AddressPrefix - Address-prefix for this VirtualHub.
25456	AddressPrefix *string `json:"addressPrefix,omitempty"`
25457	// RouteTable - The routeTable associated with this virtual hub.
25458	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
25459	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25460	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25461}
25462
25463// VirtualHubRoute virtualHub route
25464type VirtualHubRoute struct {
25465	// AddressPrefixes - list of all addressPrefixes.
25466	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25467	// NextHopIPAddress - NextHop ip address.
25468	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
25469}
25470
25471// VirtualHubRouteTable virtualHub route table
25472type VirtualHubRouteTable struct {
25473	// Routes - list of all routes.
25474	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
25475}
25476
25477// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25478// long-running operation.
25479type VirtualHubsCreateOrUpdateFuture struct {
25480	azure.FutureAPI
25481	// Result returns the result of the asynchronous operation.
25482	// If the operation has not completed it will return an error.
25483	Result func(VirtualHubsClient) (VirtualHub, error)
25484}
25485
25486// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25487func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25488	var azFuture azure.Future
25489	if err := json.Unmarshal(body, &azFuture); err != nil {
25490		return err
25491	}
25492	future.FutureAPI = &azFuture
25493	future.Result = future.result
25494	return nil
25495}
25496
25497// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
25498func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25499	var done bool
25500	done, err = future.DoneWithContext(context.Background(), client)
25501	if err != nil {
25502		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25503		return
25504	}
25505	if !done {
25506		vh.Response.Response = future.Response()
25507		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
25508		return
25509	}
25510	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25511	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25512		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
25513		if err != nil {
25514			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
25515		}
25516	}
25517	return
25518}
25519
25520// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25521// operation.
25522type VirtualHubsDeleteFuture struct {
25523	azure.FutureAPI
25524	// Result returns the result of the asynchronous operation.
25525	// If the operation has not completed it will return an error.
25526	Result func(VirtualHubsClient) (autorest.Response, error)
25527}
25528
25529// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25530func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
25531	var azFuture azure.Future
25532	if err := json.Unmarshal(body, &azFuture); err != nil {
25533		return err
25534	}
25535	future.FutureAPI = &azFuture
25536	future.Result = future.result
25537	return nil
25538}
25539
25540// result is the default implementation for VirtualHubsDeleteFuture.Result.
25541func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
25542	var done bool
25543	done, err = future.DoneWithContext(context.Background(), client)
25544	if err != nil {
25545		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
25546		return
25547	}
25548	if !done {
25549		ar.Response = future.Response()
25550		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
25551		return
25552	}
25553	ar.Response = future.Response()
25554	return
25555}
25556
25557// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25558// operation.
25559type VirtualHubsUpdateTagsFuture struct {
25560	azure.FutureAPI
25561	// Result returns the result of the asynchronous operation.
25562	// If the operation has not completed it will return an error.
25563	Result func(VirtualHubsClient) (VirtualHub, error)
25564}
25565
25566// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25567func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25568	var azFuture azure.Future
25569	if err := json.Unmarshal(body, &azFuture); err != nil {
25570		return err
25571	}
25572	future.FutureAPI = &azFuture
25573	future.Result = future.result
25574	return nil
25575}
25576
25577// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
25578func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25579	var done bool
25580	done, err = future.DoneWithContext(context.Background(), client)
25581	if err != nil {
25582		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25583		return
25584	}
25585	if !done {
25586		vh.Response.Response = future.Response()
25587		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
25588		return
25589	}
25590	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25591	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25592		vh, err = client.UpdateTagsResponder(vh.Response.Response)
25593		if err != nil {
25594			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
25595		}
25596	}
25597	return
25598}
25599
25600// VirtualNetwork virtual Network resource.
25601type VirtualNetwork struct {
25602	autorest.Response `json:"-"`
25603	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
25604	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
25605	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25606	Etag *string `json:"etag,omitempty"`
25607	// ID - Resource ID.
25608	ID *string `json:"id,omitempty"`
25609	// Name - READ-ONLY; Resource name.
25610	Name *string `json:"name,omitempty"`
25611	// Type - READ-ONLY; Resource type.
25612	Type *string `json:"type,omitempty"`
25613	// Location - Resource location.
25614	Location *string `json:"location,omitempty"`
25615	// Tags - Resource tags.
25616	Tags map[string]*string `json:"tags"`
25617}
25618
25619// MarshalJSON is the custom marshaler for VirtualNetwork.
25620func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
25621	objectMap := make(map[string]interface{})
25622	if vn.VirtualNetworkPropertiesFormat != nil {
25623		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
25624	}
25625	if vn.Etag != nil {
25626		objectMap["etag"] = vn.Etag
25627	}
25628	if vn.ID != nil {
25629		objectMap["id"] = vn.ID
25630	}
25631	if vn.Location != nil {
25632		objectMap["location"] = vn.Location
25633	}
25634	if vn.Tags != nil {
25635		objectMap["tags"] = vn.Tags
25636	}
25637	return json.Marshal(objectMap)
25638}
25639
25640// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
25641func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
25642	var m map[string]*json.RawMessage
25643	err := json.Unmarshal(body, &m)
25644	if err != nil {
25645		return err
25646	}
25647	for k, v := range m {
25648		switch k {
25649		case "properties":
25650			if v != nil {
25651				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
25652				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
25653				if err != nil {
25654					return err
25655				}
25656				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
25657			}
25658		case "etag":
25659			if v != nil {
25660				var etag string
25661				err = json.Unmarshal(*v, &etag)
25662				if err != nil {
25663					return err
25664				}
25665				vn.Etag = &etag
25666			}
25667		case "id":
25668			if v != nil {
25669				var ID string
25670				err = json.Unmarshal(*v, &ID)
25671				if err != nil {
25672					return err
25673				}
25674				vn.ID = &ID
25675			}
25676		case "name":
25677			if v != nil {
25678				var name string
25679				err = json.Unmarshal(*v, &name)
25680				if err != nil {
25681					return err
25682				}
25683				vn.Name = &name
25684			}
25685		case "type":
25686			if v != nil {
25687				var typeVar string
25688				err = json.Unmarshal(*v, &typeVar)
25689				if err != nil {
25690					return err
25691				}
25692				vn.Type = &typeVar
25693			}
25694		case "location":
25695			if v != nil {
25696				var location string
25697				err = json.Unmarshal(*v, &location)
25698				if err != nil {
25699					return err
25700				}
25701				vn.Location = &location
25702			}
25703		case "tags":
25704			if v != nil {
25705				var tags map[string]*string
25706				err = json.Unmarshal(*v, &tags)
25707				if err != nil {
25708					return err
25709				}
25710				vn.Tags = tags
25711			}
25712		}
25713	}
25714
25715	return nil
25716}
25717
25718// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
25719// resource.
25720type VirtualNetworkConnectionGatewayReference struct {
25721	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
25722	ID *string `json:"id,omitempty"`
25723}
25724
25725// VirtualNetworkGateway a common class for general resource information
25726type VirtualNetworkGateway struct {
25727	autorest.Response `json:"-"`
25728	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
25729	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
25730	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25731	Etag *string `json:"etag,omitempty"`
25732	// ID - Resource ID.
25733	ID *string `json:"id,omitempty"`
25734	// Name - READ-ONLY; Resource name.
25735	Name *string `json:"name,omitempty"`
25736	// Type - READ-ONLY; Resource type.
25737	Type *string `json:"type,omitempty"`
25738	// Location - Resource location.
25739	Location *string `json:"location,omitempty"`
25740	// Tags - Resource tags.
25741	Tags map[string]*string `json:"tags"`
25742}
25743
25744// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
25745func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
25746	objectMap := make(map[string]interface{})
25747	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
25748		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
25749	}
25750	if vng.Etag != nil {
25751		objectMap["etag"] = vng.Etag
25752	}
25753	if vng.ID != nil {
25754		objectMap["id"] = vng.ID
25755	}
25756	if vng.Location != nil {
25757		objectMap["location"] = vng.Location
25758	}
25759	if vng.Tags != nil {
25760		objectMap["tags"] = vng.Tags
25761	}
25762	return json.Marshal(objectMap)
25763}
25764
25765// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
25766func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
25767	var m map[string]*json.RawMessage
25768	err := json.Unmarshal(body, &m)
25769	if err != nil {
25770		return err
25771	}
25772	for k, v := range m {
25773		switch k {
25774		case "properties":
25775			if v != nil {
25776				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
25777				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
25778				if err != nil {
25779					return err
25780				}
25781				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
25782			}
25783		case "etag":
25784			if v != nil {
25785				var etag string
25786				err = json.Unmarshal(*v, &etag)
25787				if err != nil {
25788					return err
25789				}
25790				vng.Etag = &etag
25791			}
25792		case "id":
25793			if v != nil {
25794				var ID string
25795				err = json.Unmarshal(*v, &ID)
25796				if err != nil {
25797					return err
25798				}
25799				vng.ID = &ID
25800			}
25801		case "name":
25802			if v != nil {
25803				var name string
25804				err = json.Unmarshal(*v, &name)
25805				if err != nil {
25806					return err
25807				}
25808				vng.Name = &name
25809			}
25810		case "type":
25811			if v != nil {
25812				var typeVar string
25813				err = json.Unmarshal(*v, &typeVar)
25814				if err != nil {
25815					return err
25816				}
25817				vng.Type = &typeVar
25818			}
25819		case "location":
25820			if v != nil {
25821				var location string
25822				err = json.Unmarshal(*v, &location)
25823				if err != nil {
25824					return err
25825				}
25826				vng.Location = &location
25827			}
25828		case "tags":
25829			if v != nil {
25830				var tags map[string]*string
25831				err = json.Unmarshal(*v, &tags)
25832				if err != nil {
25833					return err
25834				}
25835				vng.Tags = tags
25836			}
25837		}
25838	}
25839
25840	return nil
25841}
25842
25843// VirtualNetworkGatewayConnection a common class for general resource information
25844type VirtualNetworkGatewayConnection struct {
25845	autorest.Response `json:"-"`
25846	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
25847	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
25848	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25849	Etag *string `json:"etag,omitempty"`
25850	// ID - Resource ID.
25851	ID *string `json:"id,omitempty"`
25852	// Name - READ-ONLY; Resource name.
25853	Name *string `json:"name,omitempty"`
25854	// Type - READ-ONLY; Resource type.
25855	Type *string `json:"type,omitempty"`
25856	// Location - Resource location.
25857	Location *string `json:"location,omitempty"`
25858	// Tags - Resource tags.
25859	Tags map[string]*string `json:"tags"`
25860}
25861
25862// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
25863func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
25864	objectMap := make(map[string]interface{})
25865	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
25866		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
25867	}
25868	if vngc.Etag != nil {
25869		objectMap["etag"] = vngc.Etag
25870	}
25871	if vngc.ID != nil {
25872		objectMap["id"] = vngc.ID
25873	}
25874	if vngc.Location != nil {
25875		objectMap["location"] = vngc.Location
25876	}
25877	if vngc.Tags != nil {
25878		objectMap["tags"] = vngc.Tags
25879	}
25880	return json.Marshal(objectMap)
25881}
25882
25883// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
25884func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
25885	var m map[string]*json.RawMessage
25886	err := json.Unmarshal(body, &m)
25887	if err != nil {
25888		return err
25889	}
25890	for k, v := range m {
25891		switch k {
25892		case "properties":
25893			if v != nil {
25894				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
25895				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
25896				if err != nil {
25897					return err
25898				}
25899				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
25900			}
25901		case "etag":
25902			if v != nil {
25903				var etag string
25904				err = json.Unmarshal(*v, &etag)
25905				if err != nil {
25906					return err
25907				}
25908				vngc.Etag = &etag
25909			}
25910		case "id":
25911			if v != nil {
25912				var ID string
25913				err = json.Unmarshal(*v, &ID)
25914				if err != nil {
25915					return err
25916				}
25917				vngc.ID = &ID
25918			}
25919		case "name":
25920			if v != nil {
25921				var name string
25922				err = json.Unmarshal(*v, &name)
25923				if err != nil {
25924					return err
25925				}
25926				vngc.Name = &name
25927			}
25928		case "type":
25929			if v != nil {
25930				var typeVar string
25931				err = json.Unmarshal(*v, &typeVar)
25932				if err != nil {
25933					return err
25934				}
25935				vngc.Type = &typeVar
25936			}
25937		case "location":
25938			if v != nil {
25939				var location string
25940				err = json.Unmarshal(*v, &location)
25941				if err != nil {
25942					return err
25943				}
25944				vngc.Location = &location
25945			}
25946		case "tags":
25947			if v != nil {
25948				var tags map[string]*string
25949				err = json.Unmarshal(*v, &tags)
25950				if err != nil {
25951					return err
25952				}
25953				vngc.Tags = tags
25954			}
25955		}
25956	}
25957
25958	return nil
25959}
25960
25961// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
25962type VirtualNetworkGatewayConnectionListEntity struct {
25963	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
25964	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
25965	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25966	Etag *string `json:"etag,omitempty"`
25967	// ID - Resource ID.
25968	ID *string `json:"id,omitempty"`
25969	// Name - READ-ONLY; Resource name.
25970	Name *string `json:"name,omitempty"`
25971	// Type - READ-ONLY; Resource type.
25972	Type *string `json:"type,omitempty"`
25973	// Location - Resource location.
25974	Location *string `json:"location,omitempty"`
25975	// Tags - Resource tags.
25976	Tags map[string]*string `json:"tags"`
25977}
25978
25979// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
25980func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
25981	objectMap := make(map[string]interface{})
25982	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
25983		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
25984	}
25985	if vngcle.Etag != nil {
25986		objectMap["etag"] = vngcle.Etag
25987	}
25988	if vngcle.ID != nil {
25989		objectMap["id"] = vngcle.ID
25990	}
25991	if vngcle.Location != nil {
25992		objectMap["location"] = vngcle.Location
25993	}
25994	if vngcle.Tags != nil {
25995		objectMap["tags"] = vngcle.Tags
25996	}
25997	return json.Marshal(objectMap)
25998}
25999
26000// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
26001func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
26002	var m map[string]*json.RawMessage
26003	err := json.Unmarshal(body, &m)
26004	if err != nil {
26005		return err
26006	}
26007	for k, v := range m {
26008		switch k {
26009		case "properties":
26010			if v != nil {
26011				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
26012				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
26013				if err != nil {
26014					return err
26015				}
26016				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
26017			}
26018		case "etag":
26019			if v != nil {
26020				var etag string
26021				err = json.Unmarshal(*v, &etag)
26022				if err != nil {
26023					return err
26024				}
26025				vngcle.Etag = &etag
26026			}
26027		case "id":
26028			if v != nil {
26029				var ID string
26030				err = json.Unmarshal(*v, &ID)
26031				if err != nil {
26032					return err
26033				}
26034				vngcle.ID = &ID
26035			}
26036		case "name":
26037			if v != nil {
26038				var name string
26039				err = json.Unmarshal(*v, &name)
26040				if err != nil {
26041					return err
26042				}
26043				vngcle.Name = &name
26044			}
26045		case "type":
26046			if v != nil {
26047				var typeVar string
26048				err = json.Unmarshal(*v, &typeVar)
26049				if err != nil {
26050					return err
26051				}
26052				vngcle.Type = &typeVar
26053			}
26054		case "location":
26055			if v != nil {
26056				var location string
26057				err = json.Unmarshal(*v, &location)
26058				if err != nil {
26059					return err
26060				}
26061				vngcle.Location = &location
26062			}
26063		case "tags":
26064			if v != nil {
26065				var tags map[string]*string
26066				err = json.Unmarshal(*v, &tags)
26067				if err != nil {
26068					return err
26069				}
26070				vngcle.Tags = tags
26071			}
26072		}
26073	}
26074
26075	return nil
26076}
26077
26078// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
26079type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
26080	// AuthorizationKey - The authorizationKey.
26081	AuthorizationKey *string `json:"authorizationKey,omitempty"`
26082	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
26083	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
26084	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
26085	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
26086	// LocalNetworkGateway2 - The reference to local network gateway resource.
26087	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
26088	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
26089	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
26090	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26091	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
26092	// RoutingWeight - The routing weight.
26093	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26094	// SharedKey - The IPSec shared key.
26095	SharedKey *string `json:"sharedKey,omitempty"`
26096	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26097	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26098	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
26099	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
26100	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
26101	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26102	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
26103	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26104	// Peer - The reference to peerings resource.
26105	Peer *SubResource `json:"peer,omitempty"`
26106	// EnableBgp - EnableBgp flag
26107	EnableBgp *bool `json:"enableBgp,omitempty"`
26108	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
26109	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
26110	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26111	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26112	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
26113	ResourceGUID *string `json:"resourceGuid,omitempty"`
26114	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26115	ProvisioningState *string `json:"provisioningState,omitempty"`
26116	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
26117	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
26118}
26119
26120// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
26121func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
26122	objectMap := make(map[string]interface{})
26123	if vngclepf.AuthorizationKey != nil {
26124		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
26125	}
26126	if vngclepf.VirtualNetworkGateway1 != nil {
26127		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
26128	}
26129	if vngclepf.VirtualNetworkGateway2 != nil {
26130		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
26131	}
26132	if vngclepf.LocalNetworkGateway2 != nil {
26133		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
26134	}
26135	if vngclepf.ConnectionType != "" {
26136		objectMap["connectionType"] = vngclepf.ConnectionType
26137	}
26138	if vngclepf.ConnectionProtocol != "" {
26139		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
26140	}
26141	if vngclepf.RoutingWeight != nil {
26142		objectMap["routingWeight"] = vngclepf.RoutingWeight
26143	}
26144	if vngclepf.SharedKey != nil {
26145		objectMap["sharedKey"] = vngclepf.SharedKey
26146	}
26147	if vngclepf.Peer != nil {
26148		objectMap["peer"] = vngclepf.Peer
26149	}
26150	if vngclepf.EnableBgp != nil {
26151		objectMap["enableBgp"] = vngclepf.EnableBgp
26152	}
26153	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
26154		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
26155	}
26156	if vngclepf.IpsecPolicies != nil {
26157		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
26158	}
26159	if vngclepf.ResourceGUID != nil {
26160		objectMap["resourceGuid"] = vngclepf.ResourceGUID
26161	}
26162	if vngclepf.ExpressRouteGatewayBypass != nil {
26163		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
26164	}
26165	return json.Marshal(objectMap)
26166}
26167
26168// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
26169// service call
26170type VirtualNetworkGatewayConnectionListResult struct {
26171	autorest.Response `json:"-"`
26172	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
26173	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
26174	// NextLink - READ-ONLY; The URL to get the next set of results.
26175	NextLink *string `json:"nextLink,omitempty"`
26176}
26177
26178// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
26179func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
26180	objectMap := make(map[string]interface{})
26181	if vngclr.Value != nil {
26182		objectMap["value"] = vngclr.Value
26183	}
26184	return json.Marshal(objectMap)
26185}
26186
26187// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
26188// VirtualNetworkGatewayConnection values.
26189type VirtualNetworkGatewayConnectionListResultIterator struct {
26190	i    int
26191	page VirtualNetworkGatewayConnectionListResultPage
26192}
26193
26194// NextWithContext advances to the next value.  If there was an error making
26195// the request the iterator does not advance and the error is returned.
26196func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
26197	if tracing.IsEnabled() {
26198		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
26199		defer func() {
26200			sc := -1
26201			if iter.Response().Response.Response != nil {
26202				sc = iter.Response().Response.Response.StatusCode
26203			}
26204			tracing.EndSpan(ctx, sc, err)
26205		}()
26206	}
26207	iter.i++
26208	if iter.i < len(iter.page.Values()) {
26209		return nil
26210	}
26211	err = iter.page.NextWithContext(ctx)
26212	if err != nil {
26213		iter.i--
26214		return err
26215	}
26216	iter.i = 0
26217	return nil
26218}
26219
26220// Next advances to the next value.  If there was an error making
26221// the request the iterator does not advance and the error is returned.
26222// Deprecated: Use NextWithContext() instead.
26223func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
26224	return iter.NextWithContext(context.Background())
26225}
26226
26227// NotDone returns true if the enumeration should be started or is not yet complete.
26228func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
26229	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26230}
26231
26232// Response returns the raw server response from the last page request.
26233func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
26234	return iter.page.Response()
26235}
26236
26237// Value returns the current value or a zero-initialized value if the
26238// iterator has advanced beyond the end of the collection.
26239func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
26240	if !iter.page.NotDone() {
26241		return VirtualNetworkGatewayConnection{}
26242	}
26243	return iter.page.Values()[iter.i]
26244}
26245
26246// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
26247func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
26248	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
26249}
26250
26251// IsEmpty returns true if the ListResult contains no values.
26252func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
26253	return vngclr.Value == nil || len(*vngclr.Value) == 0
26254}
26255
26256// hasNextLink returns true if the NextLink is not empty.
26257func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
26258	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
26259}
26260
26261// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
26262// It returns nil if no more results exist.
26263func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
26264	if !vngclr.hasNextLink() {
26265		return nil, nil
26266	}
26267	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26268		autorest.AsJSON(),
26269		autorest.AsGet(),
26270		autorest.WithBaseURL(to.String(vngclr.NextLink)))
26271}
26272
26273// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
26274type VirtualNetworkGatewayConnectionListResultPage struct {
26275	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
26276	vngclr VirtualNetworkGatewayConnectionListResult
26277}
26278
26279// NextWithContext advances to the next page of values.  If there was an error making
26280// the request the page does not advance and the error is returned.
26281func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
26282	if tracing.IsEnabled() {
26283		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
26284		defer func() {
26285			sc := -1
26286			if page.Response().Response.Response != nil {
26287				sc = page.Response().Response.Response.StatusCode
26288			}
26289			tracing.EndSpan(ctx, sc, err)
26290		}()
26291	}
26292	for {
26293		next, err := page.fn(ctx, page.vngclr)
26294		if err != nil {
26295			return err
26296		}
26297		page.vngclr = next
26298		if !next.hasNextLink() || !next.IsEmpty() {
26299			break
26300		}
26301	}
26302	return nil
26303}
26304
26305// Next advances to the next page of values.  If there was an error making
26306// the request the page does not advance and the error is returned.
26307// Deprecated: Use NextWithContext() instead.
26308func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
26309	return page.NextWithContext(context.Background())
26310}
26311
26312// NotDone returns true if the page enumeration should be started or is not yet complete.
26313func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
26314	return !page.vngclr.IsEmpty()
26315}
26316
26317// Response returns the raw server response from the last page request.
26318func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
26319	return page.vngclr
26320}
26321
26322// Values returns the slice of values for the current page or nil if there are no values.
26323func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
26324	if page.vngclr.IsEmpty() {
26325		return nil
26326	}
26327	return *page.vngclr.Value
26328}
26329
26330// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
26331func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
26332	return VirtualNetworkGatewayConnectionListResultPage{
26333		fn:     getNextPage,
26334		vngclr: cur,
26335	}
26336}
26337
26338// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
26339type VirtualNetworkGatewayConnectionPropertiesFormat struct {
26340	// AuthorizationKey - The authorizationKey.
26341	AuthorizationKey *string `json:"authorizationKey,omitempty"`
26342	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
26343	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
26344	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
26345	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
26346	// LocalNetworkGateway2 - The reference to local network gateway resource.
26347	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
26348	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
26349	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
26350	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26351	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
26352	// RoutingWeight - The routing weight.
26353	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26354	// SharedKey - The IPSec shared key.
26355	SharedKey *string `json:"sharedKey,omitempty"`
26356	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26357	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26358	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
26359	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
26360	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
26361	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26362	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
26363	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26364	// Peer - The reference to peerings resource.
26365	Peer *SubResource `json:"peer,omitempty"`
26366	// EnableBgp - EnableBgp flag
26367	EnableBgp *bool `json:"enableBgp,omitempty"`
26368	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
26369	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
26370	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26371	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26372	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
26373	ResourceGUID *string `json:"resourceGuid,omitempty"`
26374	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26375	ProvisioningState *string `json:"provisioningState,omitempty"`
26376	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
26377	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
26378}
26379
26380// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
26381func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
26382	objectMap := make(map[string]interface{})
26383	if vngcpf.AuthorizationKey != nil {
26384		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
26385	}
26386	if vngcpf.VirtualNetworkGateway1 != nil {
26387		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
26388	}
26389	if vngcpf.VirtualNetworkGateway2 != nil {
26390		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
26391	}
26392	if vngcpf.LocalNetworkGateway2 != nil {
26393		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
26394	}
26395	if vngcpf.ConnectionType != "" {
26396		objectMap["connectionType"] = vngcpf.ConnectionType
26397	}
26398	if vngcpf.ConnectionProtocol != "" {
26399		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
26400	}
26401	if vngcpf.RoutingWeight != nil {
26402		objectMap["routingWeight"] = vngcpf.RoutingWeight
26403	}
26404	if vngcpf.SharedKey != nil {
26405		objectMap["sharedKey"] = vngcpf.SharedKey
26406	}
26407	if vngcpf.Peer != nil {
26408		objectMap["peer"] = vngcpf.Peer
26409	}
26410	if vngcpf.EnableBgp != nil {
26411		objectMap["enableBgp"] = vngcpf.EnableBgp
26412	}
26413	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
26414		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
26415	}
26416	if vngcpf.IpsecPolicies != nil {
26417		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
26418	}
26419	if vngcpf.ResourceGUID != nil {
26420		objectMap["resourceGuid"] = vngcpf.ResourceGUID
26421	}
26422	if vngcpf.ExpressRouteGatewayBypass != nil {
26423		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
26424	}
26425	return json.Marshal(objectMap)
26426}
26427
26428// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
26429// results of a long-running operation.
26430type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
26431	azure.FutureAPI
26432	// Result returns the result of the asynchronous operation.
26433	// If the operation has not completed it will return an error.
26434	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26435}
26436
26437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26438func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26439	var azFuture azure.Future
26440	if err := json.Unmarshal(body, &azFuture); err != nil {
26441		return err
26442	}
26443	future.FutureAPI = &azFuture
26444	future.Result = future.result
26445	return nil
26446}
26447
26448// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
26449func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
26450	var done bool
26451	done, err = future.DoneWithContext(context.Background(), client)
26452	if err != nil {
26453		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26454		return
26455	}
26456	if !done {
26457		vngc.Response.Response = future.Response()
26458		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
26459		return
26460	}
26461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26462	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
26463		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
26464		if err != nil {
26465			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
26466		}
26467	}
26468	return
26469}
26470
26471// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
26472// a long-running operation.
26473type VirtualNetworkGatewayConnectionsDeleteFuture struct {
26474	azure.FutureAPI
26475	// Result returns the result of the asynchronous operation.
26476	// If the operation has not completed it will return an error.
26477	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
26478}
26479
26480// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26481func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
26482	var azFuture azure.Future
26483	if err := json.Unmarshal(body, &azFuture); err != nil {
26484		return err
26485	}
26486	future.FutureAPI = &azFuture
26487	future.Result = future.result
26488	return nil
26489}
26490
26491// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
26492func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
26493	var done bool
26494	done, err = future.DoneWithContext(context.Background(), client)
26495	if err != nil {
26496		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
26497		return
26498	}
26499	if !done {
26500		ar.Response = future.Response()
26501		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
26502		return
26503	}
26504	ar.Response = future.Response()
26505	return
26506}
26507
26508// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
26509// results of a long-running operation.
26510type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
26511	azure.FutureAPI
26512	// Result returns the result of the asynchronous operation.
26513	// If the operation has not completed it will return an error.
26514	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
26515}
26516
26517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26518func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26519	var azFuture azure.Future
26520	if err := json.Unmarshal(body, &azFuture); err != nil {
26521		return err
26522	}
26523	future.FutureAPI = &azFuture
26524	future.Result = future.result
26525	return nil
26526}
26527
26528// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
26529func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
26530	var done bool
26531	done, err = future.DoneWithContext(context.Background(), client)
26532	if err != nil {
26533		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26534		return
26535	}
26536	if !done {
26537		crsk.Response.Response = future.Response()
26538		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
26539		return
26540	}
26541	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26542	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
26543		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
26544		if err != nil {
26545			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
26546		}
26547	}
26548	return
26549}
26550
26551// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
26552// results of a long-running operation.
26553type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
26554	azure.FutureAPI
26555	// Result returns the result of the asynchronous operation.
26556	// If the operation has not completed it will return an error.
26557	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
26558}
26559
26560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26561func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26562	var azFuture azure.Future
26563	if err := json.Unmarshal(body, &azFuture); err != nil {
26564		return err
26565	}
26566	future.FutureAPI = &azFuture
26567	future.Result = future.result
26568	return nil
26569}
26570
26571// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
26572func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
26573	var done bool
26574	done, err = future.DoneWithContext(context.Background(), client)
26575	if err != nil {
26576		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26577		return
26578	}
26579	if !done {
26580		csk.Response.Response = future.Response()
26581		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
26582		return
26583	}
26584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26585	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
26586		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
26587		if err != nil {
26588			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
26589		}
26590	}
26591	return
26592}
26593
26594// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
26595// results of a long-running operation.
26596type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
26597	azure.FutureAPI
26598	// Result returns the result of the asynchronous operation.
26599	// If the operation has not completed it will return an error.
26600	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26601}
26602
26603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26604func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
26605	var azFuture azure.Future
26606	if err := json.Unmarshal(body, &azFuture); err != nil {
26607		return err
26608	}
26609	future.FutureAPI = &azFuture
26610	future.Result = future.result
26611	return nil
26612}
26613
26614// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
26615func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
26616	var done bool
26617	done, err = future.DoneWithContext(context.Background(), client)
26618	if err != nil {
26619		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
26620		return
26621	}
26622	if !done {
26623		vngc.Response.Response = future.Response()
26624		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
26625		return
26626	}
26627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26628	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
26629		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
26630		if err != nil {
26631			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
26632		}
26633	}
26634	return
26635}
26636
26637// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
26638type VirtualNetworkGatewayIPConfiguration struct {
26639	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
26640	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
26641	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26642	Name *string `json:"name,omitempty"`
26643	// Etag - A unique read-only string that changes whenever the resource is updated.
26644	Etag *string `json:"etag,omitempty"`
26645	// ID - Resource ID.
26646	ID *string `json:"id,omitempty"`
26647}
26648
26649// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
26650func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
26651	objectMap := make(map[string]interface{})
26652	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
26653		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
26654	}
26655	if vngic.Name != nil {
26656		objectMap["name"] = vngic.Name
26657	}
26658	if vngic.Etag != nil {
26659		objectMap["etag"] = vngic.Etag
26660	}
26661	if vngic.ID != nil {
26662		objectMap["id"] = vngic.ID
26663	}
26664	return json.Marshal(objectMap)
26665}
26666
26667// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
26668func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
26669	var m map[string]*json.RawMessage
26670	err := json.Unmarshal(body, &m)
26671	if err != nil {
26672		return err
26673	}
26674	for k, v := range m {
26675		switch k {
26676		case "properties":
26677			if v != nil {
26678				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
26679				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
26680				if err != nil {
26681					return err
26682				}
26683				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
26684			}
26685		case "name":
26686			if v != nil {
26687				var name string
26688				err = json.Unmarshal(*v, &name)
26689				if err != nil {
26690					return err
26691				}
26692				vngic.Name = &name
26693			}
26694		case "etag":
26695			if v != nil {
26696				var etag string
26697				err = json.Unmarshal(*v, &etag)
26698				if err != nil {
26699					return err
26700				}
26701				vngic.Etag = &etag
26702			}
26703		case "id":
26704			if v != nil {
26705				var ID string
26706				err = json.Unmarshal(*v, &ID)
26707				if err != nil {
26708					return err
26709				}
26710				vngic.ID = &ID
26711			}
26712		}
26713	}
26714
26715	return nil
26716}
26717
26718// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
26719type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
26720	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
26721	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
26722	// Subnet - The reference of the subnet resource.
26723	Subnet *SubResource `json:"subnet,omitempty"`
26724	// PublicIPAddress - The reference of the public IP resource.
26725	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
26726	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26727	ProvisioningState *string `json:"provisioningState,omitempty"`
26728}
26729
26730// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
26731func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
26732	objectMap := make(map[string]interface{})
26733	if vngicpf.PrivateIPAllocationMethod != "" {
26734		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
26735	}
26736	if vngicpf.Subnet != nil {
26737		objectMap["subnet"] = vngicpf.Subnet
26738	}
26739	if vngicpf.PublicIPAddress != nil {
26740		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
26741	}
26742	return json.Marshal(objectMap)
26743}
26744
26745// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
26746// service call
26747type VirtualNetworkGatewayListConnectionsResult struct {
26748	autorest.Response `json:"-"`
26749	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
26750	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
26751	// NextLink - READ-ONLY; The URL to get the next set of results.
26752	NextLink *string `json:"nextLink,omitempty"`
26753}
26754
26755// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
26756func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
26757	objectMap := make(map[string]interface{})
26758	if vnglcr.Value != nil {
26759		objectMap["value"] = vnglcr.Value
26760	}
26761	return json.Marshal(objectMap)
26762}
26763
26764// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
26765// VirtualNetworkGatewayConnectionListEntity values.
26766type VirtualNetworkGatewayListConnectionsResultIterator struct {
26767	i    int
26768	page VirtualNetworkGatewayListConnectionsResultPage
26769}
26770
26771// NextWithContext advances to the next value.  If there was an error making
26772// the request the iterator does not advance and the error is returned.
26773func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
26774	if tracing.IsEnabled() {
26775		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
26776		defer func() {
26777			sc := -1
26778			if iter.Response().Response.Response != nil {
26779				sc = iter.Response().Response.Response.StatusCode
26780			}
26781			tracing.EndSpan(ctx, sc, err)
26782		}()
26783	}
26784	iter.i++
26785	if iter.i < len(iter.page.Values()) {
26786		return nil
26787	}
26788	err = iter.page.NextWithContext(ctx)
26789	if err != nil {
26790		iter.i--
26791		return err
26792	}
26793	iter.i = 0
26794	return nil
26795}
26796
26797// Next advances to the next value.  If there was an error making
26798// the request the iterator does not advance and the error is returned.
26799// Deprecated: Use NextWithContext() instead.
26800func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
26801	return iter.NextWithContext(context.Background())
26802}
26803
26804// NotDone returns true if the enumeration should be started or is not yet complete.
26805func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
26806	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26807}
26808
26809// Response returns the raw server response from the last page request.
26810func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
26811	return iter.page.Response()
26812}
26813
26814// Value returns the current value or a zero-initialized value if the
26815// iterator has advanced beyond the end of the collection.
26816func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
26817	if !iter.page.NotDone() {
26818		return VirtualNetworkGatewayConnectionListEntity{}
26819	}
26820	return iter.page.Values()[iter.i]
26821}
26822
26823// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
26824func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
26825	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
26826}
26827
26828// IsEmpty returns true if the ListResult contains no values.
26829func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
26830	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
26831}
26832
26833// hasNextLink returns true if the NextLink is not empty.
26834func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
26835	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
26836}
26837
26838// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
26839// It returns nil if no more results exist.
26840func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
26841	if !vnglcr.hasNextLink() {
26842		return nil, nil
26843	}
26844	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26845		autorest.AsJSON(),
26846		autorest.AsGet(),
26847		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
26848}
26849
26850// VirtualNetworkGatewayListConnectionsResultPage contains a page of
26851// VirtualNetworkGatewayConnectionListEntity values.
26852type VirtualNetworkGatewayListConnectionsResultPage struct {
26853	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
26854	vnglcr VirtualNetworkGatewayListConnectionsResult
26855}
26856
26857// NextWithContext advances to the next page of values.  If there was an error making
26858// the request the page does not advance and the error is returned.
26859func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
26860	if tracing.IsEnabled() {
26861		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
26862		defer func() {
26863			sc := -1
26864			if page.Response().Response.Response != nil {
26865				sc = page.Response().Response.Response.StatusCode
26866			}
26867			tracing.EndSpan(ctx, sc, err)
26868		}()
26869	}
26870	for {
26871		next, err := page.fn(ctx, page.vnglcr)
26872		if err != nil {
26873			return err
26874		}
26875		page.vnglcr = next
26876		if !next.hasNextLink() || !next.IsEmpty() {
26877			break
26878		}
26879	}
26880	return nil
26881}
26882
26883// Next advances to the next page of values.  If there was an error making
26884// the request the page does not advance and the error is returned.
26885// Deprecated: Use NextWithContext() instead.
26886func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
26887	return page.NextWithContext(context.Background())
26888}
26889
26890// NotDone returns true if the page enumeration should be started or is not yet complete.
26891func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
26892	return !page.vnglcr.IsEmpty()
26893}
26894
26895// Response returns the raw server response from the last page request.
26896func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
26897	return page.vnglcr
26898}
26899
26900// Values returns the slice of values for the current page or nil if there are no values.
26901func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
26902	if page.vnglcr.IsEmpty() {
26903		return nil
26904	}
26905	return *page.vnglcr.Value
26906}
26907
26908// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
26909func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
26910	return VirtualNetworkGatewayListConnectionsResultPage{
26911		fn:     getNextPage,
26912		vnglcr: cur,
26913	}
26914}
26915
26916// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
26917type VirtualNetworkGatewayListResult struct {
26918	autorest.Response `json:"-"`
26919	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
26920	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
26921	// NextLink - READ-ONLY; The URL to get the next set of results.
26922	NextLink *string `json:"nextLink,omitempty"`
26923}
26924
26925// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
26926func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
26927	objectMap := make(map[string]interface{})
26928	if vnglr.Value != nil {
26929		objectMap["value"] = vnglr.Value
26930	}
26931	return json.Marshal(objectMap)
26932}
26933
26934// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
26935// values.
26936type VirtualNetworkGatewayListResultIterator struct {
26937	i    int
26938	page VirtualNetworkGatewayListResultPage
26939}
26940
26941// NextWithContext advances to the next value.  If there was an error making
26942// the request the iterator does not advance and the error is returned.
26943func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
26944	if tracing.IsEnabled() {
26945		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
26946		defer func() {
26947			sc := -1
26948			if iter.Response().Response.Response != nil {
26949				sc = iter.Response().Response.Response.StatusCode
26950			}
26951			tracing.EndSpan(ctx, sc, err)
26952		}()
26953	}
26954	iter.i++
26955	if iter.i < len(iter.page.Values()) {
26956		return nil
26957	}
26958	err = iter.page.NextWithContext(ctx)
26959	if err != nil {
26960		iter.i--
26961		return err
26962	}
26963	iter.i = 0
26964	return nil
26965}
26966
26967// Next advances to the next value.  If there was an error making
26968// the request the iterator does not advance and the error is returned.
26969// Deprecated: Use NextWithContext() instead.
26970func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
26971	return iter.NextWithContext(context.Background())
26972}
26973
26974// NotDone returns true if the enumeration should be started or is not yet complete.
26975func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
26976	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26977}
26978
26979// Response returns the raw server response from the last page request.
26980func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
26981	return iter.page.Response()
26982}
26983
26984// Value returns the current value or a zero-initialized value if the
26985// iterator has advanced beyond the end of the collection.
26986func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
26987	if !iter.page.NotDone() {
26988		return VirtualNetworkGateway{}
26989	}
26990	return iter.page.Values()[iter.i]
26991}
26992
26993// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
26994func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
26995	return VirtualNetworkGatewayListResultIterator{page: page}
26996}
26997
26998// IsEmpty returns true if the ListResult contains no values.
26999func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
27000	return vnglr.Value == nil || len(*vnglr.Value) == 0
27001}
27002
27003// hasNextLink returns true if the NextLink is not empty.
27004func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
27005	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
27006}
27007
27008// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
27009// It returns nil if no more results exist.
27010func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27011	if !vnglr.hasNextLink() {
27012		return nil, nil
27013	}
27014	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27015		autorest.AsJSON(),
27016		autorest.AsGet(),
27017		autorest.WithBaseURL(to.String(vnglr.NextLink)))
27018}
27019
27020// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
27021type VirtualNetworkGatewayListResultPage struct {
27022	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
27023	vnglr VirtualNetworkGatewayListResult
27024}
27025
27026// NextWithContext advances to the next page of values.  If there was an error making
27027// the request the page does not advance and the error is returned.
27028func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27029	if tracing.IsEnabled() {
27030		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
27031		defer func() {
27032			sc := -1
27033			if page.Response().Response.Response != nil {
27034				sc = page.Response().Response.Response.StatusCode
27035			}
27036			tracing.EndSpan(ctx, sc, err)
27037		}()
27038	}
27039	for {
27040		next, err := page.fn(ctx, page.vnglr)
27041		if err != nil {
27042			return err
27043		}
27044		page.vnglr = next
27045		if !next.hasNextLink() || !next.IsEmpty() {
27046			break
27047		}
27048	}
27049	return nil
27050}
27051
27052// Next advances to the next page of values.  If there was an error making
27053// the request the page does not advance and the error is returned.
27054// Deprecated: Use NextWithContext() instead.
27055func (page *VirtualNetworkGatewayListResultPage) Next() error {
27056	return page.NextWithContext(context.Background())
27057}
27058
27059// NotDone returns true if the page enumeration should be started or is not yet complete.
27060func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
27061	return !page.vnglr.IsEmpty()
27062}
27063
27064// Response returns the raw server response from the last page request.
27065func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
27066	return page.vnglr
27067}
27068
27069// Values returns the slice of values for the current page or nil if there are no values.
27070func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
27071	if page.vnglr.IsEmpty() {
27072		return nil
27073	}
27074	return *page.vnglr.Value
27075}
27076
27077// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
27078func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
27079	return VirtualNetworkGatewayListResultPage{
27080		fn:    getNextPage,
27081		vnglr: cur,
27082	}
27083}
27084
27085// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
27086type VirtualNetworkGatewayPropertiesFormat struct {
27087	// IPConfigurations - IP configurations for virtual network gateway.
27088	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
27089	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
27090	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
27091	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
27092	VpnType VpnType `json:"vpnType,omitempty"`
27093	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
27094	EnableBgp *bool `json:"enableBgp,omitempty"`
27095	// ActiveActive - ActiveActive flag
27096	ActiveActive *bool `json:"activeActive,omitempty"`
27097	// 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.
27098	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
27099	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
27100	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
27101	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
27102	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
27103	// BgpSettings - Virtual network gateway's BGP speaker settings.
27104	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
27105	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
27106	ResourceGUID *string `json:"resourceGuid,omitempty"`
27107	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27108	ProvisioningState *string `json:"provisioningState,omitempty"`
27109}
27110
27111// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
27112func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
27113	objectMap := make(map[string]interface{})
27114	if vngpf.IPConfigurations != nil {
27115		objectMap["ipConfigurations"] = vngpf.IPConfigurations
27116	}
27117	if vngpf.GatewayType != "" {
27118		objectMap["gatewayType"] = vngpf.GatewayType
27119	}
27120	if vngpf.VpnType != "" {
27121		objectMap["vpnType"] = vngpf.VpnType
27122	}
27123	if vngpf.EnableBgp != nil {
27124		objectMap["enableBgp"] = vngpf.EnableBgp
27125	}
27126	if vngpf.ActiveActive != nil {
27127		objectMap["activeActive"] = vngpf.ActiveActive
27128	}
27129	if vngpf.GatewayDefaultSite != nil {
27130		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
27131	}
27132	if vngpf.Sku != nil {
27133		objectMap["sku"] = vngpf.Sku
27134	}
27135	if vngpf.VpnClientConfiguration != nil {
27136		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
27137	}
27138	if vngpf.BgpSettings != nil {
27139		objectMap["bgpSettings"] = vngpf.BgpSettings
27140	}
27141	if vngpf.ResourceGUID != nil {
27142		objectMap["resourceGuid"] = vngpf.ResourceGUID
27143	}
27144	return json.Marshal(objectMap)
27145}
27146
27147// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27148// long-running operation.
27149type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
27150	azure.FutureAPI
27151	// Result returns the result of the asynchronous operation.
27152	// If the operation has not completed it will return an error.
27153	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27154}
27155
27156// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27157func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27158	var azFuture azure.Future
27159	if err := json.Unmarshal(body, &azFuture); err != nil {
27160		return err
27161	}
27162	future.FutureAPI = &azFuture
27163	future.Result = future.result
27164	return nil
27165}
27166
27167// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
27168func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27169	var done bool
27170	done, err = future.DoneWithContext(context.Background(), client)
27171	if err != nil {
27172		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27173		return
27174	}
27175	if !done {
27176		vng.Response.Response = future.Response()
27177		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
27178		return
27179	}
27180	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27181	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27182		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
27183		if err != nil {
27184			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
27185		}
27186	}
27187	return
27188}
27189
27190// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
27191// long-running operation.
27192type VirtualNetworkGatewaysDeleteFuture struct {
27193	azure.FutureAPI
27194	// Result returns the result of the asynchronous operation.
27195	// If the operation has not completed it will return an error.
27196	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
27197}
27198
27199// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27200func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
27201	var azFuture azure.Future
27202	if err := json.Unmarshal(body, &azFuture); err != nil {
27203		return err
27204	}
27205	future.FutureAPI = &azFuture
27206	future.Result = future.result
27207	return nil
27208}
27209
27210// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
27211func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
27212	var done bool
27213	done, err = future.DoneWithContext(context.Background(), client)
27214	if err != nil {
27215		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
27216		return
27217	}
27218	if !done {
27219		ar.Response = future.Response()
27220		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
27221		return
27222	}
27223	ar.Response = future.Response()
27224	return
27225}
27226
27227// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
27228// results of a long-running operation.
27229type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
27230	azure.FutureAPI
27231	// Result returns the result of the asynchronous operation.
27232	// If the operation has not completed it will return an error.
27233	Result func(VirtualNetworkGatewaysClient) (String, error)
27234}
27235
27236// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27237func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
27238	var azFuture azure.Future
27239	if err := json.Unmarshal(body, &azFuture); err != nil {
27240		return err
27241	}
27242	future.FutureAPI = &azFuture
27243	future.Result = future.result
27244	return nil
27245}
27246
27247// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
27248func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27249	var done bool
27250	done, err = future.DoneWithContext(context.Background(), client)
27251	if err != nil {
27252		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
27253		return
27254	}
27255	if !done {
27256		s.Response.Response = future.Response()
27257		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
27258		return
27259	}
27260	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27261	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27262		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
27263		if err != nil {
27264			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
27265		}
27266	}
27267	return
27268}
27269
27270// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
27271// of a long-running operation.
27272type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
27273	azure.FutureAPI
27274	// Result returns the result of the asynchronous operation.
27275	// If the operation has not completed it will return an error.
27276	Result func(VirtualNetworkGatewaysClient) (String, error)
27277}
27278
27279// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27280func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
27281	var azFuture azure.Future
27282	if err := json.Unmarshal(body, &azFuture); err != nil {
27283		return err
27284	}
27285	future.FutureAPI = &azFuture
27286	future.Result = future.result
27287	return nil
27288}
27289
27290// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
27291func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27292	var done bool
27293	done, err = future.DoneWithContext(context.Background(), client)
27294	if err != nil {
27295		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
27296		return
27297	}
27298	if !done {
27299		s.Response.Response = future.Response()
27300		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
27301		return
27302	}
27303	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27304	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27305		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
27306		if err != nil {
27307			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
27308		}
27309	}
27310	return
27311}
27312
27313// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
27314// of a long-running operation.
27315type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
27316	azure.FutureAPI
27317	// Result returns the result of the asynchronous operation.
27318	// If the operation has not completed it will return an error.
27319	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
27320}
27321
27322// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27323func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
27324	var azFuture azure.Future
27325	if err := json.Unmarshal(body, &azFuture); err != nil {
27326		return err
27327	}
27328	future.FutureAPI = &azFuture
27329	future.Result = future.result
27330	return nil
27331}
27332
27333// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
27334func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
27335	var done bool
27336	done, err = future.DoneWithContext(context.Background(), client)
27337	if err != nil {
27338		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
27339		return
27340	}
27341	if !done {
27342		grlr.Response.Response = future.Response()
27343		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
27344		return
27345	}
27346	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27347	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
27348		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
27349		if err != nil {
27350			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
27351		}
27352	}
27353	return
27354}
27355
27356// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
27357// a long-running operation.
27358type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
27359	azure.FutureAPI
27360	// Result returns the result of the asynchronous operation.
27361	// If the operation has not completed it will return an error.
27362	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
27363}
27364
27365// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27366func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
27367	var azFuture azure.Future
27368	if err := json.Unmarshal(body, &azFuture); err != nil {
27369		return err
27370	}
27371	future.FutureAPI = &azFuture
27372	future.Result = future.result
27373	return nil
27374}
27375
27376// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
27377func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
27378	var done bool
27379	done, err = future.DoneWithContext(context.Background(), client)
27380	if err != nil {
27381		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
27382		return
27383	}
27384	if !done {
27385		bpslr.Response.Response = future.Response()
27386		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
27387		return
27388	}
27389	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27390	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
27391		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
27392		if err != nil {
27393			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
27394		}
27395	}
27396	return
27397}
27398
27399// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
27400// a long-running operation.
27401type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
27402	azure.FutureAPI
27403	// Result returns the result of the asynchronous operation.
27404	// If the operation has not completed it will return an error.
27405	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
27406}
27407
27408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27409func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
27410	var azFuture azure.Future
27411	if err := json.Unmarshal(body, &azFuture); err != nil {
27412		return err
27413	}
27414	future.FutureAPI = &azFuture
27415	future.Result = future.result
27416	return nil
27417}
27418
27419// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
27420func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
27421	var done bool
27422	done, err = future.DoneWithContext(context.Background(), client)
27423	if err != nil {
27424		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
27425		return
27426	}
27427	if !done {
27428		grlr.Response.Response = future.Response()
27429		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
27430		return
27431	}
27432	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27433	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
27434		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
27435		if err != nil {
27436			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
27437		}
27438	}
27439	return
27440}
27441
27442// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
27443// results of a long-running operation.
27444type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
27445	azure.FutureAPI
27446	// Result returns the result of the asynchronous operation.
27447	// If the operation has not completed it will return an error.
27448	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
27449}
27450
27451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27452func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
27453	var azFuture azure.Future
27454	if err := json.Unmarshal(body, &azFuture); err != nil {
27455		return err
27456	}
27457	future.FutureAPI = &azFuture
27458	future.Result = future.result
27459	return nil
27460}
27461
27462// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
27463func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
27464	var done bool
27465	done, err = future.DoneWithContext(context.Background(), client)
27466	if err != nil {
27467		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
27468		return
27469	}
27470	if !done {
27471		vcipp.Response.Response = future.Response()
27472		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
27473		return
27474	}
27475	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27476	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
27477		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
27478		if err != nil {
27479			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
27480		}
27481	}
27482	return
27483}
27484
27485// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
27486// results of a long-running operation.
27487type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
27488	azure.FutureAPI
27489	// Result returns the result of the asynchronous operation.
27490	// If the operation has not completed it will return an error.
27491	Result func(VirtualNetworkGatewaysClient) (String, error)
27492}
27493
27494// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27495func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
27496	var azFuture azure.Future
27497	if err := json.Unmarshal(body, &azFuture); err != nil {
27498		return err
27499	}
27500	future.FutureAPI = &azFuture
27501	future.Result = future.result
27502	return nil
27503}
27504
27505// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
27506func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27507	var done bool
27508	done, err = future.DoneWithContext(context.Background(), client)
27509	if err != nil {
27510		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
27511		return
27512	}
27513	if !done {
27514		s.Response.Response = future.Response()
27515		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
27516		return
27517	}
27518	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27519	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27520		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
27521		if err != nil {
27522			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
27523		}
27524	}
27525	return
27526}
27527
27528// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
27529type VirtualNetworkGatewaySku struct {
27530	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
27531	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
27532	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
27533	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
27534	// Capacity - The capacity.
27535	Capacity *int32 `json:"capacity,omitempty"`
27536}
27537
27538// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
27539// long-running operation.
27540type VirtualNetworkGatewaysResetFuture struct {
27541	azure.FutureAPI
27542	// Result returns the result of the asynchronous operation.
27543	// If the operation has not completed it will return an error.
27544	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27545}
27546
27547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27548func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
27549	var azFuture azure.Future
27550	if err := json.Unmarshal(body, &azFuture); err != nil {
27551		return err
27552	}
27553	future.FutureAPI = &azFuture
27554	future.Result = future.result
27555	return nil
27556}
27557
27558// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
27559func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27560	var done bool
27561	done, err = future.DoneWithContext(context.Background(), client)
27562	if err != nil {
27563		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
27564		return
27565	}
27566	if !done {
27567		vng.Response.Response = future.Response()
27568		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
27569		return
27570	}
27571	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27572	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27573		vng, err = client.ResetResponder(vng.Response.Response)
27574		if err != nil {
27575			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
27576		}
27577	}
27578	return
27579}
27580
27581// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
27582// results of a long-running operation.
27583type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
27584	azure.FutureAPI
27585	// Result returns the result of the asynchronous operation.
27586	// If the operation has not completed it will return an error.
27587	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
27588}
27589
27590// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27591func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
27592	var azFuture azure.Future
27593	if err := json.Unmarshal(body, &azFuture); err != nil {
27594		return err
27595	}
27596	future.FutureAPI = &azFuture
27597	future.Result = future.result
27598	return nil
27599}
27600
27601// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
27602func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
27603	var done bool
27604	done, err = future.DoneWithContext(context.Background(), client)
27605	if err != nil {
27606		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
27607		return
27608	}
27609	if !done {
27610		ar.Response = future.Response()
27611		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
27612		return
27613	}
27614	ar.Response = future.Response()
27615	return
27616}
27617
27618// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
27619// results of a long-running operation.
27620type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
27621	azure.FutureAPI
27622	// Result returns the result of the asynchronous operation.
27623	// If the operation has not completed it will return an error.
27624	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
27625}
27626
27627// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27628func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
27629	var azFuture azure.Future
27630	if err := json.Unmarshal(body, &azFuture); err != nil {
27631		return err
27632	}
27633	future.FutureAPI = &azFuture
27634	future.Result = future.result
27635	return nil
27636}
27637
27638// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
27639func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
27640	var done bool
27641	done, err = future.DoneWithContext(context.Background(), client)
27642	if err != nil {
27643		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
27644		return
27645	}
27646	if !done {
27647		vcipp.Response.Response = future.Response()
27648		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
27649		return
27650	}
27651	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27652	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
27653		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
27654		if err != nil {
27655			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
27656		}
27657	}
27658	return
27659}
27660
27661// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
27662// long-running operation.
27663type VirtualNetworkGatewaysUpdateTagsFuture struct {
27664	azure.FutureAPI
27665	// Result returns the result of the asynchronous operation.
27666	// If the operation has not completed it will return an error.
27667	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27668}
27669
27670// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27671func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27672	var azFuture azure.Future
27673	if err := json.Unmarshal(body, &azFuture); err != nil {
27674		return err
27675	}
27676	future.FutureAPI = &azFuture
27677	future.Result = future.result
27678	return nil
27679}
27680
27681// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
27682func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27683	var done bool
27684	done, err = future.DoneWithContext(context.Background(), client)
27685	if err != nil {
27686		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27687		return
27688	}
27689	if !done {
27690		vng.Response.Response = future.Response()
27691		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
27692		return
27693	}
27694	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27695	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27696		vng, err = client.UpdateTagsResponder(vng.Response.Response)
27697		if err != nil {
27698			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
27699		}
27700	}
27701	return
27702}
27703
27704// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
27705type VirtualNetworkListResult struct {
27706	autorest.Response `json:"-"`
27707	// Value - Gets a list of VirtualNetwork resources in a resource group.
27708	Value *[]VirtualNetwork `json:"value,omitempty"`
27709	// NextLink - The URL to get the next set of results.
27710	NextLink *string `json:"nextLink,omitempty"`
27711}
27712
27713// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
27714type VirtualNetworkListResultIterator struct {
27715	i    int
27716	page VirtualNetworkListResultPage
27717}
27718
27719// NextWithContext advances to the next value.  If there was an error making
27720// the request the iterator does not advance and the error is returned.
27721func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
27722	if tracing.IsEnabled() {
27723		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
27724		defer func() {
27725			sc := -1
27726			if iter.Response().Response.Response != nil {
27727				sc = iter.Response().Response.Response.StatusCode
27728			}
27729			tracing.EndSpan(ctx, sc, err)
27730		}()
27731	}
27732	iter.i++
27733	if iter.i < len(iter.page.Values()) {
27734		return nil
27735	}
27736	err = iter.page.NextWithContext(ctx)
27737	if err != nil {
27738		iter.i--
27739		return err
27740	}
27741	iter.i = 0
27742	return nil
27743}
27744
27745// Next advances to the next value.  If there was an error making
27746// the request the iterator does not advance and the error is returned.
27747// Deprecated: Use NextWithContext() instead.
27748func (iter *VirtualNetworkListResultIterator) Next() error {
27749	return iter.NextWithContext(context.Background())
27750}
27751
27752// NotDone returns true if the enumeration should be started or is not yet complete.
27753func (iter VirtualNetworkListResultIterator) NotDone() bool {
27754	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27755}
27756
27757// Response returns the raw server response from the last page request.
27758func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
27759	return iter.page.Response()
27760}
27761
27762// Value returns the current value or a zero-initialized value if the
27763// iterator has advanced beyond the end of the collection.
27764func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
27765	if !iter.page.NotDone() {
27766		return VirtualNetwork{}
27767	}
27768	return iter.page.Values()[iter.i]
27769}
27770
27771// Creates a new instance of the VirtualNetworkListResultIterator type.
27772func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
27773	return VirtualNetworkListResultIterator{page: page}
27774}
27775
27776// IsEmpty returns true if the ListResult contains no values.
27777func (vnlr VirtualNetworkListResult) IsEmpty() bool {
27778	return vnlr.Value == nil || len(*vnlr.Value) == 0
27779}
27780
27781// hasNextLink returns true if the NextLink is not empty.
27782func (vnlr VirtualNetworkListResult) hasNextLink() bool {
27783	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
27784}
27785
27786// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
27787// It returns nil if no more results exist.
27788func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
27789	if !vnlr.hasNextLink() {
27790		return nil, nil
27791	}
27792	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27793		autorest.AsJSON(),
27794		autorest.AsGet(),
27795		autorest.WithBaseURL(to.String(vnlr.NextLink)))
27796}
27797
27798// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
27799type VirtualNetworkListResultPage struct {
27800	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
27801	vnlr VirtualNetworkListResult
27802}
27803
27804// NextWithContext advances to the next page of values.  If there was an error making
27805// the request the page does not advance and the error is returned.
27806func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
27807	if tracing.IsEnabled() {
27808		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
27809		defer func() {
27810			sc := -1
27811			if page.Response().Response.Response != nil {
27812				sc = page.Response().Response.Response.StatusCode
27813			}
27814			tracing.EndSpan(ctx, sc, err)
27815		}()
27816	}
27817	for {
27818		next, err := page.fn(ctx, page.vnlr)
27819		if err != nil {
27820			return err
27821		}
27822		page.vnlr = next
27823		if !next.hasNextLink() || !next.IsEmpty() {
27824			break
27825		}
27826	}
27827	return nil
27828}
27829
27830// Next advances to the next page of values.  If there was an error making
27831// the request the page does not advance and the error is returned.
27832// Deprecated: Use NextWithContext() instead.
27833func (page *VirtualNetworkListResultPage) Next() error {
27834	return page.NextWithContext(context.Background())
27835}
27836
27837// NotDone returns true if the page enumeration should be started or is not yet complete.
27838func (page VirtualNetworkListResultPage) NotDone() bool {
27839	return !page.vnlr.IsEmpty()
27840}
27841
27842// Response returns the raw server response from the last page request.
27843func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
27844	return page.vnlr
27845}
27846
27847// Values returns the slice of values for the current page or nil if there are no values.
27848func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
27849	if page.vnlr.IsEmpty() {
27850		return nil
27851	}
27852	return *page.vnlr.Value
27853}
27854
27855// Creates a new instance of the VirtualNetworkListResultPage type.
27856func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
27857	return VirtualNetworkListResultPage{
27858		fn:   getNextPage,
27859		vnlr: cur,
27860	}
27861}
27862
27863// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
27864type VirtualNetworkListUsageResult struct {
27865	autorest.Response `json:"-"`
27866	// Value - READ-ONLY; VirtualNetwork usage stats.
27867	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
27868	// NextLink - The URL to get the next set of results.
27869	NextLink *string `json:"nextLink,omitempty"`
27870}
27871
27872// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
27873func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
27874	objectMap := make(map[string]interface{})
27875	if vnlur.NextLink != nil {
27876		objectMap["nextLink"] = vnlur.NextLink
27877	}
27878	return json.Marshal(objectMap)
27879}
27880
27881// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
27882// values.
27883type VirtualNetworkListUsageResultIterator struct {
27884	i    int
27885	page VirtualNetworkListUsageResultPage
27886}
27887
27888// NextWithContext advances to the next value.  If there was an error making
27889// the request the iterator does not advance and the error is returned.
27890func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
27891	if tracing.IsEnabled() {
27892		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
27893		defer func() {
27894			sc := -1
27895			if iter.Response().Response.Response != nil {
27896				sc = iter.Response().Response.Response.StatusCode
27897			}
27898			tracing.EndSpan(ctx, sc, err)
27899		}()
27900	}
27901	iter.i++
27902	if iter.i < len(iter.page.Values()) {
27903		return nil
27904	}
27905	err = iter.page.NextWithContext(ctx)
27906	if err != nil {
27907		iter.i--
27908		return err
27909	}
27910	iter.i = 0
27911	return nil
27912}
27913
27914// Next advances to the next value.  If there was an error making
27915// the request the iterator does not advance and the error is returned.
27916// Deprecated: Use NextWithContext() instead.
27917func (iter *VirtualNetworkListUsageResultIterator) Next() error {
27918	return iter.NextWithContext(context.Background())
27919}
27920
27921// NotDone returns true if the enumeration should be started or is not yet complete.
27922func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
27923	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27924}
27925
27926// Response returns the raw server response from the last page request.
27927func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
27928	return iter.page.Response()
27929}
27930
27931// Value returns the current value or a zero-initialized value if the
27932// iterator has advanced beyond the end of the collection.
27933func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
27934	if !iter.page.NotDone() {
27935		return VirtualNetworkUsage{}
27936	}
27937	return iter.page.Values()[iter.i]
27938}
27939
27940// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
27941func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
27942	return VirtualNetworkListUsageResultIterator{page: page}
27943}
27944
27945// IsEmpty returns true if the ListResult contains no values.
27946func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
27947	return vnlur.Value == nil || len(*vnlur.Value) == 0
27948}
27949
27950// hasNextLink returns true if the NextLink is not empty.
27951func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
27952	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
27953}
27954
27955// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
27956// It returns nil if no more results exist.
27957func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
27958	if !vnlur.hasNextLink() {
27959		return nil, nil
27960	}
27961	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27962		autorest.AsJSON(),
27963		autorest.AsGet(),
27964		autorest.WithBaseURL(to.String(vnlur.NextLink)))
27965}
27966
27967// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
27968type VirtualNetworkListUsageResultPage struct {
27969	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
27970	vnlur VirtualNetworkListUsageResult
27971}
27972
27973// NextWithContext advances to the next page of values.  If there was an error making
27974// the request the page does not advance and the error is returned.
27975func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
27976	if tracing.IsEnabled() {
27977		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
27978		defer func() {
27979			sc := -1
27980			if page.Response().Response.Response != nil {
27981				sc = page.Response().Response.Response.StatusCode
27982			}
27983			tracing.EndSpan(ctx, sc, err)
27984		}()
27985	}
27986	for {
27987		next, err := page.fn(ctx, page.vnlur)
27988		if err != nil {
27989			return err
27990		}
27991		page.vnlur = next
27992		if !next.hasNextLink() || !next.IsEmpty() {
27993			break
27994		}
27995	}
27996	return nil
27997}
27998
27999// Next advances to the next page of values.  If there was an error making
28000// the request the page does not advance and the error is returned.
28001// Deprecated: Use NextWithContext() instead.
28002func (page *VirtualNetworkListUsageResultPage) Next() error {
28003	return page.NextWithContext(context.Background())
28004}
28005
28006// NotDone returns true if the page enumeration should be started or is not yet complete.
28007func (page VirtualNetworkListUsageResultPage) NotDone() bool {
28008	return !page.vnlur.IsEmpty()
28009}
28010
28011// Response returns the raw server response from the last page request.
28012func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
28013	return page.vnlur
28014}
28015
28016// Values returns the slice of values for the current page or nil if there are no values.
28017func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
28018	if page.vnlur.IsEmpty() {
28019		return nil
28020	}
28021	return *page.vnlur.Value
28022}
28023
28024// Creates a new instance of the VirtualNetworkListUsageResultPage type.
28025func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
28026	return VirtualNetworkListUsageResultPage{
28027		fn:    getNextPage,
28028		vnlur: cur,
28029	}
28030}
28031
28032// VirtualNetworkPeering peerings in a virtual network resource.
28033type VirtualNetworkPeering struct {
28034	autorest.Response `json:"-"`
28035	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
28036	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
28037	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28038	Name *string `json:"name,omitempty"`
28039	// Etag - A unique read-only string that changes whenever the resource is updated.
28040	Etag *string `json:"etag,omitempty"`
28041	// ID - Resource ID.
28042	ID *string `json:"id,omitempty"`
28043}
28044
28045// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
28046func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
28047	objectMap := make(map[string]interface{})
28048	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
28049		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
28050	}
28051	if vnp.Name != nil {
28052		objectMap["name"] = vnp.Name
28053	}
28054	if vnp.Etag != nil {
28055		objectMap["etag"] = vnp.Etag
28056	}
28057	if vnp.ID != nil {
28058		objectMap["id"] = vnp.ID
28059	}
28060	return json.Marshal(objectMap)
28061}
28062
28063// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
28064func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
28065	var m map[string]*json.RawMessage
28066	err := json.Unmarshal(body, &m)
28067	if err != nil {
28068		return err
28069	}
28070	for k, v := range m {
28071		switch k {
28072		case "properties":
28073			if v != nil {
28074				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
28075				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
28076				if err != nil {
28077					return err
28078				}
28079				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
28080			}
28081		case "name":
28082			if v != nil {
28083				var name string
28084				err = json.Unmarshal(*v, &name)
28085				if err != nil {
28086					return err
28087				}
28088				vnp.Name = &name
28089			}
28090		case "etag":
28091			if v != nil {
28092				var etag string
28093				err = json.Unmarshal(*v, &etag)
28094				if err != nil {
28095					return err
28096				}
28097				vnp.Etag = &etag
28098			}
28099		case "id":
28100			if v != nil {
28101				var ID string
28102				err = json.Unmarshal(*v, &ID)
28103				if err != nil {
28104					return err
28105				}
28106				vnp.ID = &ID
28107			}
28108		}
28109	}
28110
28111	return nil
28112}
28113
28114// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
28115// belong to a virtual network.
28116type VirtualNetworkPeeringListResult struct {
28117	autorest.Response `json:"-"`
28118	// Value - The peerings in a virtual network.
28119	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
28120	// NextLink - The URL to get the next set of results.
28121	NextLink *string `json:"nextLink,omitempty"`
28122}
28123
28124// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
28125// values.
28126type VirtualNetworkPeeringListResultIterator struct {
28127	i    int
28128	page VirtualNetworkPeeringListResultPage
28129}
28130
28131// NextWithContext advances to the next value.  If there was an error making
28132// the request the iterator does not advance and the error is returned.
28133func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
28134	if tracing.IsEnabled() {
28135		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
28136		defer func() {
28137			sc := -1
28138			if iter.Response().Response.Response != nil {
28139				sc = iter.Response().Response.Response.StatusCode
28140			}
28141			tracing.EndSpan(ctx, sc, err)
28142		}()
28143	}
28144	iter.i++
28145	if iter.i < len(iter.page.Values()) {
28146		return nil
28147	}
28148	err = iter.page.NextWithContext(ctx)
28149	if err != nil {
28150		iter.i--
28151		return err
28152	}
28153	iter.i = 0
28154	return nil
28155}
28156
28157// Next advances to the next value.  If there was an error making
28158// the request the iterator does not advance and the error is returned.
28159// Deprecated: Use NextWithContext() instead.
28160func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
28161	return iter.NextWithContext(context.Background())
28162}
28163
28164// NotDone returns true if the enumeration should be started or is not yet complete.
28165func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
28166	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28167}
28168
28169// Response returns the raw server response from the last page request.
28170func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
28171	return iter.page.Response()
28172}
28173
28174// Value returns the current value or a zero-initialized value if the
28175// iterator has advanced beyond the end of the collection.
28176func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
28177	if !iter.page.NotDone() {
28178		return VirtualNetworkPeering{}
28179	}
28180	return iter.page.Values()[iter.i]
28181}
28182
28183// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
28184func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
28185	return VirtualNetworkPeeringListResultIterator{page: page}
28186}
28187
28188// IsEmpty returns true if the ListResult contains no values.
28189func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
28190	return vnplr.Value == nil || len(*vnplr.Value) == 0
28191}
28192
28193// hasNextLink returns true if the NextLink is not empty.
28194func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
28195	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
28196}
28197
28198// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
28199// It returns nil if no more results exist.
28200func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
28201	if !vnplr.hasNextLink() {
28202		return nil, nil
28203	}
28204	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28205		autorest.AsJSON(),
28206		autorest.AsGet(),
28207		autorest.WithBaseURL(to.String(vnplr.NextLink)))
28208}
28209
28210// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
28211type VirtualNetworkPeeringListResultPage struct {
28212	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
28213	vnplr VirtualNetworkPeeringListResult
28214}
28215
28216// NextWithContext advances to the next page of values.  If there was an error making
28217// the request the page does not advance and the error is returned.
28218func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
28219	if tracing.IsEnabled() {
28220		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
28221		defer func() {
28222			sc := -1
28223			if page.Response().Response.Response != nil {
28224				sc = page.Response().Response.Response.StatusCode
28225			}
28226			tracing.EndSpan(ctx, sc, err)
28227		}()
28228	}
28229	for {
28230		next, err := page.fn(ctx, page.vnplr)
28231		if err != nil {
28232			return err
28233		}
28234		page.vnplr = next
28235		if !next.hasNextLink() || !next.IsEmpty() {
28236			break
28237		}
28238	}
28239	return nil
28240}
28241
28242// Next advances to the next page of values.  If there was an error making
28243// the request the page does not advance and the error is returned.
28244// Deprecated: Use NextWithContext() instead.
28245func (page *VirtualNetworkPeeringListResultPage) Next() error {
28246	return page.NextWithContext(context.Background())
28247}
28248
28249// NotDone returns true if the page enumeration should be started or is not yet complete.
28250func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
28251	return !page.vnplr.IsEmpty()
28252}
28253
28254// Response returns the raw server response from the last page request.
28255func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
28256	return page.vnplr
28257}
28258
28259// Values returns the slice of values for the current page or nil if there are no values.
28260func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
28261	if page.vnplr.IsEmpty() {
28262		return nil
28263	}
28264	return *page.vnplr.Value
28265}
28266
28267// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
28268func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
28269	return VirtualNetworkPeeringListResultPage{
28270		fn:    getNextPage,
28271		vnplr: cur,
28272	}
28273}
28274
28275// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
28276type VirtualNetworkPeeringPropertiesFormat struct {
28277	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
28278	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
28279	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
28280	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
28281	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
28282	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
28283	// 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.
28284	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
28285	// 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).
28286	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
28287	// RemoteAddressSpace - The reference of the remote virtual network address space.
28288	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
28289	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
28290	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
28291	// ProvisioningState - The provisioning state of the resource.
28292	ProvisioningState *string `json:"provisioningState,omitempty"`
28293}
28294
28295// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28296// long-running operation.
28297type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
28298	azure.FutureAPI
28299	// Result returns the result of the asynchronous operation.
28300	// If the operation has not completed it will return an error.
28301	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
28302}
28303
28304// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28305func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28306	var azFuture azure.Future
28307	if err := json.Unmarshal(body, &azFuture); err != nil {
28308		return err
28309	}
28310	future.FutureAPI = &azFuture
28311	future.Result = future.result
28312	return nil
28313}
28314
28315// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
28316func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
28317	var done bool
28318	done, err = future.DoneWithContext(context.Background(), client)
28319	if err != nil {
28320		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28321		return
28322	}
28323	if !done {
28324		vnp.Response.Response = future.Response()
28325		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
28326		return
28327	}
28328	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28329	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
28330		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
28331		if err != nil {
28332			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
28333		}
28334	}
28335	return
28336}
28337
28338// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
28339// long-running operation.
28340type VirtualNetworkPeeringsDeleteFuture struct {
28341	azure.FutureAPI
28342	// Result returns the result of the asynchronous operation.
28343	// If the operation has not completed it will return an error.
28344	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
28345}
28346
28347// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28348func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
28349	var azFuture azure.Future
28350	if err := json.Unmarshal(body, &azFuture); err != nil {
28351		return err
28352	}
28353	future.FutureAPI = &azFuture
28354	future.Result = future.result
28355	return nil
28356}
28357
28358// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
28359func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
28360	var done bool
28361	done, err = future.DoneWithContext(context.Background(), client)
28362	if err != nil {
28363		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
28364		return
28365	}
28366	if !done {
28367		ar.Response = future.Response()
28368		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
28369		return
28370	}
28371	ar.Response = future.Response()
28372	return
28373}
28374
28375// VirtualNetworkPropertiesFormat properties of the virtual network.
28376type VirtualNetworkPropertiesFormat struct {
28377	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
28378	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
28379	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
28380	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
28381	// Subnets - A list of subnets in a Virtual Network.
28382	Subnets *[]Subnet `json:"subnets,omitempty"`
28383	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
28384	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
28385	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
28386	ResourceGUID *string `json:"resourceGuid,omitempty"`
28387	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28388	ProvisioningState *string `json:"provisioningState,omitempty"`
28389	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
28390	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
28391	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
28392	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
28393	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
28394	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
28395}
28396
28397// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28398// long-running operation.
28399type VirtualNetworksCreateOrUpdateFuture struct {
28400	azure.FutureAPI
28401	// Result returns the result of the asynchronous operation.
28402	// If the operation has not completed it will return an error.
28403	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28404}
28405
28406// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28407func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28408	var azFuture azure.Future
28409	if err := json.Unmarshal(body, &azFuture); err != nil {
28410		return err
28411	}
28412	future.FutureAPI = &azFuture
28413	future.Result = future.result
28414	return nil
28415}
28416
28417// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
28418func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28419	var done bool
28420	done, err = future.DoneWithContext(context.Background(), client)
28421	if err != nil {
28422		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28423		return
28424	}
28425	if !done {
28426		vn.Response.Response = future.Response()
28427		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
28428		return
28429	}
28430	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28431	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28432		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
28433		if err != nil {
28434			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
28435		}
28436	}
28437	return
28438}
28439
28440// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28441// operation.
28442type VirtualNetworksDeleteFuture struct {
28443	azure.FutureAPI
28444	// Result returns the result of the asynchronous operation.
28445	// If the operation has not completed it will return an error.
28446	Result func(VirtualNetworksClient) (autorest.Response, error)
28447}
28448
28449// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28450func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
28451	var azFuture azure.Future
28452	if err := json.Unmarshal(body, &azFuture); err != nil {
28453		return err
28454	}
28455	future.FutureAPI = &azFuture
28456	future.Result = future.result
28457	return nil
28458}
28459
28460// result is the default implementation for VirtualNetworksDeleteFuture.Result.
28461func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
28462	var done bool
28463	done, err = future.DoneWithContext(context.Background(), client)
28464	if err != nil {
28465		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
28466		return
28467	}
28468	if !done {
28469		ar.Response = future.Response()
28470		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
28471		return
28472	}
28473	ar.Response = future.Response()
28474	return
28475}
28476
28477// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28478// long-running operation.
28479type VirtualNetworksUpdateTagsFuture struct {
28480	azure.FutureAPI
28481	// Result returns the result of the asynchronous operation.
28482	// If the operation has not completed it will return an error.
28483	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28484}
28485
28486// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28487func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28488	var azFuture azure.Future
28489	if err := json.Unmarshal(body, &azFuture); err != nil {
28490		return err
28491	}
28492	future.FutureAPI = &azFuture
28493	future.Result = future.result
28494	return nil
28495}
28496
28497// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
28498func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28499	var done bool
28500	done, err = future.DoneWithContext(context.Background(), client)
28501	if err != nil {
28502		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28503		return
28504	}
28505	if !done {
28506		vn.Response.Response = future.Response()
28507		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
28508		return
28509	}
28510	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28511	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28512		vn, err = client.UpdateTagsResponder(vn.Response.Response)
28513		if err != nil {
28514			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
28515		}
28516	}
28517	return
28518}
28519
28520// VirtualNetworkTap virtual Network Tap resource
28521type VirtualNetworkTap struct {
28522	autorest.Response `json:"-"`
28523	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
28524	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
28525	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
28526	Etag *string `json:"etag,omitempty"`
28527	// ID - Resource ID.
28528	ID *string `json:"id,omitempty"`
28529	// Name - READ-ONLY; Resource name.
28530	Name *string `json:"name,omitempty"`
28531	// Type - READ-ONLY; Resource type.
28532	Type *string `json:"type,omitempty"`
28533	// Location - Resource location.
28534	Location *string `json:"location,omitempty"`
28535	// Tags - Resource tags.
28536	Tags map[string]*string `json:"tags"`
28537}
28538
28539// MarshalJSON is the custom marshaler for VirtualNetworkTap.
28540func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
28541	objectMap := make(map[string]interface{})
28542	if vnt.VirtualNetworkTapPropertiesFormat != nil {
28543		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
28544	}
28545	if vnt.Etag != nil {
28546		objectMap["etag"] = vnt.Etag
28547	}
28548	if vnt.ID != nil {
28549		objectMap["id"] = vnt.ID
28550	}
28551	if vnt.Location != nil {
28552		objectMap["location"] = vnt.Location
28553	}
28554	if vnt.Tags != nil {
28555		objectMap["tags"] = vnt.Tags
28556	}
28557	return json.Marshal(objectMap)
28558}
28559
28560// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
28561func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
28562	var m map[string]*json.RawMessage
28563	err := json.Unmarshal(body, &m)
28564	if err != nil {
28565		return err
28566	}
28567	for k, v := range m {
28568		switch k {
28569		case "properties":
28570			if v != nil {
28571				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
28572				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
28573				if err != nil {
28574					return err
28575				}
28576				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
28577			}
28578		case "etag":
28579			if v != nil {
28580				var etag string
28581				err = json.Unmarshal(*v, &etag)
28582				if err != nil {
28583					return err
28584				}
28585				vnt.Etag = &etag
28586			}
28587		case "id":
28588			if v != nil {
28589				var ID string
28590				err = json.Unmarshal(*v, &ID)
28591				if err != nil {
28592					return err
28593				}
28594				vnt.ID = &ID
28595			}
28596		case "name":
28597			if v != nil {
28598				var name string
28599				err = json.Unmarshal(*v, &name)
28600				if err != nil {
28601					return err
28602				}
28603				vnt.Name = &name
28604			}
28605		case "type":
28606			if v != nil {
28607				var typeVar string
28608				err = json.Unmarshal(*v, &typeVar)
28609				if err != nil {
28610					return err
28611				}
28612				vnt.Type = &typeVar
28613			}
28614		case "location":
28615			if v != nil {
28616				var location string
28617				err = json.Unmarshal(*v, &location)
28618				if err != nil {
28619					return err
28620				}
28621				vnt.Location = &location
28622			}
28623		case "tags":
28624			if v != nil {
28625				var tags map[string]*string
28626				err = json.Unmarshal(*v, &tags)
28627				if err != nil {
28628					return err
28629				}
28630				vnt.Tags = tags
28631			}
28632		}
28633	}
28634
28635	return nil
28636}
28637
28638// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
28639type VirtualNetworkTapListResult struct {
28640	autorest.Response `json:"-"`
28641	// Value - A list of VirtualNetworkTaps in a resource group.
28642	Value *[]VirtualNetworkTap `json:"value,omitempty"`
28643	// NextLink - The URL to get the next set of results.
28644	NextLink *string `json:"nextLink,omitempty"`
28645}
28646
28647// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
28648type VirtualNetworkTapListResultIterator struct {
28649	i    int
28650	page VirtualNetworkTapListResultPage
28651}
28652
28653// NextWithContext advances to the next value.  If there was an error making
28654// the request the iterator does not advance and the error is returned.
28655func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
28656	if tracing.IsEnabled() {
28657		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
28658		defer func() {
28659			sc := -1
28660			if iter.Response().Response.Response != nil {
28661				sc = iter.Response().Response.Response.StatusCode
28662			}
28663			tracing.EndSpan(ctx, sc, err)
28664		}()
28665	}
28666	iter.i++
28667	if iter.i < len(iter.page.Values()) {
28668		return nil
28669	}
28670	err = iter.page.NextWithContext(ctx)
28671	if err != nil {
28672		iter.i--
28673		return err
28674	}
28675	iter.i = 0
28676	return nil
28677}
28678
28679// Next advances to the next value.  If there was an error making
28680// the request the iterator does not advance and the error is returned.
28681// Deprecated: Use NextWithContext() instead.
28682func (iter *VirtualNetworkTapListResultIterator) Next() error {
28683	return iter.NextWithContext(context.Background())
28684}
28685
28686// NotDone returns true if the enumeration should be started or is not yet complete.
28687func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
28688	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28689}
28690
28691// Response returns the raw server response from the last page request.
28692func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
28693	return iter.page.Response()
28694}
28695
28696// Value returns the current value or a zero-initialized value if the
28697// iterator has advanced beyond the end of the collection.
28698func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
28699	if !iter.page.NotDone() {
28700		return VirtualNetworkTap{}
28701	}
28702	return iter.page.Values()[iter.i]
28703}
28704
28705// Creates a new instance of the VirtualNetworkTapListResultIterator type.
28706func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
28707	return VirtualNetworkTapListResultIterator{page: page}
28708}
28709
28710// IsEmpty returns true if the ListResult contains no values.
28711func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
28712	return vntlr.Value == nil || len(*vntlr.Value) == 0
28713}
28714
28715// hasNextLink returns true if the NextLink is not empty.
28716func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
28717	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
28718}
28719
28720// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
28721// It returns nil if no more results exist.
28722func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
28723	if !vntlr.hasNextLink() {
28724		return nil, nil
28725	}
28726	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28727		autorest.AsJSON(),
28728		autorest.AsGet(),
28729		autorest.WithBaseURL(to.String(vntlr.NextLink)))
28730}
28731
28732// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
28733type VirtualNetworkTapListResultPage struct {
28734	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
28735	vntlr VirtualNetworkTapListResult
28736}
28737
28738// NextWithContext advances to the next page of values.  If there was an error making
28739// the request the page does not advance and the error is returned.
28740func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
28741	if tracing.IsEnabled() {
28742		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
28743		defer func() {
28744			sc := -1
28745			if page.Response().Response.Response != nil {
28746				sc = page.Response().Response.Response.StatusCode
28747			}
28748			tracing.EndSpan(ctx, sc, err)
28749		}()
28750	}
28751	for {
28752		next, err := page.fn(ctx, page.vntlr)
28753		if err != nil {
28754			return err
28755		}
28756		page.vntlr = next
28757		if !next.hasNextLink() || !next.IsEmpty() {
28758			break
28759		}
28760	}
28761	return nil
28762}
28763
28764// Next advances to the next page of values.  If there was an error making
28765// the request the page does not advance and the error is returned.
28766// Deprecated: Use NextWithContext() instead.
28767func (page *VirtualNetworkTapListResultPage) Next() error {
28768	return page.NextWithContext(context.Background())
28769}
28770
28771// NotDone returns true if the page enumeration should be started or is not yet complete.
28772func (page VirtualNetworkTapListResultPage) NotDone() bool {
28773	return !page.vntlr.IsEmpty()
28774}
28775
28776// Response returns the raw server response from the last page request.
28777func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
28778	return page.vntlr
28779}
28780
28781// Values returns the slice of values for the current page or nil if there are no values.
28782func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
28783	if page.vntlr.IsEmpty() {
28784		return nil
28785	}
28786	return *page.vntlr.Value
28787}
28788
28789// Creates a new instance of the VirtualNetworkTapListResultPage type.
28790func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
28791	return VirtualNetworkTapListResultPage{
28792		fn:    getNextPage,
28793		vntlr: cur,
28794	}
28795}
28796
28797// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
28798type VirtualNetworkTapPropertiesFormat struct {
28799	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
28800	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
28801	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
28802	ResourceGUID *string `json:"resourceGuid,omitempty"`
28803	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28804	ProvisioningState *string `json:"provisioningState,omitempty"`
28805	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
28806	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
28807	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
28808	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
28809	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
28810	DestinationPort *int32 `json:"destinationPort,omitempty"`
28811}
28812
28813// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
28814func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
28815	objectMap := make(map[string]interface{})
28816	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
28817		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
28818	}
28819	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
28820		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
28821	}
28822	if vntpf.DestinationPort != nil {
28823		objectMap["destinationPort"] = vntpf.DestinationPort
28824	}
28825	return json.Marshal(objectMap)
28826}
28827
28828// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28829// long-running operation.
28830type VirtualNetworkTapsCreateOrUpdateFuture struct {
28831	azure.FutureAPI
28832	// Result returns the result of the asynchronous operation.
28833	// If the operation has not completed it will return an error.
28834	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
28835}
28836
28837// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28838func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28839	var azFuture azure.Future
28840	if err := json.Unmarshal(body, &azFuture); err != nil {
28841		return err
28842	}
28843	future.FutureAPI = &azFuture
28844	future.Result = future.result
28845	return nil
28846}
28847
28848// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
28849func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
28850	var done bool
28851	done, err = future.DoneWithContext(context.Background(), client)
28852	if err != nil {
28853		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28854		return
28855	}
28856	if !done {
28857		vnt.Response.Response = future.Response()
28858		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
28859		return
28860	}
28861	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28862	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
28863		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
28864		if err != nil {
28865			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
28866		}
28867	}
28868	return
28869}
28870
28871// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
28872// long-running operation.
28873type VirtualNetworkTapsDeleteFuture struct {
28874	azure.FutureAPI
28875	// Result returns the result of the asynchronous operation.
28876	// If the operation has not completed it will return an error.
28877	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
28878}
28879
28880// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28881func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
28882	var azFuture azure.Future
28883	if err := json.Unmarshal(body, &azFuture); err != nil {
28884		return err
28885	}
28886	future.FutureAPI = &azFuture
28887	future.Result = future.result
28888	return nil
28889}
28890
28891// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
28892func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
28893	var done bool
28894	done, err = future.DoneWithContext(context.Background(), client)
28895	if err != nil {
28896		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
28897		return
28898	}
28899	if !done {
28900		ar.Response = future.Response()
28901		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
28902		return
28903	}
28904	ar.Response = future.Response()
28905	return
28906}
28907
28908// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28909// long-running operation.
28910type VirtualNetworkTapsUpdateTagsFuture struct {
28911	azure.FutureAPI
28912	// Result returns the result of the asynchronous operation.
28913	// If the operation has not completed it will return an error.
28914	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
28915}
28916
28917// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28918func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28919	var azFuture azure.Future
28920	if err := json.Unmarshal(body, &azFuture); err != nil {
28921		return err
28922	}
28923	future.FutureAPI = &azFuture
28924	future.Result = future.result
28925	return nil
28926}
28927
28928// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
28929func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
28930	var done bool
28931	done, err = future.DoneWithContext(context.Background(), client)
28932	if err != nil {
28933		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28934		return
28935	}
28936	if !done {
28937		vnt.Response.Response = future.Response()
28938		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
28939		return
28940	}
28941	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28942	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
28943		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
28944		if err != nil {
28945			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
28946		}
28947	}
28948	return
28949}
28950
28951// VirtualNetworkUsage usage details for subnet.
28952type VirtualNetworkUsage struct {
28953	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
28954	CurrentValue *float64 `json:"currentValue,omitempty"`
28955	// ID - READ-ONLY; Subnet identifier.
28956	ID *string `json:"id,omitempty"`
28957	// Limit - READ-ONLY; Indicates the size of the subnet.
28958	Limit *float64 `json:"limit,omitempty"`
28959	// Name - READ-ONLY; The name containing common and localized value for usage.
28960	Name *VirtualNetworkUsageName `json:"name,omitempty"`
28961	// Unit - READ-ONLY; Usage units. Returns 'Count'
28962	Unit *string `json:"unit,omitempty"`
28963}
28964
28965// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
28966func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
28967	objectMap := make(map[string]interface{})
28968	return json.Marshal(objectMap)
28969}
28970
28971// VirtualNetworkUsageName usage strings container.
28972type VirtualNetworkUsageName struct {
28973	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
28974	LocalizedValue *string `json:"localizedValue,omitempty"`
28975	// Value - READ-ONLY; Subnet size and usage string.
28976	Value *string `json:"value,omitempty"`
28977}
28978
28979// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
28980func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
28981	objectMap := make(map[string]interface{})
28982	return json.Marshal(objectMap)
28983}
28984
28985// VirtualWAN virtualWAN Resource.
28986type VirtualWAN struct {
28987	autorest.Response     `json:"-"`
28988	*VirtualWanProperties `json:"properties,omitempty"`
28989	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
28990	Etag *string `json:"etag,omitempty"`
28991	// ID - Resource ID.
28992	ID *string `json:"id,omitempty"`
28993	// Name - READ-ONLY; Resource name.
28994	Name *string `json:"name,omitempty"`
28995	// Type - READ-ONLY; Resource type.
28996	Type *string `json:"type,omitempty"`
28997	// Location - Resource location.
28998	Location *string `json:"location,omitempty"`
28999	// Tags - Resource tags.
29000	Tags map[string]*string `json:"tags"`
29001}
29002
29003// MarshalJSON is the custom marshaler for VirtualWAN.
29004func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
29005	objectMap := make(map[string]interface{})
29006	if vw.VirtualWanProperties != nil {
29007		objectMap["properties"] = vw.VirtualWanProperties
29008	}
29009	if vw.ID != nil {
29010		objectMap["id"] = vw.ID
29011	}
29012	if vw.Location != nil {
29013		objectMap["location"] = vw.Location
29014	}
29015	if vw.Tags != nil {
29016		objectMap["tags"] = vw.Tags
29017	}
29018	return json.Marshal(objectMap)
29019}
29020
29021// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
29022func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
29023	var m map[string]*json.RawMessage
29024	err := json.Unmarshal(body, &m)
29025	if err != nil {
29026		return err
29027	}
29028	for k, v := range m {
29029		switch k {
29030		case "properties":
29031			if v != nil {
29032				var virtualWanProperties VirtualWanProperties
29033				err = json.Unmarshal(*v, &virtualWanProperties)
29034				if err != nil {
29035					return err
29036				}
29037				vw.VirtualWanProperties = &virtualWanProperties
29038			}
29039		case "etag":
29040			if v != nil {
29041				var etag string
29042				err = json.Unmarshal(*v, &etag)
29043				if err != nil {
29044					return err
29045				}
29046				vw.Etag = &etag
29047			}
29048		case "id":
29049			if v != nil {
29050				var ID string
29051				err = json.Unmarshal(*v, &ID)
29052				if err != nil {
29053					return err
29054				}
29055				vw.ID = &ID
29056			}
29057		case "name":
29058			if v != nil {
29059				var name string
29060				err = json.Unmarshal(*v, &name)
29061				if err != nil {
29062					return err
29063				}
29064				vw.Name = &name
29065			}
29066		case "type":
29067			if v != nil {
29068				var typeVar string
29069				err = json.Unmarshal(*v, &typeVar)
29070				if err != nil {
29071					return err
29072				}
29073				vw.Type = &typeVar
29074			}
29075		case "location":
29076			if v != nil {
29077				var location string
29078				err = json.Unmarshal(*v, &location)
29079				if err != nil {
29080					return err
29081				}
29082				vw.Location = &location
29083			}
29084		case "tags":
29085			if v != nil {
29086				var tags map[string]*string
29087				err = json.Unmarshal(*v, &tags)
29088				if err != nil {
29089					return err
29090				}
29091				vw.Tags = tags
29092			}
29093		}
29094	}
29095
29096	return nil
29097}
29098
29099// VirtualWanProperties parameters for VirtualWAN
29100type VirtualWanProperties struct {
29101	// DisableVpnEncryption - Vpn encryption to be disabled or not.
29102	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
29103	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
29104	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
29105	// VpnSites - READ-ONLY
29106	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
29107	// SecurityProviderName - The Security Provider name.
29108	SecurityProviderName *string `json:"securityProviderName,omitempty"`
29109	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
29110	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
29111	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
29112	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
29113	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
29114	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
29115	// P2SVpnServerConfigurations - list of all P2SVpnServerConfigurations associated with the virtual wan.
29116	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
29117	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29118	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29119}
29120
29121// MarshalJSON is the custom marshaler for VirtualWanProperties.
29122func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
29123	objectMap := make(map[string]interface{})
29124	if vwp.DisableVpnEncryption != nil {
29125		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
29126	}
29127	if vwp.SecurityProviderName != nil {
29128		objectMap["securityProviderName"] = vwp.SecurityProviderName
29129	}
29130	if vwp.AllowBranchToBranchTraffic != nil {
29131		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
29132	}
29133	if vwp.AllowVnetToVnetTraffic != nil {
29134		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
29135	}
29136	if vwp.Office365LocalBreakoutCategory != "" {
29137		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
29138	}
29139	if vwp.P2SVpnServerConfigurations != nil {
29140		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
29141	}
29142	if vwp.ProvisioningState != "" {
29143		objectMap["provisioningState"] = vwp.ProvisioningState
29144	}
29145	return json.Marshal(objectMap)
29146}
29147
29148// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29149// long-running operation.
29150type VirtualWansCreateOrUpdateFuture struct {
29151	azure.FutureAPI
29152	// Result returns the result of the asynchronous operation.
29153	// If the operation has not completed it will return an error.
29154	Result func(VirtualWansClient) (VirtualWAN, error)
29155}
29156
29157// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29158func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29159	var azFuture azure.Future
29160	if err := json.Unmarshal(body, &azFuture); err != nil {
29161		return err
29162	}
29163	future.FutureAPI = &azFuture
29164	future.Result = future.result
29165	return nil
29166}
29167
29168// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
29169func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
29170	var done bool
29171	done, err = future.DoneWithContext(context.Background(), client)
29172	if err != nil {
29173		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29174		return
29175	}
29176	if !done {
29177		vw.Response.Response = future.Response()
29178		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
29179		return
29180	}
29181	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29182	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
29183		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
29184		if err != nil {
29185			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
29186		}
29187	}
29188	return
29189}
29190
29191// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29192// operation.
29193type VirtualWansDeleteFuture struct {
29194	azure.FutureAPI
29195	// Result returns the result of the asynchronous operation.
29196	// If the operation has not completed it will return an error.
29197	Result func(VirtualWansClient) (autorest.Response, error)
29198}
29199
29200// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29201func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
29202	var azFuture azure.Future
29203	if err := json.Unmarshal(body, &azFuture); err != nil {
29204		return err
29205	}
29206	future.FutureAPI = &azFuture
29207	future.Result = future.result
29208	return nil
29209}
29210
29211// result is the default implementation for VirtualWansDeleteFuture.Result.
29212func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
29213	var done bool
29214	done, err = future.DoneWithContext(context.Background(), client)
29215	if err != nil {
29216		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
29217		return
29218	}
29219	if !done {
29220		ar.Response = future.Response()
29221		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
29222		return
29223	}
29224	ar.Response = future.Response()
29225	return
29226}
29227
29228// VirtualWanSecurityProvider collection of SecurityProviders.
29229type VirtualWanSecurityProvider struct {
29230	// Name - Name of the security provider.
29231	Name *string `json:"name,omitempty"`
29232	// URL - Url of the security provider.
29233	URL *string `json:"url,omitempty"`
29234	// Type - Name of the security provider. Possible values include: 'External', 'Native'
29235	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
29236}
29237
29238// VirtualWanSecurityProviders collection of SecurityProviders.
29239type VirtualWanSecurityProviders struct {
29240	autorest.Response  `json:"-"`
29241	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
29242}
29243
29244// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29245// operation.
29246type VirtualWansUpdateTagsFuture struct {
29247	azure.FutureAPI
29248	// Result returns the result of the asynchronous operation.
29249	// If the operation has not completed it will return an error.
29250	Result func(VirtualWansClient) (VirtualWAN, error)
29251}
29252
29253// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29254func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29255	var azFuture azure.Future
29256	if err := json.Unmarshal(body, &azFuture); err != nil {
29257		return err
29258	}
29259	future.FutureAPI = &azFuture
29260	future.Result = future.result
29261	return nil
29262}
29263
29264// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
29265func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
29266	var done bool
29267	done, err = future.DoneWithContext(context.Background(), client)
29268	if err != nil {
29269		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29270		return
29271	}
29272	if !done {
29273		vw.Response.Response = future.Response()
29274		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
29275		return
29276	}
29277	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29278	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
29279		vw, err = client.UpdateTagsResponder(vw.Response.Response)
29280		if err != nil {
29281			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
29282		}
29283	}
29284	return
29285}
29286
29287// VpnClientConfiguration vpnClientConfiguration for P2S client.
29288type VpnClientConfiguration struct {
29289	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
29290	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
29291	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
29292	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
29293	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
29294	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
29295	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
29296	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
29297	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
29298	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
29299	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
29300	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
29301	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
29302	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
29303}
29304
29305// VpnClientConnectionHealth vpnClientConnectionHealth properties
29306type VpnClientConnectionHealth struct {
29307	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
29308	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
29309	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
29310	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
29311	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
29312	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
29313	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
29314	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
29315}
29316
29317// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
29318func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
29319	objectMap := make(map[string]interface{})
29320	if vcch.VpnClientConnectionsCount != nil {
29321		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
29322	}
29323	if vcch.AllocatedIPAddresses != nil {
29324		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
29325	}
29326	return json.Marshal(objectMap)
29327}
29328
29329// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
29330type VpnClientIPsecParameters struct {
29331	autorest.Response `json:"-"`
29332	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
29333	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
29334	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
29335	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
29336	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
29337	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
29338	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
29339	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
29340	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
29341	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
29342	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
29343	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
29344	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
29345	DhGroup DhGroup `json:"dhGroup,omitempty"`
29346	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
29347	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
29348}
29349
29350// VpnClientParameters vpn Client Parameters for package generation
29351type VpnClientParameters struct {
29352	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
29353	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
29354	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
29355	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
29356	// 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.
29357	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
29358	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
29359	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
29360}
29361
29362// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
29363type VpnClientRevokedCertificate struct {
29364	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
29365	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
29366	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29367	Name *string `json:"name,omitempty"`
29368	// Etag - A unique read-only string that changes whenever the resource is updated.
29369	Etag *string `json:"etag,omitempty"`
29370	// ID - Resource ID.
29371	ID *string `json:"id,omitempty"`
29372}
29373
29374// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
29375func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
29376	objectMap := make(map[string]interface{})
29377	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
29378		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
29379	}
29380	if vcrc.Name != nil {
29381		objectMap["name"] = vcrc.Name
29382	}
29383	if vcrc.Etag != nil {
29384		objectMap["etag"] = vcrc.Etag
29385	}
29386	if vcrc.ID != nil {
29387		objectMap["id"] = vcrc.ID
29388	}
29389	return json.Marshal(objectMap)
29390}
29391
29392// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
29393func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
29394	var m map[string]*json.RawMessage
29395	err := json.Unmarshal(body, &m)
29396	if err != nil {
29397		return err
29398	}
29399	for k, v := range m {
29400		switch k {
29401		case "properties":
29402			if v != nil {
29403				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
29404				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
29405				if err != nil {
29406					return err
29407				}
29408				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
29409			}
29410		case "name":
29411			if v != nil {
29412				var name string
29413				err = json.Unmarshal(*v, &name)
29414				if err != nil {
29415					return err
29416				}
29417				vcrc.Name = &name
29418			}
29419		case "etag":
29420			if v != nil {
29421				var etag string
29422				err = json.Unmarshal(*v, &etag)
29423				if err != nil {
29424					return err
29425				}
29426				vcrc.Etag = &etag
29427			}
29428		case "id":
29429			if v != nil {
29430				var ID string
29431				err = json.Unmarshal(*v, &ID)
29432				if err != nil {
29433					return err
29434				}
29435				vcrc.ID = &ID
29436			}
29437		}
29438	}
29439
29440	return nil
29441}
29442
29443// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
29444// network gateway.
29445type VpnClientRevokedCertificatePropertiesFormat struct {
29446	// Thumbprint - The revoked VPN client certificate thumbprint.
29447	Thumbprint *string `json:"thumbprint,omitempty"`
29448	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29449	ProvisioningState *string `json:"provisioningState,omitempty"`
29450}
29451
29452// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
29453func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29454	objectMap := make(map[string]interface{})
29455	if vcrcpf.Thumbprint != nil {
29456		objectMap["thumbprint"] = vcrcpf.Thumbprint
29457	}
29458	return json.Marshal(objectMap)
29459}
29460
29461// VpnClientRootCertificate VPN client root certificate of virtual network gateway
29462type VpnClientRootCertificate struct {
29463	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
29464	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
29465	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29466	Name *string `json:"name,omitempty"`
29467	// Etag - A unique read-only string that changes whenever the resource is updated.
29468	Etag *string `json:"etag,omitempty"`
29469	// ID - Resource ID.
29470	ID *string `json:"id,omitempty"`
29471}
29472
29473// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
29474func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
29475	objectMap := make(map[string]interface{})
29476	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
29477		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
29478	}
29479	if vcrc.Name != nil {
29480		objectMap["name"] = vcrc.Name
29481	}
29482	if vcrc.Etag != nil {
29483		objectMap["etag"] = vcrc.Etag
29484	}
29485	if vcrc.ID != nil {
29486		objectMap["id"] = vcrc.ID
29487	}
29488	return json.Marshal(objectMap)
29489}
29490
29491// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
29492func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
29493	var m map[string]*json.RawMessage
29494	err := json.Unmarshal(body, &m)
29495	if err != nil {
29496		return err
29497	}
29498	for k, v := range m {
29499		switch k {
29500		case "properties":
29501			if v != nil {
29502				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
29503				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
29504				if err != nil {
29505					return err
29506				}
29507				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
29508			}
29509		case "name":
29510			if v != nil {
29511				var name string
29512				err = json.Unmarshal(*v, &name)
29513				if err != nil {
29514					return err
29515				}
29516				vcrc.Name = &name
29517			}
29518		case "etag":
29519			if v != nil {
29520				var etag string
29521				err = json.Unmarshal(*v, &etag)
29522				if err != nil {
29523					return err
29524				}
29525				vcrc.Etag = &etag
29526			}
29527		case "id":
29528			if v != nil {
29529				var ID string
29530				err = json.Unmarshal(*v, &ID)
29531				if err != nil {
29532					return err
29533				}
29534				vcrc.ID = &ID
29535			}
29536		}
29537	}
29538
29539	return nil
29540}
29541
29542// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
29543type VpnClientRootCertificatePropertiesFormat struct {
29544	// PublicCertData - The certificate public data.
29545	PublicCertData *string `json:"publicCertData,omitempty"`
29546	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29547	ProvisioningState *string `json:"provisioningState,omitempty"`
29548}
29549
29550// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
29551func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29552	objectMap := make(map[string]interface{})
29553	if vcrcpf.PublicCertData != nil {
29554		objectMap["publicCertData"] = vcrcpf.PublicCertData
29555	}
29556	return json.Marshal(objectMap)
29557}
29558
29559// VpnConnection vpnConnection Resource.
29560type VpnConnection struct {
29561	autorest.Response        `json:"-"`
29562	*VpnConnectionProperties `json:"properties,omitempty"`
29563	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29564	Name *string `json:"name,omitempty"`
29565	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29566	Etag *string `json:"etag,omitempty"`
29567	// ID - Resource ID.
29568	ID *string `json:"id,omitempty"`
29569}
29570
29571// MarshalJSON is the custom marshaler for VpnConnection.
29572func (vc VpnConnection) MarshalJSON() ([]byte, error) {
29573	objectMap := make(map[string]interface{})
29574	if vc.VpnConnectionProperties != nil {
29575		objectMap["properties"] = vc.VpnConnectionProperties
29576	}
29577	if vc.Name != nil {
29578		objectMap["name"] = vc.Name
29579	}
29580	if vc.ID != nil {
29581		objectMap["id"] = vc.ID
29582	}
29583	return json.Marshal(objectMap)
29584}
29585
29586// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
29587func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
29588	var m map[string]*json.RawMessage
29589	err := json.Unmarshal(body, &m)
29590	if err != nil {
29591		return err
29592	}
29593	for k, v := range m {
29594		switch k {
29595		case "properties":
29596			if v != nil {
29597				var vpnConnectionProperties VpnConnectionProperties
29598				err = json.Unmarshal(*v, &vpnConnectionProperties)
29599				if err != nil {
29600					return err
29601				}
29602				vc.VpnConnectionProperties = &vpnConnectionProperties
29603			}
29604		case "name":
29605			if v != nil {
29606				var name string
29607				err = json.Unmarshal(*v, &name)
29608				if err != nil {
29609					return err
29610				}
29611				vc.Name = &name
29612			}
29613		case "etag":
29614			if v != nil {
29615				var etag string
29616				err = json.Unmarshal(*v, &etag)
29617				if err != nil {
29618					return err
29619				}
29620				vc.Etag = &etag
29621			}
29622		case "id":
29623			if v != nil {
29624				var ID string
29625				err = json.Unmarshal(*v, &ID)
29626				if err != nil {
29627					return err
29628				}
29629				vc.ID = &ID
29630			}
29631		}
29632	}
29633
29634	return nil
29635}
29636
29637// VpnConnectionProperties parameters for VpnConnection
29638type VpnConnectionProperties struct {
29639	// RemoteVpnSite - Id of the connected vpn site.
29640	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
29641	// RoutingWeight - routing weight for vpn connection.
29642	RoutingWeight *int32 `json:"routingWeight,omitempty"`
29643	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
29644	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
29645	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
29646	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
29647	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
29648	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29649	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
29650	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29651	// ConnectionBandwidth - Expected bandwidth in MBPS.
29652	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
29653	// SharedKey - SharedKey for the vpn connection.
29654	SharedKey *string `json:"sharedKey,omitempty"`
29655	// EnableBgp - EnableBgp flag
29656	EnableBgp *bool `json:"enableBgp,omitempty"`
29657	// IpsecPolicies - The IPSec Policies to be considered by this connection.
29658	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
29659	// EnableRateLimiting - EnableBgp flag
29660	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
29661	// EnableInternetSecurity - Enable internet security
29662	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
29663	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29664	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29665}
29666
29667// MarshalJSON is the custom marshaler for VpnConnectionProperties.
29668func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
29669	objectMap := make(map[string]interface{})
29670	if vcp.RemoteVpnSite != nil {
29671		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
29672	}
29673	if vcp.RoutingWeight != nil {
29674		objectMap["routingWeight"] = vcp.RoutingWeight
29675	}
29676	if vcp.ConnectionStatus != "" {
29677		objectMap["connectionStatus"] = vcp.ConnectionStatus
29678	}
29679	if vcp.VpnConnectionProtocolType != "" {
29680		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
29681	}
29682	if vcp.ConnectionBandwidth != nil {
29683		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
29684	}
29685	if vcp.SharedKey != nil {
29686		objectMap["sharedKey"] = vcp.SharedKey
29687	}
29688	if vcp.EnableBgp != nil {
29689		objectMap["enableBgp"] = vcp.EnableBgp
29690	}
29691	if vcp.IpsecPolicies != nil {
29692		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
29693	}
29694	if vcp.EnableRateLimiting != nil {
29695		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
29696	}
29697	if vcp.EnableInternetSecurity != nil {
29698		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
29699	}
29700	if vcp.ProvisioningState != "" {
29701		objectMap["provisioningState"] = vcp.ProvisioningState
29702	}
29703	return json.Marshal(objectMap)
29704}
29705
29706// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29707// long-running operation.
29708type VpnConnectionsCreateOrUpdateFuture struct {
29709	azure.FutureAPI
29710	// Result returns the result of the asynchronous operation.
29711	// If the operation has not completed it will return an error.
29712	Result func(VpnConnectionsClient) (VpnConnection, error)
29713}
29714
29715// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29716func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29717	var azFuture azure.Future
29718	if err := json.Unmarshal(body, &azFuture); err != nil {
29719		return err
29720	}
29721	future.FutureAPI = &azFuture
29722	future.Result = future.result
29723	return nil
29724}
29725
29726// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
29727func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
29728	var done bool
29729	done, err = future.DoneWithContext(context.Background(), client)
29730	if err != nil {
29731		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29732		return
29733	}
29734	if !done {
29735		vc.Response.Response = future.Response()
29736		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
29737		return
29738	}
29739	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29740	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
29741		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
29742		if err != nil {
29743			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
29744		}
29745	}
29746	return
29747}
29748
29749// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29750// operation.
29751type VpnConnectionsDeleteFuture struct {
29752	azure.FutureAPI
29753	// Result returns the result of the asynchronous operation.
29754	// If the operation has not completed it will return an error.
29755	Result func(VpnConnectionsClient) (autorest.Response, error)
29756}
29757
29758// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29759func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
29760	var azFuture azure.Future
29761	if err := json.Unmarshal(body, &azFuture); err != nil {
29762		return err
29763	}
29764	future.FutureAPI = &azFuture
29765	future.Result = future.result
29766	return nil
29767}
29768
29769// result is the default implementation for VpnConnectionsDeleteFuture.Result.
29770func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
29771	var done bool
29772	done, err = future.DoneWithContext(context.Background(), client)
29773	if err != nil {
29774		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
29775		return
29776	}
29777	if !done {
29778		ar.Response = future.Response()
29779		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
29780		return
29781	}
29782	ar.Response = future.Response()
29783	return
29784}
29785
29786// VpnDeviceScriptParameters vpn device configuration script generation parameters
29787type VpnDeviceScriptParameters struct {
29788	// Vendor - The vendor for the vpn device.
29789	Vendor *string `json:"vendor,omitempty"`
29790	// DeviceFamily - The device family for the vpn device.
29791	DeviceFamily *string `json:"deviceFamily,omitempty"`
29792	// FirmwareVersion - The firmware version for the vpn device.
29793	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
29794}
29795
29796// VpnGateway vpnGateway Resource.
29797type VpnGateway struct {
29798	autorest.Response     `json:"-"`
29799	*VpnGatewayProperties `json:"properties,omitempty"`
29800	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29801	Etag *string `json:"etag,omitempty"`
29802	// ID - Resource ID.
29803	ID *string `json:"id,omitempty"`
29804	// Name - READ-ONLY; Resource name.
29805	Name *string `json:"name,omitempty"`
29806	// Type - READ-ONLY; Resource type.
29807	Type *string `json:"type,omitempty"`
29808	// Location - Resource location.
29809	Location *string `json:"location,omitempty"`
29810	// Tags - Resource tags.
29811	Tags map[string]*string `json:"tags"`
29812}
29813
29814// MarshalJSON is the custom marshaler for VpnGateway.
29815func (vg VpnGateway) MarshalJSON() ([]byte, error) {
29816	objectMap := make(map[string]interface{})
29817	if vg.VpnGatewayProperties != nil {
29818		objectMap["properties"] = vg.VpnGatewayProperties
29819	}
29820	if vg.ID != nil {
29821		objectMap["id"] = vg.ID
29822	}
29823	if vg.Location != nil {
29824		objectMap["location"] = vg.Location
29825	}
29826	if vg.Tags != nil {
29827		objectMap["tags"] = vg.Tags
29828	}
29829	return json.Marshal(objectMap)
29830}
29831
29832// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
29833func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
29834	var m map[string]*json.RawMessage
29835	err := json.Unmarshal(body, &m)
29836	if err != nil {
29837		return err
29838	}
29839	for k, v := range m {
29840		switch k {
29841		case "properties":
29842			if v != nil {
29843				var vpnGatewayProperties VpnGatewayProperties
29844				err = json.Unmarshal(*v, &vpnGatewayProperties)
29845				if err != nil {
29846					return err
29847				}
29848				vg.VpnGatewayProperties = &vpnGatewayProperties
29849			}
29850		case "etag":
29851			if v != nil {
29852				var etag string
29853				err = json.Unmarshal(*v, &etag)
29854				if err != nil {
29855					return err
29856				}
29857				vg.Etag = &etag
29858			}
29859		case "id":
29860			if v != nil {
29861				var ID string
29862				err = json.Unmarshal(*v, &ID)
29863				if err != nil {
29864					return err
29865				}
29866				vg.ID = &ID
29867			}
29868		case "name":
29869			if v != nil {
29870				var name string
29871				err = json.Unmarshal(*v, &name)
29872				if err != nil {
29873					return err
29874				}
29875				vg.Name = &name
29876			}
29877		case "type":
29878			if v != nil {
29879				var typeVar string
29880				err = json.Unmarshal(*v, &typeVar)
29881				if err != nil {
29882					return err
29883				}
29884				vg.Type = &typeVar
29885			}
29886		case "location":
29887			if v != nil {
29888				var location string
29889				err = json.Unmarshal(*v, &location)
29890				if err != nil {
29891					return err
29892				}
29893				vg.Location = &location
29894			}
29895		case "tags":
29896			if v != nil {
29897				var tags map[string]*string
29898				err = json.Unmarshal(*v, &tags)
29899				if err != nil {
29900					return err
29901				}
29902				vg.Tags = tags
29903			}
29904		}
29905	}
29906
29907	return nil
29908}
29909
29910// VpnGatewayProperties parameters for VpnGateway
29911type VpnGatewayProperties struct {
29912	// VirtualHub - The VirtualHub to which the gateway belongs
29913	VirtualHub *SubResource `json:"virtualHub,omitempty"`
29914	// Connections - list of all vpn connections to the gateway.
29915	Connections *[]VpnConnection `json:"connections,omitempty"`
29916	// BgpSettings - Local network gateway's BGP speaker settings.
29917	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
29918	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29919	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29920	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
29921	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
29922}
29923
29924// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29925// long-running operation.
29926type VpnGatewaysCreateOrUpdateFuture struct {
29927	azure.FutureAPI
29928	// Result returns the result of the asynchronous operation.
29929	// If the operation has not completed it will return an error.
29930	Result func(VpnGatewaysClient) (VpnGateway, error)
29931}
29932
29933// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29934func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29935	var azFuture azure.Future
29936	if err := json.Unmarshal(body, &azFuture); err != nil {
29937		return err
29938	}
29939	future.FutureAPI = &azFuture
29940	future.Result = future.result
29941	return nil
29942}
29943
29944// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
29945func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
29946	var done bool
29947	done, err = future.DoneWithContext(context.Background(), client)
29948	if err != nil {
29949		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29950		return
29951	}
29952	if !done {
29953		vg.Response.Response = future.Response()
29954		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
29955		return
29956	}
29957	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29958	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
29959		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
29960		if err != nil {
29961			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
29962		}
29963	}
29964	return
29965}
29966
29967// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29968// operation.
29969type VpnGatewaysDeleteFuture struct {
29970	azure.FutureAPI
29971	// Result returns the result of the asynchronous operation.
29972	// If the operation has not completed it will return an error.
29973	Result func(VpnGatewaysClient) (autorest.Response, error)
29974}
29975
29976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29977func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
29978	var azFuture azure.Future
29979	if err := json.Unmarshal(body, &azFuture); err != nil {
29980		return err
29981	}
29982	future.FutureAPI = &azFuture
29983	future.Result = future.result
29984	return nil
29985}
29986
29987// result is the default implementation for VpnGatewaysDeleteFuture.Result.
29988func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
29989	var done bool
29990	done, err = future.DoneWithContext(context.Background(), client)
29991	if err != nil {
29992		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
29993		return
29994	}
29995	if !done {
29996		ar.Response = future.Response()
29997		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
29998		return
29999	}
30000	ar.Response = future.Response()
30001	return
30002}
30003
30004// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30005// operation.
30006type VpnGatewaysUpdateTagsFuture struct {
30007	azure.FutureAPI
30008	// Result returns the result of the asynchronous operation.
30009	// If the operation has not completed it will return an error.
30010	Result func(VpnGatewaysClient) (VpnGateway, error)
30011}
30012
30013// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30014func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30015	var azFuture azure.Future
30016	if err := json.Unmarshal(body, &azFuture); err != nil {
30017		return err
30018	}
30019	future.FutureAPI = &azFuture
30020	future.Result = future.result
30021	return nil
30022}
30023
30024// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
30025func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
30026	var done bool
30027	done, err = future.DoneWithContext(context.Background(), client)
30028	if err != nil {
30029		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30030		return
30031	}
30032	if !done {
30033		vg.Response.Response = future.Response()
30034		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
30035		return
30036	}
30037	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30038	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
30039		vg, err = client.UpdateTagsResponder(vg.Response.Response)
30040		if err != nil {
30041			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
30042		}
30043	}
30044	return
30045}
30046
30047// VpnProfileResponse vpn Profile Response for package generation
30048type VpnProfileResponse struct {
30049	autorest.Response `json:"-"`
30050	// ProfileURL - URL to the VPN profile
30051	ProfileURL *string `json:"profileUrl,omitempty"`
30052}
30053
30054// VpnSite vpnSite Resource.
30055type VpnSite struct {
30056	autorest.Response  `json:"-"`
30057	*VpnSiteProperties `json:"properties,omitempty"`
30058	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30059	Etag *string `json:"etag,omitempty"`
30060	// ID - Resource ID.
30061	ID *string `json:"id,omitempty"`
30062	// Name - READ-ONLY; Resource name.
30063	Name *string `json:"name,omitempty"`
30064	// Type - READ-ONLY; Resource type.
30065	Type *string `json:"type,omitempty"`
30066	// Location - Resource location.
30067	Location *string `json:"location,omitempty"`
30068	// Tags - Resource tags.
30069	Tags map[string]*string `json:"tags"`
30070}
30071
30072// MarshalJSON is the custom marshaler for VpnSite.
30073func (vs VpnSite) MarshalJSON() ([]byte, error) {
30074	objectMap := make(map[string]interface{})
30075	if vs.VpnSiteProperties != nil {
30076		objectMap["properties"] = vs.VpnSiteProperties
30077	}
30078	if vs.ID != nil {
30079		objectMap["id"] = vs.ID
30080	}
30081	if vs.Location != nil {
30082		objectMap["location"] = vs.Location
30083	}
30084	if vs.Tags != nil {
30085		objectMap["tags"] = vs.Tags
30086	}
30087	return json.Marshal(objectMap)
30088}
30089
30090// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
30091func (vs *VpnSite) UnmarshalJSON(body []byte) error {
30092	var m map[string]*json.RawMessage
30093	err := json.Unmarshal(body, &m)
30094	if err != nil {
30095		return err
30096	}
30097	for k, v := range m {
30098		switch k {
30099		case "properties":
30100			if v != nil {
30101				var vpnSiteProperties VpnSiteProperties
30102				err = json.Unmarshal(*v, &vpnSiteProperties)
30103				if err != nil {
30104					return err
30105				}
30106				vs.VpnSiteProperties = &vpnSiteProperties
30107			}
30108		case "etag":
30109			if v != nil {
30110				var etag string
30111				err = json.Unmarshal(*v, &etag)
30112				if err != nil {
30113					return err
30114				}
30115				vs.Etag = &etag
30116			}
30117		case "id":
30118			if v != nil {
30119				var ID string
30120				err = json.Unmarshal(*v, &ID)
30121				if err != nil {
30122					return err
30123				}
30124				vs.ID = &ID
30125			}
30126		case "name":
30127			if v != nil {
30128				var name string
30129				err = json.Unmarshal(*v, &name)
30130				if err != nil {
30131					return err
30132				}
30133				vs.Name = &name
30134			}
30135		case "type":
30136			if v != nil {
30137				var typeVar string
30138				err = json.Unmarshal(*v, &typeVar)
30139				if err != nil {
30140					return err
30141				}
30142				vs.Type = &typeVar
30143			}
30144		case "location":
30145			if v != nil {
30146				var location string
30147				err = json.Unmarshal(*v, &location)
30148				if err != nil {
30149					return err
30150				}
30151				vs.Location = &location
30152			}
30153		case "tags":
30154			if v != nil {
30155				var tags map[string]*string
30156				err = json.Unmarshal(*v, &tags)
30157				if err != nil {
30158					return err
30159				}
30160				vs.Tags = tags
30161			}
30162		}
30163	}
30164
30165	return nil
30166}
30167
30168// VpnSiteID vpnSite Resource.
30169type VpnSiteID struct {
30170	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
30171	VpnSite *string `json:"vpnSite,omitempty"`
30172}
30173
30174// MarshalJSON is the custom marshaler for VpnSiteID.
30175func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
30176	objectMap := make(map[string]interface{})
30177	return json.Marshal(objectMap)
30178}
30179
30180// VpnSiteProperties parameters for VpnSite
30181type VpnSiteProperties struct {
30182	// VirtualWan - The VirtualWAN to which the vpnSite belongs
30183	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30184	// DeviceProperties - The device properties
30185	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
30186	// IPAddress - The ip-address for the vpn-site.
30187	IPAddress *string `json:"ipAddress,omitempty"`
30188	// SiteKey - The key for vpn-site that can be used for connections.
30189	SiteKey *string `json:"siteKey,omitempty"`
30190	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
30191	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
30192	// BgpProperties - The set of bgp properties.
30193	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
30194	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30195	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30196	// IsSecuritySite - IsSecuritySite flag
30197	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
30198}
30199
30200// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
30201// long-running operation.
30202type VpnSitesConfigurationDownloadFuture struct {
30203	azure.FutureAPI
30204	// Result returns the result of the asynchronous operation.
30205	// If the operation has not completed it will return an error.
30206	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
30207}
30208
30209// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30210func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
30211	var azFuture azure.Future
30212	if err := json.Unmarshal(body, &azFuture); err != nil {
30213		return err
30214	}
30215	future.FutureAPI = &azFuture
30216	future.Result = future.result
30217	return nil
30218}
30219
30220// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
30221func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
30222	var done bool
30223	done, err = future.DoneWithContext(context.Background(), client)
30224	if err != nil {
30225		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
30226		return
30227	}
30228	if !done {
30229		ar.Response = future.Response()
30230		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
30231		return
30232	}
30233	ar.Response = future.Response()
30234	return
30235}
30236
30237// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30238// operation.
30239type VpnSitesCreateOrUpdateFuture struct {
30240	azure.FutureAPI
30241	// Result returns the result of the asynchronous operation.
30242	// If the operation has not completed it will return an error.
30243	Result func(VpnSitesClient) (VpnSite, error)
30244}
30245
30246// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30247func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30248	var azFuture azure.Future
30249	if err := json.Unmarshal(body, &azFuture); err != nil {
30250		return err
30251	}
30252	future.FutureAPI = &azFuture
30253	future.Result = future.result
30254	return nil
30255}
30256
30257// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
30258func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
30259	var done bool
30260	done, err = future.DoneWithContext(context.Background(), client)
30261	if err != nil {
30262		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30263		return
30264	}
30265	if !done {
30266		vs.Response.Response = future.Response()
30267		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
30268		return
30269	}
30270	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30271	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
30272		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
30273		if err != nil {
30274			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
30275		}
30276	}
30277	return
30278}
30279
30280// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30281// operation.
30282type VpnSitesDeleteFuture struct {
30283	azure.FutureAPI
30284	// Result returns the result of the asynchronous operation.
30285	// If the operation has not completed it will return an error.
30286	Result func(VpnSitesClient) (autorest.Response, error)
30287}
30288
30289// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30290func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
30291	var azFuture azure.Future
30292	if err := json.Unmarshal(body, &azFuture); err != nil {
30293		return err
30294	}
30295	future.FutureAPI = &azFuture
30296	future.Result = future.result
30297	return nil
30298}
30299
30300// result is the default implementation for VpnSitesDeleteFuture.Result.
30301func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
30302	var done bool
30303	done, err = future.DoneWithContext(context.Background(), client)
30304	if err != nil {
30305		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
30306		return
30307	}
30308	if !done {
30309		ar.Response = future.Response()
30310		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
30311		return
30312	}
30313	ar.Response = future.Response()
30314	return
30315}
30316
30317// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30318// operation.
30319type VpnSitesUpdateTagsFuture struct {
30320	azure.FutureAPI
30321	// Result returns the result of the asynchronous operation.
30322	// If the operation has not completed it will return an error.
30323	Result func(VpnSitesClient) (VpnSite, error)
30324}
30325
30326// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30327func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30328	var azFuture azure.Future
30329	if err := json.Unmarshal(body, &azFuture); err != nil {
30330		return err
30331	}
30332	future.FutureAPI = &azFuture
30333	future.Result = future.result
30334	return nil
30335}
30336
30337// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
30338func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
30339	var done bool
30340	done, err = future.DoneWithContext(context.Background(), client)
30341	if err != nil {
30342		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30343		return
30344	}
30345	if !done {
30346		vs.Response.Response = future.Response()
30347		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
30348		return
30349	}
30350	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30351	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
30352		vs, err = client.UpdateTagsResponder(vs.Response.Response)
30353		if err != nil {
30354			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
30355		}
30356	}
30357	return
30358}
30359
30360// Watcher network watcher in a resource group.
30361type Watcher struct {
30362	autorest.Response `json:"-"`
30363	// Etag - A unique read-only string that changes whenever the resource is updated.
30364	Etag                     *string `json:"etag,omitempty"`
30365	*WatcherPropertiesFormat `json:"properties,omitempty"`
30366	// ID - Resource ID.
30367	ID *string `json:"id,omitempty"`
30368	// Name - READ-ONLY; Resource name.
30369	Name *string `json:"name,omitempty"`
30370	// Type - READ-ONLY; Resource type.
30371	Type *string `json:"type,omitempty"`
30372	// Location - Resource location.
30373	Location *string `json:"location,omitempty"`
30374	// Tags - Resource tags.
30375	Tags map[string]*string `json:"tags"`
30376}
30377
30378// MarshalJSON is the custom marshaler for Watcher.
30379func (w Watcher) MarshalJSON() ([]byte, error) {
30380	objectMap := make(map[string]interface{})
30381	if w.Etag != nil {
30382		objectMap["etag"] = w.Etag
30383	}
30384	if w.WatcherPropertiesFormat != nil {
30385		objectMap["properties"] = w.WatcherPropertiesFormat
30386	}
30387	if w.ID != nil {
30388		objectMap["id"] = w.ID
30389	}
30390	if w.Location != nil {
30391		objectMap["location"] = w.Location
30392	}
30393	if w.Tags != nil {
30394		objectMap["tags"] = w.Tags
30395	}
30396	return json.Marshal(objectMap)
30397}
30398
30399// UnmarshalJSON is the custom unmarshaler for Watcher struct.
30400func (w *Watcher) UnmarshalJSON(body []byte) error {
30401	var m map[string]*json.RawMessage
30402	err := json.Unmarshal(body, &m)
30403	if err != nil {
30404		return err
30405	}
30406	for k, v := range m {
30407		switch k {
30408		case "etag":
30409			if v != nil {
30410				var etag string
30411				err = json.Unmarshal(*v, &etag)
30412				if err != nil {
30413					return err
30414				}
30415				w.Etag = &etag
30416			}
30417		case "properties":
30418			if v != nil {
30419				var watcherPropertiesFormat WatcherPropertiesFormat
30420				err = json.Unmarshal(*v, &watcherPropertiesFormat)
30421				if err != nil {
30422					return err
30423				}
30424				w.WatcherPropertiesFormat = &watcherPropertiesFormat
30425			}
30426		case "id":
30427			if v != nil {
30428				var ID string
30429				err = json.Unmarshal(*v, &ID)
30430				if err != nil {
30431					return err
30432				}
30433				w.ID = &ID
30434			}
30435		case "name":
30436			if v != nil {
30437				var name string
30438				err = json.Unmarshal(*v, &name)
30439				if err != nil {
30440					return err
30441				}
30442				w.Name = &name
30443			}
30444		case "type":
30445			if v != nil {
30446				var typeVar string
30447				err = json.Unmarshal(*v, &typeVar)
30448				if err != nil {
30449					return err
30450				}
30451				w.Type = &typeVar
30452			}
30453		case "location":
30454			if v != nil {
30455				var location string
30456				err = json.Unmarshal(*v, &location)
30457				if err != nil {
30458					return err
30459				}
30460				w.Location = &location
30461			}
30462		case "tags":
30463			if v != nil {
30464				var tags map[string]*string
30465				err = json.Unmarshal(*v, &tags)
30466				if err != nil {
30467					return err
30468				}
30469				w.Tags = tags
30470			}
30471		}
30472	}
30473
30474	return nil
30475}
30476
30477// WatcherListResult list of network watcher resources.
30478type WatcherListResult struct {
30479	autorest.Response `json:"-"`
30480	Value             *[]Watcher `json:"value,omitempty"`
30481}
30482
30483// WatcherPropertiesFormat the network watcher properties.
30484type WatcherPropertiesFormat struct {
30485	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30486	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30487}
30488
30489// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
30490func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
30491	objectMap := make(map[string]interface{})
30492	return json.Marshal(objectMap)
30493}
30494
30495// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
30496// long-running operation.
30497type WatchersCheckConnectivityFuture struct {
30498	azure.FutureAPI
30499	// Result returns the result of the asynchronous operation.
30500	// If the operation has not completed it will return an error.
30501	Result func(WatchersClient) (ConnectivityInformation, error)
30502}
30503
30504// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30505func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
30506	var azFuture azure.Future
30507	if err := json.Unmarshal(body, &azFuture); err != nil {
30508		return err
30509	}
30510	future.FutureAPI = &azFuture
30511	future.Result = future.result
30512	return nil
30513}
30514
30515// result is the default implementation for WatchersCheckConnectivityFuture.Result.
30516func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
30517	var done bool
30518	done, err = future.DoneWithContext(context.Background(), client)
30519	if err != nil {
30520		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
30521		return
30522	}
30523	if !done {
30524		ci.Response.Response = future.Response()
30525		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
30526		return
30527	}
30528	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30529	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
30530		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
30531		if err != nil {
30532			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
30533		}
30534	}
30535	return
30536}
30537
30538// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30539// operation.
30540type WatchersDeleteFuture struct {
30541	azure.FutureAPI
30542	// Result returns the result of the asynchronous operation.
30543	// If the operation has not completed it will return an error.
30544	Result func(WatchersClient) (autorest.Response, error)
30545}
30546
30547// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30548func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
30549	var azFuture azure.Future
30550	if err := json.Unmarshal(body, &azFuture); err != nil {
30551		return err
30552	}
30553	future.FutureAPI = &azFuture
30554	future.Result = future.result
30555	return nil
30556}
30557
30558// result is the default implementation for WatchersDeleteFuture.Result.
30559func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
30560	var done bool
30561	done, err = future.DoneWithContext(context.Background(), client)
30562	if err != nil {
30563		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
30564		return
30565	}
30566	if !done {
30567		ar.Response = future.Response()
30568		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
30569		return
30570	}
30571	ar.Response = future.Response()
30572	return
30573}
30574
30575// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
30576// long-running operation.
30577type WatchersGetAzureReachabilityReportFuture struct {
30578	azure.FutureAPI
30579	// Result returns the result of the asynchronous operation.
30580	// If the operation has not completed it will return an error.
30581	Result func(WatchersClient) (AzureReachabilityReport, error)
30582}
30583
30584// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30585func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
30586	var azFuture azure.Future
30587	if err := json.Unmarshal(body, &azFuture); err != nil {
30588		return err
30589	}
30590	future.FutureAPI = &azFuture
30591	future.Result = future.result
30592	return nil
30593}
30594
30595// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
30596func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
30597	var done bool
30598	done, err = future.DoneWithContext(context.Background(), client)
30599	if err != nil {
30600		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
30601		return
30602	}
30603	if !done {
30604		arr.Response.Response = future.Response()
30605		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
30606		return
30607	}
30608	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30609	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
30610		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
30611		if err != nil {
30612			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
30613		}
30614	}
30615	return
30616}
30617
30618// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
30619// long-running operation.
30620type WatchersGetFlowLogStatusFuture struct {
30621	azure.FutureAPI
30622	// Result returns the result of the asynchronous operation.
30623	// If the operation has not completed it will return an error.
30624	Result func(WatchersClient) (FlowLogInformation, error)
30625}
30626
30627// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30628func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
30629	var azFuture azure.Future
30630	if err := json.Unmarshal(body, &azFuture); err != nil {
30631		return err
30632	}
30633	future.FutureAPI = &azFuture
30634	future.Result = future.result
30635	return nil
30636}
30637
30638// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
30639func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
30640	var done bool
30641	done, err = future.DoneWithContext(context.Background(), client)
30642	if err != nil {
30643		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
30644		return
30645	}
30646	if !done {
30647		fli.Response.Response = future.Response()
30648		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
30649		return
30650	}
30651	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30652	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
30653		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
30654		if err != nil {
30655			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
30656		}
30657	}
30658	return
30659}
30660
30661// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
30662// of a long-running operation.
30663type WatchersGetNetworkConfigurationDiagnosticFuture struct {
30664	azure.FutureAPI
30665	// Result returns the result of the asynchronous operation.
30666	// If the operation has not completed it will return an error.
30667	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
30668}
30669
30670// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30671func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
30672	var azFuture azure.Future
30673	if err := json.Unmarshal(body, &azFuture); err != nil {
30674		return err
30675	}
30676	future.FutureAPI = &azFuture
30677	future.Result = future.result
30678	return nil
30679}
30680
30681// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
30682func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
30683	var done bool
30684	done, err = future.DoneWithContext(context.Background(), client)
30685	if err != nil {
30686		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
30687		return
30688	}
30689	if !done {
30690		cdr.Response.Response = future.Response()
30691		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
30692		return
30693	}
30694	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30695	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
30696		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
30697		if err != nil {
30698			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
30699		}
30700	}
30701	return
30702}
30703
30704// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
30705// operation.
30706type WatchersGetNextHopFuture struct {
30707	azure.FutureAPI
30708	// Result returns the result of the asynchronous operation.
30709	// If the operation has not completed it will return an error.
30710	Result func(WatchersClient) (NextHopResult, error)
30711}
30712
30713// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30714func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
30715	var azFuture azure.Future
30716	if err := json.Unmarshal(body, &azFuture); err != nil {
30717		return err
30718	}
30719	future.FutureAPI = &azFuture
30720	future.Result = future.result
30721	return nil
30722}
30723
30724// result is the default implementation for WatchersGetNextHopFuture.Result.
30725func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
30726	var done bool
30727	done, err = future.DoneWithContext(context.Background(), client)
30728	if err != nil {
30729		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
30730		return
30731	}
30732	if !done {
30733		nhr.Response.Response = future.Response()
30734		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
30735		return
30736	}
30737	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30738	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
30739		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
30740		if err != nil {
30741			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
30742		}
30743	}
30744	return
30745}
30746
30747// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
30748// long-running operation.
30749type WatchersGetTroubleshootingFuture struct {
30750	azure.FutureAPI
30751	// Result returns the result of the asynchronous operation.
30752	// If the operation has not completed it will return an error.
30753	Result func(WatchersClient) (TroubleshootingResult, error)
30754}
30755
30756// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30757func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
30758	var azFuture azure.Future
30759	if err := json.Unmarshal(body, &azFuture); err != nil {
30760		return err
30761	}
30762	future.FutureAPI = &azFuture
30763	future.Result = future.result
30764	return nil
30765}
30766
30767// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
30768func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
30769	var done bool
30770	done, err = future.DoneWithContext(context.Background(), client)
30771	if err != nil {
30772		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
30773		return
30774	}
30775	if !done {
30776		tr.Response.Response = future.Response()
30777		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
30778		return
30779	}
30780	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30781	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
30782		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
30783		if err != nil {
30784			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
30785		}
30786	}
30787	return
30788}
30789
30790// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
30791// long-running operation.
30792type WatchersGetTroubleshootingResultFuture struct {
30793	azure.FutureAPI
30794	// Result returns the result of the asynchronous operation.
30795	// If the operation has not completed it will return an error.
30796	Result func(WatchersClient) (TroubleshootingResult, error)
30797}
30798
30799// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30800func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
30801	var azFuture azure.Future
30802	if err := json.Unmarshal(body, &azFuture); err != nil {
30803		return err
30804	}
30805	future.FutureAPI = &azFuture
30806	future.Result = future.result
30807	return nil
30808}
30809
30810// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
30811func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
30812	var done bool
30813	done, err = future.DoneWithContext(context.Background(), client)
30814	if err != nil {
30815		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
30816		return
30817	}
30818	if !done {
30819		tr.Response.Response = future.Response()
30820		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
30821		return
30822	}
30823	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30824	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
30825		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
30826		if err != nil {
30827			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
30828		}
30829	}
30830	return
30831}
30832
30833// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
30834// long-running operation.
30835type WatchersGetVMSecurityRulesFuture struct {
30836	azure.FutureAPI
30837	// Result returns the result of the asynchronous operation.
30838	// If the operation has not completed it will return an error.
30839	Result func(WatchersClient) (SecurityGroupViewResult, error)
30840}
30841
30842// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30843func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
30844	var azFuture azure.Future
30845	if err := json.Unmarshal(body, &azFuture); err != nil {
30846		return err
30847	}
30848	future.FutureAPI = &azFuture
30849	future.Result = future.result
30850	return nil
30851}
30852
30853// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
30854func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
30855	var done bool
30856	done, err = future.DoneWithContext(context.Background(), client)
30857	if err != nil {
30858		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
30859		return
30860	}
30861	if !done {
30862		sgvr.Response.Response = future.Response()
30863		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
30864		return
30865	}
30866	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30867	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
30868		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
30869		if err != nil {
30870			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
30871		}
30872	}
30873	return
30874}
30875
30876// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
30877// long-running operation.
30878type WatchersListAvailableProvidersFuture struct {
30879	azure.FutureAPI
30880	// Result returns the result of the asynchronous operation.
30881	// If the operation has not completed it will return an error.
30882	Result func(WatchersClient) (AvailableProvidersList, error)
30883}
30884
30885// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30886func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
30887	var azFuture azure.Future
30888	if err := json.Unmarshal(body, &azFuture); err != nil {
30889		return err
30890	}
30891	future.FutureAPI = &azFuture
30892	future.Result = future.result
30893	return nil
30894}
30895
30896// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
30897func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
30898	var done bool
30899	done, err = future.DoneWithContext(context.Background(), client)
30900	if err != nil {
30901		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
30902		return
30903	}
30904	if !done {
30905		apl.Response.Response = future.Response()
30906		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
30907		return
30908	}
30909	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30910	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
30911		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
30912		if err != nil {
30913			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
30914		}
30915	}
30916	return
30917}
30918
30919// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
30920// long-running operation.
30921type WatchersSetFlowLogConfigurationFuture struct {
30922	azure.FutureAPI
30923	// Result returns the result of the asynchronous operation.
30924	// If the operation has not completed it will return an error.
30925	Result func(WatchersClient) (FlowLogInformation, error)
30926}
30927
30928// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30929func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
30930	var azFuture azure.Future
30931	if err := json.Unmarshal(body, &azFuture); err != nil {
30932		return err
30933	}
30934	future.FutureAPI = &azFuture
30935	future.Result = future.result
30936	return nil
30937}
30938
30939// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
30940func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
30941	var done bool
30942	done, err = future.DoneWithContext(context.Background(), client)
30943	if err != nil {
30944		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
30945		return
30946	}
30947	if !done {
30948		fli.Response.Response = future.Response()
30949		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
30950		return
30951	}
30952	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30953	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
30954		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
30955		if err != nil {
30956			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
30957		}
30958	}
30959	return
30960}
30961
30962// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
30963// operation.
30964type WatchersVerifyIPFlowFuture struct {
30965	azure.FutureAPI
30966	// Result returns the result of the asynchronous operation.
30967	// If the operation has not completed it will return an error.
30968	Result func(WatchersClient) (VerificationIPFlowResult, error)
30969}
30970
30971// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30972func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
30973	var azFuture azure.Future
30974	if err := json.Unmarshal(body, &azFuture); err != nil {
30975		return err
30976	}
30977	future.FutureAPI = &azFuture
30978	future.Result = future.result
30979	return nil
30980}
30981
30982// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
30983func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
30984	var done bool
30985	done, err = future.DoneWithContext(context.Background(), client)
30986	if err != nil {
30987		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
30988		return
30989	}
30990	if !done {
30991		vifr.Response.Response = future.Response()
30992		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
30993		return
30994	}
30995	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30996	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
30997		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
30998		if err != nil {
30999			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
31000		}
31001	}
31002	return
31003}
31004