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/2019-04-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 - Properties of the application gateway.
34	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
35	// Etag - A unique read-only string that changes whenever the resource is updated.
36	Etag *string `json:"etag,omitempty"`
37	// Zones - A list of availability zones denoting where the resource needs to come from.
38	Zones *[]string `json:"zones,omitempty"`
39	// Identity - The identity of the application gateway, if configured.
40	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
41	// ID - Resource ID.
42	ID *string `json:"id,omitempty"`
43	// Name - READ-ONLY; Resource name.
44	Name *string `json:"name,omitempty"`
45	// Type - READ-ONLY; Resource type.
46	Type *string `json:"type,omitempty"`
47	// Location - Resource location.
48	Location *string `json:"location,omitempty"`
49	// Tags - Resource tags.
50	Tags map[string]*string `json:"tags"`
51}
52
53// MarshalJSON is the custom marshaler for ApplicationGateway.
54func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
55	objectMap := make(map[string]interface{})
56	if ag.ApplicationGatewayPropertiesFormat != nil {
57		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
58	}
59	if ag.Etag != nil {
60		objectMap["etag"] = ag.Etag
61	}
62	if ag.Zones != nil {
63		objectMap["zones"] = ag.Zones
64	}
65	if ag.Identity != nil {
66		objectMap["identity"] = ag.Identity
67	}
68	if ag.ID != nil {
69		objectMap["id"] = ag.ID
70	}
71	if ag.Location != nil {
72		objectMap["location"] = ag.Location
73	}
74	if ag.Tags != nil {
75		objectMap["tags"] = ag.Tags
76	}
77	return json.Marshal(objectMap)
78}
79
80// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
81func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
82	var m map[string]*json.RawMessage
83	err := json.Unmarshal(body, &m)
84	if err != nil {
85		return err
86	}
87	for k, v := range m {
88		switch k {
89		case "properties":
90			if v != nil {
91				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
92				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
93				if err != nil {
94					return err
95				}
96				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
97			}
98		case "etag":
99			if v != nil {
100				var etag string
101				err = json.Unmarshal(*v, &etag)
102				if err != nil {
103					return err
104				}
105				ag.Etag = &etag
106			}
107		case "zones":
108			if v != nil {
109				var zones []string
110				err = json.Unmarshal(*v, &zones)
111				if err != nil {
112					return err
113				}
114				ag.Zones = &zones
115			}
116		case "identity":
117			if v != nil {
118				var identity ManagedServiceIdentity
119				err = json.Unmarshal(*v, &identity)
120				if err != nil {
121					return err
122				}
123				ag.Identity = &identity
124			}
125		case "id":
126			if v != nil {
127				var ID string
128				err = json.Unmarshal(*v, &ID)
129				if err != nil {
130					return err
131				}
132				ag.ID = &ID
133			}
134		case "name":
135			if v != nil {
136				var name string
137				err = json.Unmarshal(*v, &name)
138				if err != nil {
139					return err
140				}
141				ag.Name = &name
142			}
143		case "type":
144			if v != nil {
145				var typeVar string
146				err = json.Unmarshal(*v, &typeVar)
147				if err != nil {
148					return err
149				}
150				ag.Type = &typeVar
151			}
152		case "location":
153			if v != nil {
154				var location string
155				err = json.Unmarshal(*v, &location)
156				if err != nil {
157					return err
158				}
159				ag.Location = &location
160			}
161		case "tags":
162			if v != nil {
163				var tags map[string]*string
164				err = json.Unmarshal(*v, &tags)
165				if err != nil {
166					return err
167				}
168				ag.Tags = tags
169			}
170		}
171	}
172
173	return nil
174}
175
176// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
177type ApplicationGatewayAuthenticationCertificate struct {
178	// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate.
179	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
180	// Name - Name of the authentication certificate that is unique within an Application Gateway.
181	Name *string `json:"name,omitempty"`
182	// Etag - A unique read-only string that changes whenever the resource is updated.
183	Etag *string `json:"etag,omitempty"`
184	// Type - Type of the resource.
185	Type *string `json:"type,omitempty"`
186	// ID - Resource ID.
187	ID *string `json:"id,omitempty"`
188}
189
190// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
191func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
192	objectMap := make(map[string]interface{})
193	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
194		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
195	}
196	if agac.Name != nil {
197		objectMap["name"] = agac.Name
198	}
199	if agac.Etag != nil {
200		objectMap["etag"] = agac.Etag
201	}
202	if agac.Type != nil {
203		objectMap["type"] = agac.Type
204	}
205	if agac.ID != nil {
206		objectMap["id"] = agac.ID
207	}
208	return json.Marshal(objectMap)
209}
210
211// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
212func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
213	var m map[string]*json.RawMessage
214	err := json.Unmarshal(body, &m)
215	if err != nil {
216		return err
217	}
218	for k, v := range m {
219		switch k {
220		case "properties":
221			if v != nil {
222				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
223				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
224				if err != nil {
225					return err
226				}
227				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
228			}
229		case "name":
230			if v != nil {
231				var name string
232				err = json.Unmarshal(*v, &name)
233				if err != nil {
234					return err
235				}
236				agac.Name = &name
237			}
238		case "etag":
239			if v != nil {
240				var etag string
241				err = json.Unmarshal(*v, &etag)
242				if err != nil {
243					return err
244				}
245				agac.Etag = &etag
246			}
247		case "type":
248			if v != nil {
249				var typeVar string
250				err = json.Unmarshal(*v, &typeVar)
251				if err != nil {
252					return err
253				}
254				agac.Type = &typeVar
255			}
256		case "id":
257			if v != nil {
258				var ID string
259				err = json.Unmarshal(*v, &ID)
260				if err != nil {
261					return err
262				}
263				agac.ID = &ID
264			}
265		}
266	}
267
268	return nil
269}
270
271// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
272// application gateway.
273type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
274	// Data - Certificate public data.
275	Data *string `json:"data,omitempty"`
276	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
277	ProvisioningState *string `json:"provisioningState,omitempty"`
278}
279
280// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
281type ApplicationGatewayAutoscaleConfiguration struct {
282	// MinCapacity - Lower bound on number of Application Gateway capacity.
283	MinCapacity *int32 `json:"minCapacity,omitempty"`
284	// MaxCapacity - Upper bound on number of Application Gateway capacity.
285	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
286}
287
288// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
289// call.
290type ApplicationGatewayAvailableSslOptions struct {
291	autorest.Response `json:"-"`
292	// ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options.
293	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
294	// ID - Resource ID.
295	ID *string `json:"id,omitempty"`
296	// Name - READ-ONLY; Resource name.
297	Name *string `json:"name,omitempty"`
298	// Type - READ-ONLY; Resource type.
299	Type *string `json:"type,omitempty"`
300	// Location - Resource location.
301	Location *string `json:"location,omitempty"`
302	// Tags - Resource tags.
303	Tags map[string]*string `json:"tags"`
304}
305
306// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
307func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
308	objectMap := make(map[string]interface{})
309	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
310		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
311	}
312	if agaso.ID != nil {
313		objectMap["id"] = agaso.ID
314	}
315	if agaso.Location != nil {
316		objectMap["location"] = agaso.Location
317	}
318	if agaso.Tags != nil {
319		objectMap["tags"] = agaso.Tags
320	}
321	return json.Marshal(objectMap)
322}
323
324// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
325func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
326	var m map[string]*json.RawMessage
327	err := json.Unmarshal(body, &m)
328	if err != nil {
329		return err
330	}
331	for k, v := range m {
332		switch k {
333		case "properties":
334			if v != nil {
335				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
336				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
337				if err != nil {
338					return err
339				}
340				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
341			}
342		case "id":
343			if v != nil {
344				var ID string
345				err = json.Unmarshal(*v, &ID)
346				if err != nil {
347					return err
348				}
349				agaso.ID = &ID
350			}
351		case "name":
352			if v != nil {
353				var name string
354				err = json.Unmarshal(*v, &name)
355				if err != nil {
356					return err
357				}
358				agaso.Name = &name
359			}
360		case "type":
361			if v != nil {
362				var typeVar string
363				err = json.Unmarshal(*v, &typeVar)
364				if err != nil {
365					return err
366				}
367				agaso.Type = &typeVar
368			}
369		case "location":
370			if v != nil {
371				var location string
372				err = json.Unmarshal(*v, &location)
373				if err != nil {
374					return err
375				}
376				agaso.Location = &location
377			}
378		case "tags":
379			if v != nil {
380				var tags map[string]*string
381				err = json.Unmarshal(*v, &tags)
382				if err != nil {
383					return err
384				}
385				agaso.Tags = tags
386			}
387		}
388	}
389
390	return nil
391}
392
393// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
394// ApplicationGatewayAvailableSslOptions.
395type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
396	// PredefinedPolicies - List of available Ssl predefined policy.
397	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
398	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
399	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
400	// AvailableCipherSuites - List of available Ssl cipher suites.
401	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
402	// AvailableProtocols - List of available Ssl protocols.
403	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
404}
405
406// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
407// service call.
408type ApplicationGatewayAvailableSslPredefinedPolicies struct {
409	autorest.Response `json:"-"`
410	// Value - List of available Ssl predefined policy.
411	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
412	// NextLink - URL to get the next set of results.
413	NextLink *string `json:"nextLink,omitempty"`
414}
415
416// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
417// ApplicationGatewaySslPredefinedPolicy values.
418type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
419	i    int
420	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
421}
422
423// NextWithContext advances to the next value.  If there was an error making
424// the request the iterator does not advance and the error is returned.
425func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
426	if tracing.IsEnabled() {
427		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
428		defer func() {
429			sc := -1
430			if iter.Response().Response.Response != nil {
431				sc = iter.Response().Response.Response.StatusCode
432			}
433			tracing.EndSpan(ctx, sc, err)
434		}()
435	}
436	iter.i++
437	if iter.i < len(iter.page.Values()) {
438		return nil
439	}
440	err = iter.page.NextWithContext(ctx)
441	if err != nil {
442		iter.i--
443		return err
444	}
445	iter.i = 0
446	return nil
447}
448
449// Next advances to the next value.  If there was an error making
450// the request the iterator does not advance and the error is returned.
451// Deprecated: Use NextWithContext() instead.
452func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
453	return iter.NextWithContext(context.Background())
454}
455
456// NotDone returns true if the enumeration should be started or is not yet complete.
457func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
458	return iter.page.NotDone() && iter.i < len(iter.page.Values())
459}
460
461// Response returns the raw server response from the last page request.
462func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
463	return iter.page.Response()
464}
465
466// Value returns the current value or a zero-initialized value if the
467// iterator has advanced beyond the end of the collection.
468func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
469	if !iter.page.NotDone() {
470		return ApplicationGatewaySslPredefinedPolicy{}
471	}
472	return iter.page.Values()[iter.i]
473}
474
475// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
476func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
477	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
478}
479
480// IsEmpty returns true if the ListResult contains no values.
481func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
482	return agaspp.Value == nil || len(*agaspp.Value) == 0
483}
484
485// hasNextLink returns true if the NextLink is not empty.
486func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
487	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
488}
489
490// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
491// It returns nil if no more results exist.
492func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
493	if !agaspp.hasNextLink() {
494		return nil, nil
495	}
496	return autorest.Prepare((&http.Request{}).WithContext(ctx),
497		autorest.AsJSON(),
498		autorest.AsGet(),
499		autorest.WithBaseURL(to.String(agaspp.NextLink)))
500}
501
502// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
503// ApplicationGatewaySslPredefinedPolicy values.
504type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
505	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
506	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
507}
508
509// NextWithContext advances to the next page of values.  If there was an error making
510// the request the page does not advance and the error is returned.
511func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
512	if tracing.IsEnabled() {
513		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
514		defer func() {
515			sc := -1
516			if page.Response().Response.Response != nil {
517				sc = page.Response().Response.Response.StatusCode
518			}
519			tracing.EndSpan(ctx, sc, err)
520		}()
521	}
522	for {
523		next, err := page.fn(ctx, page.agaspp)
524		if err != nil {
525			return err
526		}
527		page.agaspp = next
528		if !next.hasNextLink() || !next.IsEmpty() {
529			break
530		}
531	}
532	return nil
533}
534
535// Next advances to the next page of values.  If there was an error making
536// the request the page does not advance and the error is returned.
537// Deprecated: Use NextWithContext() instead.
538func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
539	return page.NextWithContext(context.Background())
540}
541
542// NotDone returns true if the page enumeration should be started or is not yet complete.
543func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
544	return !page.agaspp.IsEmpty()
545}
546
547// Response returns the raw server response from the last page request.
548func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
549	return page.agaspp
550}
551
552// Values returns the slice of values for the current page or nil if there are no values.
553func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
554	if page.agaspp.IsEmpty() {
555		return nil
556	}
557	return *page.agaspp.Value
558}
559
560// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
561func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
562	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
563		fn:     getNextPage,
564		agaspp: cur,
565	}
566}
567
568// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
569// service call.
570type ApplicationGatewayAvailableWafRuleSetsResult struct {
571	autorest.Response `json:"-"`
572	// Value - The list of application gateway rule sets.
573	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
574}
575
576// ApplicationGatewayBackendAddress backend address of an application gateway.
577type ApplicationGatewayBackendAddress struct {
578	// Fqdn - Fully qualified domain name (FQDN).
579	Fqdn *string `json:"fqdn,omitempty"`
580	// IPAddress - IP address.
581	IPAddress *string `json:"ipAddress,omitempty"`
582}
583
584// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
585type ApplicationGatewayBackendAddressPool struct {
586	// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool.
587	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
588	// Name - Name of the backend address pool that is unique within an Application Gateway.
589	Name *string `json:"name,omitempty"`
590	// Etag - A unique read-only string that changes whenever the resource is updated.
591	Etag *string `json:"etag,omitempty"`
592	// Type - Type of the resource.
593	Type *string `json:"type,omitempty"`
594	// ID - Resource ID.
595	ID *string `json:"id,omitempty"`
596}
597
598// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
599func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
600	objectMap := make(map[string]interface{})
601	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
602		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
603	}
604	if agbap.Name != nil {
605		objectMap["name"] = agbap.Name
606	}
607	if agbap.Etag != nil {
608		objectMap["etag"] = agbap.Etag
609	}
610	if agbap.Type != nil {
611		objectMap["type"] = agbap.Type
612	}
613	if agbap.ID != nil {
614		objectMap["id"] = agbap.ID
615	}
616	return json.Marshal(objectMap)
617}
618
619// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
620func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
621	var m map[string]*json.RawMessage
622	err := json.Unmarshal(body, &m)
623	if err != nil {
624		return err
625	}
626	for k, v := range m {
627		switch k {
628		case "properties":
629			if v != nil {
630				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
631				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
632				if err != nil {
633					return err
634				}
635				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
636			}
637		case "name":
638			if v != nil {
639				var name string
640				err = json.Unmarshal(*v, &name)
641				if err != nil {
642					return err
643				}
644				agbap.Name = &name
645			}
646		case "etag":
647			if v != nil {
648				var etag string
649				err = json.Unmarshal(*v, &etag)
650				if err != nil {
651					return err
652				}
653				agbap.Etag = &etag
654			}
655		case "type":
656			if v != nil {
657				var typeVar string
658				err = json.Unmarshal(*v, &typeVar)
659				if err != nil {
660					return err
661				}
662				agbap.Type = &typeVar
663			}
664		case "id":
665			if v != nil {
666				var ID string
667				err = json.Unmarshal(*v, &ID)
668				if err != nil {
669					return err
670				}
671				agbap.ID = &ID
672			}
673		}
674	}
675
676	return nil
677}
678
679// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
680// application gateway.
681type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
682	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
683	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
684	// BackendAddresses - Backend addresses.
685	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
686	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
687	ProvisioningState *string `json:"provisioningState,omitempty"`
688}
689
690// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call.
691type ApplicationGatewayBackendHealth struct {
692	autorest.Response `json:"-"`
693	// BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources.
694	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
695}
696
697// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
698type ApplicationGatewayBackendHealthHTTPSettings struct {
699	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
700	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
701	// Servers - List of ApplicationGatewayBackendHealthServer resources.
702	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
703}
704
705// ApplicationGatewayBackendHealthOnDemand result of on demand test probe.
706type ApplicationGatewayBackendHealthOnDemand struct {
707	autorest.Response `json:"-"`
708	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
709	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
710	// BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings.
711	BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"`
712}
713
714// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
715type ApplicationGatewayBackendHealthPool struct {
716	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
717	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
718	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
719	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
720}
721
722// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
723type ApplicationGatewayBackendHealthServer struct {
724	// Address - IP address or FQDN of backend server.
725	Address *string `json:"address,omitempty"`
726	// IPConfiguration - Reference of IP configuration of backend server.
727	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
728	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
729	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
730	// HealthProbeLog - Health Probe Log.
731	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
732}
733
734// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
735type ApplicationGatewayBackendHTTPSettings struct {
736	// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings.
737	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
738	// Name - Name of the backend http settings that is unique within an Application Gateway.
739	Name *string `json:"name,omitempty"`
740	// Etag - A unique read-only string that changes whenever the resource is updated.
741	Etag *string `json:"etag,omitempty"`
742	// Type - Type of the resource.
743	Type *string `json:"type,omitempty"`
744	// ID - Resource ID.
745	ID *string `json:"id,omitempty"`
746}
747
748// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
749func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
750	objectMap := make(map[string]interface{})
751	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
752		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
753	}
754	if agbhs.Name != nil {
755		objectMap["name"] = agbhs.Name
756	}
757	if agbhs.Etag != nil {
758		objectMap["etag"] = agbhs.Etag
759	}
760	if agbhs.Type != nil {
761		objectMap["type"] = agbhs.Type
762	}
763	if agbhs.ID != nil {
764		objectMap["id"] = agbhs.ID
765	}
766	return json.Marshal(objectMap)
767}
768
769// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
770func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
771	var m map[string]*json.RawMessage
772	err := json.Unmarshal(body, &m)
773	if err != nil {
774		return err
775	}
776	for k, v := range m {
777		switch k {
778		case "properties":
779			if v != nil {
780				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
781				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
782				if err != nil {
783					return err
784				}
785				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
786			}
787		case "name":
788			if v != nil {
789				var name string
790				err = json.Unmarshal(*v, &name)
791				if err != nil {
792					return err
793				}
794				agbhs.Name = &name
795			}
796		case "etag":
797			if v != nil {
798				var etag string
799				err = json.Unmarshal(*v, &etag)
800				if err != nil {
801					return err
802				}
803				agbhs.Etag = &etag
804			}
805		case "type":
806			if v != nil {
807				var typeVar string
808				err = json.Unmarshal(*v, &typeVar)
809				if err != nil {
810					return err
811				}
812				agbhs.Type = &typeVar
813			}
814		case "id":
815			if v != nil {
816				var ID string
817				err = json.Unmarshal(*v, &ID)
818				if err != nil {
819					return err
820				}
821				agbhs.ID = &ID
822			}
823		}
824	}
825
826	return nil
827}
828
829// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
830// application gateway.
831type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
832	// Port - The destination port on the backend.
833	Port *int32 `json:"port,omitempty"`
834	// Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS'
835	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
836	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
837	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
838	// 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.
839	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
840	// Probe - Probe resource of an application gateway.
841	Probe *SubResource `json:"probe,omitempty"`
842	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
843	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
844	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
845	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
846	// ConnectionDraining - Connection draining of the backend http settings resource.
847	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
848	// HostName - Host header to be sent to the backend servers.
849	HostName *string `json:"hostName,omitempty"`
850	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
851	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
852	// AffinityCookieName - Cookie name to use for the affinity cookie.
853	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
854	// ProbeEnabled - Whether the probe is enabled. Default value is false.
855	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
856	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
857	Path *string `json:"path,omitempty"`
858	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
859	ProvisioningState *string `json:"provisioningState,omitempty"`
860}
861
862// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
863// be active for a specified time after the backend server got removed from the configuration.
864type ApplicationGatewayConnectionDraining struct {
865	// Enabled - Whether connection draining is enabled or not.
866	Enabled *bool `json:"enabled,omitempty"`
867	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
868	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
869}
870
871// ApplicationGatewayCustomError customer error of an application gateway.
872type ApplicationGatewayCustomError struct {
873	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
874	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
875	// CustomErrorPageURL - Error page URL of the application gateway customer error.
876	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
877}
878
879// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
880// rule group.
881type ApplicationGatewayFirewallDisabledRuleGroup struct {
882	// RuleGroupName - The name of the rule group that will be disabled.
883	RuleGroupName *string `json:"ruleGroupName,omitempty"`
884	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
885	Rules *[]int32 `json:"rules,omitempty"`
886}
887
888// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
889// check.
890type ApplicationGatewayFirewallExclusion struct {
891	// MatchVariable - The variable to be excluded.
892	MatchVariable *string `json:"matchVariable,omitempty"`
893	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
894	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
895	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
896	Selector *string `json:"selector,omitempty"`
897}
898
899// ApplicationGatewayFirewallRule a web application firewall rule.
900type ApplicationGatewayFirewallRule struct {
901	// RuleID - The identifier of the web application firewall rule.
902	RuleID *int32 `json:"ruleId,omitempty"`
903	// Description - The description of the web application firewall rule.
904	Description *string `json:"description,omitempty"`
905}
906
907// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
908type ApplicationGatewayFirewallRuleGroup struct {
909	// RuleGroupName - The name of the web application firewall rule group.
910	RuleGroupName *string `json:"ruleGroupName,omitempty"`
911	// Description - The description of the web application firewall rule group.
912	Description *string `json:"description,omitempty"`
913	// Rules - The rules of the web application firewall rule group.
914	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
915}
916
917// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
918type ApplicationGatewayFirewallRuleSet struct {
919	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
920	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
921	// ID - Resource ID.
922	ID *string `json:"id,omitempty"`
923	// Name - READ-ONLY; Resource name.
924	Name *string `json:"name,omitempty"`
925	// Type - READ-ONLY; Resource type.
926	Type *string `json:"type,omitempty"`
927	// Location - Resource location.
928	Location *string `json:"location,omitempty"`
929	// Tags - Resource tags.
930	Tags map[string]*string `json:"tags"`
931}
932
933// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
934func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
935	objectMap := make(map[string]interface{})
936	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
937		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
938	}
939	if agfrs.ID != nil {
940		objectMap["id"] = agfrs.ID
941	}
942	if agfrs.Location != nil {
943		objectMap["location"] = agfrs.Location
944	}
945	if agfrs.Tags != nil {
946		objectMap["tags"] = agfrs.Tags
947	}
948	return json.Marshal(objectMap)
949}
950
951// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
952func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
953	var m map[string]*json.RawMessage
954	err := json.Unmarshal(body, &m)
955	if err != nil {
956		return err
957	}
958	for k, v := range m {
959		switch k {
960		case "properties":
961			if v != nil {
962				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
963				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
964				if err != nil {
965					return err
966				}
967				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
968			}
969		case "id":
970			if v != nil {
971				var ID string
972				err = json.Unmarshal(*v, &ID)
973				if err != nil {
974					return err
975				}
976				agfrs.ID = &ID
977			}
978		case "name":
979			if v != nil {
980				var name string
981				err = json.Unmarshal(*v, &name)
982				if err != nil {
983					return err
984				}
985				agfrs.Name = &name
986			}
987		case "type":
988			if v != nil {
989				var typeVar string
990				err = json.Unmarshal(*v, &typeVar)
991				if err != nil {
992					return err
993				}
994				agfrs.Type = &typeVar
995			}
996		case "location":
997			if v != nil {
998				var location string
999				err = json.Unmarshal(*v, &location)
1000				if err != nil {
1001					return err
1002				}
1003				agfrs.Location = &location
1004			}
1005		case "tags":
1006			if v != nil {
1007				var tags map[string]*string
1008				err = json.Unmarshal(*v, &tags)
1009				if err != nil {
1010					return err
1011				}
1012				agfrs.Tags = tags
1013			}
1014		}
1015	}
1016
1017	return nil
1018}
1019
1020// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1021type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1022	// ProvisioningState - The provisioning state of the web application firewall rule set.
1023	ProvisioningState *string `json:"provisioningState,omitempty"`
1024	// RuleSetType - The type of the web application firewall rule set.
1025	RuleSetType *string `json:"ruleSetType,omitempty"`
1026	// RuleSetVersion - The version of the web application firewall rule set type.
1027	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1028	// RuleGroups - The rule groups of the web application firewall rule set.
1029	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1030}
1031
1032// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1033type ApplicationGatewayFrontendIPConfiguration struct {
1034	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1035	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1036	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1037	Name *string `json:"name,omitempty"`
1038	// Etag - A unique read-only string that changes whenever the resource is updated.
1039	Etag *string `json:"etag,omitempty"`
1040	// Type - Type of the resource.
1041	Type *string `json:"type,omitempty"`
1042	// ID - Resource ID.
1043	ID *string `json:"id,omitempty"`
1044}
1045
1046// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1047func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1048	objectMap := make(map[string]interface{})
1049	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1050		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1051	}
1052	if agfic.Name != nil {
1053		objectMap["name"] = agfic.Name
1054	}
1055	if agfic.Etag != nil {
1056		objectMap["etag"] = agfic.Etag
1057	}
1058	if agfic.Type != nil {
1059		objectMap["type"] = agfic.Type
1060	}
1061	if agfic.ID != nil {
1062		objectMap["id"] = agfic.ID
1063	}
1064	return json.Marshal(objectMap)
1065}
1066
1067// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1068func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1069	var m map[string]*json.RawMessage
1070	err := json.Unmarshal(body, &m)
1071	if err != nil {
1072		return err
1073	}
1074	for k, v := range m {
1075		switch k {
1076		case "properties":
1077			if v != nil {
1078				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1079				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1080				if err != nil {
1081					return err
1082				}
1083				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1084			}
1085		case "name":
1086			if v != nil {
1087				var name string
1088				err = json.Unmarshal(*v, &name)
1089				if err != nil {
1090					return err
1091				}
1092				agfic.Name = &name
1093			}
1094		case "etag":
1095			if v != nil {
1096				var etag string
1097				err = json.Unmarshal(*v, &etag)
1098				if err != nil {
1099					return err
1100				}
1101				agfic.Etag = &etag
1102			}
1103		case "type":
1104			if v != nil {
1105				var typeVar string
1106				err = json.Unmarshal(*v, &typeVar)
1107				if err != nil {
1108					return err
1109				}
1110				agfic.Type = &typeVar
1111			}
1112		case "id":
1113			if v != nil {
1114				var ID string
1115				err = json.Unmarshal(*v, &ID)
1116				if err != nil {
1117					return err
1118				}
1119				agfic.ID = &ID
1120			}
1121		}
1122	}
1123
1124	return nil
1125}
1126
1127// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1128// application gateway.
1129type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1130	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1131	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1132	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1133	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1134	// Subnet - Reference of the subnet resource.
1135	Subnet *SubResource `json:"subnet,omitempty"`
1136	// PublicIPAddress - Reference of the PublicIP resource.
1137	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1138	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1139	ProvisioningState *string `json:"provisioningState,omitempty"`
1140}
1141
1142// ApplicationGatewayFrontendPort frontend port of an application gateway.
1143type ApplicationGatewayFrontendPort struct {
1144	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1145	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1146	// Name - Name of the frontend port that is unique within an Application Gateway.
1147	Name *string `json:"name,omitempty"`
1148	// Etag - A unique read-only string that changes whenever the resource is updated.
1149	Etag *string `json:"etag,omitempty"`
1150	// Type - Type of the resource.
1151	Type *string `json:"type,omitempty"`
1152	// ID - Resource ID.
1153	ID *string `json:"id,omitempty"`
1154}
1155
1156// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1157func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1158	objectMap := make(map[string]interface{})
1159	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1160		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1161	}
1162	if agfp.Name != nil {
1163		objectMap["name"] = agfp.Name
1164	}
1165	if agfp.Etag != nil {
1166		objectMap["etag"] = agfp.Etag
1167	}
1168	if agfp.Type != nil {
1169		objectMap["type"] = agfp.Type
1170	}
1171	if agfp.ID != nil {
1172		objectMap["id"] = agfp.ID
1173	}
1174	return json.Marshal(objectMap)
1175}
1176
1177// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1178func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1179	var m map[string]*json.RawMessage
1180	err := json.Unmarshal(body, &m)
1181	if err != nil {
1182		return err
1183	}
1184	for k, v := range m {
1185		switch k {
1186		case "properties":
1187			if v != nil {
1188				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1189				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1190				if err != nil {
1191					return err
1192				}
1193				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1194			}
1195		case "name":
1196			if v != nil {
1197				var name string
1198				err = json.Unmarshal(*v, &name)
1199				if err != nil {
1200					return err
1201				}
1202				agfp.Name = &name
1203			}
1204		case "etag":
1205			if v != nil {
1206				var etag string
1207				err = json.Unmarshal(*v, &etag)
1208				if err != nil {
1209					return err
1210				}
1211				agfp.Etag = &etag
1212			}
1213		case "type":
1214			if v != nil {
1215				var typeVar string
1216				err = json.Unmarshal(*v, &typeVar)
1217				if err != nil {
1218					return err
1219				}
1220				agfp.Type = &typeVar
1221			}
1222		case "id":
1223			if v != nil {
1224				var ID string
1225				err = json.Unmarshal(*v, &ID)
1226				if err != nil {
1227					return err
1228				}
1229				agfp.ID = &ID
1230			}
1231		}
1232	}
1233
1234	return nil
1235}
1236
1237// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1238type ApplicationGatewayFrontendPortPropertiesFormat struct {
1239	// Port - Frontend port.
1240	Port *int32 `json:"port,omitempty"`
1241	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1242	ProvisioningState *string `json:"provisioningState,omitempty"`
1243}
1244
1245// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1246type ApplicationGatewayHeaderConfiguration struct {
1247	// HeaderName - Header name of the header configuration.
1248	HeaderName *string `json:"headerName,omitempty"`
1249	// HeaderValue - Header value of the header configuration.
1250	HeaderValue *string `json:"headerValue,omitempty"`
1251}
1252
1253// ApplicationGatewayHTTPListener http listener of an application gateway.
1254type ApplicationGatewayHTTPListener struct {
1255	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1256	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1257	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1258	Name *string `json:"name,omitempty"`
1259	// Etag - A unique read-only string that changes whenever the resource is updated.
1260	Etag *string `json:"etag,omitempty"`
1261	// Type - Type of the resource.
1262	Type *string `json:"type,omitempty"`
1263	// ID - Resource ID.
1264	ID *string `json:"id,omitempty"`
1265}
1266
1267// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1268func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1269	objectMap := make(map[string]interface{})
1270	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1271		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1272	}
1273	if aghl.Name != nil {
1274		objectMap["name"] = aghl.Name
1275	}
1276	if aghl.Etag != nil {
1277		objectMap["etag"] = aghl.Etag
1278	}
1279	if aghl.Type != nil {
1280		objectMap["type"] = aghl.Type
1281	}
1282	if aghl.ID != nil {
1283		objectMap["id"] = aghl.ID
1284	}
1285	return json.Marshal(objectMap)
1286}
1287
1288// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1289func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1290	var m map[string]*json.RawMessage
1291	err := json.Unmarshal(body, &m)
1292	if err != nil {
1293		return err
1294	}
1295	for k, v := range m {
1296		switch k {
1297		case "properties":
1298			if v != nil {
1299				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1300				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1301				if err != nil {
1302					return err
1303				}
1304				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1305			}
1306		case "name":
1307			if v != nil {
1308				var name string
1309				err = json.Unmarshal(*v, &name)
1310				if err != nil {
1311					return err
1312				}
1313				aghl.Name = &name
1314			}
1315		case "etag":
1316			if v != nil {
1317				var etag string
1318				err = json.Unmarshal(*v, &etag)
1319				if err != nil {
1320					return err
1321				}
1322				aghl.Etag = &etag
1323			}
1324		case "type":
1325			if v != nil {
1326				var typeVar string
1327				err = json.Unmarshal(*v, &typeVar)
1328				if err != nil {
1329					return err
1330				}
1331				aghl.Type = &typeVar
1332			}
1333		case "id":
1334			if v != nil {
1335				var ID string
1336				err = json.Unmarshal(*v, &ID)
1337				if err != nil {
1338					return err
1339				}
1340				aghl.ID = &ID
1341			}
1342		}
1343	}
1344
1345	return nil
1346}
1347
1348// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1349type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1350	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1351	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1352	// FrontendPort - Frontend port resource of an application gateway.
1353	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1354	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1355	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1356	// HostName - Host name of HTTP listener.
1357	HostName *string `json:"hostName,omitempty"`
1358	// SslCertificate - SSL certificate resource of an application gateway.
1359	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1360	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1361	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1362	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1363	ProvisioningState *string `json:"provisioningState,omitempty"`
1364	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1365	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1366}
1367
1368// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1369// private IP configuration is allowed.
1370type ApplicationGatewayIPConfiguration struct {
1371	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1372	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1373	// Name - Name of the IP configuration that is unique within an Application Gateway.
1374	Name *string `json:"name,omitempty"`
1375	// Etag - A unique read-only string that changes whenever the resource is updated.
1376	Etag *string `json:"etag,omitempty"`
1377	// Type - Type of the resource.
1378	Type *string `json:"type,omitempty"`
1379	// ID - Resource ID.
1380	ID *string `json:"id,omitempty"`
1381}
1382
1383// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1384func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1385	objectMap := make(map[string]interface{})
1386	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1387		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1388	}
1389	if agic.Name != nil {
1390		objectMap["name"] = agic.Name
1391	}
1392	if agic.Etag != nil {
1393		objectMap["etag"] = agic.Etag
1394	}
1395	if agic.Type != nil {
1396		objectMap["type"] = agic.Type
1397	}
1398	if agic.ID != nil {
1399		objectMap["id"] = agic.ID
1400	}
1401	return json.Marshal(objectMap)
1402}
1403
1404// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1405func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1406	var m map[string]*json.RawMessage
1407	err := json.Unmarshal(body, &m)
1408	if err != nil {
1409		return err
1410	}
1411	for k, v := range m {
1412		switch k {
1413		case "properties":
1414			if v != nil {
1415				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1416				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1417				if err != nil {
1418					return err
1419				}
1420				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1421			}
1422		case "name":
1423			if v != nil {
1424				var name string
1425				err = json.Unmarshal(*v, &name)
1426				if err != nil {
1427					return err
1428				}
1429				agic.Name = &name
1430			}
1431		case "etag":
1432			if v != nil {
1433				var etag string
1434				err = json.Unmarshal(*v, &etag)
1435				if err != nil {
1436					return err
1437				}
1438				agic.Etag = &etag
1439			}
1440		case "type":
1441			if v != nil {
1442				var typeVar string
1443				err = json.Unmarshal(*v, &typeVar)
1444				if err != nil {
1445					return err
1446				}
1447				agic.Type = &typeVar
1448			}
1449		case "id":
1450			if v != nil {
1451				var ID string
1452				err = json.Unmarshal(*v, &ID)
1453				if err != nil {
1454					return err
1455				}
1456				agic.ID = &ID
1457			}
1458		}
1459	}
1460
1461	return nil
1462}
1463
1464// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1465// gateway.
1466type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1467	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1468	Subnet *SubResource `json:"subnet,omitempty"`
1469	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1470	ProvisioningState *string `json:"provisioningState,omitempty"`
1471}
1472
1473// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1474type ApplicationGatewayListResult struct {
1475	autorest.Response `json:"-"`
1476	// Value - List of an application gateways in a resource group.
1477	Value *[]ApplicationGateway `json:"value,omitempty"`
1478	// NextLink - URL to get the next set of results.
1479	NextLink *string `json:"nextLink,omitempty"`
1480}
1481
1482// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1483type ApplicationGatewayListResultIterator struct {
1484	i    int
1485	page ApplicationGatewayListResultPage
1486}
1487
1488// NextWithContext advances to the next value.  If there was an error making
1489// the request the iterator does not advance and the error is returned.
1490func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1491	if tracing.IsEnabled() {
1492		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1493		defer func() {
1494			sc := -1
1495			if iter.Response().Response.Response != nil {
1496				sc = iter.Response().Response.Response.StatusCode
1497			}
1498			tracing.EndSpan(ctx, sc, err)
1499		}()
1500	}
1501	iter.i++
1502	if iter.i < len(iter.page.Values()) {
1503		return nil
1504	}
1505	err = iter.page.NextWithContext(ctx)
1506	if err != nil {
1507		iter.i--
1508		return err
1509	}
1510	iter.i = 0
1511	return nil
1512}
1513
1514// Next advances to the next value.  If there was an error making
1515// the request the iterator does not advance and the error is returned.
1516// Deprecated: Use NextWithContext() instead.
1517func (iter *ApplicationGatewayListResultIterator) Next() error {
1518	return iter.NextWithContext(context.Background())
1519}
1520
1521// NotDone returns true if the enumeration should be started or is not yet complete.
1522func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1524}
1525
1526// Response returns the raw server response from the last page request.
1527func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1528	return iter.page.Response()
1529}
1530
1531// Value returns the current value or a zero-initialized value if the
1532// iterator has advanced beyond the end of the collection.
1533func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1534	if !iter.page.NotDone() {
1535		return ApplicationGateway{}
1536	}
1537	return iter.page.Values()[iter.i]
1538}
1539
1540// Creates a new instance of the ApplicationGatewayListResultIterator type.
1541func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1542	return ApplicationGatewayListResultIterator{page: page}
1543}
1544
1545// IsEmpty returns true if the ListResult contains no values.
1546func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1547	return aglr.Value == nil || len(*aglr.Value) == 0
1548}
1549
1550// hasNextLink returns true if the NextLink is not empty.
1551func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1552	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1553}
1554
1555// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1556// It returns nil if no more results exist.
1557func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1558	if !aglr.hasNextLink() {
1559		return nil, nil
1560	}
1561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1562		autorest.AsJSON(),
1563		autorest.AsGet(),
1564		autorest.WithBaseURL(to.String(aglr.NextLink)))
1565}
1566
1567// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1568type ApplicationGatewayListResultPage struct {
1569	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1570	aglr ApplicationGatewayListResult
1571}
1572
1573// NextWithContext advances to the next page of values.  If there was an error making
1574// the request the page does not advance and the error is returned.
1575func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1576	if tracing.IsEnabled() {
1577		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1578		defer func() {
1579			sc := -1
1580			if page.Response().Response.Response != nil {
1581				sc = page.Response().Response.Response.StatusCode
1582			}
1583			tracing.EndSpan(ctx, sc, err)
1584		}()
1585	}
1586	for {
1587		next, err := page.fn(ctx, page.aglr)
1588		if err != nil {
1589			return err
1590		}
1591		page.aglr = next
1592		if !next.hasNextLink() || !next.IsEmpty() {
1593			break
1594		}
1595	}
1596	return nil
1597}
1598
1599// Next advances to the next page of values.  If there was an error making
1600// the request the page does not advance and the error is returned.
1601// Deprecated: Use NextWithContext() instead.
1602func (page *ApplicationGatewayListResultPage) Next() error {
1603	return page.NextWithContext(context.Background())
1604}
1605
1606// NotDone returns true if the page enumeration should be started or is not yet complete.
1607func (page ApplicationGatewayListResultPage) NotDone() bool {
1608	return !page.aglr.IsEmpty()
1609}
1610
1611// Response returns the raw server response from the last page request.
1612func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1613	return page.aglr
1614}
1615
1616// Values returns the slice of values for the current page or nil if there are no values.
1617func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1618	if page.aglr.IsEmpty() {
1619		return nil
1620	}
1621	return *page.aglr.Value
1622}
1623
1624// Creates a new instance of the ApplicationGatewayListResultPage type.
1625func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1626	return ApplicationGatewayListResultPage{
1627		fn:   getNextPage,
1628		aglr: cur,
1629	}
1630}
1631
1632// ApplicationGatewayOnDemandProbe details of on demand test probe request.
1633type ApplicationGatewayOnDemandProbe struct {
1634	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1635	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1636	// Host - Host name to send the probe to.
1637	Host *string `json:"host,omitempty"`
1638	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1639	Path *string `json:"path,omitempty"`
1640	// 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.
1641	Timeout *int32 `json:"timeout,omitempty"`
1642	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1643	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1644	// Match - Criterion for classifying a healthy probe response.
1645	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1646	// BackendAddressPool - Reference of backend pool of application gateway to which probe request will be sent.
1647	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1648	// BackendHTTPSettings - Reference of backend http setting of application gateway to be used for test probe.
1649	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1650}
1651
1652// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1653type ApplicationGatewayPathRule struct {
1654	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1655	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1656	// Name - Name of the path rule that is unique within an Application Gateway.
1657	Name *string `json:"name,omitempty"`
1658	// Etag - A unique read-only string that changes whenever the resource is updated.
1659	Etag *string `json:"etag,omitempty"`
1660	// Type - Type of the resource.
1661	Type *string `json:"type,omitempty"`
1662	// ID - Resource ID.
1663	ID *string `json:"id,omitempty"`
1664}
1665
1666// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1667func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1668	objectMap := make(map[string]interface{})
1669	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1670		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1671	}
1672	if agpr.Name != nil {
1673		objectMap["name"] = agpr.Name
1674	}
1675	if agpr.Etag != nil {
1676		objectMap["etag"] = agpr.Etag
1677	}
1678	if agpr.Type != nil {
1679		objectMap["type"] = agpr.Type
1680	}
1681	if agpr.ID != nil {
1682		objectMap["id"] = agpr.ID
1683	}
1684	return json.Marshal(objectMap)
1685}
1686
1687// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1688func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1689	var m map[string]*json.RawMessage
1690	err := json.Unmarshal(body, &m)
1691	if err != nil {
1692		return err
1693	}
1694	for k, v := range m {
1695		switch k {
1696		case "properties":
1697			if v != nil {
1698				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1699				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1700				if err != nil {
1701					return err
1702				}
1703				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1704			}
1705		case "name":
1706			if v != nil {
1707				var name string
1708				err = json.Unmarshal(*v, &name)
1709				if err != nil {
1710					return err
1711				}
1712				agpr.Name = &name
1713			}
1714		case "etag":
1715			if v != nil {
1716				var etag string
1717				err = json.Unmarshal(*v, &etag)
1718				if err != nil {
1719					return err
1720				}
1721				agpr.Etag = &etag
1722			}
1723		case "type":
1724			if v != nil {
1725				var typeVar string
1726				err = json.Unmarshal(*v, &typeVar)
1727				if err != nil {
1728					return err
1729				}
1730				agpr.Type = &typeVar
1731			}
1732		case "id":
1733			if v != nil {
1734				var ID string
1735				err = json.Unmarshal(*v, &ID)
1736				if err != nil {
1737					return err
1738				}
1739				agpr.ID = &ID
1740			}
1741		}
1742	}
1743
1744	return nil
1745}
1746
1747// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1748type ApplicationGatewayPathRulePropertiesFormat struct {
1749	// Paths - Path rules of URL path map.
1750	Paths *[]string `json:"paths,omitempty"`
1751	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1752	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1753	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1754	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1755	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1756	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1757	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1758	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1759	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1760	ProvisioningState *string `json:"provisioningState,omitempty"`
1761}
1762
1763// ApplicationGatewayProbe probe of the application gateway.
1764type ApplicationGatewayProbe struct {
1765	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
1766	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1767	// Name - Name of the probe that is unique within an Application Gateway.
1768	Name *string `json:"name,omitempty"`
1769	// Etag - A unique read-only string that changes whenever the resource is updated.
1770	Etag *string `json:"etag,omitempty"`
1771	// Type - Type of the resource.
1772	Type *string `json:"type,omitempty"`
1773	// ID - Resource ID.
1774	ID *string `json:"id,omitempty"`
1775}
1776
1777// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1778func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1779	objectMap := make(map[string]interface{})
1780	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1781		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1782	}
1783	if agp.Name != nil {
1784		objectMap["name"] = agp.Name
1785	}
1786	if agp.Etag != nil {
1787		objectMap["etag"] = agp.Etag
1788	}
1789	if agp.Type != nil {
1790		objectMap["type"] = agp.Type
1791	}
1792	if agp.ID != nil {
1793		objectMap["id"] = agp.ID
1794	}
1795	return json.Marshal(objectMap)
1796}
1797
1798// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1799func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1800	var m map[string]*json.RawMessage
1801	err := json.Unmarshal(body, &m)
1802	if err != nil {
1803		return err
1804	}
1805	for k, v := range m {
1806		switch k {
1807		case "properties":
1808			if v != nil {
1809				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1810				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1811				if err != nil {
1812					return err
1813				}
1814				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1815			}
1816		case "name":
1817			if v != nil {
1818				var name string
1819				err = json.Unmarshal(*v, &name)
1820				if err != nil {
1821					return err
1822				}
1823				agp.Name = &name
1824			}
1825		case "etag":
1826			if v != nil {
1827				var etag string
1828				err = json.Unmarshal(*v, &etag)
1829				if err != nil {
1830					return err
1831				}
1832				agp.Etag = &etag
1833			}
1834		case "type":
1835			if v != nil {
1836				var typeVar string
1837				err = json.Unmarshal(*v, &typeVar)
1838				if err != nil {
1839					return err
1840				}
1841				agp.Type = &typeVar
1842			}
1843		case "id":
1844			if v != nil {
1845				var ID string
1846				err = json.Unmarshal(*v, &ID)
1847				if err != nil {
1848					return err
1849				}
1850				agp.ID = &ID
1851			}
1852		}
1853	}
1854
1855	return nil
1856}
1857
1858// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match.
1859type ApplicationGatewayProbeHealthResponseMatch struct {
1860	// Body - Body that must be contained in the health response. Default value is empty.
1861	Body *string `json:"body,omitempty"`
1862	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1863	StatusCodes *[]string `json:"statusCodes,omitempty"`
1864}
1865
1866// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1867type ApplicationGatewayProbePropertiesFormat struct {
1868	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1869	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1870	// Host - Host name to send the probe to.
1871	Host *string `json:"host,omitempty"`
1872	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>.
1873	Path *string `json:"path,omitempty"`
1874	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1875	Interval *int32 `json:"interval,omitempty"`
1876	// 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.
1877	Timeout *int32 `json:"timeout,omitempty"`
1878	// 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.
1879	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1880	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1881	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1882	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1883	MinServers *int32 `json:"minServers,omitempty"`
1884	// Match - Criterion for classifying a healthy probe response.
1885	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1886	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1887	ProvisioningState *string `json:"provisioningState,omitempty"`
1888	// Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
1889	Port *int32 `json:"port,omitempty"`
1890}
1891
1892// ApplicationGatewayPropertiesFormat properties of the application gateway.
1893type ApplicationGatewayPropertiesFormat struct {
1894	// Sku - SKU of the application gateway resource.
1895	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1896	// SslPolicy - SSL policy of the application gateway resource.
1897	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1898	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1899	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1900	// GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1901	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1902	// AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1903	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1904	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1905	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1906	// SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1907	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1908	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1909	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1910	// FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1911	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1912	// Probes - Probes of the application gateway resource.
1913	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1914	// BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1915	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1916	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1917	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1918	// HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1919	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1920	// URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1921	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1922	// RequestRoutingRules - Request routing rules of the application gateway resource.
1923	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1924	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1925	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1926	// RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1927	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1928	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1929	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1930	// FirewallPolicy - Reference of the FirewallPolicy resource.
1931	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1932	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1933	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1934	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1935	EnableFips *bool `json:"enableFips,omitempty"`
1936	// AutoscaleConfiguration - Autoscale Configuration.
1937	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1938	// ResourceGUID - Resource GUID property of the application gateway resource.
1939	ResourceGUID *string `json:"resourceGuid,omitempty"`
1940	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1941	ProvisioningState *string `json:"provisioningState,omitempty"`
1942	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1943	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1944}
1945
1946// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1947func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1948	objectMap := make(map[string]interface{})
1949	if agpf.Sku != nil {
1950		objectMap["sku"] = agpf.Sku
1951	}
1952	if agpf.SslPolicy != nil {
1953		objectMap["sslPolicy"] = agpf.SslPolicy
1954	}
1955	if agpf.GatewayIPConfigurations != nil {
1956		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1957	}
1958	if agpf.AuthenticationCertificates != nil {
1959		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1960	}
1961	if agpf.TrustedRootCertificates != nil {
1962		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1963	}
1964	if agpf.SslCertificates != nil {
1965		objectMap["sslCertificates"] = agpf.SslCertificates
1966	}
1967	if agpf.FrontendIPConfigurations != nil {
1968		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1969	}
1970	if agpf.FrontendPorts != nil {
1971		objectMap["frontendPorts"] = agpf.FrontendPorts
1972	}
1973	if agpf.Probes != nil {
1974		objectMap["probes"] = agpf.Probes
1975	}
1976	if agpf.BackendAddressPools != nil {
1977		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1978	}
1979	if agpf.BackendHTTPSettingsCollection != nil {
1980		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1981	}
1982	if agpf.HTTPListeners != nil {
1983		objectMap["httpListeners"] = agpf.HTTPListeners
1984	}
1985	if agpf.URLPathMaps != nil {
1986		objectMap["urlPathMaps"] = agpf.URLPathMaps
1987	}
1988	if agpf.RequestRoutingRules != nil {
1989		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1990	}
1991	if agpf.RewriteRuleSets != nil {
1992		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1993	}
1994	if agpf.RedirectConfigurations != nil {
1995		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1996	}
1997	if agpf.WebApplicationFirewallConfiguration != nil {
1998		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1999	}
2000	if agpf.FirewallPolicy != nil {
2001		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2002	}
2003	if agpf.EnableHTTP2 != nil {
2004		objectMap["enableHttp2"] = agpf.EnableHTTP2
2005	}
2006	if agpf.EnableFips != nil {
2007		objectMap["enableFips"] = agpf.EnableFips
2008	}
2009	if agpf.AutoscaleConfiguration != nil {
2010		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2011	}
2012	if agpf.ResourceGUID != nil {
2013		objectMap["resourceGuid"] = agpf.ResourceGUID
2014	}
2015	if agpf.ProvisioningState != nil {
2016		objectMap["provisioningState"] = agpf.ProvisioningState
2017	}
2018	if agpf.CustomErrorConfigurations != nil {
2019		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2020	}
2021	return json.Marshal(objectMap)
2022}
2023
2024// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2025type ApplicationGatewayRedirectConfiguration struct {
2026	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2027	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2028	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2029	Name *string `json:"name,omitempty"`
2030	// Etag - A unique read-only string that changes whenever the resource is updated.
2031	Etag *string `json:"etag,omitempty"`
2032	// Type - Type of the resource.
2033	Type *string `json:"type,omitempty"`
2034	// ID - Resource ID.
2035	ID *string `json:"id,omitempty"`
2036}
2037
2038// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2039func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2040	objectMap := make(map[string]interface{})
2041	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2042		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2043	}
2044	if agrc.Name != nil {
2045		objectMap["name"] = agrc.Name
2046	}
2047	if agrc.Etag != nil {
2048		objectMap["etag"] = agrc.Etag
2049	}
2050	if agrc.Type != nil {
2051		objectMap["type"] = agrc.Type
2052	}
2053	if agrc.ID != nil {
2054		objectMap["id"] = agrc.ID
2055	}
2056	return json.Marshal(objectMap)
2057}
2058
2059// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2060func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2061	var m map[string]*json.RawMessage
2062	err := json.Unmarshal(body, &m)
2063	if err != nil {
2064		return err
2065	}
2066	for k, v := range m {
2067		switch k {
2068		case "properties":
2069			if v != nil {
2070				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2071				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2072				if err != nil {
2073					return err
2074				}
2075				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2076			}
2077		case "name":
2078			if v != nil {
2079				var name string
2080				err = json.Unmarshal(*v, &name)
2081				if err != nil {
2082					return err
2083				}
2084				agrc.Name = &name
2085			}
2086		case "etag":
2087			if v != nil {
2088				var etag string
2089				err = json.Unmarshal(*v, &etag)
2090				if err != nil {
2091					return err
2092				}
2093				agrc.Etag = &etag
2094			}
2095		case "type":
2096			if v != nil {
2097				var typeVar string
2098				err = json.Unmarshal(*v, &typeVar)
2099				if err != nil {
2100					return err
2101				}
2102				agrc.Type = &typeVar
2103			}
2104		case "id":
2105			if v != nil {
2106				var ID string
2107				err = json.Unmarshal(*v, &ID)
2108				if err != nil {
2109					return err
2110				}
2111				agrc.ID = &ID
2112			}
2113		}
2114	}
2115
2116	return nil
2117}
2118
2119// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2120// application gateway.
2121type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2122	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2123	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2124	// TargetListener - Reference to a listener to redirect the request to.
2125	TargetListener *SubResource `json:"targetListener,omitempty"`
2126	// TargetURL - Url to redirect the request to.
2127	TargetURL *string `json:"targetUrl,omitempty"`
2128	// IncludePath - Include path in the redirected url.
2129	IncludePath *bool `json:"includePath,omitempty"`
2130	// IncludeQueryString - Include query string in the redirected url.
2131	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2132	// RequestRoutingRules - Request routing specifying redirect configuration.
2133	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2134	// URLPathMaps - Url path maps specifying default redirect configuration.
2135	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2136	// PathRules - Path rules specifying redirect configuration.
2137	PathRules *[]SubResource `json:"pathRules,omitempty"`
2138}
2139
2140// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2141type ApplicationGatewayRequestRoutingRule struct {
2142	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2143	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2144	// Name - Name of the request routing rule that is unique within an Application Gateway.
2145	Name *string `json:"name,omitempty"`
2146	// Etag - A unique read-only string that changes whenever the resource is updated.
2147	Etag *string `json:"etag,omitempty"`
2148	// Type - Type of the resource.
2149	Type *string `json:"type,omitempty"`
2150	// ID - Resource ID.
2151	ID *string `json:"id,omitempty"`
2152}
2153
2154// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2155func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2156	objectMap := make(map[string]interface{})
2157	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2158		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2159	}
2160	if agrrr.Name != nil {
2161		objectMap["name"] = agrrr.Name
2162	}
2163	if agrrr.Etag != nil {
2164		objectMap["etag"] = agrrr.Etag
2165	}
2166	if agrrr.Type != nil {
2167		objectMap["type"] = agrrr.Type
2168	}
2169	if agrrr.ID != nil {
2170		objectMap["id"] = agrrr.ID
2171	}
2172	return json.Marshal(objectMap)
2173}
2174
2175// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2176func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2177	var m map[string]*json.RawMessage
2178	err := json.Unmarshal(body, &m)
2179	if err != nil {
2180		return err
2181	}
2182	for k, v := range m {
2183		switch k {
2184		case "properties":
2185			if v != nil {
2186				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2187				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2188				if err != nil {
2189					return err
2190				}
2191				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2192			}
2193		case "name":
2194			if v != nil {
2195				var name string
2196				err = json.Unmarshal(*v, &name)
2197				if err != nil {
2198					return err
2199				}
2200				agrrr.Name = &name
2201			}
2202		case "etag":
2203			if v != nil {
2204				var etag string
2205				err = json.Unmarshal(*v, &etag)
2206				if err != nil {
2207					return err
2208				}
2209				agrrr.Etag = &etag
2210			}
2211		case "type":
2212			if v != nil {
2213				var typeVar string
2214				err = json.Unmarshal(*v, &typeVar)
2215				if err != nil {
2216					return err
2217				}
2218				agrrr.Type = &typeVar
2219			}
2220		case "id":
2221			if v != nil {
2222				var ID string
2223				err = json.Unmarshal(*v, &ID)
2224				if err != nil {
2225					return err
2226				}
2227				agrrr.ID = &ID
2228			}
2229		}
2230	}
2231
2232	return nil
2233}
2234
2235// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2236// application gateway.
2237type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2238	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2239	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2240	// BackendAddressPool - Backend address pool resource of the application gateway.
2241	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2242	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2243	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2244	// HTTPListener - Http listener resource of the application gateway.
2245	HTTPListener *SubResource `json:"httpListener,omitempty"`
2246	// URLPathMap - URL path map resource of the application gateway.
2247	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2248	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2249	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2250	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2251	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2252	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2253	ProvisioningState *string `json:"provisioningState,omitempty"`
2254}
2255
2256// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2257type ApplicationGatewayRewriteRule struct {
2258	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2259	Name *string `json:"name,omitempty"`
2260	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2261	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2262	// Conditions - Conditions based on which the action set execution will be evaluated.
2263	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2264	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2265	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2266}
2267
2268// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2269type ApplicationGatewayRewriteRuleActionSet struct {
2270	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
2271	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2272	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
2273	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2274}
2275
2276// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2277type ApplicationGatewayRewriteRuleCondition struct {
2278	// Variable - The condition parameter of the RewriteRuleCondition.
2279	Variable *string `json:"variable,omitempty"`
2280	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
2281	Pattern *string `json:"pattern,omitempty"`
2282	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2283	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2284	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2285	Negate *bool `json:"negate,omitempty"`
2286}
2287
2288// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2289type ApplicationGatewayRewriteRuleSet struct {
2290	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2291	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2292	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2293	Name *string `json:"name,omitempty"`
2294	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2295	Etag *string `json:"etag,omitempty"`
2296	// ID - Resource ID.
2297	ID *string `json:"id,omitempty"`
2298}
2299
2300// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2301func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2302	objectMap := make(map[string]interface{})
2303	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2304		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2305	}
2306	if agrrs.Name != nil {
2307		objectMap["name"] = agrrs.Name
2308	}
2309	if agrrs.ID != nil {
2310		objectMap["id"] = agrrs.ID
2311	}
2312	return json.Marshal(objectMap)
2313}
2314
2315// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2316func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2317	var m map[string]*json.RawMessage
2318	err := json.Unmarshal(body, &m)
2319	if err != nil {
2320		return err
2321	}
2322	for k, v := range m {
2323		switch k {
2324		case "properties":
2325			if v != nil {
2326				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2327				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2328				if err != nil {
2329					return err
2330				}
2331				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2332			}
2333		case "name":
2334			if v != nil {
2335				var name string
2336				err = json.Unmarshal(*v, &name)
2337				if err != nil {
2338					return err
2339				}
2340				agrrs.Name = &name
2341			}
2342		case "etag":
2343			if v != nil {
2344				var etag string
2345				err = json.Unmarshal(*v, &etag)
2346				if err != nil {
2347					return err
2348				}
2349				agrrs.Etag = &etag
2350			}
2351		case "id":
2352			if v != nil {
2353				var ID string
2354				err = json.Unmarshal(*v, &ID)
2355				if err != nil {
2356					return err
2357				}
2358				agrrs.ID = &ID
2359			}
2360		}
2361	}
2362
2363	return nil
2364}
2365
2366// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2367// gateway.
2368type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2369	// RewriteRules - Rewrite rules in the rewrite rule set.
2370	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2371	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2372	ProvisioningState *string `json:"provisioningState,omitempty"`
2373}
2374
2375// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2376func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2377	objectMap := make(map[string]interface{})
2378	if agrrspf.RewriteRules != nil {
2379		objectMap["rewriteRules"] = agrrspf.RewriteRules
2380	}
2381	return json.Marshal(objectMap)
2382}
2383
2384// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2385// long-running operation.
2386type ApplicationGatewaysBackendHealthFuture struct {
2387	azure.FutureAPI
2388	// Result returns the result of the asynchronous operation.
2389	// If the operation has not completed it will return an error.
2390	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2391}
2392
2393// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2394func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2395	var azFuture azure.Future
2396	if err := json.Unmarshal(body, &azFuture); err != nil {
2397		return err
2398	}
2399	future.FutureAPI = &azFuture
2400	future.Result = future.result
2401	return nil
2402}
2403
2404// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2405func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2406	var done bool
2407	done, err = future.DoneWithContext(context.Background(), client)
2408	if err != nil {
2409		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2410		return
2411	}
2412	if !done {
2413		agbh.Response.Response = future.Response()
2414		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2415		return
2416	}
2417	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2418	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2419		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2420		if err != nil {
2421			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2422		}
2423	}
2424	return
2425}
2426
2427// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2428// of a long-running operation.
2429type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2430	azure.FutureAPI
2431	// Result returns the result of the asynchronous operation.
2432	// If the operation has not completed it will return an error.
2433	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2434}
2435
2436// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2437func (future *ApplicationGatewaysBackendHealthOnDemandFuture) UnmarshalJSON(body []byte) error {
2438	var azFuture azure.Future
2439	if err := json.Unmarshal(body, &azFuture); err != nil {
2440		return err
2441	}
2442	future.FutureAPI = &azFuture
2443	future.Result = future.result
2444	return nil
2445}
2446
2447// result is the default implementation for ApplicationGatewaysBackendHealthOnDemandFuture.Result.
2448func (future *ApplicationGatewaysBackendHealthOnDemandFuture) result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) {
2449	var done bool
2450	done, err = future.DoneWithContext(context.Background(), client)
2451	if err != nil {
2452		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure")
2453		return
2454	}
2455	if !done {
2456		agbhod.Response.Response = future.Response()
2457		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture")
2458		return
2459	}
2460	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2461	if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent {
2462		agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response)
2463		if err != nil {
2464			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request")
2465		}
2466	}
2467	return
2468}
2469
2470// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2471// long-running operation.
2472type ApplicationGatewaysCreateOrUpdateFuture struct {
2473	azure.FutureAPI
2474	// Result returns the result of the asynchronous operation.
2475	// If the operation has not completed it will return an error.
2476	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2477}
2478
2479// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2480func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2481	var azFuture azure.Future
2482	if err := json.Unmarshal(body, &azFuture); err != nil {
2483		return err
2484	}
2485	future.FutureAPI = &azFuture
2486	future.Result = future.result
2487	return nil
2488}
2489
2490// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2491func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2492	var done bool
2493	done, err = future.DoneWithContext(context.Background(), client)
2494	if err != nil {
2495		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2496		return
2497	}
2498	if !done {
2499		ag.Response.Response = future.Response()
2500		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2501		return
2502	}
2503	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2504	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2505		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2506		if err != nil {
2507			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2508		}
2509	}
2510	return
2511}
2512
2513// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2514// long-running operation.
2515type ApplicationGatewaysDeleteFuture struct {
2516	azure.FutureAPI
2517	// Result returns the result of the asynchronous operation.
2518	// If the operation has not completed it will return an error.
2519	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2520}
2521
2522// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2523func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2524	var azFuture azure.Future
2525	if err := json.Unmarshal(body, &azFuture); err != nil {
2526		return err
2527	}
2528	future.FutureAPI = &azFuture
2529	future.Result = future.result
2530	return nil
2531}
2532
2533// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2534func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2535	var done bool
2536	done, err = future.DoneWithContext(context.Background(), client)
2537	if err != nil {
2538		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2539		return
2540	}
2541	if !done {
2542		ar.Response = future.Response()
2543		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2544		return
2545	}
2546	ar.Response = future.Response()
2547	return
2548}
2549
2550// ApplicationGatewaySku SKU of an application gateway.
2551type ApplicationGatewaySku struct {
2552	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2553	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2554	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2555	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2556	// Capacity - Capacity (instance count) of an application gateway.
2557	Capacity *int32 `json:"capacity,omitempty"`
2558}
2559
2560// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2561type ApplicationGatewaySslCertificate struct {
2562	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2563	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2564	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2565	Name *string `json:"name,omitempty"`
2566	// Etag - A unique read-only string that changes whenever the resource is updated.
2567	Etag *string `json:"etag,omitempty"`
2568	// Type - Type of the resource.
2569	Type *string `json:"type,omitempty"`
2570	// ID - Resource ID.
2571	ID *string `json:"id,omitempty"`
2572}
2573
2574// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2575func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2576	objectMap := make(map[string]interface{})
2577	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2578		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2579	}
2580	if agsc.Name != nil {
2581		objectMap["name"] = agsc.Name
2582	}
2583	if agsc.Etag != nil {
2584		objectMap["etag"] = agsc.Etag
2585	}
2586	if agsc.Type != nil {
2587		objectMap["type"] = agsc.Type
2588	}
2589	if agsc.ID != nil {
2590		objectMap["id"] = agsc.ID
2591	}
2592	return json.Marshal(objectMap)
2593}
2594
2595// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2596func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2597	var m map[string]*json.RawMessage
2598	err := json.Unmarshal(body, &m)
2599	if err != nil {
2600		return err
2601	}
2602	for k, v := range m {
2603		switch k {
2604		case "properties":
2605			if v != nil {
2606				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2607				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2608				if err != nil {
2609					return err
2610				}
2611				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2612			}
2613		case "name":
2614			if v != nil {
2615				var name string
2616				err = json.Unmarshal(*v, &name)
2617				if err != nil {
2618					return err
2619				}
2620				agsc.Name = &name
2621			}
2622		case "etag":
2623			if v != nil {
2624				var etag string
2625				err = json.Unmarshal(*v, &etag)
2626				if err != nil {
2627					return err
2628				}
2629				agsc.Etag = &etag
2630			}
2631		case "type":
2632			if v != nil {
2633				var typeVar string
2634				err = json.Unmarshal(*v, &typeVar)
2635				if err != nil {
2636					return err
2637				}
2638				agsc.Type = &typeVar
2639			}
2640		case "id":
2641			if v != nil {
2642				var ID string
2643				err = json.Unmarshal(*v, &ID)
2644				if err != nil {
2645					return err
2646				}
2647				agsc.ID = &ID
2648			}
2649		}
2650	}
2651
2652	return nil
2653}
2654
2655// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2656// gateway.
2657type ApplicationGatewaySslCertificatePropertiesFormat struct {
2658	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2659	Data *string `json:"data,omitempty"`
2660	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2661	Password *string `json:"password,omitempty"`
2662	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2663	PublicCertData *string `json:"publicCertData,omitempty"`
2664	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2665	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2666	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2667	ProvisioningState *string `json:"provisioningState,omitempty"`
2668}
2669
2670// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2671type ApplicationGatewaySslPolicy struct {
2672	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2673	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2674	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2675	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2676	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2677	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2678	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2679	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2680	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2681	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2682}
2683
2684// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
2685type ApplicationGatewaySslPredefinedPolicy struct {
2686	autorest.Response `json:"-"`
2687	// Name - Name of the Ssl predefined policy.
2688	Name *string `json:"name,omitempty"`
2689	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2690	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2691	// ID - Resource ID.
2692	ID *string `json:"id,omitempty"`
2693}
2694
2695// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2696func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2697	objectMap := make(map[string]interface{})
2698	if agspp.Name != nil {
2699		objectMap["name"] = agspp.Name
2700	}
2701	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2702		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2703	}
2704	if agspp.ID != nil {
2705		objectMap["id"] = agspp.ID
2706	}
2707	return json.Marshal(objectMap)
2708}
2709
2710// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2711func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2712	var m map[string]*json.RawMessage
2713	err := json.Unmarshal(body, &m)
2714	if err != nil {
2715		return err
2716	}
2717	for k, v := range m {
2718		switch k {
2719		case "name":
2720			if v != nil {
2721				var name string
2722				err = json.Unmarshal(*v, &name)
2723				if err != nil {
2724					return err
2725				}
2726				agspp.Name = &name
2727			}
2728		case "properties":
2729			if v != nil {
2730				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2731				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2732				if err != nil {
2733					return err
2734				}
2735				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2736			}
2737		case "id":
2738			if v != nil {
2739				var ID string
2740				err = json.Unmarshal(*v, &ID)
2741				if err != nil {
2742					return err
2743				}
2744				agspp.ID = &ID
2745			}
2746		}
2747	}
2748
2749	return nil
2750}
2751
2752// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2753// ApplicationGatewaySslPredefinedPolicy.
2754type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2755	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2756	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2757	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2758	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2759}
2760
2761// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2762// long-running operation.
2763type ApplicationGatewaysStartFuture struct {
2764	azure.FutureAPI
2765	// Result returns the result of the asynchronous operation.
2766	// If the operation has not completed it will return an error.
2767	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2768}
2769
2770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2771func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2772	var azFuture azure.Future
2773	if err := json.Unmarshal(body, &azFuture); err != nil {
2774		return err
2775	}
2776	future.FutureAPI = &azFuture
2777	future.Result = future.result
2778	return nil
2779}
2780
2781// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2782func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2783	var done bool
2784	done, err = future.DoneWithContext(context.Background(), client)
2785	if err != nil {
2786		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2787		return
2788	}
2789	if !done {
2790		ar.Response = future.Response()
2791		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2792		return
2793	}
2794	ar.Response = future.Response()
2795	return
2796}
2797
2798// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2799// operation.
2800type ApplicationGatewaysStopFuture struct {
2801	azure.FutureAPI
2802	// Result returns the result of the asynchronous operation.
2803	// If the operation has not completed it will return an error.
2804	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2805}
2806
2807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2808func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2809	var azFuture azure.Future
2810	if err := json.Unmarshal(body, &azFuture); err != nil {
2811		return err
2812	}
2813	future.FutureAPI = &azFuture
2814	future.Result = future.result
2815	return nil
2816}
2817
2818// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2819func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2820	var done bool
2821	done, err = future.DoneWithContext(context.Background(), client)
2822	if err != nil {
2823		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2824		return
2825	}
2826	if !done {
2827		ar.Response = future.Response()
2828		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2829		return
2830	}
2831	ar.Response = future.Response()
2832	return
2833}
2834
2835// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2836// long-running operation.
2837type ApplicationGatewaysUpdateTagsFuture struct {
2838	azure.FutureAPI
2839	// Result returns the result of the asynchronous operation.
2840	// If the operation has not completed it will return an error.
2841	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2842}
2843
2844// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2845func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2846	var azFuture azure.Future
2847	if err := json.Unmarshal(body, &azFuture); err != nil {
2848		return err
2849	}
2850	future.FutureAPI = &azFuture
2851	future.Result = future.result
2852	return nil
2853}
2854
2855// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2856func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2857	var done bool
2858	done, err = future.DoneWithContext(context.Background(), client)
2859	if err != nil {
2860		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2861		return
2862	}
2863	if !done {
2864		ag.Response.Response = future.Response()
2865		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2866		return
2867	}
2868	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2869	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2870		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2871		if err != nil {
2872			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2873		}
2874	}
2875	return
2876}
2877
2878// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2879type ApplicationGatewayTrustedRootCertificate struct {
2880	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2881	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2882	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2883	Name *string `json:"name,omitempty"`
2884	// Etag - A unique read-only string that changes whenever the resource is updated.
2885	Etag *string `json:"etag,omitempty"`
2886	// Type - Type of the resource.
2887	Type *string `json:"type,omitempty"`
2888	// ID - Resource ID.
2889	ID *string `json:"id,omitempty"`
2890}
2891
2892// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2893func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2894	objectMap := make(map[string]interface{})
2895	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2896		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2897	}
2898	if agtrc.Name != nil {
2899		objectMap["name"] = agtrc.Name
2900	}
2901	if agtrc.Etag != nil {
2902		objectMap["etag"] = agtrc.Etag
2903	}
2904	if agtrc.Type != nil {
2905		objectMap["type"] = agtrc.Type
2906	}
2907	if agtrc.ID != nil {
2908		objectMap["id"] = agtrc.ID
2909	}
2910	return json.Marshal(objectMap)
2911}
2912
2913// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2914func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2915	var m map[string]*json.RawMessage
2916	err := json.Unmarshal(body, &m)
2917	if err != nil {
2918		return err
2919	}
2920	for k, v := range m {
2921		switch k {
2922		case "properties":
2923			if v != nil {
2924				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2925				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2926				if err != nil {
2927					return err
2928				}
2929				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2930			}
2931		case "name":
2932			if v != nil {
2933				var name string
2934				err = json.Unmarshal(*v, &name)
2935				if err != nil {
2936					return err
2937				}
2938				agtrc.Name = &name
2939			}
2940		case "etag":
2941			if v != nil {
2942				var etag string
2943				err = json.Unmarshal(*v, &etag)
2944				if err != nil {
2945					return err
2946				}
2947				agtrc.Etag = &etag
2948			}
2949		case "type":
2950			if v != nil {
2951				var typeVar string
2952				err = json.Unmarshal(*v, &typeVar)
2953				if err != nil {
2954					return err
2955				}
2956				agtrc.Type = &typeVar
2957			}
2958		case "id":
2959			if v != nil {
2960				var ID string
2961				err = json.Unmarshal(*v, &ID)
2962				if err != nil {
2963					return err
2964				}
2965				agtrc.ID = &ID
2966			}
2967		}
2968	}
2969
2970	return nil
2971}
2972
2973// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2974// application gateway.
2975type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2976	// Data - Certificate public data.
2977	Data *string `json:"data,omitempty"`
2978	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2979	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2980	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2981	ProvisioningState *string `json:"provisioningState,omitempty"`
2982}
2983
2984// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2985// PathBasedRouting.
2986type ApplicationGatewayURLPathMap struct {
2987	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2988	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2989	// Name - Name of the URL path map that is unique within an Application Gateway.
2990	Name *string `json:"name,omitempty"`
2991	// Etag - A unique read-only string that changes whenever the resource is updated.
2992	Etag *string `json:"etag,omitempty"`
2993	// Type - Type of the resource.
2994	Type *string `json:"type,omitempty"`
2995	// ID - Resource ID.
2996	ID *string `json:"id,omitempty"`
2997}
2998
2999// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3000func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3001	objectMap := make(map[string]interface{})
3002	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3003		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3004	}
3005	if agupm.Name != nil {
3006		objectMap["name"] = agupm.Name
3007	}
3008	if agupm.Etag != nil {
3009		objectMap["etag"] = agupm.Etag
3010	}
3011	if agupm.Type != nil {
3012		objectMap["type"] = agupm.Type
3013	}
3014	if agupm.ID != nil {
3015		objectMap["id"] = agupm.ID
3016	}
3017	return json.Marshal(objectMap)
3018}
3019
3020// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3021func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3022	var m map[string]*json.RawMessage
3023	err := json.Unmarshal(body, &m)
3024	if err != nil {
3025		return err
3026	}
3027	for k, v := range m {
3028		switch k {
3029		case "properties":
3030			if v != nil {
3031				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3032				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3033				if err != nil {
3034					return err
3035				}
3036				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3037			}
3038		case "name":
3039			if v != nil {
3040				var name string
3041				err = json.Unmarshal(*v, &name)
3042				if err != nil {
3043					return err
3044				}
3045				agupm.Name = &name
3046			}
3047		case "etag":
3048			if v != nil {
3049				var etag string
3050				err = json.Unmarshal(*v, &etag)
3051				if err != nil {
3052					return err
3053				}
3054				agupm.Etag = &etag
3055			}
3056		case "type":
3057			if v != nil {
3058				var typeVar string
3059				err = json.Unmarshal(*v, &typeVar)
3060				if err != nil {
3061					return err
3062				}
3063				agupm.Type = &typeVar
3064			}
3065		case "id":
3066			if v != nil {
3067				var ID string
3068				err = json.Unmarshal(*v, &ID)
3069				if err != nil {
3070					return err
3071				}
3072				agupm.ID = &ID
3073			}
3074		}
3075	}
3076
3077	return nil
3078}
3079
3080// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
3081type ApplicationGatewayURLPathMapPropertiesFormat struct {
3082	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
3083	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
3084	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
3085	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
3086	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
3087	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
3088	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
3089	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
3090	// PathRules - Path rule of URL path map resource.
3091	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
3092	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3093	ProvisioningState *string `json:"provisioningState,omitempty"`
3094}
3095
3096// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
3097// configuration.
3098type ApplicationGatewayWebApplicationFirewallConfiguration struct {
3099	// Enabled - Whether the web application firewall is enabled or not.
3100	Enabled *bool `json:"enabled,omitempty"`
3101	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
3102	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
3103	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
3104	RuleSetType *string `json:"ruleSetType,omitempty"`
3105	// RuleSetVersion - The version of the rule set type.
3106	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
3107	// DisabledRuleGroups - The disabled rule groups.
3108	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
3109	// RequestBodyCheck - Whether allow WAF to check request Body.
3110	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
3111	// MaxRequestBodySize - Maximum request body size for WAF.
3112	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
3113	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
3114	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
3115	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
3116	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3117	// Exclusions - The exclusion list.
3118	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3119}
3120
3121// ApplicationSecurityGroup an application security group in a resource group.
3122type ApplicationSecurityGroup struct {
3123	autorest.Response `json:"-"`
3124	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3125	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3126	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3127	Etag *string `json:"etag,omitempty"`
3128	// ID - Resource ID.
3129	ID *string `json:"id,omitempty"`
3130	// Name - READ-ONLY; Resource name.
3131	Name *string `json:"name,omitempty"`
3132	// Type - READ-ONLY; Resource type.
3133	Type *string `json:"type,omitempty"`
3134	// Location - Resource location.
3135	Location *string `json:"location,omitempty"`
3136	// Tags - Resource tags.
3137	Tags map[string]*string `json:"tags"`
3138}
3139
3140// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3141func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3142	objectMap := make(map[string]interface{})
3143	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3144		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3145	}
3146	if asg.ID != nil {
3147		objectMap["id"] = asg.ID
3148	}
3149	if asg.Location != nil {
3150		objectMap["location"] = asg.Location
3151	}
3152	if asg.Tags != nil {
3153		objectMap["tags"] = asg.Tags
3154	}
3155	return json.Marshal(objectMap)
3156}
3157
3158// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3159func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3160	var m map[string]*json.RawMessage
3161	err := json.Unmarshal(body, &m)
3162	if err != nil {
3163		return err
3164	}
3165	for k, v := range m {
3166		switch k {
3167		case "properties":
3168			if v != nil {
3169				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3170				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3171				if err != nil {
3172					return err
3173				}
3174				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3175			}
3176		case "etag":
3177			if v != nil {
3178				var etag string
3179				err = json.Unmarshal(*v, &etag)
3180				if err != nil {
3181					return err
3182				}
3183				asg.Etag = &etag
3184			}
3185		case "id":
3186			if v != nil {
3187				var ID string
3188				err = json.Unmarshal(*v, &ID)
3189				if err != nil {
3190					return err
3191				}
3192				asg.ID = &ID
3193			}
3194		case "name":
3195			if v != nil {
3196				var name string
3197				err = json.Unmarshal(*v, &name)
3198				if err != nil {
3199					return err
3200				}
3201				asg.Name = &name
3202			}
3203		case "type":
3204			if v != nil {
3205				var typeVar string
3206				err = json.Unmarshal(*v, &typeVar)
3207				if err != nil {
3208					return err
3209				}
3210				asg.Type = &typeVar
3211			}
3212		case "location":
3213			if v != nil {
3214				var location string
3215				err = json.Unmarshal(*v, &location)
3216				if err != nil {
3217					return err
3218				}
3219				asg.Location = &location
3220			}
3221		case "tags":
3222			if v != nil {
3223				var tags map[string]*string
3224				err = json.Unmarshal(*v, &tags)
3225				if err != nil {
3226					return err
3227				}
3228				asg.Tags = tags
3229			}
3230		}
3231	}
3232
3233	return nil
3234}
3235
3236// ApplicationSecurityGroupListResult a list of application security groups.
3237type ApplicationSecurityGroupListResult struct {
3238	autorest.Response `json:"-"`
3239	// Value - A list of application security groups.
3240	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3241	// NextLink - READ-ONLY; The URL to get the next set of results.
3242	NextLink *string `json:"nextLink,omitempty"`
3243}
3244
3245// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3246func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3247	objectMap := make(map[string]interface{})
3248	if asglr.Value != nil {
3249		objectMap["value"] = asglr.Value
3250	}
3251	return json.Marshal(objectMap)
3252}
3253
3254// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3255// ApplicationSecurityGroup values.
3256type ApplicationSecurityGroupListResultIterator struct {
3257	i    int
3258	page ApplicationSecurityGroupListResultPage
3259}
3260
3261// NextWithContext advances to the next value.  If there was an error making
3262// the request the iterator does not advance and the error is returned.
3263func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3264	if tracing.IsEnabled() {
3265		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3266		defer func() {
3267			sc := -1
3268			if iter.Response().Response.Response != nil {
3269				sc = iter.Response().Response.Response.StatusCode
3270			}
3271			tracing.EndSpan(ctx, sc, err)
3272		}()
3273	}
3274	iter.i++
3275	if iter.i < len(iter.page.Values()) {
3276		return nil
3277	}
3278	err = iter.page.NextWithContext(ctx)
3279	if err != nil {
3280		iter.i--
3281		return err
3282	}
3283	iter.i = 0
3284	return nil
3285}
3286
3287// Next advances to the next value.  If there was an error making
3288// the request the iterator does not advance and the error is returned.
3289// Deprecated: Use NextWithContext() instead.
3290func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3291	return iter.NextWithContext(context.Background())
3292}
3293
3294// NotDone returns true if the enumeration should be started or is not yet complete.
3295func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3296	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3297}
3298
3299// Response returns the raw server response from the last page request.
3300func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3301	return iter.page.Response()
3302}
3303
3304// Value returns the current value or a zero-initialized value if the
3305// iterator has advanced beyond the end of the collection.
3306func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3307	if !iter.page.NotDone() {
3308		return ApplicationSecurityGroup{}
3309	}
3310	return iter.page.Values()[iter.i]
3311}
3312
3313// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3314func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3315	return ApplicationSecurityGroupListResultIterator{page: page}
3316}
3317
3318// IsEmpty returns true if the ListResult contains no values.
3319func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3320	return asglr.Value == nil || len(*asglr.Value) == 0
3321}
3322
3323// hasNextLink returns true if the NextLink is not empty.
3324func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3325	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3326}
3327
3328// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3329// It returns nil if no more results exist.
3330func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3331	if !asglr.hasNextLink() {
3332		return nil, nil
3333	}
3334	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3335		autorest.AsJSON(),
3336		autorest.AsGet(),
3337		autorest.WithBaseURL(to.String(asglr.NextLink)))
3338}
3339
3340// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3341type ApplicationSecurityGroupListResultPage struct {
3342	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3343	asglr ApplicationSecurityGroupListResult
3344}
3345
3346// NextWithContext advances to the next page of values.  If there was an error making
3347// the request the page does not advance and the error is returned.
3348func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3349	if tracing.IsEnabled() {
3350		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3351		defer func() {
3352			sc := -1
3353			if page.Response().Response.Response != nil {
3354				sc = page.Response().Response.Response.StatusCode
3355			}
3356			tracing.EndSpan(ctx, sc, err)
3357		}()
3358	}
3359	for {
3360		next, err := page.fn(ctx, page.asglr)
3361		if err != nil {
3362			return err
3363		}
3364		page.asglr = next
3365		if !next.hasNextLink() || !next.IsEmpty() {
3366			break
3367		}
3368	}
3369	return nil
3370}
3371
3372// Next advances to the next page of values.  If there was an error making
3373// the request the page does not advance and the error is returned.
3374// Deprecated: Use NextWithContext() instead.
3375func (page *ApplicationSecurityGroupListResultPage) Next() error {
3376	return page.NextWithContext(context.Background())
3377}
3378
3379// NotDone returns true if the page enumeration should be started or is not yet complete.
3380func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3381	return !page.asglr.IsEmpty()
3382}
3383
3384// Response returns the raw server response from the last page request.
3385func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3386	return page.asglr
3387}
3388
3389// Values returns the slice of values for the current page or nil if there are no values.
3390func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3391	if page.asglr.IsEmpty() {
3392		return nil
3393	}
3394	return *page.asglr.Value
3395}
3396
3397// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3398func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3399	return ApplicationSecurityGroupListResultPage{
3400		fn:    getNextPage,
3401		asglr: cur,
3402	}
3403}
3404
3405// ApplicationSecurityGroupPropertiesFormat application security group properties.
3406type ApplicationSecurityGroupPropertiesFormat struct {
3407	// 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.
3408	ResourceGUID *string `json:"resourceGuid,omitempty"`
3409	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3410	ProvisioningState *string `json:"provisioningState,omitempty"`
3411}
3412
3413// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3414func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3415	objectMap := make(map[string]interface{})
3416	return json.Marshal(objectMap)
3417}
3418
3419// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3420// of a long-running operation.
3421type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3422	azure.FutureAPI
3423	// Result returns the result of the asynchronous operation.
3424	// If the operation has not completed it will return an error.
3425	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3426}
3427
3428// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3429func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3430	var azFuture azure.Future
3431	if err := json.Unmarshal(body, &azFuture); err != nil {
3432		return err
3433	}
3434	future.FutureAPI = &azFuture
3435	future.Result = future.result
3436	return nil
3437}
3438
3439// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3440func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3441	var done bool
3442	done, err = future.DoneWithContext(context.Background(), client)
3443	if err != nil {
3444		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3445		return
3446	}
3447	if !done {
3448		asg.Response.Response = future.Response()
3449		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3450		return
3451	}
3452	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3453	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3454		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3455		if err != nil {
3456			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3457		}
3458	}
3459	return
3460}
3461
3462// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3463// long-running operation.
3464type ApplicationSecurityGroupsDeleteFuture struct {
3465	azure.FutureAPI
3466	// Result returns the result of the asynchronous operation.
3467	// If the operation has not completed it will return an error.
3468	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3469}
3470
3471// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3472func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3473	var azFuture azure.Future
3474	if err := json.Unmarshal(body, &azFuture); err != nil {
3475		return err
3476	}
3477	future.FutureAPI = &azFuture
3478	future.Result = future.result
3479	return nil
3480}
3481
3482// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3483func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3484	var done bool
3485	done, err = future.DoneWithContext(context.Background(), client)
3486	if err != nil {
3487		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3488		return
3489	}
3490	if !done {
3491		ar.Response = future.Response()
3492		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3493		return
3494	}
3495	ar.Response = future.Response()
3496	return
3497}
3498
3499// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3500// long-running operation.
3501type ApplicationSecurityGroupsUpdateTagsFuture struct {
3502	azure.FutureAPI
3503	// Result returns the result of the asynchronous operation.
3504	// If the operation has not completed it will return an error.
3505	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3506}
3507
3508// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3509func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3510	var azFuture azure.Future
3511	if err := json.Unmarshal(body, &azFuture); err != nil {
3512		return err
3513	}
3514	future.FutureAPI = &azFuture
3515	future.Result = future.result
3516	return nil
3517}
3518
3519// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3520func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3521	var done bool
3522	done, err = future.DoneWithContext(context.Background(), client)
3523	if err != nil {
3524		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3525		return
3526	}
3527	if !done {
3528		asg.Response.Response = future.Response()
3529		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3530		return
3531	}
3532	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3533	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3534		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3535		if err != nil {
3536			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3537		}
3538	}
3539	return
3540}
3541
3542// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3543// that belongs to an ExpressRouteCircuit.
3544type AuthorizationListResult struct {
3545	autorest.Response `json:"-"`
3546	// Value - The authorizations in an ExpressRoute Circuit.
3547	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3548	// NextLink - The URL to get the next set of results.
3549	NextLink *string `json:"nextLink,omitempty"`
3550}
3551
3552// AuthorizationListResultIterator provides access to a complete listing of
3553// ExpressRouteCircuitAuthorization values.
3554type AuthorizationListResultIterator struct {
3555	i    int
3556	page AuthorizationListResultPage
3557}
3558
3559// NextWithContext advances to the next value.  If there was an error making
3560// the request the iterator does not advance and the error is returned.
3561func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3562	if tracing.IsEnabled() {
3563		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3564		defer func() {
3565			sc := -1
3566			if iter.Response().Response.Response != nil {
3567				sc = iter.Response().Response.Response.StatusCode
3568			}
3569			tracing.EndSpan(ctx, sc, err)
3570		}()
3571	}
3572	iter.i++
3573	if iter.i < len(iter.page.Values()) {
3574		return nil
3575	}
3576	err = iter.page.NextWithContext(ctx)
3577	if err != nil {
3578		iter.i--
3579		return err
3580	}
3581	iter.i = 0
3582	return nil
3583}
3584
3585// Next advances to the next value.  If there was an error making
3586// the request the iterator does not advance and the error is returned.
3587// Deprecated: Use NextWithContext() instead.
3588func (iter *AuthorizationListResultIterator) Next() error {
3589	return iter.NextWithContext(context.Background())
3590}
3591
3592// NotDone returns true if the enumeration should be started or is not yet complete.
3593func (iter AuthorizationListResultIterator) NotDone() bool {
3594	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3595}
3596
3597// Response returns the raw server response from the last page request.
3598func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3599	return iter.page.Response()
3600}
3601
3602// Value returns the current value or a zero-initialized value if the
3603// iterator has advanced beyond the end of the collection.
3604func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3605	if !iter.page.NotDone() {
3606		return ExpressRouteCircuitAuthorization{}
3607	}
3608	return iter.page.Values()[iter.i]
3609}
3610
3611// Creates a new instance of the AuthorizationListResultIterator type.
3612func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3613	return AuthorizationListResultIterator{page: page}
3614}
3615
3616// IsEmpty returns true if the ListResult contains no values.
3617func (alr AuthorizationListResult) IsEmpty() bool {
3618	return alr.Value == nil || len(*alr.Value) == 0
3619}
3620
3621// hasNextLink returns true if the NextLink is not empty.
3622func (alr AuthorizationListResult) hasNextLink() bool {
3623	return alr.NextLink != nil && len(*alr.NextLink) != 0
3624}
3625
3626// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3627// It returns nil if no more results exist.
3628func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3629	if !alr.hasNextLink() {
3630		return nil, nil
3631	}
3632	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3633		autorest.AsJSON(),
3634		autorest.AsGet(),
3635		autorest.WithBaseURL(to.String(alr.NextLink)))
3636}
3637
3638// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3639type AuthorizationListResultPage struct {
3640	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3641	alr AuthorizationListResult
3642}
3643
3644// NextWithContext advances to the next page of values.  If there was an error making
3645// the request the page does not advance and the error is returned.
3646func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3647	if tracing.IsEnabled() {
3648		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3649		defer func() {
3650			sc := -1
3651			if page.Response().Response.Response != nil {
3652				sc = page.Response().Response.Response.StatusCode
3653			}
3654			tracing.EndSpan(ctx, sc, err)
3655		}()
3656	}
3657	for {
3658		next, err := page.fn(ctx, page.alr)
3659		if err != nil {
3660			return err
3661		}
3662		page.alr = next
3663		if !next.hasNextLink() || !next.IsEmpty() {
3664			break
3665		}
3666	}
3667	return nil
3668}
3669
3670// Next advances to the next page of values.  If there was an error making
3671// the request the page does not advance and the error is returned.
3672// Deprecated: Use NextWithContext() instead.
3673func (page *AuthorizationListResultPage) Next() error {
3674	return page.NextWithContext(context.Background())
3675}
3676
3677// NotDone returns true if the page enumeration should be started or is not yet complete.
3678func (page AuthorizationListResultPage) NotDone() bool {
3679	return !page.alr.IsEmpty()
3680}
3681
3682// Response returns the raw server response from the last page request.
3683func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3684	return page.alr
3685}
3686
3687// Values returns the slice of values for the current page or nil if there are no values.
3688func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3689	if page.alr.IsEmpty() {
3690		return nil
3691	}
3692	return *page.alr.Value
3693}
3694
3695// Creates a new instance of the AuthorizationListResultPage type.
3696func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3697	return AuthorizationListResultPage{
3698		fn:  getNextPage,
3699		alr: cur,
3700	}
3701}
3702
3703// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3704type AuthorizationPropertiesFormat struct {
3705	// AuthorizationKey - The authorization key.
3706	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3707	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3708	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3709	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3710	ProvisioningState *string `json:"provisioningState,omitempty"`
3711}
3712
3713// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3714type AutoApprovedPrivateLinkService struct {
3715	// PrivateLinkService - The id of the private link service resource.
3716	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3717}
3718
3719// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3720// private end point with auto approved.
3721type AutoApprovedPrivateLinkServicesResult struct {
3722	autorest.Response `json:"-"`
3723	// Value - An array of auto approved private link service.
3724	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3725	// NextLink - READ-ONLY; The URL to get the next set of results.
3726	NextLink *string `json:"nextLink,omitempty"`
3727}
3728
3729// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3730func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3731	objectMap := make(map[string]interface{})
3732	if aaplsr.Value != nil {
3733		objectMap["value"] = aaplsr.Value
3734	}
3735	return json.Marshal(objectMap)
3736}
3737
3738// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3739// AutoApprovedPrivateLinkService values.
3740type AutoApprovedPrivateLinkServicesResultIterator struct {
3741	i    int
3742	page AutoApprovedPrivateLinkServicesResultPage
3743}
3744
3745// NextWithContext advances to the next value.  If there was an error making
3746// the request the iterator does not advance and the error is returned.
3747func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3748	if tracing.IsEnabled() {
3749		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3750		defer func() {
3751			sc := -1
3752			if iter.Response().Response.Response != nil {
3753				sc = iter.Response().Response.Response.StatusCode
3754			}
3755			tracing.EndSpan(ctx, sc, err)
3756		}()
3757	}
3758	iter.i++
3759	if iter.i < len(iter.page.Values()) {
3760		return nil
3761	}
3762	err = iter.page.NextWithContext(ctx)
3763	if err != nil {
3764		iter.i--
3765		return err
3766	}
3767	iter.i = 0
3768	return nil
3769}
3770
3771// Next advances to the next value.  If there was an error making
3772// the request the iterator does not advance and the error is returned.
3773// Deprecated: Use NextWithContext() instead.
3774func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
3775	return iter.NextWithContext(context.Background())
3776}
3777
3778// NotDone returns true if the enumeration should be started or is not yet complete.
3779func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
3780	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3781}
3782
3783// Response returns the raw server response from the last page request.
3784func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
3785	return iter.page.Response()
3786}
3787
3788// Value returns the current value or a zero-initialized value if the
3789// iterator has advanced beyond the end of the collection.
3790func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
3791	if !iter.page.NotDone() {
3792		return AutoApprovedPrivateLinkService{}
3793	}
3794	return iter.page.Values()[iter.i]
3795}
3796
3797// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
3798func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
3799	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
3800}
3801
3802// IsEmpty returns true if the ListResult contains no values.
3803func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
3804	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
3805}
3806
3807// hasNextLink returns true if the NextLink is not empty.
3808func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
3809	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
3810}
3811
3812// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
3813// It returns nil if no more results exist.
3814func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
3815	if !aaplsr.hasNextLink() {
3816		return nil, nil
3817	}
3818	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3819		autorest.AsJSON(),
3820		autorest.AsGet(),
3821		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
3822}
3823
3824// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
3825type AutoApprovedPrivateLinkServicesResultPage struct {
3826	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
3827	aaplsr AutoApprovedPrivateLinkServicesResult
3828}
3829
3830// NextWithContext advances to the next page of values.  If there was an error making
3831// the request the page does not advance and the error is returned.
3832func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
3833	if tracing.IsEnabled() {
3834		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
3835		defer func() {
3836			sc := -1
3837			if page.Response().Response.Response != nil {
3838				sc = page.Response().Response.Response.StatusCode
3839			}
3840			tracing.EndSpan(ctx, sc, err)
3841		}()
3842	}
3843	for {
3844		next, err := page.fn(ctx, page.aaplsr)
3845		if err != nil {
3846			return err
3847		}
3848		page.aaplsr = next
3849		if !next.hasNextLink() || !next.IsEmpty() {
3850			break
3851		}
3852	}
3853	return nil
3854}
3855
3856// Next advances to the next page of values.  If there was an error making
3857// the request the page does not advance and the error is returned.
3858// Deprecated: Use NextWithContext() instead.
3859func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
3860	return page.NextWithContext(context.Background())
3861}
3862
3863// NotDone returns true if the page enumeration should be started or is not yet complete.
3864func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
3865	return !page.aaplsr.IsEmpty()
3866}
3867
3868// Response returns the raw server response from the last page request.
3869func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
3870	return page.aaplsr
3871}
3872
3873// Values returns the slice of values for the current page or nil if there are no values.
3874func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
3875	if page.aaplsr.IsEmpty() {
3876		return nil
3877	}
3878	return *page.aaplsr.Value
3879}
3880
3881// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
3882func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
3883	return AutoApprovedPrivateLinkServicesResultPage{
3884		fn:     getNextPage,
3885		aaplsr: cur,
3886	}
3887}
3888
3889// Availability availability of the metric.
3890type Availability struct {
3891	// TimeGrain - The time grain of the availability.
3892	TimeGrain *string `json:"timeGrain,omitempty"`
3893	// Retention - The retention of the availability.
3894	Retention *string `json:"retention,omitempty"`
3895	// BlobDuration - Duration of the availability blob.
3896	BlobDuration *string `json:"blobDuration,omitempty"`
3897}
3898
3899// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3900// subnet.
3901type AvailableDelegation struct {
3902	// Name - The name of the AvailableDelegation resource.
3903	Name *string `json:"name,omitempty"`
3904	// ID - A unique identifier of the AvailableDelegation resource.
3905	ID *string `json:"id,omitempty"`
3906	// Type - Resource type.
3907	Type *string `json:"type,omitempty"`
3908	// ServiceName - The name of the service and resource.
3909	ServiceName *string `json:"serviceName,omitempty"`
3910	// Actions - Describes the actions permitted to the service upon delegation.
3911	Actions *[]string `json:"actions,omitempty"`
3912}
3913
3914// AvailableDelegationsResult an array of available delegations.
3915type AvailableDelegationsResult struct {
3916	autorest.Response `json:"-"`
3917	// Value - An array of available delegations.
3918	Value *[]AvailableDelegation `json:"value,omitempty"`
3919	// NextLink - READ-ONLY; The URL to get the next set of results.
3920	NextLink *string `json:"nextLink,omitempty"`
3921}
3922
3923// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3924func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3925	objectMap := make(map[string]interface{})
3926	if adr.Value != nil {
3927		objectMap["value"] = adr.Value
3928	}
3929	return json.Marshal(objectMap)
3930}
3931
3932// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3933type AvailableDelegationsResultIterator struct {
3934	i    int
3935	page AvailableDelegationsResultPage
3936}
3937
3938// NextWithContext advances to the next value.  If there was an error making
3939// the request the iterator does not advance and the error is returned.
3940func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3941	if tracing.IsEnabled() {
3942		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3943		defer func() {
3944			sc := -1
3945			if iter.Response().Response.Response != nil {
3946				sc = iter.Response().Response.Response.StatusCode
3947			}
3948			tracing.EndSpan(ctx, sc, err)
3949		}()
3950	}
3951	iter.i++
3952	if iter.i < len(iter.page.Values()) {
3953		return nil
3954	}
3955	err = iter.page.NextWithContext(ctx)
3956	if err != nil {
3957		iter.i--
3958		return err
3959	}
3960	iter.i = 0
3961	return nil
3962}
3963
3964// Next advances to the next value.  If there was an error making
3965// the request the iterator does not advance and the error is returned.
3966// Deprecated: Use NextWithContext() instead.
3967func (iter *AvailableDelegationsResultIterator) Next() error {
3968	return iter.NextWithContext(context.Background())
3969}
3970
3971// NotDone returns true if the enumeration should be started or is not yet complete.
3972func (iter AvailableDelegationsResultIterator) NotDone() bool {
3973	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3974}
3975
3976// Response returns the raw server response from the last page request.
3977func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3978	return iter.page.Response()
3979}
3980
3981// Value returns the current value or a zero-initialized value if the
3982// iterator has advanced beyond the end of the collection.
3983func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3984	if !iter.page.NotDone() {
3985		return AvailableDelegation{}
3986	}
3987	return iter.page.Values()[iter.i]
3988}
3989
3990// Creates a new instance of the AvailableDelegationsResultIterator type.
3991func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3992	return AvailableDelegationsResultIterator{page: page}
3993}
3994
3995// IsEmpty returns true if the ListResult contains no values.
3996func (adr AvailableDelegationsResult) IsEmpty() bool {
3997	return adr.Value == nil || len(*adr.Value) == 0
3998}
3999
4000// hasNextLink returns true if the NextLink is not empty.
4001func (adr AvailableDelegationsResult) hasNextLink() bool {
4002	return adr.NextLink != nil && len(*adr.NextLink) != 0
4003}
4004
4005// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
4006// It returns nil if no more results exist.
4007func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
4008	if !adr.hasNextLink() {
4009		return nil, nil
4010	}
4011	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4012		autorest.AsJSON(),
4013		autorest.AsGet(),
4014		autorest.WithBaseURL(to.String(adr.NextLink)))
4015}
4016
4017// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
4018type AvailableDelegationsResultPage struct {
4019	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
4020	adr AvailableDelegationsResult
4021}
4022
4023// NextWithContext advances to the next page of values.  If there was an error making
4024// the request the page does not advance and the error is returned.
4025func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
4026	if tracing.IsEnabled() {
4027		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
4028		defer func() {
4029			sc := -1
4030			if page.Response().Response.Response != nil {
4031				sc = page.Response().Response.Response.StatusCode
4032			}
4033			tracing.EndSpan(ctx, sc, err)
4034		}()
4035	}
4036	for {
4037		next, err := page.fn(ctx, page.adr)
4038		if err != nil {
4039			return err
4040		}
4041		page.adr = next
4042		if !next.hasNextLink() || !next.IsEmpty() {
4043			break
4044		}
4045	}
4046	return nil
4047}
4048
4049// Next advances to the next page of values.  If there was an error making
4050// the request the page does not advance and the error is returned.
4051// Deprecated: Use NextWithContext() instead.
4052func (page *AvailableDelegationsResultPage) Next() error {
4053	return page.NextWithContext(context.Background())
4054}
4055
4056// NotDone returns true if the page enumeration should be started or is not yet complete.
4057func (page AvailableDelegationsResultPage) NotDone() bool {
4058	return !page.adr.IsEmpty()
4059}
4060
4061// Response returns the raw server response from the last page request.
4062func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
4063	return page.adr
4064}
4065
4066// Values returns the slice of values for the current page or nil if there are no values.
4067func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
4068	if page.adr.IsEmpty() {
4069		return nil
4070	}
4071	return *page.adr.Value
4072}
4073
4074// Creates a new instance of the AvailableDelegationsResultPage type.
4075func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
4076	return AvailableDelegationsResultPage{
4077		fn:  getNextPage,
4078		adr: cur,
4079	}
4080}
4081
4082// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
4083type AvailablePrivateEndpointType struct {
4084	// Name - The name of the service and resource.
4085	Name *string `json:"name,omitempty"`
4086	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
4087	ID *string `json:"id,omitempty"`
4088	// Type - Resource type.
4089	Type *string `json:"type,omitempty"`
4090	// ResourceName - The name of the service and resource.
4091	ResourceName *string `json:"resourceName,omitempty"`
4092}
4093
4094// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
4095type AvailablePrivateEndpointTypesResult struct {
4096	autorest.Response `json:"-"`
4097	// Value - An array of available privateEndpoint type.
4098	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
4099	// NextLink - READ-ONLY; The URL to get the next set of results.
4100	NextLink *string `json:"nextLink,omitempty"`
4101}
4102
4103// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
4104func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
4105	objectMap := make(map[string]interface{})
4106	if apetr.Value != nil {
4107		objectMap["value"] = apetr.Value
4108	}
4109	return json.Marshal(objectMap)
4110}
4111
4112// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
4113// AvailablePrivateEndpointType values.
4114type AvailablePrivateEndpointTypesResultIterator struct {
4115	i    int
4116	page AvailablePrivateEndpointTypesResultPage
4117}
4118
4119// NextWithContext advances to the next value.  If there was an error making
4120// the request the iterator does not advance and the error is returned.
4121func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
4122	if tracing.IsEnabled() {
4123		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
4124		defer func() {
4125			sc := -1
4126			if iter.Response().Response.Response != nil {
4127				sc = iter.Response().Response.Response.StatusCode
4128			}
4129			tracing.EndSpan(ctx, sc, err)
4130		}()
4131	}
4132	iter.i++
4133	if iter.i < len(iter.page.Values()) {
4134		return nil
4135	}
4136	err = iter.page.NextWithContext(ctx)
4137	if err != nil {
4138		iter.i--
4139		return err
4140	}
4141	iter.i = 0
4142	return nil
4143}
4144
4145// Next advances to the next value.  If there was an error making
4146// the request the iterator does not advance and the error is returned.
4147// Deprecated: Use NextWithContext() instead.
4148func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
4149	return iter.NextWithContext(context.Background())
4150}
4151
4152// NotDone returns true if the enumeration should be started or is not yet complete.
4153func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
4154	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4155}
4156
4157// Response returns the raw server response from the last page request.
4158func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
4159	return iter.page.Response()
4160}
4161
4162// Value returns the current value or a zero-initialized value if the
4163// iterator has advanced beyond the end of the collection.
4164func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
4165	if !iter.page.NotDone() {
4166		return AvailablePrivateEndpointType{}
4167	}
4168	return iter.page.Values()[iter.i]
4169}
4170
4171// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
4172func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
4173	return AvailablePrivateEndpointTypesResultIterator{page: page}
4174}
4175
4176// IsEmpty returns true if the ListResult contains no values.
4177func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
4178	return apetr.Value == nil || len(*apetr.Value) == 0
4179}
4180
4181// hasNextLink returns true if the NextLink is not empty.
4182func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
4183	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
4184}
4185
4186// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
4187// It returns nil if no more results exist.
4188func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
4189	if !apetr.hasNextLink() {
4190		return nil, nil
4191	}
4192	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4193		autorest.AsJSON(),
4194		autorest.AsGet(),
4195		autorest.WithBaseURL(to.String(apetr.NextLink)))
4196}
4197
4198// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
4199type AvailablePrivateEndpointTypesResultPage struct {
4200	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
4201	apetr AvailablePrivateEndpointTypesResult
4202}
4203
4204// NextWithContext advances to the next page of values.  If there was an error making
4205// the request the page does not advance and the error is returned.
4206func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
4207	if tracing.IsEnabled() {
4208		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
4209		defer func() {
4210			sc := -1
4211			if page.Response().Response.Response != nil {
4212				sc = page.Response().Response.Response.StatusCode
4213			}
4214			tracing.EndSpan(ctx, sc, err)
4215		}()
4216	}
4217	for {
4218		next, err := page.fn(ctx, page.apetr)
4219		if err != nil {
4220			return err
4221		}
4222		page.apetr = next
4223		if !next.hasNextLink() || !next.IsEmpty() {
4224			break
4225		}
4226	}
4227	return nil
4228}
4229
4230// Next advances to the next page of values.  If there was an error making
4231// the request the page does not advance and the error is returned.
4232// Deprecated: Use NextWithContext() instead.
4233func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
4234	return page.NextWithContext(context.Background())
4235}
4236
4237// NotDone returns true if the page enumeration should be started or is not yet complete.
4238func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
4239	return !page.apetr.IsEmpty()
4240}
4241
4242// Response returns the raw server response from the last page request.
4243func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4244	return page.apetr
4245}
4246
4247// Values returns the slice of values for the current page or nil if there are no values.
4248func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4249	if page.apetr.IsEmpty() {
4250		return nil
4251	}
4252	return *page.apetr.Value
4253}
4254
4255// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4256func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4257	return AvailablePrivateEndpointTypesResultPage{
4258		fn:    getNextPage,
4259		apetr: cur,
4260	}
4261}
4262
4263// AvailableProvidersList list of available countries with details.
4264type AvailableProvidersList struct {
4265	autorest.Response `json:"-"`
4266	// Countries - List of available countries.
4267	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4268}
4269
4270// AvailableProvidersListCity city or town details.
4271type AvailableProvidersListCity struct {
4272	// CityName - The city or town name.
4273	CityName *string `json:"cityName,omitempty"`
4274	// Providers - A list of Internet service providers.
4275	Providers *[]string `json:"providers,omitempty"`
4276}
4277
4278// AvailableProvidersListCountry country details.
4279type AvailableProvidersListCountry struct {
4280	// CountryName - The country name.
4281	CountryName *string `json:"countryName,omitempty"`
4282	// Providers - A list of Internet service providers.
4283	Providers *[]string `json:"providers,omitempty"`
4284	// States - List of available states in the country.
4285	States *[]AvailableProvidersListState `json:"states,omitempty"`
4286}
4287
4288// AvailableProvidersListParameters constraints that determine the list of available Internet service
4289// providers.
4290type AvailableProvidersListParameters struct {
4291	// AzureLocations - A list of Azure regions.
4292	AzureLocations *[]string `json:"azureLocations,omitempty"`
4293	// Country - The country for available providers list.
4294	Country *string `json:"country,omitempty"`
4295	// State - The state for available providers list.
4296	State *string `json:"state,omitempty"`
4297	// City - The city or town for available providers list.
4298	City *string `json:"city,omitempty"`
4299}
4300
4301// AvailableProvidersListState state details.
4302type AvailableProvidersListState struct {
4303	// StateName - The state name.
4304	StateName *string `json:"stateName,omitempty"`
4305	// Providers - A list of Internet service providers.
4306	Providers *[]string `json:"providers,omitempty"`
4307	// Cities - List of available cities or towns in the state.
4308	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4309}
4310
4311// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4312// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4313// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4314// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4315// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4316// and error information regarding the failure.
4317type AzureAsyncOperationResult struct {
4318	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4319	Status OperationStatus `json:"status,omitempty"`
4320	// Error - Details of the error occurred during specified asynchronous operation.
4321	Error *Error `json:"error,omitempty"`
4322}
4323
4324// AzureFirewall azure Firewall resource.
4325type AzureFirewall struct {
4326	autorest.Response `json:"-"`
4327	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4328	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4329	// Zones - A list of availability zones denoting where the resource needs to come from.
4330	Zones *[]string `json:"zones,omitempty"`
4331	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4332	Etag *string `json:"etag,omitempty"`
4333	// ID - Resource ID.
4334	ID *string `json:"id,omitempty"`
4335	// Name - READ-ONLY; Resource name.
4336	Name *string `json:"name,omitempty"`
4337	// Type - READ-ONLY; Resource type.
4338	Type *string `json:"type,omitempty"`
4339	// Location - Resource location.
4340	Location *string `json:"location,omitempty"`
4341	// Tags - Resource tags.
4342	Tags map[string]*string `json:"tags"`
4343}
4344
4345// MarshalJSON is the custom marshaler for AzureFirewall.
4346func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4347	objectMap := make(map[string]interface{})
4348	if af.AzureFirewallPropertiesFormat != nil {
4349		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4350	}
4351	if af.Zones != nil {
4352		objectMap["zones"] = af.Zones
4353	}
4354	if af.ID != nil {
4355		objectMap["id"] = af.ID
4356	}
4357	if af.Location != nil {
4358		objectMap["location"] = af.Location
4359	}
4360	if af.Tags != nil {
4361		objectMap["tags"] = af.Tags
4362	}
4363	return json.Marshal(objectMap)
4364}
4365
4366// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4367func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4368	var m map[string]*json.RawMessage
4369	err := json.Unmarshal(body, &m)
4370	if err != nil {
4371		return err
4372	}
4373	for k, v := range m {
4374		switch k {
4375		case "properties":
4376			if v != nil {
4377				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4378				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4379				if err != nil {
4380					return err
4381				}
4382				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4383			}
4384		case "zones":
4385			if v != nil {
4386				var zones []string
4387				err = json.Unmarshal(*v, &zones)
4388				if err != nil {
4389					return err
4390				}
4391				af.Zones = &zones
4392			}
4393		case "etag":
4394			if v != nil {
4395				var etag string
4396				err = json.Unmarshal(*v, &etag)
4397				if err != nil {
4398					return err
4399				}
4400				af.Etag = &etag
4401			}
4402		case "id":
4403			if v != nil {
4404				var ID string
4405				err = json.Unmarshal(*v, &ID)
4406				if err != nil {
4407					return err
4408				}
4409				af.ID = &ID
4410			}
4411		case "name":
4412			if v != nil {
4413				var name string
4414				err = json.Unmarshal(*v, &name)
4415				if err != nil {
4416					return err
4417				}
4418				af.Name = &name
4419			}
4420		case "type":
4421			if v != nil {
4422				var typeVar string
4423				err = json.Unmarshal(*v, &typeVar)
4424				if err != nil {
4425					return err
4426				}
4427				af.Type = &typeVar
4428			}
4429		case "location":
4430			if v != nil {
4431				var location string
4432				err = json.Unmarshal(*v, &location)
4433				if err != nil {
4434					return err
4435				}
4436				af.Location = &location
4437			}
4438		case "tags":
4439			if v != nil {
4440				var tags map[string]*string
4441				err = json.Unmarshal(*v, &tags)
4442				if err != nil {
4443					return err
4444				}
4445				af.Tags = tags
4446			}
4447		}
4448	}
4449
4450	return nil
4451}
4452
4453// AzureFirewallApplicationRule properties of an application rule.
4454type AzureFirewallApplicationRule struct {
4455	// Name - Name of the application rule.
4456	Name *string `json:"name,omitempty"`
4457	// Description - Description of the rule.
4458	Description *string `json:"description,omitempty"`
4459	// SourceAddresses - List of source IP addresses for this rule.
4460	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4461	// Protocols - Array of ApplicationRuleProtocols.
4462	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4463	// TargetFqdns - List of FQDNs for this rule.
4464	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4465	// FqdnTags - List of FQDN Tags for this rule.
4466	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4467}
4468
4469// AzureFirewallApplicationRuleCollection application rule collection resource.
4470type AzureFirewallApplicationRuleCollection struct {
4471	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4472	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4473	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4474	Name *string `json:"name,omitempty"`
4475	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4476	Etag *string `json:"etag,omitempty"`
4477	// ID - Resource ID.
4478	ID *string `json:"id,omitempty"`
4479}
4480
4481// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4482func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4483	objectMap := make(map[string]interface{})
4484	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4485		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4486	}
4487	if afarc.Name != nil {
4488		objectMap["name"] = afarc.Name
4489	}
4490	if afarc.ID != nil {
4491		objectMap["id"] = afarc.ID
4492	}
4493	return json.Marshal(objectMap)
4494}
4495
4496// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4497func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4498	var m map[string]*json.RawMessage
4499	err := json.Unmarshal(body, &m)
4500	if err != nil {
4501		return err
4502	}
4503	for k, v := range m {
4504		switch k {
4505		case "properties":
4506			if v != nil {
4507				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4508				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4509				if err != nil {
4510					return err
4511				}
4512				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4513			}
4514		case "name":
4515			if v != nil {
4516				var name string
4517				err = json.Unmarshal(*v, &name)
4518				if err != nil {
4519					return err
4520				}
4521				afarc.Name = &name
4522			}
4523		case "etag":
4524			if v != nil {
4525				var etag string
4526				err = json.Unmarshal(*v, &etag)
4527				if err != nil {
4528					return err
4529				}
4530				afarc.Etag = &etag
4531			}
4532		case "id":
4533			if v != nil {
4534				var ID string
4535				err = json.Unmarshal(*v, &ID)
4536				if err != nil {
4537					return err
4538				}
4539				afarc.ID = &ID
4540			}
4541		}
4542	}
4543
4544	return nil
4545}
4546
4547// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4548type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4549	// Priority - Priority of the application rule collection resource.
4550	Priority *int32 `json:"priority,omitempty"`
4551	// Action - The action type of a rule collection.
4552	Action *AzureFirewallRCAction `json:"action,omitempty"`
4553	// Rules - Collection of rules used by a application rule collection.
4554	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4555	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4556	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4557}
4558
4559// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4560type AzureFirewallApplicationRuleProtocol struct {
4561	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4562	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4563	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4564	Port *int32 `json:"port,omitempty"`
4565}
4566
4567// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
4568type AzureFirewallFqdnTag struct {
4569	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4570	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4571	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4572	Etag *string `json:"etag,omitempty"`
4573	// ID - Resource ID.
4574	ID *string `json:"id,omitempty"`
4575	// Name - READ-ONLY; Resource name.
4576	Name *string `json:"name,omitempty"`
4577	// Type - READ-ONLY; Resource type.
4578	Type *string `json:"type,omitempty"`
4579	// Location - Resource location.
4580	Location *string `json:"location,omitempty"`
4581	// Tags - Resource tags.
4582	Tags map[string]*string `json:"tags"`
4583}
4584
4585// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4586func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4587	objectMap := make(map[string]interface{})
4588	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4589		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4590	}
4591	if afft.ID != nil {
4592		objectMap["id"] = afft.ID
4593	}
4594	if afft.Location != nil {
4595		objectMap["location"] = afft.Location
4596	}
4597	if afft.Tags != nil {
4598		objectMap["tags"] = afft.Tags
4599	}
4600	return json.Marshal(objectMap)
4601}
4602
4603// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4604func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4605	var m map[string]*json.RawMessage
4606	err := json.Unmarshal(body, &m)
4607	if err != nil {
4608		return err
4609	}
4610	for k, v := range m {
4611		switch k {
4612		case "properties":
4613			if v != nil {
4614				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4615				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4616				if err != nil {
4617					return err
4618				}
4619				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4620			}
4621		case "etag":
4622			if v != nil {
4623				var etag string
4624				err = json.Unmarshal(*v, &etag)
4625				if err != nil {
4626					return err
4627				}
4628				afft.Etag = &etag
4629			}
4630		case "id":
4631			if v != nil {
4632				var ID string
4633				err = json.Unmarshal(*v, &ID)
4634				if err != nil {
4635					return err
4636				}
4637				afft.ID = &ID
4638			}
4639		case "name":
4640			if v != nil {
4641				var name string
4642				err = json.Unmarshal(*v, &name)
4643				if err != nil {
4644					return err
4645				}
4646				afft.Name = &name
4647			}
4648		case "type":
4649			if v != nil {
4650				var typeVar string
4651				err = json.Unmarshal(*v, &typeVar)
4652				if err != nil {
4653					return err
4654				}
4655				afft.Type = &typeVar
4656			}
4657		case "location":
4658			if v != nil {
4659				var location string
4660				err = json.Unmarshal(*v, &location)
4661				if err != nil {
4662					return err
4663				}
4664				afft.Location = &location
4665			}
4666		case "tags":
4667			if v != nil {
4668				var tags map[string]*string
4669				err = json.Unmarshal(*v, &tags)
4670				if err != nil {
4671					return err
4672				}
4673				afft.Tags = tags
4674			}
4675		}
4676	}
4677
4678	return nil
4679}
4680
4681// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4682type AzureFirewallFqdnTagListResult struct {
4683	autorest.Response `json:"-"`
4684	// Value - List of Azure Firewall FQDN Tags in a resource group.
4685	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4686	// NextLink - URL to get the next set of results.
4687	NextLink *string `json:"nextLink,omitempty"`
4688}
4689
4690// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4691// values.
4692type AzureFirewallFqdnTagListResultIterator struct {
4693	i    int
4694	page AzureFirewallFqdnTagListResultPage
4695}
4696
4697// NextWithContext advances to the next value.  If there was an error making
4698// the request the iterator does not advance and the error is returned.
4699func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4700	if tracing.IsEnabled() {
4701		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4702		defer func() {
4703			sc := -1
4704			if iter.Response().Response.Response != nil {
4705				sc = iter.Response().Response.Response.StatusCode
4706			}
4707			tracing.EndSpan(ctx, sc, err)
4708		}()
4709	}
4710	iter.i++
4711	if iter.i < len(iter.page.Values()) {
4712		return nil
4713	}
4714	err = iter.page.NextWithContext(ctx)
4715	if err != nil {
4716		iter.i--
4717		return err
4718	}
4719	iter.i = 0
4720	return nil
4721}
4722
4723// Next advances to the next value.  If there was an error making
4724// the request the iterator does not advance and the error is returned.
4725// Deprecated: Use NextWithContext() instead.
4726func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4727	return iter.NextWithContext(context.Background())
4728}
4729
4730// NotDone returns true if the enumeration should be started or is not yet complete.
4731func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4732	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4733}
4734
4735// Response returns the raw server response from the last page request.
4736func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4737	return iter.page.Response()
4738}
4739
4740// Value returns the current value or a zero-initialized value if the
4741// iterator has advanced beyond the end of the collection.
4742func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4743	if !iter.page.NotDone() {
4744		return AzureFirewallFqdnTag{}
4745	}
4746	return iter.page.Values()[iter.i]
4747}
4748
4749// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4750func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4751	return AzureFirewallFqdnTagListResultIterator{page: page}
4752}
4753
4754// IsEmpty returns true if the ListResult contains no values.
4755func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4756	return afftlr.Value == nil || len(*afftlr.Value) == 0
4757}
4758
4759// hasNextLink returns true if the NextLink is not empty.
4760func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4761	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4762}
4763
4764// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4765// It returns nil if no more results exist.
4766func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4767	if !afftlr.hasNextLink() {
4768		return nil, nil
4769	}
4770	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4771		autorest.AsJSON(),
4772		autorest.AsGet(),
4773		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4774}
4775
4776// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4777type AzureFirewallFqdnTagListResultPage struct {
4778	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4779	afftlr AzureFirewallFqdnTagListResult
4780}
4781
4782// NextWithContext advances to the next page of values.  If there was an error making
4783// the request the page does not advance and the error is returned.
4784func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4785	if tracing.IsEnabled() {
4786		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4787		defer func() {
4788			sc := -1
4789			if page.Response().Response.Response != nil {
4790				sc = page.Response().Response.Response.StatusCode
4791			}
4792			tracing.EndSpan(ctx, sc, err)
4793		}()
4794	}
4795	for {
4796		next, err := page.fn(ctx, page.afftlr)
4797		if err != nil {
4798			return err
4799		}
4800		page.afftlr = next
4801		if !next.hasNextLink() || !next.IsEmpty() {
4802			break
4803		}
4804	}
4805	return nil
4806}
4807
4808// Next advances to the next page of values.  If there was an error making
4809// the request the page does not advance and the error is returned.
4810// Deprecated: Use NextWithContext() instead.
4811func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4812	return page.NextWithContext(context.Background())
4813}
4814
4815// NotDone returns true if the page enumeration should be started or is not yet complete.
4816func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4817	return !page.afftlr.IsEmpty()
4818}
4819
4820// Response returns the raw server response from the last page request.
4821func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4822	return page.afftlr
4823}
4824
4825// Values returns the slice of values for the current page or nil if there are no values.
4826func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4827	if page.afftlr.IsEmpty() {
4828		return nil
4829	}
4830	return *page.afftlr.Value
4831}
4832
4833// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4834func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4835	return AzureFirewallFqdnTagListResultPage{
4836		fn:     getNextPage,
4837		afftlr: cur,
4838	}
4839}
4840
4841// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
4842type AzureFirewallFqdnTagPropertiesFormat struct {
4843	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4844	ProvisioningState *string `json:"provisioningState,omitempty"`
4845	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4846	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4847}
4848
4849// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4850func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4851	objectMap := make(map[string]interface{})
4852	return json.Marshal(objectMap)
4853}
4854
4855// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4856type AzureFirewallIPConfiguration struct {
4857	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4858	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4859	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4860	Name *string `json:"name,omitempty"`
4861	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4862	Etag *string `json:"etag,omitempty"`
4863	// ID - Resource ID.
4864	ID *string `json:"id,omitempty"`
4865}
4866
4867// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4868func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4869	objectMap := make(map[string]interface{})
4870	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4871		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4872	}
4873	if afic.Name != nil {
4874		objectMap["name"] = afic.Name
4875	}
4876	if afic.ID != nil {
4877		objectMap["id"] = afic.ID
4878	}
4879	return json.Marshal(objectMap)
4880}
4881
4882// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4883func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4884	var m map[string]*json.RawMessage
4885	err := json.Unmarshal(body, &m)
4886	if err != nil {
4887		return err
4888	}
4889	for k, v := range m {
4890		switch k {
4891		case "properties":
4892			if v != nil {
4893				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4894				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4895				if err != nil {
4896					return err
4897				}
4898				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4899			}
4900		case "name":
4901			if v != nil {
4902				var name string
4903				err = json.Unmarshal(*v, &name)
4904				if err != nil {
4905					return err
4906				}
4907				afic.Name = &name
4908			}
4909		case "etag":
4910			if v != nil {
4911				var etag string
4912				err = json.Unmarshal(*v, &etag)
4913				if err != nil {
4914					return err
4915				}
4916				afic.Etag = &etag
4917			}
4918		case "id":
4919			if v != nil {
4920				var ID string
4921				err = json.Unmarshal(*v, &ID)
4922				if err != nil {
4923					return err
4924				}
4925				afic.ID = &ID
4926			}
4927		}
4928	}
4929
4930	return nil
4931}
4932
4933// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4934type AzureFirewallIPConfigurationPropertiesFormat struct {
4935	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4936	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4937	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4938	Subnet *SubResource `json:"subnet,omitempty"`
4939	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4940	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4941	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4942	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4943}
4944
4945// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4946func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4947	objectMap := make(map[string]interface{})
4948	if aficpf.Subnet != nil {
4949		objectMap["subnet"] = aficpf.Subnet
4950	}
4951	if aficpf.PublicIPAddress != nil {
4952		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4953	}
4954	if aficpf.ProvisioningState != "" {
4955		objectMap["provisioningState"] = aficpf.ProvisioningState
4956	}
4957	return json.Marshal(objectMap)
4958}
4959
4960// AzureFirewallListResult response for ListAzureFirewalls API service call.
4961type AzureFirewallListResult struct {
4962	autorest.Response `json:"-"`
4963	// Value - List of Azure Firewalls in a resource group.
4964	Value *[]AzureFirewall `json:"value,omitempty"`
4965	// NextLink - URL to get the next set of results.
4966	NextLink *string `json:"nextLink,omitempty"`
4967}
4968
4969// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4970type AzureFirewallListResultIterator struct {
4971	i    int
4972	page AzureFirewallListResultPage
4973}
4974
4975// NextWithContext advances to the next value.  If there was an error making
4976// the request the iterator does not advance and the error is returned.
4977func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4978	if tracing.IsEnabled() {
4979		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4980		defer func() {
4981			sc := -1
4982			if iter.Response().Response.Response != nil {
4983				sc = iter.Response().Response.Response.StatusCode
4984			}
4985			tracing.EndSpan(ctx, sc, err)
4986		}()
4987	}
4988	iter.i++
4989	if iter.i < len(iter.page.Values()) {
4990		return nil
4991	}
4992	err = iter.page.NextWithContext(ctx)
4993	if err != nil {
4994		iter.i--
4995		return err
4996	}
4997	iter.i = 0
4998	return nil
4999}
5000
5001// Next advances to the next value.  If there was an error making
5002// the request the iterator does not advance and the error is returned.
5003// Deprecated: Use NextWithContext() instead.
5004func (iter *AzureFirewallListResultIterator) Next() error {
5005	return iter.NextWithContext(context.Background())
5006}
5007
5008// NotDone returns true if the enumeration should be started or is not yet complete.
5009func (iter AzureFirewallListResultIterator) NotDone() bool {
5010	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5011}
5012
5013// Response returns the raw server response from the last page request.
5014func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5015	return iter.page.Response()
5016}
5017
5018// Value returns the current value or a zero-initialized value if the
5019// iterator has advanced beyond the end of the collection.
5020func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5021	if !iter.page.NotDone() {
5022		return AzureFirewall{}
5023	}
5024	return iter.page.Values()[iter.i]
5025}
5026
5027// Creates a new instance of the AzureFirewallListResultIterator type.
5028func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5029	return AzureFirewallListResultIterator{page: page}
5030}
5031
5032// IsEmpty returns true if the ListResult contains no values.
5033func (aflr AzureFirewallListResult) IsEmpty() bool {
5034	return aflr.Value == nil || len(*aflr.Value) == 0
5035}
5036
5037// hasNextLink returns true if the NextLink is not empty.
5038func (aflr AzureFirewallListResult) hasNextLink() bool {
5039	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
5040}
5041
5042// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5043// It returns nil if no more results exist.
5044func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5045	if !aflr.hasNextLink() {
5046		return nil, nil
5047	}
5048	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5049		autorest.AsJSON(),
5050		autorest.AsGet(),
5051		autorest.WithBaseURL(to.String(aflr.NextLink)))
5052}
5053
5054// AzureFirewallListResultPage contains a page of AzureFirewall values.
5055type AzureFirewallListResultPage struct {
5056	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5057	aflr AzureFirewallListResult
5058}
5059
5060// NextWithContext advances to the next page of values.  If there was an error making
5061// the request the page does not advance and the error is returned.
5062func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5063	if tracing.IsEnabled() {
5064		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5065		defer func() {
5066			sc := -1
5067			if page.Response().Response.Response != nil {
5068				sc = page.Response().Response.Response.StatusCode
5069			}
5070			tracing.EndSpan(ctx, sc, err)
5071		}()
5072	}
5073	for {
5074		next, err := page.fn(ctx, page.aflr)
5075		if err != nil {
5076			return err
5077		}
5078		page.aflr = next
5079		if !next.hasNextLink() || !next.IsEmpty() {
5080			break
5081		}
5082	}
5083	return nil
5084}
5085
5086// Next advances to the next page of values.  If there was an error making
5087// the request the page does not advance and the error is returned.
5088// Deprecated: Use NextWithContext() instead.
5089func (page *AzureFirewallListResultPage) Next() error {
5090	return page.NextWithContext(context.Background())
5091}
5092
5093// NotDone returns true if the page enumeration should be started or is not yet complete.
5094func (page AzureFirewallListResultPage) NotDone() bool {
5095	return !page.aflr.IsEmpty()
5096}
5097
5098// Response returns the raw server response from the last page request.
5099func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5100	return page.aflr
5101}
5102
5103// Values returns the slice of values for the current page or nil if there are no values.
5104func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5105	if page.aflr.IsEmpty() {
5106		return nil
5107	}
5108	return *page.aflr.Value
5109}
5110
5111// Creates a new instance of the AzureFirewallListResultPage type.
5112func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5113	return AzureFirewallListResultPage{
5114		fn:   getNextPage,
5115		aflr: cur,
5116	}
5117}
5118
5119// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
5120type AzureFirewallNatRCAction struct {
5121	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
5122	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
5123}
5124
5125// AzureFirewallNatRule properties of a NAT rule.
5126type AzureFirewallNatRule struct {
5127	// Name - Name of the NAT rule.
5128	Name *string `json:"name,omitempty"`
5129	// Description - Description of the rule.
5130	Description *string `json:"description,omitempty"`
5131	// SourceAddresses - List of source IP addresses for this rule.
5132	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5133	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
5134	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5135	// DestinationPorts - List of destination ports.
5136	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5137	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
5138	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5139	// TranslatedAddress - The translated address for this NAT rule.
5140	TranslatedAddress *string `json:"translatedAddress,omitempty"`
5141	// TranslatedPort - The translated port for this NAT rule.
5142	TranslatedPort *string `json:"translatedPort,omitempty"`
5143}
5144
5145// AzureFirewallNatRuleCollection NAT rule collection resource.
5146type AzureFirewallNatRuleCollection struct {
5147	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
5148	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
5149	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5150	Name *string `json:"name,omitempty"`
5151	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5152	Etag *string `json:"etag,omitempty"`
5153	// ID - Resource ID.
5154	ID *string `json:"id,omitempty"`
5155}
5156
5157// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
5158func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
5159	objectMap := make(map[string]interface{})
5160	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
5161		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
5162	}
5163	if afnrc.Name != nil {
5164		objectMap["name"] = afnrc.Name
5165	}
5166	if afnrc.ID != nil {
5167		objectMap["id"] = afnrc.ID
5168	}
5169	return json.Marshal(objectMap)
5170}
5171
5172// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
5173func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
5174	var m map[string]*json.RawMessage
5175	err := json.Unmarshal(body, &m)
5176	if err != nil {
5177		return err
5178	}
5179	for k, v := range m {
5180		switch k {
5181		case "properties":
5182			if v != nil {
5183				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
5184				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
5185				if err != nil {
5186					return err
5187				}
5188				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
5189			}
5190		case "name":
5191			if v != nil {
5192				var name string
5193				err = json.Unmarshal(*v, &name)
5194				if err != nil {
5195					return err
5196				}
5197				afnrc.Name = &name
5198			}
5199		case "etag":
5200			if v != nil {
5201				var etag string
5202				err = json.Unmarshal(*v, &etag)
5203				if err != nil {
5204					return err
5205				}
5206				afnrc.Etag = &etag
5207			}
5208		case "id":
5209			if v != nil {
5210				var ID string
5211				err = json.Unmarshal(*v, &ID)
5212				if err != nil {
5213					return err
5214				}
5215				afnrc.ID = &ID
5216			}
5217		}
5218	}
5219
5220	return nil
5221}
5222
5223// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
5224type AzureFirewallNatRuleCollectionProperties struct {
5225	// Priority - Priority of the NAT rule collection resource.
5226	Priority *int32 `json:"priority,omitempty"`
5227	// Action - The action type of a NAT rule collection.
5228	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
5229	// Rules - Collection of rules used by a NAT rule collection.
5230	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
5231	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5232	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5233}
5234
5235// AzureFirewallNetworkRule properties of the network rule.
5236type AzureFirewallNetworkRule struct {
5237	// Name - Name of the network rule.
5238	Name *string `json:"name,omitempty"`
5239	// Description - Description of the rule.
5240	Description *string `json:"description,omitempty"`
5241	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5242	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5243	// SourceAddresses - List of source IP addresses for this rule.
5244	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5245	// DestinationAddresses - List of destination IP addresses.
5246	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5247	// DestinationPorts - List of destination ports.
5248	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5249}
5250
5251// AzureFirewallNetworkRuleCollection network rule collection resource.
5252type AzureFirewallNetworkRuleCollection struct {
5253	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5254	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5255	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5256	Name *string `json:"name,omitempty"`
5257	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5258	Etag *string `json:"etag,omitempty"`
5259	// ID - Resource ID.
5260	ID *string `json:"id,omitempty"`
5261}
5262
5263// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5264func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5265	objectMap := make(map[string]interface{})
5266	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5267		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5268	}
5269	if afnrc.Name != nil {
5270		objectMap["name"] = afnrc.Name
5271	}
5272	if afnrc.ID != nil {
5273		objectMap["id"] = afnrc.ID
5274	}
5275	return json.Marshal(objectMap)
5276}
5277
5278// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5279func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5280	var m map[string]*json.RawMessage
5281	err := json.Unmarshal(body, &m)
5282	if err != nil {
5283		return err
5284	}
5285	for k, v := range m {
5286		switch k {
5287		case "properties":
5288			if v != nil {
5289				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5290				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5291				if err != nil {
5292					return err
5293				}
5294				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5295			}
5296		case "name":
5297			if v != nil {
5298				var name string
5299				err = json.Unmarshal(*v, &name)
5300				if err != nil {
5301					return err
5302				}
5303				afnrc.Name = &name
5304			}
5305		case "etag":
5306			if v != nil {
5307				var etag string
5308				err = json.Unmarshal(*v, &etag)
5309				if err != nil {
5310					return err
5311				}
5312				afnrc.Etag = &etag
5313			}
5314		case "id":
5315			if v != nil {
5316				var ID string
5317				err = json.Unmarshal(*v, &ID)
5318				if err != nil {
5319					return err
5320				}
5321				afnrc.ID = &ID
5322			}
5323		}
5324	}
5325
5326	return nil
5327}
5328
5329// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5330type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5331	// Priority - Priority of the network rule collection resource.
5332	Priority *int32 `json:"priority,omitempty"`
5333	// Action - The action type of a rule collection.
5334	Action *AzureFirewallRCAction `json:"action,omitempty"`
5335	// Rules - Collection of rules used by a network rule collection.
5336	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5337	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5338	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5339}
5340
5341// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5342type AzureFirewallPropertiesFormat struct {
5343	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5344	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5345	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5346	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5347	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5348	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5349	// IPConfigurations - IP configuration of the Azure Firewall resource.
5350	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5351	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5352	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5353	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5354	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5355}
5356
5357// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5358type AzureFirewallRCAction struct {
5359	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5360	Type AzureFirewallRCActionType `json:"type,omitempty"`
5361}
5362
5363// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5364// long-running operation.
5365type AzureFirewallsCreateOrUpdateFuture struct {
5366	azure.FutureAPI
5367	// Result returns the result of the asynchronous operation.
5368	// If the operation has not completed it will return an error.
5369	Result func(AzureFirewallsClient) (AzureFirewall, error)
5370}
5371
5372// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5373func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5374	var azFuture azure.Future
5375	if err := json.Unmarshal(body, &azFuture); err != nil {
5376		return err
5377	}
5378	future.FutureAPI = &azFuture
5379	future.Result = future.result
5380	return nil
5381}
5382
5383// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
5384func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5385	var done bool
5386	done, err = future.DoneWithContext(context.Background(), client)
5387	if err != nil {
5388		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5389		return
5390	}
5391	if !done {
5392		af.Response.Response = future.Response()
5393		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5394		return
5395	}
5396	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5397	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5398		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5399		if err != nil {
5400			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5401		}
5402	}
5403	return
5404}
5405
5406// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5407// operation.
5408type AzureFirewallsDeleteFuture struct {
5409	azure.FutureAPI
5410	// Result returns the result of the asynchronous operation.
5411	// If the operation has not completed it will return an error.
5412	Result func(AzureFirewallsClient) (autorest.Response, error)
5413}
5414
5415// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5416func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
5417	var azFuture azure.Future
5418	if err := json.Unmarshal(body, &azFuture); err != nil {
5419		return err
5420	}
5421	future.FutureAPI = &azFuture
5422	future.Result = future.result
5423	return nil
5424}
5425
5426// result is the default implementation for AzureFirewallsDeleteFuture.Result.
5427func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5428	var done bool
5429	done, err = future.DoneWithContext(context.Background(), client)
5430	if err != nil {
5431		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5432		return
5433	}
5434	if !done {
5435		ar.Response = future.Response()
5436		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5437		return
5438	}
5439	ar.Response = future.Response()
5440	return
5441}
5442
5443// AzureReachabilityReport azure reachability report details.
5444type AzureReachabilityReport struct {
5445	autorest.Response `json:"-"`
5446	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5447	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5448	// ProviderLocation - Parameters that define a geographic location.
5449	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5450	// ReachabilityReport - List of Azure reachability report items.
5451	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5452}
5453
5454// AzureReachabilityReportItem azure reachability report details for a given provider location.
5455type AzureReachabilityReportItem struct {
5456	// Provider - The Internet service provider.
5457	Provider *string `json:"provider,omitempty"`
5458	// AzureLocation - The Azure region.
5459	AzureLocation *string `json:"azureLocation,omitempty"`
5460	// Latencies - List of latency details for each of the time series.
5461	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5462}
5463
5464// AzureReachabilityReportLatencyInfo details on latency for a time series.
5465type AzureReachabilityReportLatencyInfo struct {
5466	// TimeStamp - The time stamp.
5467	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5468	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5469	Score *int32 `json:"score,omitempty"`
5470}
5471
5472// AzureReachabilityReportLocation parameters that define a geographic location.
5473type AzureReachabilityReportLocation struct {
5474	// Country - The name of the country.
5475	Country *string `json:"country,omitempty"`
5476	// State - The name of the state.
5477	State *string `json:"state,omitempty"`
5478	// City - The name of the city or town.
5479	City *string `json:"city,omitempty"`
5480}
5481
5482// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5483type AzureReachabilityReportParameters struct {
5484	// ProviderLocation - Parameters that define a geographic location.
5485	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5486	// Providers - List of Internet service providers.
5487	Providers *[]string `json:"providers,omitempty"`
5488	// AzureLocations - Optional Azure regions to scope the query to.
5489	AzureLocations *[]string `json:"azureLocations,omitempty"`
5490	// StartTime - The start time for the Azure reachability report.
5491	StartTime *date.Time `json:"startTime,omitempty"`
5492	// EndTime - The end time for the Azure reachability report.
5493	EndTime *date.Time `json:"endTime,omitempty"`
5494}
5495
5496// BackendAddressPool pool of backend IP addresses.
5497type BackendAddressPool struct {
5498	autorest.Response `json:"-"`
5499	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5500	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5501	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5502	Name *string `json:"name,omitempty"`
5503	// Etag - A unique read-only string that changes whenever the resource is updated.
5504	Etag *string `json:"etag,omitempty"`
5505	// ID - Resource ID.
5506	ID *string `json:"id,omitempty"`
5507}
5508
5509// MarshalJSON is the custom marshaler for BackendAddressPool.
5510func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5511	objectMap := make(map[string]interface{})
5512	if bap.BackendAddressPoolPropertiesFormat != nil {
5513		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5514	}
5515	if bap.Name != nil {
5516		objectMap["name"] = bap.Name
5517	}
5518	if bap.Etag != nil {
5519		objectMap["etag"] = bap.Etag
5520	}
5521	if bap.ID != nil {
5522		objectMap["id"] = bap.ID
5523	}
5524	return json.Marshal(objectMap)
5525}
5526
5527// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5528func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5529	var m map[string]*json.RawMessage
5530	err := json.Unmarshal(body, &m)
5531	if err != nil {
5532		return err
5533	}
5534	for k, v := range m {
5535		switch k {
5536		case "properties":
5537			if v != nil {
5538				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5539				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5540				if err != nil {
5541					return err
5542				}
5543				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5544			}
5545		case "name":
5546			if v != nil {
5547				var name string
5548				err = json.Unmarshal(*v, &name)
5549				if err != nil {
5550					return err
5551				}
5552				bap.Name = &name
5553			}
5554		case "etag":
5555			if v != nil {
5556				var etag string
5557				err = json.Unmarshal(*v, &etag)
5558				if err != nil {
5559					return err
5560				}
5561				bap.Etag = &etag
5562			}
5563		case "id":
5564			if v != nil {
5565				var ID string
5566				err = json.Unmarshal(*v, &ID)
5567				if err != nil {
5568					return err
5569				}
5570				bap.ID = &ID
5571			}
5572		}
5573	}
5574
5575	return nil
5576}
5577
5578// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5579type BackendAddressPoolPropertiesFormat struct {
5580	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5581	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5582	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5583	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5584	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5585	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5586	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5587	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5588	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5589	ProvisioningState *string `json:"provisioningState,omitempty"`
5590}
5591
5592// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5593func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5594	objectMap := make(map[string]interface{})
5595	if bappf.ProvisioningState != nil {
5596		objectMap["provisioningState"] = bappf.ProvisioningState
5597	}
5598	return json.Marshal(objectMap)
5599}
5600
5601// BastionHost bastion Host resource.
5602type BastionHost struct {
5603	autorest.Response `json:"-"`
5604	// BastionHostPropertiesFormat - Represents the bastion host resource.
5605	*BastionHostPropertiesFormat `json:"properties,omitempty"`
5606	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5607	Etag *string `json:"etag,omitempty"`
5608	// ID - Resource ID.
5609	ID *string `json:"id,omitempty"`
5610	// Name - READ-ONLY; Resource name.
5611	Name *string `json:"name,omitempty"`
5612	// Type - READ-ONLY; Resource type.
5613	Type *string `json:"type,omitempty"`
5614	// Location - Resource location.
5615	Location *string `json:"location,omitempty"`
5616	// Tags - Resource tags.
5617	Tags map[string]*string `json:"tags"`
5618}
5619
5620// MarshalJSON is the custom marshaler for BastionHost.
5621func (bh BastionHost) MarshalJSON() ([]byte, error) {
5622	objectMap := make(map[string]interface{})
5623	if bh.BastionHostPropertiesFormat != nil {
5624		objectMap["properties"] = bh.BastionHostPropertiesFormat
5625	}
5626	if bh.ID != nil {
5627		objectMap["id"] = bh.ID
5628	}
5629	if bh.Location != nil {
5630		objectMap["location"] = bh.Location
5631	}
5632	if bh.Tags != nil {
5633		objectMap["tags"] = bh.Tags
5634	}
5635	return json.Marshal(objectMap)
5636}
5637
5638// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
5639func (bh *BastionHost) UnmarshalJSON(body []byte) error {
5640	var m map[string]*json.RawMessage
5641	err := json.Unmarshal(body, &m)
5642	if err != nil {
5643		return err
5644	}
5645	for k, v := range m {
5646		switch k {
5647		case "properties":
5648			if v != nil {
5649				var bastionHostPropertiesFormat BastionHostPropertiesFormat
5650				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
5651				if err != nil {
5652					return err
5653				}
5654				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
5655			}
5656		case "etag":
5657			if v != nil {
5658				var etag string
5659				err = json.Unmarshal(*v, &etag)
5660				if err != nil {
5661					return err
5662				}
5663				bh.Etag = &etag
5664			}
5665		case "id":
5666			if v != nil {
5667				var ID string
5668				err = json.Unmarshal(*v, &ID)
5669				if err != nil {
5670					return err
5671				}
5672				bh.ID = &ID
5673			}
5674		case "name":
5675			if v != nil {
5676				var name string
5677				err = json.Unmarshal(*v, &name)
5678				if err != nil {
5679					return err
5680				}
5681				bh.Name = &name
5682			}
5683		case "type":
5684			if v != nil {
5685				var typeVar string
5686				err = json.Unmarshal(*v, &typeVar)
5687				if err != nil {
5688					return err
5689				}
5690				bh.Type = &typeVar
5691			}
5692		case "location":
5693			if v != nil {
5694				var location string
5695				err = json.Unmarshal(*v, &location)
5696				if err != nil {
5697					return err
5698				}
5699				bh.Location = &location
5700			}
5701		case "tags":
5702			if v != nil {
5703				var tags map[string]*string
5704				err = json.Unmarshal(*v, &tags)
5705				if err != nil {
5706					return err
5707				}
5708				bh.Tags = tags
5709			}
5710		}
5711	}
5712
5713	return nil
5714}
5715
5716// BastionHostIPConfiguration IP configuration of an Bastion Host.
5717type BastionHostIPConfiguration struct {
5718	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
5719	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5720	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5721	Name *string `json:"name,omitempty"`
5722	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5723	Etag *string `json:"etag,omitempty"`
5724	// Type - READ-ONLY; Ip configuration type.
5725	Type *string `json:"type,omitempty"`
5726	// ID - Resource ID.
5727	ID *string `json:"id,omitempty"`
5728}
5729
5730// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
5731func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
5732	objectMap := make(map[string]interface{})
5733	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
5734		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
5735	}
5736	if bhic.Name != nil {
5737		objectMap["name"] = bhic.Name
5738	}
5739	if bhic.ID != nil {
5740		objectMap["id"] = bhic.ID
5741	}
5742	return json.Marshal(objectMap)
5743}
5744
5745// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
5746func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
5747	var m map[string]*json.RawMessage
5748	err := json.Unmarshal(body, &m)
5749	if err != nil {
5750		return err
5751	}
5752	for k, v := range m {
5753		switch k {
5754		case "properties":
5755			if v != nil {
5756				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
5757				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
5758				if err != nil {
5759					return err
5760				}
5761				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
5762			}
5763		case "name":
5764			if v != nil {
5765				var name string
5766				err = json.Unmarshal(*v, &name)
5767				if err != nil {
5768					return err
5769				}
5770				bhic.Name = &name
5771			}
5772		case "etag":
5773			if v != nil {
5774				var etag string
5775				err = json.Unmarshal(*v, &etag)
5776				if err != nil {
5777					return err
5778				}
5779				bhic.Etag = &etag
5780			}
5781		case "type":
5782			if v != nil {
5783				var typeVar string
5784				err = json.Unmarshal(*v, &typeVar)
5785				if err != nil {
5786					return err
5787				}
5788				bhic.Type = &typeVar
5789			}
5790		case "id":
5791			if v != nil {
5792				var ID string
5793				err = json.Unmarshal(*v, &ID)
5794				if err != nil {
5795					return err
5796				}
5797				bhic.ID = &ID
5798			}
5799		}
5800	}
5801
5802	return nil
5803}
5804
5805// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
5806type BastionHostIPConfigurationPropertiesFormat struct {
5807	// Subnet - Reference of the subnet resource.
5808	Subnet *SubResource `json:"subnet,omitempty"`
5809	// PublicIPAddress - Reference of the PublicIP resource.
5810	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5811	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5812	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5813	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
5814	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5815}
5816
5817// BastionHostListResult response for ListBastionHosts API service call.
5818type BastionHostListResult struct {
5819	autorest.Response `json:"-"`
5820	// Value - List of Bastion Hosts in a resource group.
5821	Value *[]BastionHost `json:"value,omitempty"`
5822	// NextLink - URL to get the next set of results.
5823	NextLink *string `json:"nextLink,omitempty"`
5824}
5825
5826// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
5827type BastionHostListResultIterator struct {
5828	i    int
5829	page BastionHostListResultPage
5830}
5831
5832// NextWithContext advances to the next value.  If there was an error making
5833// the request the iterator does not advance and the error is returned.
5834func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
5835	if tracing.IsEnabled() {
5836		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
5837		defer func() {
5838			sc := -1
5839			if iter.Response().Response.Response != nil {
5840				sc = iter.Response().Response.Response.StatusCode
5841			}
5842			tracing.EndSpan(ctx, sc, err)
5843		}()
5844	}
5845	iter.i++
5846	if iter.i < len(iter.page.Values()) {
5847		return nil
5848	}
5849	err = iter.page.NextWithContext(ctx)
5850	if err != nil {
5851		iter.i--
5852		return err
5853	}
5854	iter.i = 0
5855	return nil
5856}
5857
5858// Next advances to the next value.  If there was an error making
5859// the request the iterator does not advance and the error is returned.
5860// Deprecated: Use NextWithContext() instead.
5861func (iter *BastionHostListResultIterator) Next() error {
5862	return iter.NextWithContext(context.Background())
5863}
5864
5865// NotDone returns true if the enumeration should be started or is not yet complete.
5866func (iter BastionHostListResultIterator) NotDone() bool {
5867	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5868}
5869
5870// Response returns the raw server response from the last page request.
5871func (iter BastionHostListResultIterator) Response() BastionHostListResult {
5872	return iter.page.Response()
5873}
5874
5875// Value returns the current value or a zero-initialized value if the
5876// iterator has advanced beyond the end of the collection.
5877func (iter BastionHostListResultIterator) Value() BastionHost {
5878	if !iter.page.NotDone() {
5879		return BastionHost{}
5880	}
5881	return iter.page.Values()[iter.i]
5882}
5883
5884// Creates a new instance of the BastionHostListResultIterator type.
5885func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
5886	return BastionHostListResultIterator{page: page}
5887}
5888
5889// IsEmpty returns true if the ListResult contains no values.
5890func (bhlr BastionHostListResult) IsEmpty() bool {
5891	return bhlr.Value == nil || len(*bhlr.Value) == 0
5892}
5893
5894// hasNextLink returns true if the NextLink is not empty.
5895func (bhlr BastionHostListResult) hasNextLink() bool {
5896	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
5897}
5898
5899// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
5900// It returns nil if no more results exist.
5901func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
5902	if !bhlr.hasNextLink() {
5903		return nil, nil
5904	}
5905	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5906		autorest.AsJSON(),
5907		autorest.AsGet(),
5908		autorest.WithBaseURL(to.String(bhlr.NextLink)))
5909}
5910
5911// BastionHostListResultPage contains a page of BastionHost values.
5912type BastionHostListResultPage struct {
5913	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
5914	bhlr BastionHostListResult
5915}
5916
5917// NextWithContext advances to the next page of values.  If there was an error making
5918// the request the page does not advance and the error is returned.
5919func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
5920	if tracing.IsEnabled() {
5921		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
5922		defer func() {
5923			sc := -1
5924			if page.Response().Response.Response != nil {
5925				sc = page.Response().Response.Response.StatusCode
5926			}
5927			tracing.EndSpan(ctx, sc, err)
5928		}()
5929	}
5930	for {
5931		next, err := page.fn(ctx, page.bhlr)
5932		if err != nil {
5933			return err
5934		}
5935		page.bhlr = next
5936		if !next.hasNextLink() || !next.IsEmpty() {
5937			break
5938		}
5939	}
5940	return nil
5941}
5942
5943// Next advances to the next page of values.  If there was an error making
5944// the request the page does not advance and the error is returned.
5945// Deprecated: Use NextWithContext() instead.
5946func (page *BastionHostListResultPage) Next() error {
5947	return page.NextWithContext(context.Background())
5948}
5949
5950// NotDone returns true if the page enumeration should be started or is not yet complete.
5951func (page BastionHostListResultPage) NotDone() bool {
5952	return !page.bhlr.IsEmpty()
5953}
5954
5955// Response returns the raw server response from the last page request.
5956func (page BastionHostListResultPage) Response() BastionHostListResult {
5957	return page.bhlr
5958}
5959
5960// Values returns the slice of values for the current page or nil if there are no values.
5961func (page BastionHostListResultPage) Values() []BastionHost {
5962	if page.bhlr.IsEmpty() {
5963		return nil
5964	}
5965	return *page.bhlr.Value
5966}
5967
5968// Creates a new instance of the BastionHostListResultPage type.
5969func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
5970	return BastionHostListResultPage{
5971		fn:   getNextPage,
5972		bhlr: cur,
5973	}
5974}
5975
5976// BastionHostPropertiesFormat properties of the Bastion Host.
5977type BastionHostPropertiesFormat struct {
5978	// IPConfigurations - IP configuration of the Bastion Host resource.
5979	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
5980	// DNSName - FQDN for the endpoint on which bastion host is accessible.
5981	DNSName *string `json:"dnsName,omitempty"`
5982	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5983	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5984}
5985
5986// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5987// long-running operation.
5988type BastionHostsCreateOrUpdateFuture struct {
5989	azure.FutureAPI
5990	// Result returns the result of the asynchronous operation.
5991	// If the operation has not completed it will return an error.
5992	Result func(BastionHostsClient) (BastionHost, error)
5993}
5994
5995// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5996func (future *BastionHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5997	var azFuture azure.Future
5998	if err := json.Unmarshal(body, &azFuture); err != nil {
5999		return err
6000	}
6001	future.FutureAPI = &azFuture
6002	future.Result = future.result
6003	return nil
6004}
6005
6006// result is the default implementation for BastionHostsCreateOrUpdateFuture.Result.
6007func (future *BastionHostsCreateOrUpdateFuture) result(client BastionHostsClient) (bh BastionHost, err error) {
6008	var done bool
6009	done, err = future.DoneWithContext(context.Background(), client)
6010	if err != nil {
6011		err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6012		return
6013	}
6014	if !done {
6015		bh.Response.Response = future.Response()
6016		err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture")
6017		return
6018	}
6019	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6020	if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent {
6021		bh, err = client.CreateOrUpdateResponder(bh.Response.Response)
6022		if err != nil {
6023			err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request")
6024		}
6025	}
6026	return
6027}
6028
6029// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6030// operation.
6031type BastionHostsDeleteFuture struct {
6032	azure.FutureAPI
6033	// Result returns the result of the asynchronous operation.
6034	// If the operation has not completed it will return an error.
6035	Result func(BastionHostsClient) (autorest.Response, error)
6036}
6037
6038// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6039func (future *BastionHostsDeleteFuture) UnmarshalJSON(body []byte) error {
6040	var azFuture azure.Future
6041	if err := json.Unmarshal(body, &azFuture); err != nil {
6042		return err
6043	}
6044	future.FutureAPI = &azFuture
6045	future.Result = future.result
6046	return nil
6047}
6048
6049// result is the default implementation for BastionHostsDeleteFuture.Result.
6050func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar autorest.Response, err error) {
6051	var done bool
6052	done, err = future.DoneWithContext(context.Background(), client)
6053	if err != nil {
6054		err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure")
6055		return
6056	}
6057	if !done {
6058		ar.Response = future.Response()
6059		err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture")
6060		return
6061	}
6062	ar.Response = future.Response()
6063	return
6064}
6065
6066// BGPCommunity contains bgp community information offered in Service Community resources.
6067type BGPCommunity struct {
6068	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
6069	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
6070	// CommunityName - The name of the bgp community. e.g. Skype.
6071	CommunityName *string `json:"communityName,omitempty"`
6072	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
6073	CommunityValue *string `json:"communityValue,omitempty"`
6074	// CommunityPrefixes - The prefixes that the bgp community contains.
6075	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
6076	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
6077	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
6078	// ServiceGroup - The service group of the bgp community contains.
6079	ServiceGroup *string `json:"serviceGroup,omitempty"`
6080}
6081
6082// BgpPeerStatus BGP peer status details.
6083type BgpPeerStatus struct {
6084	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
6085	LocalAddress *string `json:"localAddress,omitempty"`
6086	// Neighbor - READ-ONLY; The remote BGP peer.
6087	Neighbor *string `json:"neighbor,omitempty"`
6088	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
6089	Asn *int32 `json:"asn,omitempty"`
6090	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
6091	State BgpPeerState `json:"state,omitempty"`
6092	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
6093	ConnectedDuration *string `json:"connectedDuration,omitempty"`
6094	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
6095	RoutesReceived *int64 `json:"routesReceived,omitempty"`
6096	// MessagesSent - READ-ONLY; The number of BGP messages sent.
6097	MessagesSent *int64 `json:"messagesSent,omitempty"`
6098	// MessagesReceived - READ-ONLY; The number of BGP messages received.
6099	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
6100}
6101
6102// MarshalJSON is the custom marshaler for BgpPeerStatus.
6103func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
6104	objectMap := make(map[string]interface{})
6105	return json.Marshal(objectMap)
6106}
6107
6108// BgpPeerStatusListResult response for list BGP peer status API service call.
6109type BgpPeerStatusListResult struct {
6110	autorest.Response `json:"-"`
6111	// Value - List of BGP peers.
6112	Value *[]BgpPeerStatus `json:"value,omitempty"`
6113}
6114
6115// BgpServiceCommunity service Community Properties.
6116type BgpServiceCommunity struct {
6117	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
6118	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
6119	// ID - Resource ID.
6120	ID *string `json:"id,omitempty"`
6121	// Name - READ-ONLY; Resource name.
6122	Name *string `json:"name,omitempty"`
6123	// Type - READ-ONLY; Resource type.
6124	Type *string `json:"type,omitempty"`
6125	// Location - Resource location.
6126	Location *string `json:"location,omitempty"`
6127	// Tags - Resource tags.
6128	Tags map[string]*string `json:"tags"`
6129}
6130
6131// MarshalJSON is the custom marshaler for BgpServiceCommunity.
6132func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
6133	objectMap := make(map[string]interface{})
6134	if bsc.BgpServiceCommunityPropertiesFormat != nil {
6135		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
6136	}
6137	if bsc.ID != nil {
6138		objectMap["id"] = bsc.ID
6139	}
6140	if bsc.Location != nil {
6141		objectMap["location"] = bsc.Location
6142	}
6143	if bsc.Tags != nil {
6144		objectMap["tags"] = bsc.Tags
6145	}
6146	return json.Marshal(objectMap)
6147}
6148
6149// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
6150func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
6151	var m map[string]*json.RawMessage
6152	err := json.Unmarshal(body, &m)
6153	if err != nil {
6154		return err
6155	}
6156	for k, v := range m {
6157		switch k {
6158		case "properties":
6159			if v != nil {
6160				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
6161				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
6162				if err != nil {
6163					return err
6164				}
6165				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
6166			}
6167		case "id":
6168			if v != nil {
6169				var ID string
6170				err = json.Unmarshal(*v, &ID)
6171				if err != nil {
6172					return err
6173				}
6174				bsc.ID = &ID
6175			}
6176		case "name":
6177			if v != nil {
6178				var name string
6179				err = json.Unmarshal(*v, &name)
6180				if err != nil {
6181					return err
6182				}
6183				bsc.Name = &name
6184			}
6185		case "type":
6186			if v != nil {
6187				var typeVar string
6188				err = json.Unmarshal(*v, &typeVar)
6189				if err != nil {
6190					return err
6191				}
6192				bsc.Type = &typeVar
6193			}
6194		case "location":
6195			if v != nil {
6196				var location string
6197				err = json.Unmarshal(*v, &location)
6198				if err != nil {
6199					return err
6200				}
6201				bsc.Location = &location
6202			}
6203		case "tags":
6204			if v != nil {
6205				var tags map[string]*string
6206				err = json.Unmarshal(*v, &tags)
6207				if err != nil {
6208					return err
6209				}
6210				bsc.Tags = tags
6211			}
6212		}
6213	}
6214
6215	return nil
6216}
6217
6218// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
6219type BgpServiceCommunityListResult struct {
6220	autorest.Response `json:"-"`
6221	// Value - A list of service community resources.
6222	Value *[]BgpServiceCommunity `json:"value,omitempty"`
6223	// NextLink - The URL to get the next set of results.
6224	NextLink *string `json:"nextLink,omitempty"`
6225}
6226
6227// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
6228// values.
6229type BgpServiceCommunityListResultIterator struct {
6230	i    int
6231	page BgpServiceCommunityListResultPage
6232}
6233
6234// NextWithContext advances to the next value.  If there was an error making
6235// the request the iterator does not advance and the error is returned.
6236func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
6237	if tracing.IsEnabled() {
6238		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
6239		defer func() {
6240			sc := -1
6241			if iter.Response().Response.Response != nil {
6242				sc = iter.Response().Response.Response.StatusCode
6243			}
6244			tracing.EndSpan(ctx, sc, err)
6245		}()
6246	}
6247	iter.i++
6248	if iter.i < len(iter.page.Values()) {
6249		return nil
6250	}
6251	err = iter.page.NextWithContext(ctx)
6252	if err != nil {
6253		iter.i--
6254		return err
6255	}
6256	iter.i = 0
6257	return nil
6258}
6259
6260// Next advances to the next value.  If there was an error making
6261// the request the iterator does not advance and the error is returned.
6262// Deprecated: Use NextWithContext() instead.
6263func (iter *BgpServiceCommunityListResultIterator) Next() error {
6264	return iter.NextWithContext(context.Background())
6265}
6266
6267// NotDone returns true if the enumeration should be started or is not yet complete.
6268func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
6269	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6270}
6271
6272// Response returns the raw server response from the last page request.
6273func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
6274	return iter.page.Response()
6275}
6276
6277// Value returns the current value or a zero-initialized value if the
6278// iterator has advanced beyond the end of the collection.
6279func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
6280	if !iter.page.NotDone() {
6281		return BgpServiceCommunity{}
6282	}
6283	return iter.page.Values()[iter.i]
6284}
6285
6286// Creates a new instance of the BgpServiceCommunityListResultIterator type.
6287func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
6288	return BgpServiceCommunityListResultIterator{page: page}
6289}
6290
6291// IsEmpty returns true if the ListResult contains no values.
6292func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
6293	return bsclr.Value == nil || len(*bsclr.Value) == 0
6294}
6295
6296// hasNextLink returns true if the NextLink is not empty.
6297func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
6298	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
6299}
6300
6301// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
6302// It returns nil if no more results exist.
6303func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
6304	if !bsclr.hasNextLink() {
6305		return nil, nil
6306	}
6307	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6308		autorest.AsJSON(),
6309		autorest.AsGet(),
6310		autorest.WithBaseURL(to.String(bsclr.NextLink)))
6311}
6312
6313// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
6314type BgpServiceCommunityListResultPage struct {
6315	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
6316	bsclr BgpServiceCommunityListResult
6317}
6318
6319// NextWithContext advances to the next page of values.  If there was an error making
6320// the request the page does not advance and the error is returned.
6321func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
6322	if tracing.IsEnabled() {
6323		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
6324		defer func() {
6325			sc := -1
6326			if page.Response().Response.Response != nil {
6327				sc = page.Response().Response.Response.StatusCode
6328			}
6329			tracing.EndSpan(ctx, sc, err)
6330		}()
6331	}
6332	for {
6333		next, err := page.fn(ctx, page.bsclr)
6334		if err != nil {
6335			return err
6336		}
6337		page.bsclr = next
6338		if !next.hasNextLink() || !next.IsEmpty() {
6339			break
6340		}
6341	}
6342	return nil
6343}
6344
6345// Next advances to the next page of values.  If there was an error making
6346// the request the page does not advance and the error is returned.
6347// Deprecated: Use NextWithContext() instead.
6348func (page *BgpServiceCommunityListResultPage) Next() error {
6349	return page.NextWithContext(context.Background())
6350}
6351
6352// NotDone returns true if the page enumeration should be started or is not yet complete.
6353func (page BgpServiceCommunityListResultPage) NotDone() bool {
6354	return !page.bsclr.IsEmpty()
6355}
6356
6357// Response returns the raw server response from the last page request.
6358func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
6359	return page.bsclr
6360}
6361
6362// Values returns the slice of values for the current page or nil if there are no values.
6363func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
6364	if page.bsclr.IsEmpty() {
6365		return nil
6366	}
6367	return *page.bsclr.Value
6368}
6369
6370// Creates a new instance of the BgpServiceCommunityListResultPage type.
6371func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
6372	return BgpServiceCommunityListResultPage{
6373		fn:    getNextPage,
6374		bsclr: cur,
6375	}
6376}
6377
6378// BgpServiceCommunityPropertiesFormat properties of Service Community.
6379type BgpServiceCommunityPropertiesFormat struct {
6380	// ServiceName - The name of the bgp community. e.g. Skype.
6381	ServiceName *string `json:"serviceName,omitempty"`
6382	// BgpCommunities - Get a list of bgp communities.
6383	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
6384}
6385
6386// BgpSettings BGP settings details.
6387type BgpSettings struct {
6388	// Asn - The BGP speaker's ASN.
6389	Asn *int64 `json:"asn,omitempty"`
6390	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
6391	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
6392	// PeerWeight - The weight added to routes learned from this BGP speaker.
6393	PeerWeight *int32 `json:"peerWeight,omitempty"`
6394}
6395
6396// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
6397// service call.
6398type CheckPrivateLinkServiceVisibilityRequest struct {
6399	// PrivateLinkServiceAlias - The alias of the private link service.
6400	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
6401}
6402
6403// CloudError an error response from the Batch service.
6404type CloudError struct {
6405	// Error - Cloud error body.
6406	Error *CloudErrorBody `json:"error,omitempty"`
6407}
6408
6409// CloudErrorBody an error response from the Batch service.
6410type CloudErrorBody struct {
6411	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
6412	Code *string `json:"code,omitempty"`
6413	// Message - A message describing the error, intended to be suitable for display in a user interface.
6414	Message *string `json:"message,omitempty"`
6415	// Target - The target of the particular error. For example, the name of the property in error.
6416	Target *string `json:"target,omitempty"`
6417	// Details - A list of additional details about the error.
6418	Details *[]CloudErrorBody `json:"details,omitempty"`
6419}
6420
6421// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
6422type ConfigurationDiagnosticParameters struct {
6423	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
6424	TargetResourceID *string `json:"targetResourceId,omitempty"`
6425	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
6426	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
6427	// Profiles - List of network configuration diagnostic profiles.
6428	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
6429}
6430
6431// ConfigurationDiagnosticProfile parameters to compare with network configuration.
6432type ConfigurationDiagnosticProfile struct {
6433	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
6434	Direction Direction `json:"direction,omitempty"`
6435	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
6436	Protocol *string `json:"protocol,omitempty"`
6437	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
6438	Source *string `json:"source,omitempty"`
6439	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
6440	Destination *string `json:"destination,omitempty"`
6441	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
6442	DestinationPort *string `json:"destinationPort,omitempty"`
6443}
6444
6445// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
6446type ConfigurationDiagnosticResponse struct {
6447	autorest.Response `json:"-"`
6448	// Results - READ-ONLY; List of network configuration diagnostic results.
6449	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
6450}
6451
6452// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
6453func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
6454	objectMap := make(map[string]interface{})
6455	return json.Marshal(objectMap)
6456}
6457
6458// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
6459// query.
6460type ConfigurationDiagnosticResult struct {
6461	// Profile - Network configuration diagnostic profile.
6462	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
6463	// NetworkSecurityGroupResult - Network security group result.
6464	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
6465}
6466
6467// ConnectionMonitor parameters that define the operation to create a connection monitor.
6468type ConnectionMonitor struct {
6469	// Location - Connection monitor location.
6470	Location *string `json:"location,omitempty"`
6471	// Tags - Connection monitor tags.
6472	Tags map[string]*string `json:"tags"`
6473	// ConnectionMonitorParameters - Properties of the connection monitor.
6474	*ConnectionMonitorParameters `json:"properties,omitempty"`
6475}
6476
6477// MarshalJSON is the custom marshaler for ConnectionMonitor.
6478func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
6479	objectMap := make(map[string]interface{})
6480	if cm.Location != nil {
6481		objectMap["location"] = cm.Location
6482	}
6483	if cm.Tags != nil {
6484		objectMap["tags"] = cm.Tags
6485	}
6486	if cm.ConnectionMonitorParameters != nil {
6487		objectMap["properties"] = cm.ConnectionMonitorParameters
6488	}
6489	return json.Marshal(objectMap)
6490}
6491
6492// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
6493func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
6494	var m map[string]*json.RawMessage
6495	err := json.Unmarshal(body, &m)
6496	if err != nil {
6497		return err
6498	}
6499	for k, v := range m {
6500		switch k {
6501		case "location":
6502			if v != nil {
6503				var location string
6504				err = json.Unmarshal(*v, &location)
6505				if err != nil {
6506					return err
6507				}
6508				cm.Location = &location
6509			}
6510		case "tags":
6511			if v != nil {
6512				var tags map[string]*string
6513				err = json.Unmarshal(*v, &tags)
6514				if err != nil {
6515					return err
6516				}
6517				cm.Tags = tags
6518			}
6519		case "properties":
6520			if v != nil {
6521				var connectionMonitorParameters ConnectionMonitorParameters
6522				err = json.Unmarshal(*v, &connectionMonitorParameters)
6523				if err != nil {
6524					return err
6525				}
6526				cm.ConnectionMonitorParameters = &connectionMonitorParameters
6527			}
6528		}
6529	}
6530
6531	return nil
6532}
6533
6534// ConnectionMonitorDestination describes the destination of connection monitor.
6535type ConnectionMonitorDestination struct {
6536	// ResourceID - The ID of the resource used as the destination by connection monitor.
6537	ResourceID *string `json:"resourceId,omitempty"`
6538	// Address - Address of the connection monitor destination (IP or domain name).
6539	Address *string `json:"address,omitempty"`
6540	// Port - The destination port used by connection monitor.
6541	Port *int32 `json:"port,omitempty"`
6542}
6543
6544// ConnectionMonitorListResult list of connection monitors.
6545type ConnectionMonitorListResult struct {
6546	autorest.Response `json:"-"`
6547	// Value - Information about connection monitors.
6548	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
6549}
6550
6551// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
6552type ConnectionMonitorParameters struct {
6553	// Source - Describes the source of connection monitor.
6554	Source *ConnectionMonitorSource `json:"source,omitempty"`
6555	// Destination - Describes the destination of connection monitor.
6556	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6557	// AutoStart - Determines if the connection monitor will start automatically once created.
6558	AutoStart *bool `json:"autoStart,omitempty"`
6559	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6560	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6561}
6562
6563// ConnectionMonitorQueryResult list of connection states snapshots.
6564type ConnectionMonitorQueryResult struct {
6565	autorest.Response `json:"-"`
6566	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
6567	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
6568	// States - Information about connection states.
6569	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
6570}
6571
6572// ConnectionMonitorResult information about the connection monitor.
6573type ConnectionMonitorResult struct {
6574	autorest.Response `json:"-"`
6575	// Name - READ-ONLY; Name of the connection monitor.
6576	Name *string `json:"name,omitempty"`
6577	// ID - READ-ONLY; ID of the connection monitor.
6578	ID *string `json:"id,omitempty"`
6579	// Etag - A unique read-only string that changes whenever the resource is updated.
6580	Etag *string `json:"etag,omitempty"`
6581	// Type - READ-ONLY; Connection monitor type.
6582	Type *string `json:"type,omitempty"`
6583	// Location - Connection monitor location.
6584	Location *string `json:"location,omitempty"`
6585	// Tags - Connection monitor tags.
6586	Tags map[string]*string `json:"tags"`
6587	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
6588	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
6589}
6590
6591// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
6592func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
6593	objectMap := make(map[string]interface{})
6594	if cmr.Etag != nil {
6595		objectMap["etag"] = cmr.Etag
6596	}
6597	if cmr.Location != nil {
6598		objectMap["location"] = cmr.Location
6599	}
6600	if cmr.Tags != nil {
6601		objectMap["tags"] = cmr.Tags
6602	}
6603	if cmr.ConnectionMonitorResultProperties != nil {
6604		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
6605	}
6606	return json.Marshal(objectMap)
6607}
6608
6609// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
6610func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
6611	var m map[string]*json.RawMessage
6612	err := json.Unmarshal(body, &m)
6613	if err != nil {
6614		return err
6615	}
6616	for k, v := range m {
6617		switch k {
6618		case "name":
6619			if v != nil {
6620				var name string
6621				err = json.Unmarshal(*v, &name)
6622				if err != nil {
6623					return err
6624				}
6625				cmr.Name = &name
6626			}
6627		case "id":
6628			if v != nil {
6629				var ID string
6630				err = json.Unmarshal(*v, &ID)
6631				if err != nil {
6632					return err
6633				}
6634				cmr.ID = &ID
6635			}
6636		case "etag":
6637			if v != nil {
6638				var etag string
6639				err = json.Unmarshal(*v, &etag)
6640				if err != nil {
6641					return err
6642				}
6643				cmr.Etag = &etag
6644			}
6645		case "type":
6646			if v != nil {
6647				var typeVar string
6648				err = json.Unmarshal(*v, &typeVar)
6649				if err != nil {
6650					return err
6651				}
6652				cmr.Type = &typeVar
6653			}
6654		case "location":
6655			if v != nil {
6656				var location string
6657				err = json.Unmarshal(*v, &location)
6658				if err != nil {
6659					return err
6660				}
6661				cmr.Location = &location
6662			}
6663		case "tags":
6664			if v != nil {
6665				var tags map[string]*string
6666				err = json.Unmarshal(*v, &tags)
6667				if err != nil {
6668					return err
6669				}
6670				cmr.Tags = tags
6671			}
6672		case "properties":
6673			if v != nil {
6674				var connectionMonitorResultProperties ConnectionMonitorResultProperties
6675				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
6676				if err != nil {
6677					return err
6678				}
6679				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
6680			}
6681		}
6682	}
6683
6684	return nil
6685}
6686
6687// ConnectionMonitorResultProperties describes the properties of a connection monitor.
6688type ConnectionMonitorResultProperties struct {
6689	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6690	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6691	// StartTime - The date and time when the connection monitor was started.
6692	StartTime *date.Time `json:"startTime,omitempty"`
6693	// MonitoringStatus - The monitoring status of the connection monitor.
6694	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
6695	// Source - Describes the source of connection monitor.
6696	Source *ConnectionMonitorSource `json:"source,omitempty"`
6697	// Destination - Describes the destination of connection monitor.
6698	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6699	// AutoStart - Determines if the connection monitor will start automatically once created.
6700	AutoStart *bool `json:"autoStart,omitempty"`
6701	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6702	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6703}
6704
6705// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6706// long-running operation.
6707type ConnectionMonitorsCreateOrUpdateFuture struct {
6708	azure.FutureAPI
6709	// Result returns the result of the asynchronous operation.
6710	// If the operation has not completed it will return an error.
6711	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
6712}
6713
6714// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6715func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6716	var azFuture azure.Future
6717	if err := json.Unmarshal(body, &azFuture); err != nil {
6718		return err
6719	}
6720	future.FutureAPI = &azFuture
6721	future.Result = future.result
6722	return nil
6723}
6724
6725// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
6726func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
6727	var done bool
6728	done, err = future.DoneWithContext(context.Background(), client)
6729	if err != nil {
6730		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6731		return
6732	}
6733	if !done {
6734		cmr.Response.Response = future.Response()
6735		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
6736		return
6737	}
6738	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6739	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
6740		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
6741		if err != nil {
6742			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
6743		}
6744	}
6745	return
6746}
6747
6748// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6749// long-running operation.
6750type ConnectionMonitorsDeleteFuture struct {
6751	azure.FutureAPI
6752	// Result returns the result of the asynchronous operation.
6753	// If the operation has not completed it will return an error.
6754	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6755}
6756
6757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6758func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
6759	var azFuture azure.Future
6760	if err := json.Unmarshal(body, &azFuture); err != nil {
6761		return err
6762	}
6763	future.FutureAPI = &azFuture
6764	future.Result = future.result
6765	return nil
6766}
6767
6768// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
6769func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6770	var done bool
6771	done, err = future.DoneWithContext(context.Background(), client)
6772	if err != nil {
6773		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
6774		return
6775	}
6776	if !done {
6777		ar.Response = future.Response()
6778		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
6779		return
6780	}
6781	ar.Response = future.Response()
6782	return
6783}
6784
6785// ConnectionMonitorSource describes the source of connection monitor.
6786type ConnectionMonitorSource struct {
6787	// ResourceID - The ID of the resource used as the source by connection monitor.
6788	ResourceID *string `json:"resourceId,omitempty"`
6789	// Port - The source port used by connection monitor.
6790	Port *int32 `json:"port,omitempty"`
6791}
6792
6793// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
6794// operation.
6795type ConnectionMonitorsQueryFuture struct {
6796	azure.FutureAPI
6797	// Result returns the result of the asynchronous operation.
6798	// If the operation has not completed it will return an error.
6799	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
6800}
6801
6802// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6803func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
6804	var azFuture azure.Future
6805	if err := json.Unmarshal(body, &azFuture); err != nil {
6806		return err
6807	}
6808	future.FutureAPI = &azFuture
6809	future.Result = future.result
6810	return nil
6811}
6812
6813// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
6814func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
6815	var done bool
6816	done, err = future.DoneWithContext(context.Background(), client)
6817	if err != nil {
6818		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
6819		return
6820	}
6821	if !done {
6822		cmqr.Response.Response = future.Response()
6823		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
6824		return
6825	}
6826	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6827	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
6828		cmqr, err = client.QueryResponder(cmqr.Response.Response)
6829		if err != nil {
6830			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
6831		}
6832	}
6833	return
6834}
6835
6836// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
6837// operation.
6838type ConnectionMonitorsStartFuture struct {
6839	azure.FutureAPI
6840	// Result returns the result of the asynchronous operation.
6841	// If the operation has not completed it will return an error.
6842	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6843}
6844
6845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6846func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
6847	var azFuture azure.Future
6848	if err := json.Unmarshal(body, &azFuture); err != nil {
6849		return err
6850	}
6851	future.FutureAPI = &azFuture
6852	future.Result = future.result
6853	return nil
6854}
6855
6856// result is the default implementation for ConnectionMonitorsStartFuture.Result.
6857func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6858	var done bool
6859	done, err = future.DoneWithContext(context.Background(), client)
6860	if err != nil {
6861		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
6862		return
6863	}
6864	if !done {
6865		ar.Response = future.Response()
6866		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
6867		return
6868	}
6869	ar.Response = future.Response()
6870	return
6871}
6872
6873// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
6874// operation.
6875type ConnectionMonitorsStopFuture struct {
6876	azure.FutureAPI
6877	// Result returns the result of the asynchronous operation.
6878	// If the operation has not completed it will return an error.
6879	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6880}
6881
6882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6883func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
6884	var azFuture azure.Future
6885	if err := json.Unmarshal(body, &azFuture); err != nil {
6886		return err
6887	}
6888	future.FutureAPI = &azFuture
6889	future.Result = future.result
6890	return nil
6891}
6892
6893// result is the default implementation for ConnectionMonitorsStopFuture.Result.
6894func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6895	var done bool
6896	done, err = future.DoneWithContext(context.Background(), client)
6897	if err != nil {
6898		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
6899		return
6900	}
6901	if !done {
6902		ar.Response = future.Response()
6903		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
6904		return
6905	}
6906	ar.Response = future.Response()
6907	return
6908}
6909
6910// ConnectionResetSharedKey the virtual network connection reset shared key.
6911type ConnectionResetSharedKey struct {
6912	autorest.Response `json:"-"`
6913	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
6914	KeyLength *int32 `json:"keyLength,omitempty"`
6915}
6916
6917// ConnectionSharedKey response for GetConnectionSharedKey API service call.
6918type ConnectionSharedKey struct {
6919	autorest.Response `json:"-"`
6920	// Value - The virtual network connection shared key value.
6921	Value *string `json:"value,omitempty"`
6922	// ID - Resource ID.
6923	ID *string `json:"id,omitempty"`
6924}
6925
6926// ConnectionStateSnapshot connection state snapshot.
6927type ConnectionStateSnapshot struct {
6928	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
6929	ConnectionState ConnectionState `json:"connectionState,omitempty"`
6930	// StartTime - The start time of the connection snapshot.
6931	StartTime *date.Time `json:"startTime,omitempty"`
6932	// EndTime - The end time of the connection snapshot.
6933	EndTime *date.Time `json:"endTime,omitempty"`
6934	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
6935	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
6936	// AvgLatencyInMs - Average latency in ms.
6937	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6938	// MinLatencyInMs - Minimum latency in ms.
6939	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6940	// MaxLatencyInMs - Maximum latency in ms.
6941	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6942	// ProbesSent - The number of sent probes.
6943	ProbesSent *int32 `json:"probesSent,omitempty"`
6944	// ProbesFailed - The number of failed probes.
6945	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6946	// Hops - READ-ONLY; List of hops between the source and the destination.
6947	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6948}
6949
6950// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
6951func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
6952	objectMap := make(map[string]interface{})
6953	if CSS.ConnectionState != "" {
6954		objectMap["connectionState"] = CSS.ConnectionState
6955	}
6956	if CSS.StartTime != nil {
6957		objectMap["startTime"] = CSS.StartTime
6958	}
6959	if CSS.EndTime != nil {
6960		objectMap["endTime"] = CSS.EndTime
6961	}
6962	if CSS.EvaluationState != "" {
6963		objectMap["evaluationState"] = CSS.EvaluationState
6964	}
6965	if CSS.AvgLatencyInMs != nil {
6966		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
6967	}
6968	if CSS.MinLatencyInMs != nil {
6969		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
6970	}
6971	if CSS.MaxLatencyInMs != nil {
6972		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
6973	}
6974	if CSS.ProbesSent != nil {
6975		objectMap["probesSent"] = CSS.ProbesSent
6976	}
6977	if CSS.ProbesFailed != nil {
6978		objectMap["probesFailed"] = CSS.ProbesFailed
6979	}
6980	return json.Marshal(objectMap)
6981}
6982
6983// ConnectivityDestination parameters that define destination of connection.
6984type ConnectivityDestination struct {
6985	// ResourceID - The ID of the resource to which a connection attempt will be made.
6986	ResourceID *string `json:"resourceId,omitempty"`
6987	// Address - The IP address or URI the resource to which a connection attempt will be made.
6988	Address *string `json:"address,omitempty"`
6989	// Port - Port on which check connectivity will be performed.
6990	Port *int32 `json:"port,omitempty"`
6991}
6992
6993// ConnectivityHop information about a hop between the source and the destination.
6994type ConnectivityHop struct {
6995	// Type - READ-ONLY; The type of the hop.
6996	Type *string `json:"type,omitempty"`
6997	// ID - READ-ONLY; The ID of the hop.
6998	ID *string `json:"id,omitempty"`
6999	// Address - READ-ONLY; The IP address of the hop.
7000	Address *string `json:"address,omitempty"`
7001	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
7002	ResourceID *string `json:"resourceId,omitempty"`
7003	// NextHopIds - READ-ONLY; List of next hop identifiers.
7004	NextHopIds *[]string `json:"nextHopIds,omitempty"`
7005	// Issues - READ-ONLY; List of issues.
7006	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
7007}
7008
7009// MarshalJSON is the custom marshaler for ConnectivityHop.
7010func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
7011	objectMap := make(map[string]interface{})
7012	return json.Marshal(objectMap)
7013}
7014
7015// ConnectivityInformation information on the connectivity status.
7016type ConnectivityInformation struct {
7017	autorest.Response `json:"-"`
7018	// Hops - READ-ONLY; List of hops between the source and the destination.
7019	Hops *[]ConnectivityHop `json:"hops,omitempty"`
7020	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
7021	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
7022	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
7023	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
7024	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
7025	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
7026	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
7027	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
7028	// ProbesSent - READ-ONLY; Total number of probes sent.
7029	ProbesSent *int32 `json:"probesSent,omitempty"`
7030	// ProbesFailed - READ-ONLY; Number of failed probes.
7031	ProbesFailed *int32 `json:"probesFailed,omitempty"`
7032}
7033
7034// MarshalJSON is the custom marshaler for ConnectivityInformation.
7035func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
7036	objectMap := make(map[string]interface{})
7037	return json.Marshal(objectMap)
7038}
7039
7040// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
7041type ConnectivityIssue struct {
7042	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
7043	Origin Origin `json:"origin,omitempty"`
7044	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
7045	Severity Severity `json:"severity,omitempty"`
7046	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
7047	Type IssueType `json:"type,omitempty"`
7048	// Context - READ-ONLY; Provides additional context on the issue.
7049	Context *[]map[string]*string `json:"context,omitempty"`
7050}
7051
7052// MarshalJSON is the custom marshaler for ConnectivityIssue.
7053func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
7054	objectMap := make(map[string]interface{})
7055	return json.Marshal(objectMap)
7056}
7057
7058// ConnectivityParameters parameters that determine how the connectivity check will be performed.
7059type ConnectivityParameters struct {
7060	// Source - Describes the source of the connection.
7061	Source *ConnectivitySource `json:"source,omitempty"`
7062	// Destination - Describes the destination of connection.
7063	Destination *ConnectivityDestination `json:"destination,omitempty"`
7064	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
7065	Protocol Protocol `json:"protocol,omitempty"`
7066	// ProtocolConfiguration - Configuration of the protocol.
7067	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
7068}
7069
7070// ConnectivitySource parameters that define the source of the connection.
7071type ConnectivitySource struct {
7072	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
7073	ResourceID *string `json:"resourceId,omitempty"`
7074	// Port - The source port from which a connectivity check will be performed.
7075	Port *int32 `json:"port,omitempty"`
7076}
7077
7078// Container reference to container resource in remote resource provider.
7079type Container struct {
7080	// ID - Resource ID.
7081	ID *string `json:"id,omitempty"`
7082}
7083
7084// ContainerNetworkInterface container network interface child resource.
7085type ContainerNetworkInterface struct {
7086	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
7087	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
7088	// Name - The name of the resource. This name can be used to access the resource.
7089	Name *string `json:"name,omitempty"`
7090	// Type - READ-ONLY; Sub Resource type.
7091	Type *string `json:"type,omitempty"`
7092	// Etag - A unique read-only string that changes whenever the resource is updated.
7093	Etag *string `json:"etag,omitempty"`
7094	// ID - Resource ID.
7095	ID *string `json:"id,omitempty"`
7096}
7097
7098// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
7099func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
7100	objectMap := make(map[string]interface{})
7101	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
7102		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
7103	}
7104	if cni.Name != nil {
7105		objectMap["name"] = cni.Name
7106	}
7107	if cni.Etag != nil {
7108		objectMap["etag"] = cni.Etag
7109	}
7110	if cni.ID != nil {
7111		objectMap["id"] = cni.ID
7112	}
7113	return json.Marshal(objectMap)
7114}
7115
7116// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
7117func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
7118	var m map[string]*json.RawMessage
7119	err := json.Unmarshal(body, &m)
7120	if err != nil {
7121		return err
7122	}
7123	for k, v := range m {
7124		switch k {
7125		case "properties":
7126			if v != nil {
7127				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
7128				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
7129				if err != nil {
7130					return err
7131				}
7132				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
7133			}
7134		case "name":
7135			if v != nil {
7136				var name string
7137				err = json.Unmarshal(*v, &name)
7138				if err != nil {
7139					return err
7140				}
7141				cni.Name = &name
7142			}
7143		case "type":
7144			if v != nil {
7145				var typeVar string
7146				err = json.Unmarshal(*v, &typeVar)
7147				if err != nil {
7148					return err
7149				}
7150				cni.Type = &typeVar
7151			}
7152		case "etag":
7153			if v != nil {
7154				var etag string
7155				err = json.Unmarshal(*v, &etag)
7156				if err != nil {
7157					return err
7158				}
7159				cni.Etag = &etag
7160			}
7161		case "id":
7162			if v != nil {
7163				var ID string
7164				err = json.Unmarshal(*v, &ID)
7165				if err != nil {
7166					return err
7167				}
7168				cni.ID = &ID
7169			}
7170		}
7171	}
7172
7173	return nil
7174}
7175
7176// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
7177type ContainerNetworkInterfaceConfiguration struct {
7178	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
7179	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
7180	// Name - The name of the resource. This name can be used to access the resource.
7181	Name *string `json:"name,omitempty"`
7182	// Type - READ-ONLY; Sub Resource type.
7183	Type *string `json:"type,omitempty"`
7184	// Etag - A unique read-only string that changes whenever the resource is updated.
7185	Etag *string `json:"etag,omitempty"`
7186	// ID - Resource ID.
7187	ID *string `json:"id,omitempty"`
7188}
7189
7190// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
7191func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
7192	objectMap := make(map[string]interface{})
7193	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
7194		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
7195	}
7196	if cnic.Name != nil {
7197		objectMap["name"] = cnic.Name
7198	}
7199	if cnic.Etag != nil {
7200		objectMap["etag"] = cnic.Etag
7201	}
7202	if cnic.ID != nil {
7203		objectMap["id"] = cnic.ID
7204	}
7205	return json.Marshal(objectMap)
7206}
7207
7208// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
7209func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
7210	var m map[string]*json.RawMessage
7211	err := json.Unmarshal(body, &m)
7212	if err != nil {
7213		return err
7214	}
7215	for k, v := range m {
7216		switch k {
7217		case "properties":
7218			if v != nil {
7219				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
7220				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
7221				if err != nil {
7222					return err
7223				}
7224				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
7225			}
7226		case "name":
7227			if v != nil {
7228				var name string
7229				err = json.Unmarshal(*v, &name)
7230				if err != nil {
7231					return err
7232				}
7233				cnic.Name = &name
7234			}
7235		case "type":
7236			if v != nil {
7237				var typeVar string
7238				err = json.Unmarshal(*v, &typeVar)
7239				if err != nil {
7240					return err
7241				}
7242				cnic.Type = &typeVar
7243			}
7244		case "etag":
7245			if v != nil {
7246				var etag string
7247				err = json.Unmarshal(*v, &etag)
7248				if err != nil {
7249					return err
7250				}
7251				cnic.Etag = &etag
7252			}
7253		case "id":
7254			if v != nil {
7255				var ID string
7256				err = json.Unmarshal(*v, &ID)
7257				if err != nil {
7258					return err
7259				}
7260				cnic.ID = &ID
7261			}
7262		}
7263	}
7264
7265	return nil
7266}
7267
7268// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
7269// properties.
7270type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
7271	// IPConfigurations - A list of ip configurations of the container network interface configuration.
7272	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
7273	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
7274	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
7275	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7276	ProvisioningState *string `json:"provisioningState,omitempty"`
7277}
7278
7279// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
7280func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7281	objectMap := make(map[string]interface{})
7282	if cnicpf.IPConfigurations != nil {
7283		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
7284	}
7285	if cnicpf.ContainerNetworkInterfaces != nil {
7286		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
7287	}
7288	return json.Marshal(objectMap)
7289}
7290
7291// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
7292type ContainerNetworkInterfaceIPConfiguration struct {
7293	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
7294	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7295	// Name - The name of the resource. This name can be used to access the resource.
7296	Name *string `json:"name,omitempty"`
7297	// Type - READ-ONLY; Sub Resource type.
7298	Type *string `json:"type,omitempty"`
7299	// Etag - A unique read-only string that changes whenever the resource is updated.
7300	Etag *string `json:"etag,omitempty"`
7301}
7302
7303// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
7304func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
7305	objectMap := make(map[string]interface{})
7306	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
7307		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7308	}
7309	if cniic.Name != nil {
7310		objectMap["name"] = cniic.Name
7311	}
7312	if cniic.Etag != nil {
7313		objectMap["etag"] = cniic.Etag
7314	}
7315	return json.Marshal(objectMap)
7316}
7317
7318// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
7319func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
7320	var m map[string]*json.RawMessage
7321	err := json.Unmarshal(body, &m)
7322	if err != nil {
7323		return err
7324	}
7325	for k, v := range m {
7326		switch k {
7327		case "properties":
7328			if v != nil {
7329				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
7330				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
7331				if err != nil {
7332					return err
7333				}
7334				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
7335			}
7336		case "name":
7337			if v != nil {
7338				var name string
7339				err = json.Unmarshal(*v, &name)
7340				if err != nil {
7341					return err
7342				}
7343				cniic.Name = &name
7344			}
7345		case "type":
7346			if v != nil {
7347				var typeVar string
7348				err = json.Unmarshal(*v, &typeVar)
7349				if err != nil {
7350					return err
7351				}
7352				cniic.Type = &typeVar
7353			}
7354		case "etag":
7355			if v != nil {
7356				var etag string
7357				err = json.Unmarshal(*v, &etag)
7358				if err != nil {
7359					return err
7360				}
7361				cniic.Etag = &etag
7362			}
7363		}
7364	}
7365
7366	return nil
7367}
7368
7369// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
7370// IP configuration.
7371type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
7372	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7373	ProvisioningState *string `json:"provisioningState,omitempty"`
7374}
7375
7376// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
7377func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7378	objectMap := make(map[string]interface{})
7379	return json.Marshal(objectMap)
7380}
7381
7382// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
7383type ContainerNetworkInterfacePropertiesFormat struct {
7384	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
7385	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
7386	// Container - Reference to the container to which this container network interface is attached.
7387	Container *Container `json:"container,omitempty"`
7388	// IPConfigurations - Reference to the ip configuration on this container nic.
7389	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
7390	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
7391	ProvisioningState *string `json:"provisioningState,omitempty"`
7392}
7393
7394// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
7395func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
7396	objectMap := make(map[string]interface{})
7397	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
7398		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
7399	}
7400	if cnipf.Container != nil {
7401		objectMap["container"] = cnipf.Container
7402	}
7403	if cnipf.IPConfigurations != nil {
7404		objectMap["ipConfigurations"] = cnipf.IPConfigurations
7405	}
7406	return json.Marshal(objectMap)
7407}
7408
7409// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7410// long-running operation.
7411type DdosCustomPoliciesCreateOrUpdateFuture struct {
7412	azure.FutureAPI
7413	// Result returns the result of the asynchronous operation.
7414	// If the operation has not completed it will return an error.
7415	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7416}
7417
7418// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7419func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7420	var azFuture azure.Future
7421	if err := json.Unmarshal(body, &azFuture); err != nil {
7422		return err
7423	}
7424	future.FutureAPI = &azFuture
7425	future.Result = future.result
7426	return nil
7427}
7428
7429// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
7430func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7431	var done bool
7432	done, err = future.DoneWithContext(context.Background(), client)
7433	if err != nil {
7434		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7435		return
7436	}
7437	if !done {
7438		dcp.Response.Response = future.Response()
7439		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
7440		return
7441	}
7442	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7443	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7444		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
7445		if err != nil {
7446			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
7447		}
7448	}
7449	return
7450}
7451
7452// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
7453// long-running operation.
7454type DdosCustomPoliciesDeleteFuture struct {
7455	azure.FutureAPI
7456	// Result returns the result of the asynchronous operation.
7457	// If the operation has not completed it will return an error.
7458	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
7459}
7460
7461// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7462func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
7463	var azFuture azure.Future
7464	if err := json.Unmarshal(body, &azFuture); err != nil {
7465		return err
7466	}
7467	future.FutureAPI = &azFuture
7468	future.Result = future.result
7469	return nil
7470}
7471
7472// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
7473func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
7474	var done bool
7475	done, err = future.DoneWithContext(context.Background(), client)
7476	if err != nil {
7477		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
7478		return
7479	}
7480	if !done {
7481		ar.Response = future.Response()
7482		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
7483		return
7484	}
7485	ar.Response = future.Response()
7486	return
7487}
7488
7489// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7490// long-running operation.
7491type DdosCustomPoliciesUpdateTagsFuture struct {
7492	azure.FutureAPI
7493	// Result returns the result of the asynchronous operation.
7494	// If the operation has not completed it will return an error.
7495	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
7496}
7497
7498// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7499func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7500	var azFuture azure.Future
7501	if err := json.Unmarshal(body, &azFuture); err != nil {
7502		return err
7503	}
7504	future.FutureAPI = &azFuture
7505	future.Result = future.result
7506	return nil
7507}
7508
7509// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
7510func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
7511	var done bool
7512	done, err = future.DoneWithContext(context.Background(), client)
7513	if err != nil {
7514		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7515		return
7516	}
7517	if !done {
7518		dcp.Response.Response = future.Response()
7519		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
7520		return
7521	}
7522	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7523	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
7524		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
7525		if err != nil {
7526			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
7527		}
7528	}
7529	return
7530}
7531
7532// DdosCustomPolicy a DDoS custom policy in a resource group.
7533type DdosCustomPolicy struct {
7534	autorest.Response `json:"-"`
7535	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
7536	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
7537	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7538	Etag *string `json:"etag,omitempty"`
7539	// ID - Resource ID.
7540	ID *string `json:"id,omitempty"`
7541	// Name - READ-ONLY; Resource name.
7542	Name *string `json:"name,omitempty"`
7543	// Type - READ-ONLY; Resource type.
7544	Type *string `json:"type,omitempty"`
7545	// Location - Resource location.
7546	Location *string `json:"location,omitempty"`
7547	// Tags - Resource tags.
7548	Tags map[string]*string `json:"tags"`
7549}
7550
7551// MarshalJSON is the custom marshaler for DdosCustomPolicy.
7552func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
7553	objectMap := make(map[string]interface{})
7554	if dcp.DdosCustomPolicyPropertiesFormat != nil {
7555		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
7556	}
7557	if dcp.ID != nil {
7558		objectMap["id"] = dcp.ID
7559	}
7560	if dcp.Location != nil {
7561		objectMap["location"] = dcp.Location
7562	}
7563	if dcp.Tags != nil {
7564		objectMap["tags"] = dcp.Tags
7565	}
7566	return json.Marshal(objectMap)
7567}
7568
7569// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
7570func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
7571	var m map[string]*json.RawMessage
7572	err := json.Unmarshal(body, &m)
7573	if err != nil {
7574		return err
7575	}
7576	for k, v := range m {
7577		switch k {
7578		case "properties":
7579			if v != nil {
7580				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
7581				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
7582				if err != nil {
7583					return err
7584				}
7585				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
7586			}
7587		case "etag":
7588			if v != nil {
7589				var etag string
7590				err = json.Unmarshal(*v, &etag)
7591				if err != nil {
7592					return err
7593				}
7594				dcp.Etag = &etag
7595			}
7596		case "id":
7597			if v != nil {
7598				var ID string
7599				err = json.Unmarshal(*v, &ID)
7600				if err != nil {
7601					return err
7602				}
7603				dcp.ID = &ID
7604			}
7605		case "name":
7606			if v != nil {
7607				var name string
7608				err = json.Unmarshal(*v, &name)
7609				if err != nil {
7610					return err
7611				}
7612				dcp.Name = &name
7613			}
7614		case "type":
7615			if v != nil {
7616				var typeVar string
7617				err = json.Unmarshal(*v, &typeVar)
7618				if err != nil {
7619					return err
7620				}
7621				dcp.Type = &typeVar
7622			}
7623		case "location":
7624			if v != nil {
7625				var location string
7626				err = json.Unmarshal(*v, &location)
7627				if err != nil {
7628					return err
7629				}
7630				dcp.Location = &location
7631			}
7632		case "tags":
7633			if v != nil {
7634				var tags map[string]*string
7635				err = json.Unmarshal(*v, &tags)
7636				if err != nil {
7637					return err
7638				}
7639				dcp.Tags = tags
7640			}
7641		}
7642	}
7643
7644	return nil
7645}
7646
7647// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
7648type DdosCustomPolicyPropertiesFormat struct {
7649	// ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
7650	ResourceGUID *string `json:"resourceGuid,omitempty"`
7651	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7652	ProvisioningState *string `json:"provisioningState,omitempty"`
7653	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
7654	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
7655	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
7656	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
7657}
7658
7659// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
7660func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
7661	objectMap := make(map[string]interface{})
7662	if dcppf.ProtocolCustomSettings != nil {
7663		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
7664	}
7665	return json.Marshal(objectMap)
7666}
7667
7668// DdosProtectionPlan a DDoS protection plan in a resource group.
7669type DdosProtectionPlan struct {
7670	autorest.Response `json:"-"`
7671	// ID - READ-ONLY; Resource ID.
7672	ID *string `json:"id,omitempty"`
7673	// Name - READ-ONLY; Resource name.
7674	Name *string `json:"name,omitempty"`
7675	// Type - READ-ONLY; Resource type.
7676	Type *string `json:"type,omitempty"`
7677	// Location - Resource location.
7678	Location *string `json:"location,omitempty"`
7679	// Tags - Resource tags.
7680	Tags map[string]*string `json:"tags"`
7681	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
7682	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
7683	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7684	Etag *string `json:"etag,omitempty"`
7685}
7686
7687// MarshalJSON is the custom marshaler for DdosProtectionPlan.
7688func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
7689	objectMap := make(map[string]interface{})
7690	if dpp.Location != nil {
7691		objectMap["location"] = dpp.Location
7692	}
7693	if dpp.Tags != nil {
7694		objectMap["tags"] = dpp.Tags
7695	}
7696	if dpp.DdosProtectionPlanPropertiesFormat != nil {
7697		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
7698	}
7699	return json.Marshal(objectMap)
7700}
7701
7702// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
7703func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
7704	var m map[string]*json.RawMessage
7705	err := json.Unmarshal(body, &m)
7706	if err != nil {
7707		return err
7708	}
7709	for k, v := range m {
7710		switch k {
7711		case "id":
7712			if v != nil {
7713				var ID string
7714				err = json.Unmarshal(*v, &ID)
7715				if err != nil {
7716					return err
7717				}
7718				dpp.ID = &ID
7719			}
7720		case "name":
7721			if v != nil {
7722				var name string
7723				err = json.Unmarshal(*v, &name)
7724				if err != nil {
7725					return err
7726				}
7727				dpp.Name = &name
7728			}
7729		case "type":
7730			if v != nil {
7731				var typeVar string
7732				err = json.Unmarshal(*v, &typeVar)
7733				if err != nil {
7734					return err
7735				}
7736				dpp.Type = &typeVar
7737			}
7738		case "location":
7739			if v != nil {
7740				var location string
7741				err = json.Unmarshal(*v, &location)
7742				if err != nil {
7743					return err
7744				}
7745				dpp.Location = &location
7746			}
7747		case "tags":
7748			if v != nil {
7749				var tags map[string]*string
7750				err = json.Unmarshal(*v, &tags)
7751				if err != nil {
7752					return err
7753				}
7754				dpp.Tags = tags
7755			}
7756		case "properties":
7757			if v != nil {
7758				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
7759				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
7760				if err != nil {
7761					return err
7762				}
7763				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
7764			}
7765		case "etag":
7766			if v != nil {
7767				var etag string
7768				err = json.Unmarshal(*v, &etag)
7769				if err != nil {
7770					return err
7771				}
7772				dpp.Etag = &etag
7773			}
7774		}
7775	}
7776
7777	return nil
7778}
7779
7780// DdosProtectionPlanListResult a list of DDoS protection plans.
7781type DdosProtectionPlanListResult struct {
7782	autorest.Response `json:"-"`
7783	// Value - A list of DDoS protection plans.
7784	Value *[]DdosProtectionPlan `json:"value,omitempty"`
7785	// NextLink - READ-ONLY; The URL to get the next set of results.
7786	NextLink *string `json:"nextLink,omitempty"`
7787}
7788
7789// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
7790func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
7791	objectMap := make(map[string]interface{})
7792	if dpplr.Value != nil {
7793		objectMap["value"] = dpplr.Value
7794	}
7795	return json.Marshal(objectMap)
7796}
7797
7798// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
7799type DdosProtectionPlanListResultIterator struct {
7800	i    int
7801	page DdosProtectionPlanListResultPage
7802}
7803
7804// NextWithContext advances to the next value.  If there was an error making
7805// the request the iterator does not advance and the error is returned.
7806func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
7807	if tracing.IsEnabled() {
7808		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
7809		defer func() {
7810			sc := -1
7811			if iter.Response().Response.Response != nil {
7812				sc = iter.Response().Response.Response.StatusCode
7813			}
7814			tracing.EndSpan(ctx, sc, err)
7815		}()
7816	}
7817	iter.i++
7818	if iter.i < len(iter.page.Values()) {
7819		return nil
7820	}
7821	err = iter.page.NextWithContext(ctx)
7822	if err != nil {
7823		iter.i--
7824		return err
7825	}
7826	iter.i = 0
7827	return nil
7828}
7829
7830// Next advances to the next value.  If there was an error making
7831// the request the iterator does not advance and the error is returned.
7832// Deprecated: Use NextWithContext() instead.
7833func (iter *DdosProtectionPlanListResultIterator) Next() error {
7834	return iter.NextWithContext(context.Background())
7835}
7836
7837// NotDone returns true if the enumeration should be started or is not yet complete.
7838func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
7839	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7840}
7841
7842// Response returns the raw server response from the last page request.
7843func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
7844	return iter.page.Response()
7845}
7846
7847// Value returns the current value or a zero-initialized value if the
7848// iterator has advanced beyond the end of the collection.
7849func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
7850	if !iter.page.NotDone() {
7851		return DdosProtectionPlan{}
7852	}
7853	return iter.page.Values()[iter.i]
7854}
7855
7856// Creates a new instance of the DdosProtectionPlanListResultIterator type.
7857func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
7858	return DdosProtectionPlanListResultIterator{page: page}
7859}
7860
7861// IsEmpty returns true if the ListResult contains no values.
7862func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
7863	return dpplr.Value == nil || len(*dpplr.Value) == 0
7864}
7865
7866// hasNextLink returns true if the NextLink is not empty.
7867func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
7868	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
7869}
7870
7871// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
7872// It returns nil if no more results exist.
7873func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
7874	if !dpplr.hasNextLink() {
7875		return nil, nil
7876	}
7877	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7878		autorest.AsJSON(),
7879		autorest.AsGet(),
7880		autorest.WithBaseURL(to.String(dpplr.NextLink)))
7881}
7882
7883// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
7884type DdosProtectionPlanListResultPage struct {
7885	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
7886	dpplr DdosProtectionPlanListResult
7887}
7888
7889// NextWithContext advances to the next page of values.  If there was an error making
7890// the request the page does not advance and the error is returned.
7891func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
7892	if tracing.IsEnabled() {
7893		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
7894		defer func() {
7895			sc := -1
7896			if page.Response().Response.Response != nil {
7897				sc = page.Response().Response.Response.StatusCode
7898			}
7899			tracing.EndSpan(ctx, sc, err)
7900		}()
7901	}
7902	for {
7903		next, err := page.fn(ctx, page.dpplr)
7904		if err != nil {
7905			return err
7906		}
7907		page.dpplr = next
7908		if !next.hasNextLink() || !next.IsEmpty() {
7909			break
7910		}
7911	}
7912	return nil
7913}
7914
7915// Next advances to the next page of values.  If there was an error making
7916// the request the page does not advance and the error is returned.
7917// Deprecated: Use NextWithContext() instead.
7918func (page *DdosProtectionPlanListResultPage) Next() error {
7919	return page.NextWithContext(context.Background())
7920}
7921
7922// NotDone returns true if the page enumeration should be started or is not yet complete.
7923func (page DdosProtectionPlanListResultPage) NotDone() bool {
7924	return !page.dpplr.IsEmpty()
7925}
7926
7927// Response returns the raw server response from the last page request.
7928func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
7929	return page.dpplr
7930}
7931
7932// Values returns the slice of values for the current page or nil if there are no values.
7933func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
7934	if page.dpplr.IsEmpty() {
7935		return nil
7936	}
7937	return *page.dpplr.Value
7938}
7939
7940// Creates a new instance of the DdosProtectionPlanListResultPage type.
7941func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
7942	return DdosProtectionPlanListResultPage{
7943		fn:    getNextPage,
7944		dpplr: cur,
7945	}
7946}
7947
7948// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
7949type DdosProtectionPlanPropertiesFormat struct {
7950	// 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.
7951	ResourceGUID *string `json:"resourceGuid,omitempty"`
7952	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7953	ProvisioningState *string `json:"provisioningState,omitempty"`
7954	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
7955	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
7956}
7957
7958// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
7959func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
7960	objectMap := make(map[string]interface{})
7961	return json.Marshal(objectMap)
7962}
7963
7964// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7965// long-running operation.
7966type DdosProtectionPlansCreateOrUpdateFuture struct {
7967	azure.FutureAPI
7968	// Result returns the result of the asynchronous operation.
7969	// If the operation has not completed it will return an error.
7970	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7971}
7972
7973// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7974func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7975	var azFuture azure.Future
7976	if err := json.Unmarshal(body, &azFuture); err != nil {
7977		return err
7978	}
7979	future.FutureAPI = &azFuture
7980	future.Result = future.result
7981	return nil
7982}
7983
7984// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
7985func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7986	var done bool
7987	done, err = future.DoneWithContext(context.Background(), client)
7988	if err != nil {
7989		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7990		return
7991	}
7992	if !done {
7993		dpp.Response.Response = future.Response()
7994		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
7995		return
7996	}
7997	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7998	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7999		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
8000		if err != nil {
8001			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
8002		}
8003	}
8004	return
8005}
8006
8007// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
8008// long-running operation.
8009type DdosProtectionPlansDeleteFuture struct {
8010	azure.FutureAPI
8011	// Result returns the result of the asynchronous operation.
8012	// If the operation has not completed it will return an error.
8013	Result func(DdosProtectionPlansClient) (autorest.Response, error)
8014}
8015
8016// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8017func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
8018	var azFuture azure.Future
8019	if err := json.Unmarshal(body, &azFuture); err != nil {
8020		return err
8021	}
8022	future.FutureAPI = &azFuture
8023	future.Result = future.result
8024	return nil
8025}
8026
8027// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
8028func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
8029	var done bool
8030	done, err = future.DoneWithContext(context.Background(), client)
8031	if err != nil {
8032		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
8033		return
8034	}
8035	if !done {
8036		ar.Response = future.Response()
8037		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
8038		return
8039	}
8040	ar.Response = future.Response()
8041	return
8042}
8043
8044// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8045// long-running operation.
8046type DdosProtectionPlansUpdateTagsFuture struct {
8047	azure.FutureAPI
8048	// Result returns the result of the asynchronous operation.
8049	// If the operation has not completed it will return an error.
8050	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
8051}
8052
8053// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8054func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8055	var azFuture azure.Future
8056	if err := json.Unmarshal(body, &azFuture); err != nil {
8057		return err
8058	}
8059	future.FutureAPI = &azFuture
8060	future.Result = future.result
8061	return nil
8062}
8063
8064// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
8065func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
8066	var done bool
8067	done, err = future.DoneWithContext(context.Background(), client)
8068	if err != nil {
8069		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8070		return
8071	}
8072	if !done {
8073		dpp.Response.Response = future.Response()
8074		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
8075		return
8076	}
8077	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8078	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
8079		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
8080		if err != nil {
8081			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
8082		}
8083	}
8084	return
8085}
8086
8087// DdosSettings contains the DDoS protection settings of the public IP.
8088type DdosSettings struct {
8089	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
8090	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
8091	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard'
8092	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
8093}
8094
8095// Delegation details the service to which the subnet is delegated.
8096type Delegation struct {
8097	// ServiceDelegationPropertiesFormat - Properties of the subnet.
8098	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
8099	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
8100	Name *string `json:"name,omitempty"`
8101	// Etag - A unique read-only string that changes whenever the resource is updated.
8102	Etag *string `json:"etag,omitempty"`
8103	// ID - Resource ID.
8104	ID *string `json:"id,omitempty"`
8105}
8106
8107// MarshalJSON is the custom marshaler for Delegation.
8108func (d Delegation) MarshalJSON() ([]byte, error) {
8109	objectMap := make(map[string]interface{})
8110	if d.ServiceDelegationPropertiesFormat != nil {
8111		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
8112	}
8113	if d.Name != nil {
8114		objectMap["name"] = d.Name
8115	}
8116	if d.Etag != nil {
8117		objectMap["etag"] = d.Etag
8118	}
8119	if d.ID != nil {
8120		objectMap["id"] = d.ID
8121	}
8122	return json.Marshal(objectMap)
8123}
8124
8125// UnmarshalJSON is the custom unmarshaler for Delegation struct.
8126func (d *Delegation) UnmarshalJSON(body []byte) error {
8127	var m map[string]*json.RawMessage
8128	err := json.Unmarshal(body, &m)
8129	if err != nil {
8130		return err
8131	}
8132	for k, v := range m {
8133		switch k {
8134		case "properties":
8135			if v != nil {
8136				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
8137				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
8138				if err != nil {
8139					return err
8140				}
8141				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
8142			}
8143		case "name":
8144			if v != nil {
8145				var name string
8146				err = json.Unmarshal(*v, &name)
8147				if err != nil {
8148					return err
8149				}
8150				d.Name = &name
8151			}
8152		case "etag":
8153			if v != nil {
8154				var etag string
8155				err = json.Unmarshal(*v, &etag)
8156				if err != nil {
8157					return err
8158				}
8159				d.Etag = &etag
8160			}
8161		case "id":
8162			if v != nil {
8163				var ID string
8164				err = json.Unmarshal(*v, &ID)
8165				if err != nil {
8166					return err
8167				}
8168				d.ID = &ID
8169			}
8170		}
8171	}
8172
8173	return nil
8174}
8175
8176// DeviceProperties list of properties of the device.
8177type DeviceProperties struct {
8178	// DeviceVendor - Name of the device Vendor.
8179	DeviceVendor *string `json:"deviceVendor,omitempty"`
8180	// DeviceModel - Model of the device.
8181	DeviceModel *string `json:"deviceModel,omitempty"`
8182	// LinkSpeedInMbps - Link speed.
8183	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
8184}
8185
8186// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
8187// network. Standard DHCP option for a subnet overrides VNET DHCP options.
8188type DhcpOptions struct {
8189	// DNSServers - The list of DNS servers IP addresses.
8190	DNSServers *[]string `json:"dnsServers,omitempty"`
8191}
8192
8193// Dimension dimension of the metric.
8194type Dimension struct {
8195	// Name - The name of the dimension.
8196	Name *string `json:"name,omitempty"`
8197	// DisplayName - The display name of the dimension.
8198	DisplayName *string `json:"displayName,omitempty"`
8199	// InternalName - The internal name of the dimension.
8200	InternalName *string `json:"internalName,omitempty"`
8201}
8202
8203// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
8204type DNSNameAvailabilityResult struct {
8205	autorest.Response `json:"-"`
8206	// Available - Domain availability (True/False).
8207	Available *bool `json:"available,omitempty"`
8208}
8209
8210// EffectiveNetworkSecurityGroup effective network security group.
8211type EffectiveNetworkSecurityGroup struct {
8212	// NetworkSecurityGroup - The ID of network security group that is applied.
8213	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
8214	// Association - Associated resources.
8215	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
8216	// EffectiveSecurityRules - A collection of effective security rules.
8217	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
8218	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
8219	TagMap map[string][]string `json:"tagMap"`
8220}
8221
8222// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
8223func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8224	objectMap := make(map[string]interface{})
8225	if ensg.NetworkSecurityGroup != nil {
8226		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
8227	}
8228	if ensg.Association != nil {
8229		objectMap["association"] = ensg.Association
8230	}
8231	if ensg.EffectiveSecurityRules != nil {
8232		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
8233	}
8234	if ensg.TagMap != nil {
8235		objectMap["tagMap"] = ensg.TagMap
8236	}
8237	return json.Marshal(objectMap)
8238}
8239
8240// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
8241type EffectiveNetworkSecurityGroupAssociation struct {
8242	// Subnet - The ID of the subnet if assigned.
8243	Subnet *SubResource `json:"subnet,omitempty"`
8244	// NetworkInterface - The ID of the network interface if assigned.
8245	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
8246}
8247
8248// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
8249// call.
8250type EffectiveNetworkSecurityGroupListResult struct {
8251	autorest.Response `json:"-"`
8252	// Value - A list of effective network security groups.
8253	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
8254	// NextLink - READ-ONLY; The URL to get the next set of results.
8255	NextLink *string `json:"nextLink,omitempty"`
8256}
8257
8258// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
8259func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
8260	objectMap := make(map[string]interface{})
8261	if ensglr.Value != nil {
8262		objectMap["value"] = ensglr.Value
8263	}
8264	return json.Marshal(objectMap)
8265}
8266
8267// EffectiveNetworkSecurityRule effective network security rules.
8268type EffectiveNetworkSecurityRule struct {
8269	// Name - The name of the security rule specified by the user (if created by the user).
8270	Name *string `json:"name,omitempty"`
8271	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
8272	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
8273	// SourcePortRange - The source port or range.
8274	SourcePortRange *string `json:"sourcePortRange,omitempty"`
8275	// DestinationPortRange - The destination port or range.
8276	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
8277	// 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 (*).
8278	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
8279	// 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 (*).
8280	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
8281	// SourceAddressPrefix - The source address prefix.
8282	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
8283	// DestinationAddressPrefix - The destination address prefix.
8284	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
8285	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8286	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
8287	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
8288	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
8289	// ExpandedSourceAddressPrefix - The expanded source address prefix.
8290	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
8291	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
8292	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
8293	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
8294	Access SecurityRuleAccess `json:"access,omitempty"`
8295	// Priority - The priority of the rule.
8296	Priority *int32 `json:"priority,omitempty"`
8297	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
8298	Direction SecurityRuleDirection `json:"direction,omitempty"`
8299}
8300
8301// EffectiveRoute effective Route.
8302type EffectiveRoute struct {
8303	// Name - The name of the user defined route. This is optional.
8304	Name *string `json:"name,omitempty"`
8305	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
8306	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
8307	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
8308	Source EffectiveRouteSource `json:"source,omitempty"`
8309	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
8310	State EffectiveRouteState `json:"state,omitempty"`
8311	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
8312	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
8313	// NextHopIPAddress - The IP address of the next hop of the effective route.
8314	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
8315	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
8316	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
8317}
8318
8319// EffectiveRouteListResult response for list effective route API service call.
8320type EffectiveRouteListResult struct {
8321	autorest.Response `json:"-"`
8322	// Value - A list of effective routes.
8323	Value *[]EffectiveRoute `json:"value,omitempty"`
8324	// NextLink - READ-ONLY; The URL to get the next set of results.
8325	NextLink *string `json:"nextLink,omitempty"`
8326}
8327
8328// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
8329func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
8330	objectMap := make(map[string]interface{})
8331	if erlr.Value != nil {
8332		objectMap["value"] = erlr.Value
8333	}
8334	return json.Marshal(objectMap)
8335}
8336
8337// EndpointServiceResult endpoint service.
8338type EndpointServiceResult struct {
8339	// Name - READ-ONLY; Name of the endpoint service.
8340	Name *string `json:"name,omitempty"`
8341	// Type - READ-ONLY; Type of the endpoint service.
8342	Type *string `json:"type,omitempty"`
8343	// ID - Resource ID.
8344	ID *string `json:"id,omitempty"`
8345}
8346
8347// MarshalJSON is the custom marshaler for EndpointServiceResult.
8348func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
8349	objectMap := make(map[string]interface{})
8350	if esr.ID != nil {
8351		objectMap["id"] = esr.ID
8352	}
8353	return json.Marshal(objectMap)
8354}
8355
8356// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
8357type EndpointServicesListResult struct {
8358	autorest.Response `json:"-"`
8359	// Value - List of available endpoint services in a region.
8360	Value *[]EndpointServiceResult `json:"value,omitempty"`
8361	// NextLink - The URL to get the next set of results.
8362	NextLink *string `json:"nextLink,omitempty"`
8363}
8364
8365// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
8366// values.
8367type EndpointServicesListResultIterator struct {
8368	i    int
8369	page EndpointServicesListResultPage
8370}
8371
8372// NextWithContext advances to the next value.  If there was an error making
8373// the request the iterator does not advance and the error is returned.
8374func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
8375	if tracing.IsEnabled() {
8376		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
8377		defer func() {
8378			sc := -1
8379			if iter.Response().Response.Response != nil {
8380				sc = iter.Response().Response.Response.StatusCode
8381			}
8382			tracing.EndSpan(ctx, sc, err)
8383		}()
8384	}
8385	iter.i++
8386	if iter.i < len(iter.page.Values()) {
8387		return nil
8388	}
8389	err = iter.page.NextWithContext(ctx)
8390	if err != nil {
8391		iter.i--
8392		return err
8393	}
8394	iter.i = 0
8395	return nil
8396}
8397
8398// Next advances to the next value.  If there was an error making
8399// the request the iterator does not advance and the error is returned.
8400// Deprecated: Use NextWithContext() instead.
8401func (iter *EndpointServicesListResultIterator) Next() error {
8402	return iter.NextWithContext(context.Background())
8403}
8404
8405// NotDone returns true if the enumeration should be started or is not yet complete.
8406func (iter EndpointServicesListResultIterator) NotDone() bool {
8407	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8408}
8409
8410// Response returns the raw server response from the last page request.
8411func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
8412	return iter.page.Response()
8413}
8414
8415// Value returns the current value or a zero-initialized value if the
8416// iterator has advanced beyond the end of the collection.
8417func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
8418	if !iter.page.NotDone() {
8419		return EndpointServiceResult{}
8420	}
8421	return iter.page.Values()[iter.i]
8422}
8423
8424// Creates a new instance of the EndpointServicesListResultIterator type.
8425func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
8426	return EndpointServicesListResultIterator{page: page}
8427}
8428
8429// IsEmpty returns true if the ListResult contains no values.
8430func (eslr EndpointServicesListResult) IsEmpty() bool {
8431	return eslr.Value == nil || len(*eslr.Value) == 0
8432}
8433
8434// hasNextLink returns true if the NextLink is not empty.
8435func (eslr EndpointServicesListResult) hasNextLink() bool {
8436	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
8437}
8438
8439// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
8440// It returns nil if no more results exist.
8441func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
8442	if !eslr.hasNextLink() {
8443		return nil, nil
8444	}
8445	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8446		autorest.AsJSON(),
8447		autorest.AsGet(),
8448		autorest.WithBaseURL(to.String(eslr.NextLink)))
8449}
8450
8451// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
8452type EndpointServicesListResultPage struct {
8453	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
8454	eslr EndpointServicesListResult
8455}
8456
8457// NextWithContext advances to the next page of values.  If there was an error making
8458// the request the page does not advance and the error is returned.
8459func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
8460	if tracing.IsEnabled() {
8461		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
8462		defer func() {
8463			sc := -1
8464			if page.Response().Response.Response != nil {
8465				sc = page.Response().Response.Response.StatusCode
8466			}
8467			tracing.EndSpan(ctx, sc, err)
8468		}()
8469	}
8470	for {
8471		next, err := page.fn(ctx, page.eslr)
8472		if err != nil {
8473			return err
8474		}
8475		page.eslr = next
8476		if !next.hasNextLink() || !next.IsEmpty() {
8477			break
8478		}
8479	}
8480	return nil
8481}
8482
8483// Next advances to the next page of values.  If there was an error making
8484// the request the page does not advance and the error is returned.
8485// Deprecated: Use NextWithContext() instead.
8486func (page *EndpointServicesListResultPage) Next() error {
8487	return page.NextWithContext(context.Background())
8488}
8489
8490// NotDone returns true if the page enumeration should be started or is not yet complete.
8491func (page EndpointServicesListResultPage) NotDone() bool {
8492	return !page.eslr.IsEmpty()
8493}
8494
8495// Response returns the raw server response from the last page request.
8496func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
8497	return page.eslr
8498}
8499
8500// Values returns the slice of values for the current page or nil if there are no values.
8501func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
8502	if page.eslr.IsEmpty() {
8503		return nil
8504	}
8505	return *page.eslr.Value
8506}
8507
8508// Creates a new instance of the EndpointServicesListResultPage type.
8509func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
8510	return EndpointServicesListResultPage{
8511		fn:   getNextPage,
8512		eslr: cur,
8513	}
8514}
8515
8516// Error common error representation.
8517type Error struct {
8518	// Code - Error code.
8519	Code *string `json:"code,omitempty"`
8520	// Message - Error message.
8521	Message *string `json:"message,omitempty"`
8522	// Target - Error target.
8523	Target *string `json:"target,omitempty"`
8524	// Details - Error details.
8525	Details *[]ErrorDetails `json:"details,omitempty"`
8526	// InnerError - Inner error message.
8527	InnerError *string `json:"innerError,omitempty"`
8528}
8529
8530// ErrorDetails common error details representation.
8531type ErrorDetails struct {
8532	// Code - Error code.
8533	Code *string `json:"code,omitempty"`
8534	// Target - Error target.
8535	Target *string `json:"target,omitempty"`
8536	// Message - Error message.
8537	Message *string `json:"message,omitempty"`
8538}
8539
8540// ErrorResponse the error object.
8541type ErrorResponse struct {
8542	// Error - The error details object.
8543	Error *ErrorDetails `json:"error,omitempty"`
8544}
8545
8546// EvaluatedNetworkSecurityGroup results of network security group evaluation.
8547type EvaluatedNetworkSecurityGroup struct {
8548	// NetworkSecurityGroupID - Network security group ID.
8549	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
8550	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
8551	AppliedTo *string `json:"appliedTo,omitempty"`
8552	// MatchedRule - Matched network security rule.
8553	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
8554	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
8555	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
8556}
8557
8558// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
8559func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
8560	objectMap := make(map[string]interface{})
8561	if ensg.NetworkSecurityGroupID != nil {
8562		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
8563	}
8564	if ensg.AppliedTo != nil {
8565		objectMap["appliedTo"] = ensg.AppliedTo
8566	}
8567	if ensg.MatchedRule != nil {
8568		objectMap["matchedRule"] = ensg.MatchedRule
8569	}
8570	return json.Marshal(objectMap)
8571}
8572
8573// ExpressRouteCircuit expressRouteCircuit resource.
8574type ExpressRouteCircuit struct {
8575	autorest.Response `json:"-"`
8576	// Sku - The SKU.
8577	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
8578	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
8579	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
8580	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8581	Etag *string `json:"etag,omitempty"`
8582	// ID - Resource ID.
8583	ID *string `json:"id,omitempty"`
8584	// Name - READ-ONLY; Resource name.
8585	Name *string `json:"name,omitempty"`
8586	// Type - READ-ONLY; Resource type.
8587	Type *string `json:"type,omitempty"`
8588	// Location - Resource location.
8589	Location *string `json:"location,omitempty"`
8590	// Tags - Resource tags.
8591	Tags map[string]*string `json:"tags"`
8592}
8593
8594// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
8595func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
8596	objectMap := make(map[string]interface{})
8597	if erc.Sku != nil {
8598		objectMap["sku"] = erc.Sku
8599	}
8600	if erc.ExpressRouteCircuitPropertiesFormat != nil {
8601		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
8602	}
8603	if erc.ID != nil {
8604		objectMap["id"] = erc.ID
8605	}
8606	if erc.Location != nil {
8607		objectMap["location"] = erc.Location
8608	}
8609	if erc.Tags != nil {
8610		objectMap["tags"] = erc.Tags
8611	}
8612	return json.Marshal(objectMap)
8613}
8614
8615// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
8616func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
8617	var m map[string]*json.RawMessage
8618	err := json.Unmarshal(body, &m)
8619	if err != nil {
8620		return err
8621	}
8622	for k, v := range m {
8623		switch k {
8624		case "sku":
8625			if v != nil {
8626				var sku ExpressRouteCircuitSku
8627				err = json.Unmarshal(*v, &sku)
8628				if err != nil {
8629					return err
8630				}
8631				erc.Sku = &sku
8632			}
8633		case "properties":
8634			if v != nil {
8635				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
8636				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
8637				if err != nil {
8638					return err
8639				}
8640				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
8641			}
8642		case "etag":
8643			if v != nil {
8644				var etag string
8645				err = json.Unmarshal(*v, &etag)
8646				if err != nil {
8647					return err
8648				}
8649				erc.Etag = &etag
8650			}
8651		case "id":
8652			if v != nil {
8653				var ID string
8654				err = json.Unmarshal(*v, &ID)
8655				if err != nil {
8656					return err
8657				}
8658				erc.ID = &ID
8659			}
8660		case "name":
8661			if v != nil {
8662				var name string
8663				err = json.Unmarshal(*v, &name)
8664				if err != nil {
8665					return err
8666				}
8667				erc.Name = &name
8668			}
8669		case "type":
8670			if v != nil {
8671				var typeVar string
8672				err = json.Unmarshal(*v, &typeVar)
8673				if err != nil {
8674					return err
8675				}
8676				erc.Type = &typeVar
8677			}
8678		case "location":
8679			if v != nil {
8680				var location string
8681				err = json.Unmarshal(*v, &location)
8682				if err != nil {
8683					return err
8684				}
8685				erc.Location = &location
8686			}
8687		case "tags":
8688			if v != nil {
8689				var tags map[string]*string
8690				err = json.Unmarshal(*v, &tags)
8691				if err != nil {
8692					return err
8693				}
8694				erc.Tags = tags
8695			}
8696		}
8697	}
8698
8699	return nil
8700}
8701
8702// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
8703type ExpressRouteCircuitArpTable struct {
8704	// Age - Entry age in minutes.
8705	Age *int32 `json:"age,omitempty"`
8706	// Interface - Interface address.
8707	Interface *string `json:"interface,omitempty"`
8708	// IPAddress - The IP address.
8709	IPAddress *string `json:"ipAddress,omitempty"`
8710	// MacAddress - The MAC address.
8711	MacAddress *string `json:"macAddress,omitempty"`
8712}
8713
8714// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
8715type ExpressRouteCircuitAuthorization struct {
8716	autorest.Response `json:"-"`
8717	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
8718	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
8719	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8720	Name *string `json:"name,omitempty"`
8721	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8722	Etag *string `json:"etag,omitempty"`
8723	// Type - READ-ONLY; Type of the resource.
8724	Type *string `json:"type,omitempty"`
8725	// ID - Resource ID.
8726	ID *string `json:"id,omitempty"`
8727}
8728
8729// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
8730func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
8731	objectMap := make(map[string]interface{})
8732	if erca.AuthorizationPropertiesFormat != nil {
8733		objectMap["properties"] = erca.AuthorizationPropertiesFormat
8734	}
8735	if erca.Name != nil {
8736		objectMap["name"] = erca.Name
8737	}
8738	if erca.ID != nil {
8739		objectMap["id"] = erca.ID
8740	}
8741	return json.Marshal(objectMap)
8742}
8743
8744// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
8745func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
8746	var m map[string]*json.RawMessage
8747	err := json.Unmarshal(body, &m)
8748	if err != nil {
8749		return err
8750	}
8751	for k, v := range m {
8752		switch k {
8753		case "properties":
8754			if v != nil {
8755				var authorizationPropertiesFormat AuthorizationPropertiesFormat
8756				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
8757				if err != nil {
8758					return err
8759				}
8760				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
8761			}
8762		case "name":
8763			if v != nil {
8764				var name string
8765				err = json.Unmarshal(*v, &name)
8766				if err != nil {
8767					return err
8768				}
8769				erca.Name = &name
8770			}
8771		case "etag":
8772			if v != nil {
8773				var etag string
8774				err = json.Unmarshal(*v, &etag)
8775				if err != nil {
8776					return err
8777				}
8778				erca.Etag = &etag
8779			}
8780		case "type":
8781			if v != nil {
8782				var typeVar string
8783				err = json.Unmarshal(*v, &typeVar)
8784				if err != nil {
8785					return err
8786				}
8787				erca.Type = &typeVar
8788			}
8789		case "id":
8790			if v != nil {
8791				var ID string
8792				err = json.Unmarshal(*v, &ID)
8793				if err != nil {
8794					return err
8795				}
8796				erca.ID = &ID
8797			}
8798		}
8799	}
8800
8801	return nil
8802}
8803
8804// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8805// results of a long-running operation.
8806type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
8807	azure.FutureAPI
8808	// Result returns the result of the asynchronous operation.
8809	// If the operation has not completed it will return an error.
8810	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
8811}
8812
8813// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8814func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8815	var azFuture azure.Future
8816	if err := json.Unmarshal(body, &azFuture); err != nil {
8817		return err
8818	}
8819	future.FutureAPI = &azFuture
8820	future.Result = future.result
8821	return nil
8822}
8823
8824// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
8825func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
8826	var done bool
8827	done, err = future.DoneWithContext(context.Background(), client)
8828	if err != nil {
8829		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8830		return
8831	}
8832	if !done {
8833		erca.Response.Response = future.Response()
8834		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
8835		return
8836	}
8837	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8838	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
8839		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
8840		if err != nil {
8841			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
8842		}
8843	}
8844	return
8845}
8846
8847// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
8848// of a long-running operation.
8849type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
8850	azure.FutureAPI
8851	// Result returns the result of the asynchronous operation.
8852	// If the operation has not completed it will return an error.
8853	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
8854}
8855
8856// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8857func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
8858	var azFuture azure.Future
8859	if err := json.Unmarshal(body, &azFuture); err != nil {
8860		return err
8861	}
8862	future.FutureAPI = &azFuture
8863	future.Result = future.result
8864	return nil
8865}
8866
8867// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
8868func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
8869	var done bool
8870	done, err = future.DoneWithContext(context.Background(), client)
8871	if err != nil {
8872		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
8873		return
8874	}
8875	if !done {
8876		ar.Response = future.Response()
8877		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
8878		return
8879	}
8880	ar.Response = future.Response()
8881	return
8882}
8883
8884// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
8885// resource.
8886type ExpressRouteCircuitConnection struct {
8887	autorest.Response `json:"-"`
8888	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
8889	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
8890	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8891	Name *string `json:"name,omitempty"`
8892	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8893	Etag *string `json:"etag,omitempty"`
8894	// Type - READ-ONLY; Type of the resource.
8895	Type *string `json:"type,omitempty"`
8896	// ID - Resource ID.
8897	ID *string `json:"id,omitempty"`
8898}
8899
8900// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
8901func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
8902	objectMap := make(map[string]interface{})
8903	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
8904		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
8905	}
8906	if ercc.Name != nil {
8907		objectMap["name"] = ercc.Name
8908	}
8909	if ercc.ID != nil {
8910		objectMap["id"] = ercc.ID
8911	}
8912	return json.Marshal(objectMap)
8913}
8914
8915// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
8916func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
8917	var m map[string]*json.RawMessage
8918	err := json.Unmarshal(body, &m)
8919	if err != nil {
8920		return err
8921	}
8922	for k, v := range m {
8923		switch k {
8924		case "properties":
8925			if v != nil {
8926				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
8927				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
8928				if err != nil {
8929					return err
8930				}
8931				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
8932			}
8933		case "name":
8934			if v != nil {
8935				var name string
8936				err = json.Unmarshal(*v, &name)
8937				if err != nil {
8938					return err
8939				}
8940				ercc.Name = &name
8941			}
8942		case "etag":
8943			if v != nil {
8944				var etag string
8945				err = json.Unmarshal(*v, &etag)
8946				if err != nil {
8947					return err
8948				}
8949				ercc.Etag = &etag
8950			}
8951		case "type":
8952			if v != nil {
8953				var typeVar string
8954				err = json.Unmarshal(*v, &typeVar)
8955				if err != nil {
8956					return err
8957				}
8958				ercc.Type = &typeVar
8959			}
8960		case "id":
8961			if v != nil {
8962				var ID string
8963				err = json.Unmarshal(*v, &ID)
8964				if err != nil {
8965					return err
8966				}
8967				ercc.ID = &ID
8968			}
8969		}
8970	}
8971
8972	return nil
8973}
8974
8975// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
8976// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
8977type ExpressRouteCircuitConnectionListResult struct {
8978	autorest.Response `json:"-"`
8979	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
8980	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
8981	// NextLink - The URL to get the next set of results.
8982	NextLink *string `json:"nextLink,omitempty"`
8983}
8984
8985// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
8986// ExpressRouteCircuitConnection values.
8987type ExpressRouteCircuitConnectionListResultIterator struct {
8988	i    int
8989	page ExpressRouteCircuitConnectionListResultPage
8990}
8991
8992// NextWithContext advances to the next value.  If there was an error making
8993// the request the iterator does not advance and the error is returned.
8994func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8995	if tracing.IsEnabled() {
8996		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
8997		defer func() {
8998			sc := -1
8999			if iter.Response().Response.Response != nil {
9000				sc = iter.Response().Response.Response.StatusCode
9001			}
9002			tracing.EndSpan(ctx, sc, err)
9003		}()
9004	}
9005	iter.i++
9006	if iter.i < len(iter.page.Values()) {
9007		return nil
9008	}
9009	err = iter.page.NextWithContext(ctx)
9010	if err != nil {
9011		iter.i--
9012		return err
9013	}
9014	iter.i = 0
9015	return nil
9016}
9017
9018// Next advances to the next value.  If there was an error making
9019// the request the iterator does not advance and the error is returned.
9020// Deprecated: Use NextWithContext() instead.
9021func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
9022	return iter.NextWithContext(context.Background())
9023}
9024
9025// NotDone returns true if the enumeration should be started or is not yet complete.
9026func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
9027	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9028}
9029
9030// Response returns the raw server response from the last page request.
9031func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
9032	return iter.page.Response()
9033}
9034
9035// Value returns the current value or a zero-initialized value if the
9036// iterator has advanced beyond the end of the collection.
9037func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
9038	if !iter.page.NotDone() {
9039		return ExpressRouteCircuitConnection{}
9040	}
9041	return iter.page.Values()[iter.i]
9042}
9043
9044// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
9045func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
9046	return ExpressRouteCircuitConnectionListResultIterator{page: page}
9047}
9048
9049// IsEmpty returns true if the ListResult contains no values.
9050func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
9051	return ercclr.Value == nil || len(*ercclr.Value) == 0
9052}
9053
9054// hasNextLink returns true if the NextLink is not empty.
9055func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
9056	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9057}
9058
9059// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
9060// It returns nil if no more results exist.
9061func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9062	if !ercclr.hasNextLink() {
9063		return nil, nil
9064	}
9065	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9066		autorest.AsJSON(),
9067		autorest.AsGet(),
9068		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9069}
9070
9071// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
9072type ExpressRouteCircuitConnectionListResultPage struct {
9073	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
9074	ercclr ExpressRouteCircuitConnectionListResult
9075}
9076
9077// NextWithContext advances to the next page of values.  If there was an error making
9078// the request the page does not advance and the error is returned.
9079func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9080	if tracing.IsEnabled() {
9081		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
9082		defer func() {
9083			sc := -1
9084			if page.Response().Response.Response != nil {
9085				sc = page.Response().Response.Response.StatusCode
9086			}
9087			tracing.EndSpan(ctx, sc, err)
9088		}()
9089	}
9090	for {
9091		next, err := page.fn(ctx, page.ercclr)
9092		if err != nil {
9093			return err
9094		}
9095		page.ercclr = next
9096		if !next.hasNextLink() || !next.IsEmpty() {
9097			break
9098		}
9099	}
9100	return nil
9101}
9102
9103// Next advances to the next page of values.  If there was an error making
9104// the request the page does not advance and the error is returned.
9105// Deprecated: Use NextWithContext() instead.
9106func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
9107	return page.NextWithContext(context.Background())
9108}
9109
9110// NotDone returns true if the page enumeration should be started or is not yet complete.
9111func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
9112	return !page.ercclr.IsEmpty()
9113}
9114
9115// Response returns the raw server response from the last page request.
9116func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
9117	return page.ercclr
9118}
9119
9120// Values returns the slice of values for the current page or nil if there are no values.
9121func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
9122	if page.ercclr.IsEmpty() {
9123		return nil
9124	}
9125	return *page.ercclr.Value
9126}
9127
9128// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
9129func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
9130	return ExpressRouteCircuitConnectionListResultPage{
9131		fn:     getNextPage,
9132		ercclr: cur,
9133	}
9134}
9135
9136// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
9137type ExpressRouteCircuitConnectionPropertiesFormat struct {
9138	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
9139	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
9140	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
9141	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
9142	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
9143	AddressPrefix *string `json:"addressPrefix,omitempty"`
9144	// AuthorizationKey - The authorization key.
9145	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9146	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
9147	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
9148	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9149	ProvisioningState *string `json:"provisioningState,omitempty"`
9150}
9151
9152// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
9153func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
9154	objectMap := make(map[string]interface{})
9155	if erccpf.ExpressRouteCircuitPeering != nil {
9156		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
9157	}
9158	if erccpf.PeerExpressRouteCircuitPeering != nil {
9159		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
9160	}
9161	if erccpf.AddressPrefix != nil {
9162		objectMap["addressPrefix"] = erccpf.AddressPrefix
9163	}
9164	if erccpf.AuthorizationKey != nil {
9165		objectMap["authorizationKey"] = erccpf.AuthorizationKey
9166	}
9167	if erccpf.CircuitConnectionStatus != "" {
9168		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
9169	}
9170	return json.Marshal(objectMap)
9171}
9172
9173// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9174// results of a long-running operation.
9175type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
9176	azure.FutureAPI
9177	// Result returns the result of the asynchronous operation.
9178	// If the operation has not completed it will return an error.
9179	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
9180}
9181
9182// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9183func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9184	var azFuture azure.Future
9185	if err := json.Unmarshal(body, &azFuture); err != nil {
9186		return err
9187	}
9188	future.FutureAPI = &azFuture
9189	future.Result = future.result
9190	return nil
9191}
9192
9193// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
9194func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
9195	var done bool
9196	done, err = future.DoneWithContext(context.Background(), client)
9197	if err != nil {
9198		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9199		return
9200	}
9201	if !done {
9202		ercc.Response.Response = future.Response()
9203		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
9204		return
9205	}
9206	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9207	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9208		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
9209		if err != nil {
9210			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
9211		}
9212	}
9213	return
9214}
9215
9216// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9217// long-running operation.
9218type ExpressRouteCircuitConnectionsDeleteFuture struct {
9219	azure.FutureAPI
9220	// Result returns the result of the asynchronous operation.
9221	// If the operation has not completed it will return an error.
9222	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
9223}
9224
9225// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9226func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9227	var azFuture azure.Future
9228	if err := json.Unmarshal(body, &azFuture); err != nil {
9229		return err
9230	}
9231	future.FutureAPI = &azFuture
9232	future.Result = future.result
9233	return nil
9234}
9235
9236// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
9237func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
9238	var done bool
9239	done, err = future.DoneWithContext(context.Background(), client)
9240	if err != nil {
9241		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9242		return
9243	}
9244	if !done {
9245		ar.Response = future.Response()
9246		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
9247		return
9248	}
9249	ar.Response = future.Response()
9250	return
9251}
9252
9253// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
9254type ExpressRouteCircuitListResult struct {
9255	autorest.Response `json:"-"`
9256	// Value - A list of ExpressRouteCircuits in a resource group.
9257	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
9258	// NextLink - The URL to get the next set of results.
9259	NextLink *string `json:"nextLink,omitempty"`
9260}
9261
9262// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
9263// values.
9264type ExpressRouteCircuitListResultIterator struct {
9265	i    int
9266	page ExpressRouteCircuitListResultPage
9267}
9268
9269// NextWithContext advances to the next value.  If there was an error making
9270// the request the iterator does not advance and the error is returned.
9271func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
9272	if tracing.IsEnabled() {
9273		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
9274		defer func() {
9275			sc := -1
9276			if iter.Response().Response.Response != nil {
9277				sc = iter.Response().Response.Response.StatusCode
9278			}
9279			tracing.EndSpan(ctx, sc, err)
9280		}()
9281	}
9282	iter.i++
9283	if iter.i < len(iter.page.Values()) {
9284		return nil
9285	}
9286	err = iter.page.NextWithContext(ctx)
9287	if err != nil {
9288		iter.i--
9289		return err
9290	}
9291	iter.i = 0
9292	return nil
9293}
9294
9295// Next advances to the next value.  If there was an error making
9296// the request the iterator does not advance and the error is returned.
9297// Deprecated: Use NextWithContext() instead.
9298func (iter *ExpressRouteCircuitListResultIterator) Next() error {
9299	return iter.NextWithContext(context.Background())
9300}
9301
9302// NotDone returns true if the enumeration should be started or is not yet complete.
9303func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
9304	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9305}
9306
9307// Response returns the raw server response from the last page request.
9308func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
9309	return iter.page.Response()
9310}
9311
9312// Value returns the current value or a zero-initialized value if the
9313// iterator has advanced beyond the end of the collection.
9314func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
9315	if !iter.page.NotDone() {
9316		return ExpressRouteCircuit{}
9317	}
9318	return iter.page.Values()[iter.i]
9319}
9320
9321// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
9322func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
9323	return ExpressRouteCircuitListResultIterator{page: page}
9324}
9325
9326// IsEmpty returns true if the ListResult contains no values.
9327func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
9328	return erclr.Value == nil || len(*erclr.Value) == 0
9329}
9330
9331// hasNextLink returns true if the NextLink is not empty.
9332func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
9333	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
9334}
9335
9336// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
9337// It returns nil if no more results exist.
9338func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
9339	if !erclr.hasNextLink() {
9340		return nil, nil
9341	}
9342	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9343		autorest.AsJSON(),
9344		autorest.AsGet(),
9345		autorest.WithBaseURL(to.String(erclr.NextLink)))
9346}
9347
9348// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
9349type ExpressRouteCircuitListResultPage struct {
9350	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
9351	erclr ExpressRouteCircuitListResult
9352}
9353
9354// NextWithContext advances to the next page of values.  If there was an error making
9355// the request the page does not advance and the error is returned.
9356func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
9357	if tracing.IsEnabled() {
9358		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
9359		defer func() {
9360			sc := -1
9361			if page.Response().Response.Response != nil {
9362				sc = page.Response().Response.Response.StatusCode
9363			}
9364			tracing.EndSpan(ctx, sc, err)
9365		}()
9366	}
9367	for {
9368		next, err := page.fn(ctx, page.erclr)
9369		if err != nil {
9370			return err
9371		}
9372		page.erclr = next
9373		if !next.hasNextLink() || !next.IsEmpty() {
9374			break
9375		}
9376	}
9377	return nil
9378}
9379
9380// Next advances to the next page of values.  If there was an error making
9381// the request the page does not advance and the error is returned.
9382// Deprecated: Use NextWithContext() instead.
9383func (page *ExpressRouteCircuitListResultPage) Next() error {
9384	return page.NextWithContext(context.Background())
9385}
9386
9387// NotDone returns true if the page enumeration should be started or is not yet complete.
9388func (page ExpressRouteCircuitListResultPage) NotDone() bool {
9389	return !page.erclr.IsEmpty()
9390}
9391
9392// Response returns the raw server response from the last page request.
9393func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
9394	return page.erclr
9395}
9396
9397// Values returns the slice of values for the current page or nil if there are no values.
9398func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
9399	if page.erclr.IsEmpty() {
9400		return nil
9401	}
9402	return *page.erclr.Value
9403}
9404
9405// Creates a new instance of the ExpressRouteCircuitListResultPage type.
9406func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
9407	return ExpressRouteCircuitListResultPage{
9408		fn:    getNextPage,
9409		erclr: cur,
9410	}
9411}
9412
9413// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
9414type ExpressRouteCircuitPeering struct {
9415	autorest.Response `json:"-"`
9416	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
9417	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
9418	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9419	Name *string `json:"name,omitempty"`
9420	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9421	Etag *string `json:"etag,omitempty"`
9422	// Type - READ-ONLY; Type of the resource.
9423	Type *string `json:"type,omitempty"`
9424	// ID - Resource ID.
9425	ID *string `json:"id,omitempty"`
9426}
9427
9428// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
9429func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
9430	objectMap := make(map[string]interface{})
9431	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
9432		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
9433	}
9434	if ercp.Name != nil {
9435		objectMap["name"] = ercp.Name
9436	}
9437	if ercp.ID != nil {
9438		objectMap["id"] = ercp.ID
9439	}
9440	return json.Marshal(objectMap)
9441}
9442
9443// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
9444func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
9445	var m map[string]*json.RawMessage
9446	err := json.Unmarshal(body, &m)
9447	if err != nil {
9448		return err
9449	}
9450	for k, v := range m {
9451		switch k {
9452		case "properties":
9453			if v != nil {
9454				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
9455				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
9456				if err != nil {
9457					return err
9458				}
9459				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
9460			}
9461		case "name":
9462			if v != nil {
9463				var name string
9464				err = json.Unmarshal(*v, &name)
9465				if err != nil {
9466					return err
9467				}
9468				ercp.Name = &name
9469			}
9470		case "etag":
9471			if v != nil {
9472				var etag string
9473				err = json.Unmarshal(*v, &etag)
9474				if err != nil {
9475					return err
9476				}
9477				ercp.Etag = &etag
9478			}
9479		case "type":
9480			if v != nil {
9481				var typeVar string
9482				err = json.Unmarshal(*v, &typeVar)
9483				if err != nil {
9484					return err
9485				}
9486				ercp.Type = &typeVar
9487			}
9488		case "id":
9489			if v != nil {
9490				var ID string
9491				err = json.Unmarshal(*v, &ID)
9492				if err != nil {
9493					return err
9494				}
9495				ercp.ID = &ID
9496			}
9497		}
9498	}
9499
9500	return nil
9501}
9502
9503// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
9504type ExpressRouteCircuitPeeringConfig struct {
9505	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
9506	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
9507	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
9508	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
9509	// AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
9510	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
9511	// LegacyMode - The legacy mode of the peering.
9512	LegacyMode *int32 `json:"legacyMode,omitempty"`
9513	// CustomerASN - The CustomerASN of the peering.
9514	CustomerASN *int32 `json:"customerASN,omitempty"`
9515	// RoutingRegistryName - The RoutingRegistryName of the configuration.
9516	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
9517}
9518
9519// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
9520type ExpressRouteCircuitPeeringID struct {
9521	// ID - The ID of the ExpressRoute circuit peering.
9522	ID *string `json:"id,omitempty"`
9523}
9524
9525// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
9526// that belong to an ExpressRouteCircuit.
9527type ExpressRouteCircuitPeeringListResult struct {
9528	autorest.Response `json:"-"`
9529	// Value - The peerings in an express route circuit.
9530	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
9531	// NextLink - The URL to get the next set of results.
9532	NextLink *string `json:"nextLink,omitempty"`
9533}
9534
9535// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
9536// ExpressRouteCircuitPeering values.
9537type ExpressRouteCircuitPeeringListResultIterator struct {
9538	i    int
9539	page ExpressRouteCircuitPeeringListResultPage
9540}
9541
9542// NextWithContext advances to the next value.  If there was an error making
9543// the request the iterator does not advance and the error is returned.
9544func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
9545	if tracing.IsEnabled() {
9546		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
9547		defer func() {
9548			sc := -1
9549			if iter.Response().Response.Response != nil {
9550				sc = iter.Response().Response.Response.StatusCode
9551			}
9552			tracing.EndSpan(ctx, sc, err)
9553		}()
9554	}
9555	iter.i++
9556	if iter.i < len(iter.page.Values()) {
9557		return nil
9558	}
9559	err = iter.page.NextWithContext(ctx)
9560	if err != nil {
9561		iter.i--
9562		return err
9563	}
9564	iter.i = 0
9565	return nil
9566}
9567
9568// Next advances to the next value.  If there was an error making
9569// the request the iterator does not advance and the error is returned.
9570// Deprecated: Use NextWithContext() instead.
9571func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
9572	return iter.NextWithContext(context.Background())
9573}
9574
9575// NotDone returns true if the enumeration should be started or is not yet complete.
9576func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
9577	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9578}
9579
9580// Response returns the raw server response from the last page request.
9581func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
9582	return iter.page.Response()
9583}
9584
9585// Value returns the current value or a zero-initialized value if the
9586// iterator has advanced beyond the end of the collection.
9587func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
9588	if !iter.page.NotDone() {
9589		return ExpressRouteCircuitPeering{}
9590	}
9591	return iter.page.Values()[iter.i]
9592}
9593
9594// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
9595func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
9596	return ExpressRouteCircuitPeeringListResultIterator{page: page}
9597}
9598
9599// IsEmpty returns true if the ListResult contains no values.
9600func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
9601	return ercplr.Value == nil || len(*ercplr.Value) == 0
9602}
9603
9604// hasNextLink returns true if the NextLink is not empty.
9605func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
9606	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
9607}
9608
9609// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
9610// It returns nil if no more results exist.
9611func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
9612	if !ercplr.hasNextLink() {
9613		return nil, nil
9614	}
9615	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9616		autorest.AsJSON(),
9617		autorest.AsGet(),
9618		autorest.WithBaseURL(to.String(ercplr.NextLink)))
9619}
9620
9621// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
9622type ExpressRouteCircuitPeeringListResultPage struct {
9623	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
9624	ercplr ExpressRouteCircuitPeeringListResult
9625}
9626
9627// NextWithContext advances to the next page of values.  If there was an error making
9628// the request the page does not advance and the error is returned.
9629func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
9630	if tracing.IsEnabled() {
9631		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
9632		defer func() {
9633			sc := -1
9634			if page.Response().Response.Response != nil {
9635				sc = page.Response().Response.Response.StatusCode
9636			}
9637			tracing.EndSpan(ctx, sc, err)
9638		}()
9639	}
9640	for {
9641		next, err := page.fn(ctx, page.ercplr)
9642		if err != nil {
9643			return err
9644		}
9645		page.ercplr = next
9646		if !next.hasNextLink() || !next.IsEmpty() {
9647			break
9648		}
9649	}
9650	return nil
9651}
9652
9653// Next advances to the next page of values.  If there was an error making
9654// the request the page does not advance and the error is returned.
9655// Deprecated: Use NextWithContext() instead.
9656func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
9657	return page.NextWithContext(context.Background())
9658}
9659
9660// NotDone returns true if the page enumeration should be started or is not yet complete.
9661func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
9662	return !page.ercplr.IsEmpty()
9663}
9664
9665// Response returns the raw server response from the last page request.
9666func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
9667	return page.ercplr
9668}
9669
9670// Values returns the slice of values for the current page or nil if there are no values.
9671func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
9672	if page.ercplr.IsEmpty() {
9673		return nil
9674	}
9675	return *page.ercplr.Value
9676}
9677
9678// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
9679func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
9680	return ExpressRouteCircuitPeeringListResultPage{
9681		fn:     getNextPage,
9682		ercplr: cur,
9683	}
9684}
9685
9686// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
9687type ExpressRouteCircuitPeeringPropertiesFormat struct {
9688	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9689	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9690	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9691	State ExpressRoutePeeringState `json:"state,omitempty"`
9692	// AzureASN - The Azure ASN.
9693	AzureASN *int32 `json:"azureASN,omitempty"`
9694	// PeerASN - The peer ASN.
9695	PeerASN *int64 `json:"peerASN,omitempty"`
9696	// PrimaryPeerAddressPrefix - The primary address prefix.
9697	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9698	// SecondaryPeerAddressPrefix - The secondary address prefix.
9699	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9700	// PrimaryAzurePort - The primary port.
9701	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9702	// SecondaryAzurePort - The secondary port.
9703	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9704	// SharedKey - The shared key.
9705	SharedKey *string `json:"sharedKey,omitempty"`
9706	// VlanID - The VLAN ID.
9707	VlanID *int32 `json:"vlanId,omitempty"`
9708	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9709	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9710	// Stats - Gets peering stats.
9711	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
9712	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9713	ProvisioningState *string `json:"provisioningState,omitempty"`
9714	// GatewayManagerEtag - The GatewayManager Etag.
9715	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9716	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9717	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9718	// RouteFilter - The reference of the RouteFilter resource.
9719	RouteFilter *SubResource `json:"routeFilter,omitempty"`
9720	// Ipv6PeeringConfig - The IPv6 peering configuration.
9721	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9722	// ExpressRouteConnection - The ExpressRoute connection.
9723	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
9724	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
9725	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
9726	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
9727	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
9728}
9729
9730// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
9731func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
9732	objectMap := make(map[string]interface{})
9733	if ercppf.PeeringType != "" {
9734		objectMap["peeringType"] = ercppf.PeeringType
9735	}
9736	if ercppf.State != "" {
9737		objectMap["state"] = ercppf.State
9738	}
9739	if ercppf.AzureASN != nil {
9740		objectMap["azureASN"] = ercppf.AzureASN
9741	}
9742	if ercppf.PeerASN != nil {
9743		objectMap["peerASN"] = ercppf.PeerASN
9744	}
9745	if ercppf.PrimaryPeerAddressPrefix != nil {
9746		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
9747	}
9748	if ercppf.SecondaryPeerAddressPrefix != nil {
9749		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
9750	}
9751	if ercppf.PrimaryAzurePort != nil {
9752		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
9753	}
9754	if ercppf.SecondaryAzurePort != nil {
9755		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
9756	}
9757	if ercppf.SharedKey != nil {
9758		objectMap["sharedKey"] = ercppf.SharedKey
9759	}
9760	if ercppf.VlanID != nil {
9761		objectMap["vlanId"] = ercppf.VlanID
9762	}
9763	if ercppf.MicrosoftPeeringConfig != nil {
9764		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
9765	}
9766	if ercppf.Stats != nil {
9767		objectMap["stats"] = ercppf.Stats
9768	}
9769	if ercppf.ProvisioningState != nil {
9770		objectMap["provisioningState"] = ercppf.ProvisioningState
9771	}
9772	if ercppf.GatewayManagerEtag != nil {
9773		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
9774	}
9775	if ercppf.LastModifiedBy != nil {
9776		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
9777	}
9778	if ercppf.RouteFilter != nil {
9779		objectMap["routeFilter"] = ercppf.RouteFilter
9780	}
9781	if ercppf.Ipv6PeeringConfig != nil {
9782		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
9783	}
9784	if ercppf.ExpressRouteConnection != nil {
9785		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
9786	}
9787	if ercppf.Connections != nil {
9788		objectMap["connections"] = ercppf.Connections
9789	}
9790	return json.Marshal(objectMap)
9791}
9792
9793// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
9794// of a long-running operation.
9795type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
9796	azure.FutureAPI
9797	// Result returns the result of the asynchronous operation.
9798	// If the operation has not completed it will return an error.
9799	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
9800}
9801
9802// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9803func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9804	var azFuture azure.Future
9805	if err := json.Unmarshal(body, &azFuture); err != nil {
9806		return err
9807	}
9808	future.FutureAPI = &azFuture
9809	future.Result = future.result
9810	return nil
9811}
9812
9813// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
9814func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
9815	var done bool
9816	done, err = future.DoneWithContext(context.Background(), client)
9817	if err != nil {
9818		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9819		return
9820	}
9821	if !done {
9822		ercp.Response.Response = future.Response()
9823		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
9824		return
9825	}
9826	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9827	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
9828		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
9829		if err != nil {
9830			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
9831		}
9832	}
9833	return
9834}
9835
9836// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
9837// long-running operation.
9838type ExpressRouteCircuitPeeringsDeleteFuture struct {
9839	azure.FutureAPI
9840	// Result returns the result of the asynchronous operation.
9841	// If the operation has not completed it will return an error.
9842	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
9843}
9844
9845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9846func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
9847	var azFuture azure.Future
9848	if err := json.Unmarshal(body, &azFuture); err != nil {
9849		return err
9850	}
9851	future.FutureAPI = &azFuture
9852	future.Result = future.result
9853	return nil
9854}
9855
9856// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
9857func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
9858	var done bool
9859	done, err = future.DoneWithContext(context.Background(), client)
9860	if err != nil {
9861		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
9862		return
9863	}
9864	if !done {
9865		ar.Response = future.Response()
9866		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
9867		return
9868	}
9869	ar.Response = future.Response()
9870	return
9871}
9872
9873// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
9874type ExpressRouteCircuitPropertiesFormat struct {
9875	// AllowClassicOperations - Allow classic operations.
9876	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
9877	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
9878	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
9879	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9880	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9881	// Authorizations - The list of authorizations.
9882	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
9883	// Peerings - The list of peerings.
9884	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
9885	// ServiceKey - The ServiceKey.
9886	ServiceKey *string `json:"serviceKey,omitempty"`
9887	// ServiceProviderNotes - The ServiceProviderNotes.
9888	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9889	// ServiceProviderProperties - The ServiceProviderProperties.
9890	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
9891	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
9892	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
9893	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
9894	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
9895	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
9896	Stag *int32 `json:"stag,omitempty"`
9897	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9898	ProvisioningState *string `json:"provisioningState,omitempty"`
9899	// GatewayManagerEtag - The GatewayManager Etag.
9900	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9901	// GlobalReachEnabled - Flag denoting Global reach status.
9902	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
9903}
9904
9905// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
9906func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
9907	objectMap := make(map[string]interface{})
9908	if ercpf.AllowClassicOperations != nil {
9909		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
9910	}
9911	if ercpf.CircuitProvisioningState != nil {
9912		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
9913	}
9914	if ercpf.ServiceProviderProvisioningState != "" {
9915		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
9916	}
9917	if ercpf.Authorizations != nil {
9918		objectMap["authorizations"] = ercpf.Authorizations
9919	}
9920	if ercpf.Peerings != nil {
9921		objectMap["peerings"] = ercpf.Peerings
9922	}
9923	if ercpf.ServiceKey != nil {
9924		objectMap["serviceKey"] = ercpf.ServiceKey
9925	}
9926	if ercpf.ServiceProviderNotes != nil {
9927		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
9928	}
9929	if ercpf.ServiceProviderProperties != nil {
9930		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
9931	}
9932	if ercpf.ExpressRoutePort != nil {
9933		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
9934	}
9935	if ercpf.BandwidthInGbps != nil {
9936		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
9937	}
9938	if ercpf.ProvisioningState != nil {
9939		objectMap["provisioningState"] = ercpf.ProvisioningState
9940	}
9941	if ercpf.GatewayManagerEtag != nil {
9942		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
9943	}
9944	if ercpf.GlobalReachEnabled != nil {
9945		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
9946	}
9947	return json.Marshal(objectMap)
9948}
9949
9950// ExpressRouteCircuitReference reference to an express route circuit.
9951type ExpressRouteCircuitReference struct {
9952	// ID - Corresponding Express Route Circuit Id.
9953	ID *string `json:"id,omitempty"`
9954}
9955
9956// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
9957type ExpressRouteCircuitRoutesTable struct {
9958	// NetworkProperty - IP address of a network entity.
9959	NetworkProperty *string `json:"network,omitempty"`
9960	// NextHop - NextHop address.
9961	NextHop *string `json:"nextHop,omitempty"`
9962	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
9963	LocPrf *string `json:"locPrf,omitempty"`
9964	// Weight - Route Weight.
9965	Weight *int32 `json:"weight,omitempty"`
9966	// Path - Autonomous system paths to the destination network.
9967	Path *string `json:"path,omitempty"`
9968}
9969
9970// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9971type ExpressRouteCircuitRoutesTableSummary struct {
9972	// Neighbor - IP address of the neighbor.
9973	Neighbor *string `json:"neighbor,omitempty"`
9974	// V - BGP version number spoken to the neighbor.
9975	V *int32 `json:"v,omitempty"`
9976	// As - Autonomous system number.
9977	As *int32 `json:"as,omitempty"`
9978	// 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.
9979	UpDown *string `json:"upDown,omitempty"`
9980	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9981	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
9982}
9983
9984// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
9985// Circuits API.
9986type ExpressRouteCircuitsArpTableListResult struct {
9987	autorest.Response `json:"-"`
9988	// Value - Gets list of the ARP table.
9989	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
9990	// NextLink - The URL to get the next set of results.
9991	NextLink *string `json:"nextLink,omitempty"`
9992}
9993
9994// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9995// long-running operation.
9996type ExpressRouteCircuitsCreateOrUpdateFuture struct {
9997	azure.FutureAPI
9998	// Result returns the result of the asynchronous operation.
9999	// If the operation has not completed it will return an error.
10000	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10001}
10002
10003// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10004func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10005	var azFuture azure.Future
10006	if err := json.Unmarshal(body, &azFuture); err != nil {
10007		return err
10008	}
10009	future.FutureAPI = &azFuture
10010	future.Result = future.result
10011	return nil
10012}
10013
10014// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
10015func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10016	var done bool
10017	done, err = future.DoneWithContext(context.Background(), client)
10018	if err != nil {
10019		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10020		return
10021	}
10022	if !done {
10023		erc.Response.Response = future.Response()
10024		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
10025		return
10026	}
10027	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10028	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10029		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10030		if err != nil {
10031			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10032		}
10033	}
10034	return
10035}
10036
10037// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
10038// long-running operation.
10039type ExpressRouteCircuitsDeleteFuture struct {
10040	azure.FutureAPI
10041	// Result returns the result of the asynchronous operation.
10042	// If the operation has not completed it will return an error.
10043	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
10044}
10045
10046// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10047func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
10048	var azFuture azure.Future
10049	if err := json.Unmarshal(body, &azFuture); err != nil {
10050		return err
10051	}
10052	future.FutureAPI = &azFuture
10053	future.Result = future.result
10054	return nil
10055}
10056
10057// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
10058func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
10059	var done bool
10060	done, err = future.DoneWithContext(context.Background(), client)
10061	if err != nil {
10062		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
10063		return
10064	}
10065	if !done {
10066		ar.Response = future.Response()
10067		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
10068		return
10069	}
10070	ar.Response = future.Response()
10071	return
10072}
10073
10074// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
10075// ExpressRouteCircuit.
10076type ExpressRouteCircuitServiceProviderProperties struct {
10077	// ServiceProviderName - The serviceProviderName.
10078	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
10079	// PeeringLocation - The peering location.
10080	PeeringLocation *string `json:"peeringLocation,omitempty"`
10081	// BandwidthInMbps - The BandwidthInMbps.
10082	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10083}
10084
10085// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
10086type ExpressRouteCircuitSku struct {
10087	// Name - The name of the SKU.
10088	Name *string `json:"name,omitempty"`
10089	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
10090	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
10091	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
10092	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
10093}
10094
10095// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
10096// long-running operation.
10097type ExpressRouteCircuitsListArpTableFuture struct {
10098	azure.FutureAPI
10099	// Result returns the result of the asynchronous operation.
10100	// If the operation has not completed it will return an error.
10101	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
10102}
10103
10104// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10105func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
10106	var azFuture azure.Future
10107	if err := json.Unmarshal(body, &azFuture); err != nil {
10108		return err
10109	}
10110	future.FutureAPI = &azFuture
10111	future.Result = future.result
10112	return nil
10113}
10114
10115// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
10116func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10117	var done bool
10118	done, err = future.DoneWithContext(context.Background(), client)
10119	if err != nil {
10120		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
10121		return
10122	}
10123	if !done {
10124		ercatlr.Response.Response = future.Response()
10125		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
10126		return
10127	}
10128	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10129	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10130		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10131		if err != nil {
10132			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10133		}
10134	}
10135	return
10136}
10137
10138// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
10139// long-running operation.
10140type ExpressRouteCircuitsListRoutesTableFuture struct {
10141	azure.FutureAPI
10142	// Result returns the result of the asynchronous operation.
10143	// If the operation has not completed it will return an error.
10144	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10145}
10146
10147// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10148func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10149	var azFuture azure.Future
10150	if err := json.Unmarshal(body, &azFuture); err != nil {
10151		return err
10152	}
10153	future.FutureAPI = &azFuture
10154	future.Result = future.result
10155	return nil
10156}
10157
10158// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
10159func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10160	var done bool
10161	done, err = future.DoneWithContext(context.Background(), client)
10162	if err != nil {
10163		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10164		return
10165	}
10166	if !done {
10167		ercrtlr.Response.Response = future.Response()
10168		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
10169		return
10170	}
10171	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10172	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10173		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10174		if err != nil {
10175			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10176		}
10177	}
10178	return
10179}
10180
10181// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
10182// results of a long-running operation.
10183type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
10184	azure.FutureAPI
10185	// Result returns the result of the asynchronous operation.
10186	// If the operation has not completed it will return an error.
10187	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
10188}
10189
10190// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10191func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10192	var azFuture azure.Future
10193	if err := json.Unmarshal(body, &azFuture); err != nil {
10194		return err
10195	}
10196	future.FutureAPI = &azFuture
10197	future.Result = future.result
10198	return nil
10199}
10200
10201// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
10202func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
10203	var done bool
10204	done, err = future.DoneWithContext(context.Background(), client)
10205	if err != nil {
10206		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10207		return
10208	}
10209	if !done {
10210		ercrtslr.Response.Response = future.Response()
10211		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
10212		return
10213	}
10214	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10215	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
10216		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
10217		if err != nil {
10218			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
10219		}
10220	}
10221	return
10222}
10223
10224// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
10225// Circuits API.
10226type ExpressRouteCircuitsRoutesTableListResult struct {
10227	autorest.Response `json:"-"`
10228	// Value - The list of routes table.
10229	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
10230	// NextLink - The URL to get the next set of results.
10231	NextLink *string `json:"nextLink,omitempty"`
10232}
10233
10234// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
10235// Express Route Circuits API.
10236type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
10237	autorest.Response `json:"-"`
10238	// Value - A list of the routes table.
10239	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
10240	// NextLink - The URL to get the next set of results.
10241	NextLink *string `json:"nextLink,omitempty"`
10242}
10243
10244// ExpressRouteCircuitStats contains stats associated with the peering.
10245type ExpressRouteCircuitStats struct {
10246	autorest.Response `json:"-"`
10247	// PrimarybytesIn - Gets BytesIn of the peering.
10248	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
10249	// PrimarybytesOut - Gets BytesOut of the peering.
10250	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
10251	// SecondarybytesIn - Gets BytesIn of the peering.
10252	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
10253	// SecondarybytesOut - Gets BytesOut of the peering.
10254	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
10255}
10256
10257// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10258// long-running operation.
10259type ExpressRouteCircuitsUpdateTagsFuture struct {
10260	azure.FutureAPI
10261	// Result returns the result of the asynchronous operation.
10262	// If the operation has not completed it will return an error.
10263	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
10264}
10265
10266// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10267func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10268	var azFuture azure.Future
10269	if err := json.Unmarshal(body, &azFuture); err != nil {
10270		return err
10271	}
10272	future.FutureAPI = &azFuture
10273	future.Result = future.result
10274	return nil
10275}
10276
10277// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
10278func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
10279	var done bool
10280	done, err = future.DoneWithContext(context.Background(), client)
10281	if err != nil {
10282		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10283		return
10284	}
10285	if !done {
10286		erc.Response.Response = future.Response()
10287		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
10288		return
10289	}
10290	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10291	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10292		erc, err = client.UpdateTagsResponder(erc.Response.Response)
10293		if err != nil {
10294			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
10295		}
10296	}
10297	return
10298}
10299
10300// ExpressRouteConnection expressRouteConnection resource.
10301type ExpressRouteConnection struct {
10302	autorest.Response `json:"-"`
10303	// ExpressRouteConnectionProperties - Properties of the express route connection.
10304	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
10305	// Name - The name of the resource.
10306	Name *string `json:"name,omitempty"`
10307	// ID - Resource ID.
10308	ID *string `json:"id,omitempty"`
10309}
10310
10311// MarshalJSON is the custom marshaler for ExpressRouteConnection.
10312func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
10313	objectMap := make(map[string]interface{})
10314	if erc.ExpressRouteConnectionProperties != nil {
10315		objectMap["properties"] = erc.ExpressRouteConnectionProperties
10316	}
10317	if erc.Name != nil {
10318		objectMap["name"] = erc.Name
10319	}
10320	if erc.ID != nil {
10321		objectMap["id"] = erc.ID
10322	}
10323	return json.Marshal(objectMap)
10324}
10325
10326// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
10327func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
10328	var m map[string]*json.RawMessage
10329	err := json.Unmarshal(body, &m)
10330	if err != nil {
10331		return err
10332	}
10333	for k, v := range m {
10334		switch k {
10335		case "properties":
10336			if v != nil {
10337				var expressRouteConnectionProperties ExpressRouteConnectionProperties
10338				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
10339				if err != nil {
10340					return err
10341				}
10342				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
10343			}
10344		case "name":
10345			if v != nil {
10346				var name string
10347				err = json.Unmarshal(*v, &name)
10348				if err != nil {
10349					return err
10350				}
10351				erc.Name = &name
10352			}
10353		case "id":
10354			if v != nil {
10355				var ID string
10356				err = json.Unmarshal(*v, &ID)
10357				if err != nil {
10358					return err
10359				}
10360				erc.ID = &ID
10361			}
10362		}
10363	}
10364
10365	return nil
10366}
10367
10368// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
10369type ExpressRouteConnectionID struct {
10370	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
10371	ID *string `json:"id,omitempty"`
10372}
10373
10374// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
10375func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
10376	objectMap := make(map[string]interface{})
10377	return json.Marshal(objectMap)
10378}
10379
10380// ExpressRouteConnectionList expressRouteConnection list.
10381type ExpressRouteConnectionList struct {
10382	autorest.Response `json:"-"`
10383	// Value - The list of ExpressRoute connections.
10384	Value *[]ExpressRouteConnection `json:"value,omitempty"`
10385}
10386
10387// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
10388type ExpressRouteConnectionProperties struct {
10389	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10390	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10391	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
10392	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
10393	// AuthorizationKey - Authorization key to establish the connection.
10394	AuthorizationKey *string `json:"authorizationKey,omitempty"`
10395	// RoutingWeight - The routing weight associated to the connection.
10396	RoutingWeight *int32 `json:"routingWeight,omitempty"`
10397}
10398
10399// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
10400// a long-running operation.
10401type ExpressRouteConnectionsCreateOrUpdateFuture struct {
10402	azure.FutureAPI
10403	// Result returns the result of the asynchronous operation.
10404	// If the operation has not completed it will return an error.
10405	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
10406}
10407
10408// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10409func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10410	var azFuture azure.Future
10411	if err := json.Unmarshal(body, &azFuture); err != nil {
10412		return err
10413	}
10414	future.FutureAPI = &azFuture
10415	future.Result = future.result
10416	return nil
10417}
10418
10419// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
10420func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
10421	var done bool
10422	done, err = future.DoneWithContext(context.Background(), client)
10423	if err != nil {
10424		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10425		return
10426	}
10427	if !done {
10428		erc.Response.Response = future.Response()
10429		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
10430		return
10431	}
10432	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10433	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
10434		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
10435		if err != nil {
10436			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
10437		}
10438	}
10439	return
10440}
10441
10442// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
10443// long-running operation.
10444type ExpressRouteConnectionsDeleteFuture struct {
10445	azure.FutureAPI
10446	// Result returns the result of the asynchronous operation.
10447	// If the operation has not completed it will return an error.
10448	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
10449}
10450
10451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10452func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
10453	var azFuture azure.Future
10454	if err := json.Unmarshal(body, &azFuture); err != nil {
10455		return err
10456	}
10457	future.FutureAPI = &azFuture
10458	future.Result = future.result
10459	return nil
10460}
10461
10462// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
10463func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
10464	var done bool
10465	done, err = future.DoneWithContext(context.Background(), client)
10466	if err != nil {
10467		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
10468		return
10469	}
10470	if !done {
10471		ar.Response = future.Response()
10472		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
10473		return
10474	}
10475	ar.Response = future.Response()
10476	return
10477}
10478
10479// ExpressRouteCrossConnection expressRouteCrossConnection resource.
10480type ExpressRouteCrossConnection struct {
10481	autorest.Response `json:"-"`
10482	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
10483	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
10484	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
10485	Etag *string `json:"etag,omitempty"`
10486	// ID - Resource ID.
10487	ID *string `json:"id,omitempty"`
10488	// Name - READ-ONLY; Resource name.
10489	Name *string `json:"name,omitempty"`
10490	// Type - READ-ONLY; Resource type.
10491	Type *string `json:"type,omitempty"`
10492	// Location - Resource location.
10493	Location *string `json:"location,omitempty"`
10494	// Tags - Resource tags.
10495	Tags map[string]*string `json:"tags"`
10496}
10497
10498// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
10499func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
10500	objectMap := make(map[string]interface{})
10501	if ercc.ExpressRouteCrossConnectionProperties != nil {
10502		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
10503	}
10504	if ercc.ID != nil {
10505		objectMap["id"] = ercc.ID
10506	}
10507	if ercc.Location != nil {
10508		objectMap["location"] = ercc.Location
10509	}
10510	if ercc.Tags != nil {
10511		objectMap["tags"] = ercc.Tags
10512	}
10513	return json.Marshal(objectMap)
10514}
10515
10516// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
10517func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
10518	var m map[string]*json.RawMessage
10519	err := json.Unmarshal(body, &m)
10520	if err != nil {
10521		return err
10522	}
10523	for k, v := range m {
10524		switch k {
10525		case "properties":
10526			if v != nil {
10527				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
10528				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
10529				if err != nil {
10530					return err
10531				}
10532				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
10533			}
10534		case "etag":
10535			if v != nil {
10536				var etag string
10537				err = json.Unmarshal(*v, &etag)
10538				if err != nil {
10539					return err
10540				}
10541				ercc.Etag = &etag
10542			}
10543		case "id":
10544			if v != nil {
10545				var ID string
10546				err = json.Unmarshal(*v, &ID)
10547				if err != nil {
10548					return err
10549				}
10550				ercc.ID = &ID
10551			}
10552		case "name":
10553			if v != nil {
10554				var name string
10555				err = json.Unmarshal(*v, &name)
10556				if err != nil {
10557					return err
10558				}
10559				ercc.Name = &name
10560			}
10561		case "type":
10562			if v != nil {
10563				var typeVar string
10564				err = json.Unmarshal(*v, &typeVar)
10565				if err != nil {
10566					return err
10567				}
10568				ercc.Type = &typeVar
10569			}
10570		case "location":
10571			if v != nil {
10572				var location string
10573				err = json.Unmarshal(*v, &location)
10574				if err != nil {
10575					return err
10576				}
10577				ercc.Location = &location
10578			}
10579		case "tags":
10580			if v != nil {
10581				var tags map[string]*string
10582				err = json.Unmarshal(*v, &tags)
10583				if err != nil {
10584					return err
10585				}
10586				ercc.Tags = tags
10587			}
10588		}
10589	}
10590
10591	return nil
10592}
10593
10594// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
10595type ExpressRouteCrossConnectionListResult struct {
10596	autorest.Response `json:"-"`
10597	// Value - A list of ExpressRouteCrossConnection resources.
10598	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
10599	// NextLink - READ-ONLY; The URL to get the next set of results.
10600	NextLink *string `json:"nextLink,omitempty"`
10601}
10602
10603// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
10604func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
10605	objectMap := make(map[string]interface{})
10606	if ercclr.Value != nil {
10607		objectMap["value"] = ercclr.Value
10608	}
10609	return json.Marshal(objectMap)
10610}
10611
10612// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
10613// ExpressRouteCrossConnection values.
10614type ExpressRouteCrossConnectionListResultIterator struct {
10615	i    int
10616	page ExpressRouteCrossConnectionListResultPage
10617}
10618
10619// NextWithContext advances to the next value.  If there was an error making
10620// the request the iterator does not advance and the error is returned.
10621func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
10622	if tracing.IsEnabled() {
10623		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
10624		defer func() {
10625			sc := -1
10626			if iter.Response().Response.Response != nil {
10627				sc = iter.Response().Response.Response.StatusCode
10628			}
10629			tracing.EndSpan(ctx, sc, err)
10630		}()
10631	}
10632	iter.i++
10633	if iter.i < len(iter.page.Values()) {
10634		return nil
10635	}
10636	err = iter.page.NextWithContext(ctx)
10637	if err != nil {
10638		iter.i--
10639		return err
10640	}
10641	iter.i = 0
10642	return nil
10643}
10644
10645// Next advances to the next value.  If there was an error making
10646// the request the iterator does not advance and the error is returned.
10647// Deprecated: Use NextWithContext() instead.
10648func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
10649	return iter.NextWithContext(context.Background())
10650}
10651
10652// NotDone returns true if the enumeration should be started or is not yet complete.
10653func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
10654	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10655}
10656
10657// Response returns the raw server response from the last page request.
10658func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
10659	return iter.page.Response()
10660}
10661
10662// Value returns the current value or a zero-initialized value if the
10663// iterator has advanced beyond the end of the collection.
10664func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
10665	if !iter.page.NotDone() {
10666		return ExpressRouteCrossConnection{}
10667	}
10668	return iter.page.Values()[iter.i]
10669}
10670
10671// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
10672func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
10673	return ExpressRouteCrossConnectionListResultIterator{page: page}
10674}
10675
10676// IsEmpty returns true if the ListResult contains no values.
10677func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
10678	return ercclr.Value == nil || len(*ercclr.Value) == 0
10679}
10680
10681// hasNextLink returns true if the NextLink is not empty.
10682func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
10683	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
10684}
10685
10686// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
10687// It returns nil if no more results exist.
10688func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
10689	if !ercclr.hasNextLink() {
10690		return nil, nil
10691	}
10692	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10693		autorest.AsJSON(),
10694		autorest.AsGet(),
10695		autorest.WithBaseURL(to.String(ercclr.NextLink)))
10696}
10697
10698// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
10699type ExpressRouteCrossConnectionListResultPage struct {
10700	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
10701	ercclr ExpressRouteCrossConnectionListResult
10702}
10703
10704// NextWithContext advances to the next page of values.  If there was an error making
10705// the request the page does not advance and the error is returned.
10706func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
10707	if tracing.IsEnabled() {
10708		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
10709		defer func() {
10710			sc := -1
10711			if page.Response().Response.Response != nil {
10712				sc = page.Response().Response.Response.StatusCode
10713			}
10714			tracing.EndSpan(ctx, sc, err)
10715		}()
10716	}
10717	for {
10718		next, err := page.fn(ctx, page.ercclr)
10719		if err != nil {
10720			return err
10721		}
10722		page.ercclr = next
10723		if !next.hasNextLink() || !next.IsEmpty() {
10724			break
10725		}
10726	}
10727	return nil
10728}
10729
10730// Next advances to the next page of values.  If there was an error making
10731// the request the page does not advance and the error is returned.
10732// Deprecated: Use NextWithContext() instead.
10733func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
10734	return page.NextWithContext(context.Background())
10735}
10736
10737// NotDone returns true if the page enumeration should be started or is not yet complete.
10738func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
10739	return !page.ercclr.IsEmpty()
10740}
10741
10742// Response returns the raw server response from the last page request.
10743func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
10744	return page.ercclr
10745}
10746
10747// Values returns the slice of values for the current page or nil if there are no values.
10748func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
10749	if page.ercclr.IsEmpty() {
10750		return nil
10751	}
10752	return *page.ercclr.Value
10753}
10754
10755// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
10756func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
10757	return ExpressRouteCrossConnectionListResultPage{
10758		fn:     getNextPage,
10759		ercclr: cur,
10760	}
10761}
10762
10763// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
10764type ExpressRouteCrossConnectionPeering struct {
10765	autorest.Response `json:"-"`
10766	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
10767	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
10768	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10769	Name *string `json:"name,omitempty"`
10770	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10771	Etag *string `json:"etag,omitempty"`
10772	// ID - Resource ID.
10773	ID *string `json:"id,omitempty"`
10774}
10775
10776// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
10777func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
10778	objectMap := make(map[string]interface{})
10779	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
10780		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
10781	}
10782	if erccp.Name != nil {
10783		objectMap["name"] = erccp.Name
10784	}
10785	if erccp.ID != nil {
10786		objectMap["id"] = erccp.ID
10787	}
10788	return json.Marshal(objectMap)
10789}
10790
10791// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
10792func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
10793	var m map[string]*json.RawMessage
10794	err := json.Unmarshal(body, &m)
10795	if err != nil {
10796		return err
10797	}
10798	for k, v := range m {
10799		switch k {
10800		case "properties":
10801			if v != nil {
10802				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
10803				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
10804				if err != nil {
10805					return err
10806				}
10807				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
10808			}
10809		case "name":
10810			if v != nil {
10811				var name string
10812				err = json.Unmarshal(*v, &name)
10813				if err != nil {
10814					return err
10815				}
10816				erccp.Name = &name
10817			}
10818		case "etag":
10819			if v != nil {
10820				var etag string
10821				err = json.Unmarshal(*v, &etag)
10822				if err != nil {
10823					return err
10824				}
10825				erccp.Etag = &etag
10826			}
10827		case "id":
10828			if v != nil {
10829				var ID string
10830				err = json.Unmarshal(*v, &ID)
10831				if err != nil {
10832					return err
10833				}
10834				erccp.ID = &ID
10835			}
10836		}
10837	}
10838
10839	return nil
10840}
10841
10842// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
10843// that belong to an ExpressRouteCrossConnection.
10844type ExpressRouteCrossConnectionPeeringList struct {
10845	autorest.Response `json:"-"`
10846	// Value - The peerings in an express route cross connection.
10847	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
10848	// NextLink - READ-ONLY; The URL to get the next set of results.
10849	NextLink *string `json:"nextLink,omitempty"`
10850}
10851
10852// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
10853func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
10854	objectMap := make(map[string]interface{})
10855	if erccpl.Value != nil {
10856		objectMap["value"] = erccpl.Value
10857	}
10858	return json.Marshal(objectMap)
10859}
10860
10861// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
10862// ExpressRouteCrossConnectionPeering values.
10863type ExpressRouteCrossConnectionPeeringListIterator struct {
10864	i    int
10865	page ExpressRouteCrossConnectionPeeringListPage
10866}
10867
10868// NextWithContext advances to the next value.  If there was an error making
10869// the request the iterator does not advance and the error is returned.
10870func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
10871	if tracing.IsEnabled() {
10872		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
10873		defer func() {
10874			sc := -1
10875			if iter.Response().Response.Response != nil {
10876				sc = iter.Response().Response.Response.StatusCode
10877			}
10878			tracing.EndSpan(ctx, sc, err)
10879		}()
10880	}
10881	iter.i++
10882	if iter.i < len(iter.page.Values()) {
10883		return nil
10884	}
10885	err = iter.page.NextWithContext(ctx)
10886	if err != nil {
10887		iter.i--
10888		return err
10889	}
10890	iter.i = 0
10891	return nil
10892}
10893
10894// Next advances to the next value.  If there was an error making
10895// the request the iterator does not advance and the error is returned.
10896// Deprecated: Use NextWithContext() instead.
10897func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
10898	return iter.NextWithContext(context.Background())
10899}
10900
10901// NotDone returns true if the enumeration should be started or is not yet complete.
10902func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
10903	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10904}
10905
10906// Response returns the raw server response from the last page request.
10907func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
10908	return iter.page.Response()
10909}
10910
10911// Value returns the current value or a zero-initialized value if the
10912// iterator has advanced beyond the end of the collection.
10913func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
10914	if !iter.page.NotDone() {
10915		return ExpressRouteCrossConnectionPeering{}
10916	}
10917	return iter.page.Values()[iter.i]
10918}
10919
10920// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
10921func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
10922	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
10923}
10924
10925// IsEmpty returns true if the ListResult contains no values.
10926func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
10927	return erccpl.Value == nil || len(*erccpl.Value) == 0
10928}
10929
10930// hasNextLink returns true if the NextLink is not empty.
10931func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
10932	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
10933}
10934
10935// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
10936// It returns nil if no more results exist.
10937func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
10938	if !erccpl.hasNextLink() {
10939		return nil, nil
10940	}
10941	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10942		autorest.AsJSON(),
10943		autorest.AsGet(),
10944		autorest.WithBaseURL(to.String(erccpl.NextLink)))
10945}
10946
10947// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
10948type ExpressRouteCrossConnectionPeeringListPage struct {
10949	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
10950	erccpl ExpressRouteCrossConnectionPeeringList
10951}
10952
10953// NextWithContext advances to the next page of values.  If there was an error making
10954// the request the page does not advance and the error is returned.
10955func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
10956	if tracing.IsEnabled() {
10957		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
10958		defer func() {
10959			sc := -1
10960			if page.Response().Response.Response != nil {
10961				sc = page.Response().Response.Response.StatusCode
10962			}
10963			tracing.EndSpan(ctx, sc, err)
10964		}()
10965	}
10966	for {
10967		next, err := page.fn(ctx, page.erccpl)
10968		if err != nil {
10969			return err
10970		}
10971		page.erccpl = next
10972		if !next.hasNextLink() || !next.IsEmpty() {
10973			break
10974		}
10975	}
10976	return nil
10977}
10978
10979// Next advances to the next page of values.  If there was an error making
10980// the request the page does not advance and the error is returned.
10981// Deprecated: Use NextWithContext() instead.
10982func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
10983	return page.NextWithContext(context.Background())
10984}
10985
10986// NotDone returns true if the page enumeration should be started or is not yet complete.
10987func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
10988	return !page.erccpl.IsEmpty()
10989}
10990
10991// Response returns the raw server response from the last page request.
10992func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
10993	return page.erccpl
10994}
10995
10996// Values returns the slice of values for the current page or nil if there are no values.
10997func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
10998	if page.erccpl.IsEmpty() {
10999		return nil
11000	}
11001	return *page.erccpl.Value
11002}
11003
11004// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
11005func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
11006	return ExpressRouteCrossConnectionPeeringListPage{
11007		fn:     getNextPage,
11008		erccpl: cur,
11009	}
11010}
11011
11012// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
11013type ExpressRouteCrossConnectionPeeringProperties struct {
11014	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
11015	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
11016	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
11017	State ExpressRoutePeeringState `json:"state,omitempty"`
11018	// AzureASN - READ-ONLY; The Azure ASN.
11019	AzureASN *int32 `json:"azureASN,omitempty"`
11020	// PeerASN - The peer ASN.
11021	PeerASN *int64 `json:"peerASN,omitempty"`
11022	// PrimaryPeerAddressPrefix - The primary address prefix.
11023	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
11024	// SecondaryPeerAddressPrefix - The secondary address prefix.
11025	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
11026	// PrimaryAzurePort - READ-ONLY; The primary port.
11027	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11028	// SecondaryAzurePort - READ-ONLY; The secondary port.
11029	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11030	// SharedKey - The shared key.
11031	SharedKey *string `json:"sharedKey,omitempty"`
11032	// VlanID - The VLAN ID.
11033	VlanID *int32 `json:"vlanId,omitempty"`
11034	// MicrosoftPeeringConfig - The Microsoft peering configuration.
11035	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
11036	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11037	ProvisioningState *string `json:"provisioningState,omitempty"`
11038	// GatewayManagerEtag - The GatewayManager Etag.
11039	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
11040	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
11041	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
11042	// Ipv6PeeringConfig - The IPv6 peering configuration.
11043	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
11044}
11045
11046// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
11047func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
11048	objectMap := make(map[string]interface{})
11049	if erccpp.PeeringType != "" {
11050		objectMap["peeringType"] = erccpp.PeeringType
11051	}
11052	if erccpp.State != "" {
11053		objectMap["state"] = erccpp.State
11054	}
11055	if erccpp.PeerASN != nil {
11056		objectMap["peerASN"] = erccpp.PeerASN
11057	}
11058	if erccpp.PrimaryPeerAddressPrefix != nil {
11059		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
11060	}
11061	if erccpp.SecondaryPeerAddressPrefix != nil {
11062		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
11063	}
11064	if erccpp.SharedKey != nil {
11065		objectMap["sharedKey"] = erccpp.SharedKey
11066	}
11067	if erccpp.VlanID != nil {
11068		objectMap["vlanId"] = erccpp.VlanID
11069	}
11070	if erccpp.MicrosoftPeeringConfig != nil {
11071		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
11072	}
11073	if erccpp.GatewayManagerEtag != nil {
11074		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
11075	}
11076	if erccpp.LastModifiedBy != nil {
11077		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
11078	}
11079	if erccpp.Ipv6PeeringConfig != nil {
11080		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
11081	}
11082	return json.Marshal(objectMap)
11083}
11084
11085// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11086// results of a long-running operation.
11087type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
11088	azure.FutureAPI
11089	// Result returns the result of the asynchronous operation.
11090	// If the operation has not completed it will return an error.
11091	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
11092}
11093
11094// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11095func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11096	var azFuture azure.Future
11097	if err := json.Unmarshal(body, &azFuture); err != nil {
11098		return err
11099	}
11100	future.FutureAPI = &azFuture
11101	future.Result = future.result
11102	return nil
11103}
11104
11105// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
11106func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
11107	var done bool
11108	done, err = future.DoneWithContext(context.Background(), client)
11109	if err != nil {
11110		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11111		return
11112	}
11113	if !done {
11114		erccp.Response.Response = future.Response()
11115		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
11116		return
11117	}
11118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11119	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
11120		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
11121		if err != nil {
11122			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
11123		}
11124	}
11125	return
11126}
11127
11128// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
11129// of a long-running operation.
11130type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
11131	azure.FutureAPI
11132	// Result returns the result of the asynchronous operation.
11133	// If the operation has not completed it will return an error.
11134	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
11135}
11136
11137// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11138func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
11139	var azFuture azure.Future
11140	if err := json.Unmarshal(body, &azFuture); err != nil {
11141		return err
11142	}
11143	future.FutureAPI = &azFuture
11144	future.Result = future.result
11145	return nil
11146}
11147
11148// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
11149func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
11150	var done bool
11151	done, err = future.DoneWithContext(context.Background(), client)
11152	if err != nil {
11153		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
11154		return
11155	}
11156	if !done {
11157		ar.Response = future.Response()
11158		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
11159		return
11160	}
11161	ar.Response = future.Response()
11162	return
11163}
11164
11165// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
11166type ExpressRouteCrossConnectionProperties struct {
11167	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
11168	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
11169	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
11170	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
11171	// STag - READ-ONLY; The identifier of the circuit traffic.
11172	STag *int32 `json:"sTag,omitempty"`
11173	// PeeringLocation - The peering location of the ExpressRoute circuit.
11174	PeeringLocation *string `json:"peeringLocation,omitempty"`
11175	// BandwidthInMbps - The circuit bandwidth In Mbps.
11176	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
11177	// ExpressRouteCircuit - The ExpressRouteCircuit.
11178	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
11179	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
11180	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
11181	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
11182	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
11183	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11184	ProvisioningState *string `json:"provisioningState,omitempty"`
11185	// Peerings - The list of peerings.
11186	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
11187}
11188
11189// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
11190func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
11191	objectMap := make(map[string]interface{})
11192	if erccp.PeeringLocation != nil {
11193		objectMap["peeringLocation"] = erccp.PeeringLocation
11194	}
11195	if erccp.BandwidthInMbps != nil {
11196		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
11197	}
11198	if erccp.ExpressRouteCircuit != nil {
11199		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
11200	}
11201	if erccp.ServiceProviderProvisioningState != "" {
11202		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
11203	}
11204	if erccp.ServiceProviderNotes != nil {
11205		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
11206	}
11207	if erccp.Peerings != nil {
11208		objectMap["peerings"] = erccp.Peerings
11209	}
11210	return json.Marshal(objectMap)
11211}
11212
11213// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
11214type ExpressRouteCrossConnectionRoutesTableSummary struct {
11215	// Neighbor - IP address of Neighbor router.
11216	Neighbor *string `json:"neighbor,omitempty"`
11217	// Asn - Autonomous system number.
11218	Asn *int32 `json:"asn,omitempty"`
11219	// 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.
11220	UpDown *string `json:"upDown,omitempty"`
11221	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
11222	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
11223}
11224
11225// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
11226// results of a long-running operation.
11227type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
11228	azure.FutureAPI
11229	// Result returns the result of the asynchronous operation.
11230	// If the operation has not completed it will return an error.
11231	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11232}
11233
11234// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11235func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11236	var azFuture azure.Future
11237	if err := json.Unmarshal(body, &azFuture); err != nil {
11238		return err
11239	}
11240	future.FutureAPI = &azFuture
11241	future.Result = future.result
11242	return nil
11243}
11244
11245// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
11246func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11247	var done bool
11248	done, err = future.DoneWithContext(context.Background(), client)
11249	if err != nil {
11250		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11251		return
11252	}
11253	if !done {
11254		ercc.Response.Response = future.Response()
11255		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
11256		return
11257	}
11258	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11259	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11260		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
11261		if err != nil {
11262			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
11263		}
11264	}
11265	return
11266}
11267
11268// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
11269// of a long-running operation.
11270type ExpressRouteCrossConnectionsListArpTableFuture struct {
11271	azure.FutureAPI
11272	// Result returns the result of the asynchronous operation.
11273	// If the operation has not completed it will return an error.
11274	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
11275}
11276
11277// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11278func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
11279	var azFuture azure.Future
11280	if err := json.Unmarshal(body, &azFuture); err != nil {
11281		return err
11282	}
11283	future.FutureAPI = &azFuture
11284	future.Result = future.result
11285	return nil
11286}
11287
11288// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
11289func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
11290	var done bool
11291	done, err = future.DoneWithContext(context.Background(), client)
11292	if err != nil {
11293		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
11294		return
11295	}
11296	if !done {
11297		ercatlr.Response.Response = future.Response()
11298		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
11299		return
11300	}
11301	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11302	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
11303		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
11304		if err != nil {
11305			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
11306		}
11307	}
11308	return
11309}
11310
11311// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
11312// results of a long-running operation.
11313type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
11314	azure.FutureAPI
11315	// Result returns the result of the asynchronous operation.
11316	// If the operation has not completed it will return an error.
11317	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
11318}
11319
11320// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11321func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
11322	var azFuture azure.Future
11323	if err := json.Unmarshal(body, &azFuture); err != nil {
11324		return err
11325	}
11326	future.FutureAPI = &azFuture
11327	future.Result = future.result
11328	return nil
11329}
11330
11331// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
11332func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
11333	var done bool
11334	done, err = future.DoneWithContext(context.Background(), client)
11335	if err != nil {
11336		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
11337		return
11338	}
11339	if !done {
11340		ercrtlr.Response.Response = future.Response()
11341		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
11342		return
11343	}
11344	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11345	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
11346		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
11347		if err != nil {
11348			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
11349		}
11350	}
11351	return
11352}
11353
11354// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
11355// the results of a long-running operation.
11356type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
11357	azure.FutureAPI
11358	// Result returns the result of the asynchronous operation.
11359	// If the operation has not completed it will return an error.
11360	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
11361}
11362
11363// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11364func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
11365	var azFuture azure.Future
11366	if err := json.Unmarshal(body, &azFuture); err != nil {
11367		return err
11368	}
11369	future.FutureAPI = &azFuture
11370	future.Result = future.result
11371	return nil
11372}
11373
11374// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
11375func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
11376	var done bool
11377	done, err = future.DoneWithContext(context.Background(), client)
11378	if err != nil {
11379		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
11380		return
11381	}
11382	if !done {
11383		erccrtslr.Response.Response = future.Response()
11384		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
11385		return
11386	}
11387	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11388	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
11389		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
11390		if err != nil {
11391			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
11392		}
11393	}
11394	return
11395}
11396
11397// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
11398// the Express Route Cross Connections.
11399type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
11400	autorest.Response `json:"-"`
11401	// Value - A list of the routes table.
11402	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
11403	// NextLink - READ-ONLY; The URL to get the next set of results.
11404	NextLink *string `json:"nextLink,omitempty"`
11405}
11406
11407// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
11408func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
11409	objectMap := make(map[string]interface{})
11410	if erccrtslr.Value != nil {
11411		objectMap["value"] = erccrtslr.Value
11412	}
11413	return json.Marshal(objectMap)
11414}
11415
11416// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
11417// a long-running operation.
11418type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
11419	azure.FutureAPI
11420	// Result returns the result of the asynchronous operation.
11421	// If the operation has not completed it will return an error.
11422	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
11423}
11424
11425// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11426func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11427	var azFuture azure.Future
11428	if err := json.Unmarshal(body, &azFuture); err != nil {
11429		return err
11430	}
11431	future.FutureAPI = &azFuture
11432	future.Result = future.result
11433	return nil
11434}
11435
11436// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
11437func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
11438	var done bool
11439	done, err = future.DoneWithContext(context.Background(), client)
11440	if err != nil {
11441		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11442		return
11443	}
11444	if !done {
11445		ercc.Response.Response = future.Response()
11446		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
11447		return
11448	}
11449	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11450	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
11451		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
11452		if err != nil {
11453			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
11454		}
11455	}
11456	return
11457}
11458
11459// ExpressRouteGateway expressRoute gateway resource.
11460type ExpressRouteGateway struct {
11461	autorest.Response `json:"-"`
11462	// ExpressRouteGatewayProperties - Properties of the express route gateway.
11463	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
11464	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11465	Etag *string `json:"etag,omitempty"`
11466	// ID - Resource ID.
11467	ID *string `json:"id,omitempty"`
11468	// Name - READ-ONLY; Resource name.
11469	Name *string `json:"name,omitempty"`
11470	// Type - READ-ONLY; Resource type.
11471	Type *string `json:"type,omitempty"`
11472	// Location - Resource location.
11473	Location *string `json:"location,omitempty"`
11474	// Tags - Resource tags.
11475	Tags map[string]*string `json:"tags"`
11476}
11477
11478// MarshalJSON is the custom marshaler for ExpressRouteGateway.
11479func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
11480	objectMap := make(map[string]interface{})
11481	if erg.ExpressRouteGatewayProperties != nil {
11482		objectMap["properties"] = erg.ExpressRouteGatewayProperties
11483	}
11484	if erg.ID != nil {
11485		objectMap["id"] = erg.ID
11486	}
11487	if erg.Location != nil {
11488		objectMap["location"] = erg.Location
11489	}
11490	if erg.Tags != nil {
11491		objectMap["tags"] = erg.Tags
11492	}
11493	return json.Marshal(objectMap)
11494}
11495
11496// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
11497func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
11498	var m map[string]*json.RawMessage
11499	err := json.Unmarshal(body, &m)
11500	if err != nil {
11501		return err
11502	}
11503	for k, v := range m {
11504		switch k {
11505		case "properties":
11506			if v != nil {
11507				var expressRouteGatewayProperties ExpressRouteGatewayProperties
11508				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
11509				if err != nil {
11510					return err
11511				}
11512				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
11513			}
11514		case "etag":
11515			if v != nil {
11516				var etag string
11517				err = json.Unmarshal(*v, &etag)
11518				if err != nil {
11519					return err
11520				}
11521				erg.Etag = &etag
11522			}
11523		case "id":
11524			if v != nil {
11525				var ID string
11526				err = json.Unmarshal(*v, &ID)
11527				if err != nil {
11528					return err
11529				}
11530				erg.ID = &ID
11531			}
11532		case "name":
11533			if v != nil {
11534				var name string
11535				err = json.Unmarshal(*v, &name)
11536				if err != nil {
11537					return err
11538				}
11539				erg.Name = &name
11540			}
11541		case "type":
11542			if v != nil {
11543				var typeVar string
11544				err = json.Unmarshal(*v, &typeVar)
11545				if err != nil {
11546					return err
11547				}
11548				erg.Type = &typeVar
11549			}
11550		case "location":
11551			if v != nil {
11552				var location string
11553				err = json.Unmarshal(*v, &location)
11554				if err != nil {
11555					return err
11556				}
11557				erg.Location = &location
11558			}
11559		case "tags":
11560			if v != nil {
11561				var tags map[string]*string
11562				err = json.Unmarshal(*v, &tags)
11563				if err != nil {
11564					return err
11565				}
11566				erg.Tags = tags
11567			}
11568		}
11569	}
11570
11571	return nil
11572}
11573
11574// ExpressRouteGatewayList list of ExpressRoute gateways.
11575type ExpressRouteGatewayList struct {
11576	autorest.Response `json:"-"`
11577	// Value - List of ExpressRoute gateways.
11578	Value *[]ExpressRouteGateway `json:"value,omitempty"`
11579}
11580
11581// ExpressRouteGatewayProperties expressRoute gateway resource properties.
11582type ExpressRouteGatewayProperties struct {
11583	// AutoScaleConfiguration - Configuration for auto scaling.
11584	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
11585	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
11586	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
11587	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11588	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11589	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
11590	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
11591}
11592
11593// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
11594func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
11595	objectMap := make(map[string]interface{})
11596	if ergp.AutoScaleConfiguration != nil {
11597		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
11598	}
11599	if ergp.ProvisioningState != "" {
11600		objectMap["provisioningState"] = ergp.ProvisioningState
11601	}
11602	if ergp.VirtualHub != nil {
11603		objectMap["virtualHub"] = ergp.VirtualHub
11604	}
11605	return json.Marshal(objectMap)
11606}
11607
11608// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
11609type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
11610	// Bounds - Minimum and maximum number of scale units to deploy.
11611	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
11612}
11613
11614// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
11615// deploy.
11616type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
11617	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
11618	Min *int32 `json:"min,omitempty"`
11619	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
11620	Max *int32 `json:"max,omitempty"`
11621}
11622
11623// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11624// long-running operation.
11625type ExpressRouteGatewaysCreateOrUpdateFuture struct {
11626	azure.FutureAPI
11627	// Result returns the result of the asynchronous operation.
11628	// If the operation has not completed it will return an error.
11629	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
11630}
11631
11632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11633func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11634	var azFuture azure.Future
11635	if err := json.Unmarshal(body, &azFuture); err != nil {
11636		return err
11637	}
11638	future.FutureAPI = &azFuture
11639	future.Result = future.result
11640	return nil
11641}
11642
11643// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
11644func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
11645	var done bool
11646	done, err = future.DoneWithContext(context.Background(), client)
11647	if err != nil {
11648		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11649		return
11650	}
11651	if !done {
11652		erg.Response.Response = future.Response()
11653		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
11654		return
11655	}
11656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11657	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
11658		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
11659		if err != nil {
11660			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
11661		}
11662	}
11663	return
11664}
11665
11666// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11667// long-running operation.
11668type ExpressRouteGatewaysDeleteFuture struct {
11669	azure.FutureAPI
11670	// Result returns the result of the asynchronous operation.
11671	// If the operation has not completed it will return an error.
11672	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
11673}
11674
11675// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11676func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
11677	var azFuture azure.Future
11678	if err := json.Unmarshal(body, &azFuture); err != nil {
11679		return err
11680	}
11681	future.FutureAPI = &azFuture
11682	future.Result = future.result
11683	return nil
11684}
11685
11686// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
11687func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
11688	var done bool
11689	done, err = future.DoneWithContext(context.Background(), client)
11690	if err != nil {
11691		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
11692		return
11693	}
11694	if !done {
11695		ar.Response = future.Response()
11696		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
11697		return
11698	}
11699	ar.Response = future.Response()
11700	return
11701}
11702
11703// ExpressRouteLink expressRouteLink child resource definition.
11704type ExpressRouteLink struct {
11705	autorest.Response `json:"-"`
11706	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
11707	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
11708	// Name - Name of child port resource that is unique among child port resources of the parent.
11709	Name *string `json:"name,omitempty"`
11710	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11711	Etag *string `json:"etag,omitempty"`
11712	// ID - Resource ID.
11713	ID *string `json:"id,omitempty"`
11714}
11715
11716// MarshalJSON is the custom marshaler for ExpressRouteLink.
11717func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
11718	objectMap := make(map[string]interface{})
11719	if erl.ExpressRouteLinkPropertiesFormat != nil {
11720		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
11721	}
11722	if erl.Name != nil {
11723		objectMap["name"] = erl.Name
11724	}
11725	if erl.ID != nil {
11726		objectMap["id"] = erl.ID
11727	}
11728	return json.Marshal(objectMap)
11729}
11730
11731// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
11732func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
11733	var m map[string]*json.RawMessage
11734	err := json.Unmarshal(body, &m)
11735	if err != nil {
11736		return err
11737	}
11738	for k, v := range m {
11739		switch k {
11740		case "properties":
11741			if v != nil {
11742				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
11743				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
11744				if err != nil {
11745					return err
11746				}
11747				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
11748			}
11749		case "name":
11750			if v != nil {
11751				var name string
11752				err = json.Unmarshal(*v, &name)
11753				if err != nil {
11754					return err
11755				}
11756				erl.Name = &name
11757			}
11758		case "etag":
11759			if v != nil {
11760				var etag string
11761				err = json.Unmarshal(*v, &etag)
11762				if err != nil {
11763					return err
11764				}
11765				erl.Etag = &etag
11766			}
11767		case "id":
11768			if v != nil {
11769				var ID string
11770				err = json.Unmarshal(*v, &ID)
11771				if err != nil {
11772					return err
11773				}
11774				erl.ID = &ID
11775			}
11776		}
11777	}
11778
11779	return nil
11780}
11781
11782// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
11783type ExpressRouteLinkListResult struct {
11784	autorest.Response `json:"-"`
11785	// Value - The list of ExpressRouteLink sub-resources.
11786	Value *[]ExpressRouteLink `json:"value,omitempty"`
11787	// NextLink - The URL to get the next set of results.
11788	NextLink *string `json:"nextLink,omitempty"`
11789}
11790
11791// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
11792type ExpressRouteLinkListResultIterator struct {
11793	i    int
11794	page ExpressRouteLinkListResultPage
11795}
11796
11797// NextWithContext advances to the next value.  If there was an error making
11798// the request the iterator does not advance and the error is returned.
11799func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
11800	if tracing.IsEnabled() {
11801		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
11802		defer func() {
11803			sc := -1
11804			if iter.Response().Response.Response != nil {
11805				sc = iter.Response().Response.Response.StatusCode
11806			}
11807			tracing.EndSpan(ctx, sc, err)
11808		}()
11809	}
11810	iter.i++
11811	if iter.i < len(iter.page.Values()) {
11812		return nil
11813	}
11814	err = iter.page.NextWithContext(ctx)
11815	if err != nil {
11816		iter.i--
11817		return err
11818	}
11819	iter.i = 0
11820	return nil
11821}
11822
11823// Next advances to the next value.  If there was an error making
11824// the request the iterator does not advance and the error is returned.
11825// Deprecated: Use NextWithContext() instead.
11826func (iter *ExpressRouteLinkListResultIterator) Next() error {
11827	return iter.NextWithContext(context.Background())
11828}
11829
11830// NotDone returns true if the enumeration should be started or is not yet complete.
11831func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
11832	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11833}
11834
11835// Response returns the raw server response from the last page request.
11836func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
11837	return iter.page.Response()
11838}
11839
11840// Value returns the current value or a zero-initialized value if the
11841// iterator has advanced beyond the end of the collection.
11842func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
11843	if !iter.page.NotDone() {
11844		return ExpressRouteLink{}
11845	}
11846	return iter.page.Values()[iter.i]
11847}
11848
11849// Creates a new instance of the ExpressRouteLinkListResultIterator type.
11850func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
11851	return ExpressRouteLinkListResultIterator{page: page}
11852}
11853
11854// IsEmpty returns true if the ListResult contains no values.
11855func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
11856	return erllr.Value == nil || len(*erllr.Value) == 0
11857}
11858
11859// hasNextLink returns true if the NextLink is not empty.
11860func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
11861	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
11862}
11863
11864// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
11865// It returns nil if no more results exist.
11866func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
11867	if !erllr.hasNextLink() {
11868		return nil, nil
11869	}
11870	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11871		autorest.AsJSON(),
11872		autorest.AsGet(),
11873		autorest.WithBaseURL(to.String(erllr.NextLink)))
11874}
11875
11876// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
11877type ExpressRouteLinkListResultPage struct {
11878	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
11879	erllr ExpressRouteLinkListResult
11880}
11881
11882// NextWithContext advances to the next page of values.  If there was an error making
11883// the request the page does not advance and the error is returned.
11884func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
11885	if tracing.IsEnabled() {
11886		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
11887		defer func() {
11888			sc := -1
11889			if page.Response().Response.Response != nil {
11890				sc = page.Response().Response.Response.StatusCode
11891			}
11892			tracing.EndSpan(ctx, sc, err)
11893		}()
11894	}
11895	for {
11896		next, err := page.fn(ctx, page.erllr)
11897		if err != nil {
11898			return err
11899		}
11900		page.erllr = next
11901		if !next.hasNextLink() || !next.IsEmpty() {
11902			break
11903		}
11904	}
11905	return nil
11906}
11907
11908// Next advances to the next page of values.  If there was an error making
11909// the request the page does not advance and the error is returned.
11910// Deprecated: Use NextWithContext() instead.
11911func (page *ExpressRouteLinkListResultPage) Next() error {
11912	return page.NextWithContext(context.Background())
11913}
11914
11915// NotDone returns true if the page enumeration should be started or is not yet complete.
11916func (page ExpressRouteLinkListResultPage) NotDone() bool {
11917	return !page.erllr.IsEmpty()
11918}
11919
11920// Response returns the raw server response from the last page request.
11921func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
11922	return page.erllr
11923}
11924
11925// Values returns the slice of values for the current page or nil if there are no values.
11926func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
11927	if page.erllr.IsEmpty() {
11928		return nil
11929	}
11930	return *page.erllr.Value
11931}
11932
11933// Creates a new instance of the ExpressRouteLinkListResultPage type.
11934func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
11935	return ExpressRouteLinkListResultPage{
11936		fn:    getNextPage,
11937		erllr: cur,
11938	}
11939}
11940
11941// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
11942type ExpressRouteLinkPropertiesFormat struct {
11943	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
11944	RouterName *string `json:"routerName,omitempty"`
11945	// InterfaceName - READ-ONLY; Name of Azure router interface.
11946	InterfaceName *string `json:"interfaceName,omitempty"`
11947	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
11948	PatchPanelID *string `json:"patchPanelId,omitempty"`
11949	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
11950	RackID *string `json:"rackId,omitempty"`
11951	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
11952	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
11953	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
11954	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
11955	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11956	ProvisioningState *string `json:"provisioningState,omitempty"`
11957}
11958
11959// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
11960func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
11961	objectMap := make(map[string]interface{})
11962	if erlpf.AdminState != "" {
11963		objectMap["adminState"] = erlpf.AdminState
11964	}
11965	return json.Marshal(objectMap)
11966}
11967
11968// ExpressRoutePort expressRoutePort resource definition.
11969type ExpressRoutePort struct {
11970	autorest.Response `json:"-"`
11971	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
11972	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
11973	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
11974	Etag *string `json:"etag,omitempty"`
11975	// ID - Resource ID.
11976	ID *string `json:"id,omitempty"`
11977	// Name - READ-ONLY; Resource name.
11978	Name *string `json:"name,omitempty"`
11979	// Type - READ-ONLY; Resource type.
11980	Type *string `json:"type,omitempty"`
11981	// Location - Resource location.
11982	Location *string `json:"location,omitempty"`
11983	// Tags - Resource tags.
11984	Tags map[string]*string `json:"tags"`
11985}
11986
11987// MarshalJSON is the custom marshaler for ExpressRoutePort.
11988func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
11989	objectMap := make(map[string]interface{})
11990	if erp.ExpressRoutePortPropertiesFormat != nil {
11991		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
11992	}
11993	if erp.ID != nil {
11994		objectMap["id"] = erp.ID
11995	}
11996	if erp.Location != nil {
11997		objectMap["location"] = erp.Location
11998	}
11999	if erp.Tags != nil {
12000		objectMap["tags"] = erp.Tags
12001	}
12002	return json.Marshal(objectMap)
12003}
12004
12005// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
12006func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
12007	var m map[string]*json.RawMessage
12008	err := json.Unmarshal(body, &m)
12009	if err != nil {
12010		return err
12011	}
12012	for k, v := range m {
12013		switch k {
12014		case "properties":
12015			if v != nil {
12016				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
12017				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
12018				if err != nil {
12019					return err
12020				}
12021				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
12022			}
12023		case "etag":
12024			if v != nil {
12025				var etag string
12026				err = json.Unmarshal(*v, &etag)
12027				if err != nil {
12028					return err
12029				}
12030				erp.Etag = &etag
12031			}
12032		case "id":
12033			if v != nil {
12034				var ID string
12035				err = json.Unmarshal(*v, &ID)
12036				if err != nil {
12037					return err
12038				}
12039				erp.ID = &ID
12040			}
12041		case "name":
12042			if v != nil {
12043				var name string
12044				err = json.Unmarshal(*v, &name)
12045				if err != nil {
12046					return err
12047				}
12048				erp.Name = &name
12049			}
12050		case "type":
12051			if v != nil {
12052				var typeVar string
12053				err = json.Unmarshal(*v, &typeVar)
12054				if err != nil {
12055					return err
12056				}
12057				erp.Type = &typeVar
12058			}
12059		case "location":
12060			if v != nil {
12061				var location string
12062				err = json.Unmarshal(*v, &location)
12063				if err != nil {
12064					return err
12065				}
12066				erp.Location = &location
12067			}
12068		case "tags":
12069			if v != nil {
12070				var tags map[string]*string
12071				err = json.Unmarshal(*v, &tags)
12072				if err != nil {
12073					return err
12074				}
12075				erp.Tags = tags
12076			}
12077		}
12078	}
12079
12080	return nil
12081}
12082
12083// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
12084type ExpressRoutePortListResult struct {
12085	autorest.Response `json:"-"`
12086	// Value - A list of ExpressRoutePort resources.
12087	Value *[]ExpressRoutePort `json:"value,omitempty"`
12088	// NextLink - The URL to get the next set of results.
12089	NextLink *string `json:"nextLink,omitempty"`
12090}
12091
12092// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
12093type ExpressRoutePortListResultIterator struct {
12094	i    int
12095	page ExpressRoutePortListResultPage
12096}
12097
12098// NextWithContext advances to the next value.  If there was an error making
12099// the request the iterator does not advance and the error is returned.
12100func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
12101	if tracing.IsEnabled() {
12102		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
12103		defer func() {
12104			sc := -1
12105			if iter.Response().Response.Response != nil {
12106				sc = iter.Response().Response.Response.StatusCode
12107			}
12108			tracing.EndSpan(ctx, sc, err)
12109		}()
12110	}
12111	iter.i++
12112	if iter.i < len(iter.page.Values()) {
12113		return nil
12114	}
12115	err = iter.page.NextWithContext(ctx)
12116	if err != nil {
12117		iter.i--
12118		return err
12119	}
12120	iter.i = 0
12121	return nil
12122}
12123
12124// Next advances to the next value.  If there was an error making
12125// the request the iterator does not advance and the error is returned.
12126// Deprecated: Use NextWithContext() instead.
12127func (iter *ExpressRoutePortListResultIterator) Next() error {
12128	return iter.NextWithContext(context.Background())
12129}
12130
12131// NotDone returns true if the enumeration should be started or is not yet complete.
12132func (iter ExpressRoutePortListResultIterator) NotDone() bool {
12133	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12134}
12135
12136// Response returns the raw server response from the last page request.
12137func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
12138	return iter.page.Response()
12139}
12140
12141// Value returns the current value or a zero-initialized value if the
12142// iterator has advanced beyond the end of the collection.
12143func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
12144	if !iter.page.NotDone() {
12145		return ExpressRoutePort{}
12146	}
12147	return iter.page.Values()[iter.i]
12148}
12149
12150// Creates a new instance of the ExpressRoutePortListResultIterator type.
12151func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
12152	return ExpressRoutePortListResultIterator{page: page}
12153}
12154
12155// IsEmpty returns true if the ListResult contains no values.
12156func (erplr ExpressRoutePortListResult) IsEmpty() bool {
12157	return erplr.Value == nil || len(*erplr.Value) == 0
12158}
12159
12160// hasNextLink returns true if the NextLink is not empty.
12161func (erplr ExpressRoutePortListResult) hasNextLink() bool {
12162	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
12163}
12164
12165// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
12166// It returns nil if no more results exist.
12167func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
12168	if !erplr.hasNextLink() {
12169		return nil, nil
12170	}
12171	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12172		autorest.AsJSON(),
12173		autorest.AsGet(),
12174		autorest.WithBaseURL(to.String(erplr.NextLink)))
12175}
12176
12177// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
12178type ExpressRoutePortListResultPage struct {
12179	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
12180	erplr ExpressRoutePortListResult
12181}
12182
12183// NextWithContext advances to the next page of values.  If there was an error making
12184// the request the page does not advance and the error is returned.
12185func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
12186	if tracing.IsEnabled() {
12187		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
12188		defer func() {
12189			sc := -1
12190			if page.Response().Response.Response != nil {
12191				sc = page.Response().Response.Response.StatusCode
12192			}
12193			tracing.EndSpan(ctx, sc, err)
12194		}()
12195	}
12196	for {
12197		next, err := page.fn(ctx, page.erplr)
12198		if err != nil {
12199			return err
12200		}
12201		page.erplr = next
12202		if !next.hasNextLink() || !next.IsEmpty() {
12203			break
12204		}
12205	}
12206	return nil
12207}
12208
12209// Next advances to the next page of values.  If there was an error making
12210// the request the page does not advance and the error is returned.
12211// Deprecated: Use NextWithContext() instead.
12212func (page *ExpressRoutePortListResultPage) Next() error {
12213	return page.NextWithContext(context.Background())
12214}
12215
12216// NotDone returns true if the page enumeration should be started or is not yet complete.
12217func (page ExpressRoutePortListResultPage) NotDone() bool {
12218	return !page.erplr.IsEmpty()
12219}
12220
12221// Response returns the raw server response from the last page request.
12222func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
12223	return page.erplr
12224}
12225
12226// Values returns the slice of values for the current page or nil if there are no values.
12227func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
12228	if page.erplr.IsEmpty() {
12229		return nil
12230	}
12231	return *page.erplr.Value
12232}
12233
12234// Creates a new instance of the ExpressRoutePortListResultPage type.
12235func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
12236	return ExpressRoutePortListResultPage{
12237		fn:    getNextPage,
12238		erplr: cur,
12239	}
12240}
12241
12242// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
12243type ExpressRoutePortPropertiesFormat struct {
12244	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
12245	PeeringLocation *string `json:"peeringLocation,omitempty"`
12246	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
12247	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
12248	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
12249	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
12250	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
12251	Mtu *string `json:"mtu,omitempty"`
12252	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
12253	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
12254	// EtherType - READ-ONLY; Ether type of the physical port.
12255	EtherType *string `json:"etherType,omitempty"`
12256	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
12257	AllocationDate *string `json:"allocationDate,omitempty"`
12258	// Links - The set of physical links of the ExpressRoutePort resource.
12259	Links *[]ExpressRouteLink `json:"links,omitempty"`
12260	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
12261	Circuits *[]SubResource `json:"circuits,omitempty"`
12262	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
12263	ProvisioningState *string `json:"provisioningState,omitempty"`
12264	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
12265	ResourceGUID *string `json:"resourceGuid,omitempty"`
12266}
12267
12268// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
12269func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
12270	objectMap := make(map[string]interface{})
12271	if erppf.PeeringLocation != nil {
12272		objectMap["peeringLocation"] = erppf.PeeringLocation
12273	}
12274	if erppf.BandwidthInGbps != nil {
12275		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
12276	}
12277	if erppf.Encapsulation != "" {
12278		objectMap["encapsulation"] = erppf.Encapsulation
12279	}
12280	if erppf.Links != nil {
12281		objectMap["links"] = erppf.Links
12282	}
12283	if erppf.ResourceGUID != nil {
12284		objectMap["resourceGuid"] = erppf.ResourceGUID
12285	}
12286	return json.Marshal(objectMap)
12287}
12288
12289// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12290// long-running operation.
12291type ExpressRoutePortsCreateOrUpdateFuture struct {
12292	azure.FutureAPI
12293	// Result returns the result of the asynchronous operation.
12294	// If the operation has not completed it will return an error.
12295	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12296}
12297
12298// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12299func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12300	var azFuture azure.Future
12301	if err := json.Unmarshal(body, &azFuture); err != nil {
12302		return err
12303	}
12304	future.FutureAPI = &azFuture
12305	future.Result = future.result
12306	return nil
12307}
12308
12309// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
12310func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12311	var done bool
12312	done, err = future.DoneWithContext(context.Background(), client)
12313	if err != nil {
12314		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12315		return
12316	}
12317	if !done {
12318		erp.Response.Response = future.Response()
12319		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
12320		return
12321	}
12322	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12323	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12324		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
12325		if err != nil {
12326			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
12327		}
12328	}
12329	return
12330}
12331
12332// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12333// operation.
12334type ExpressRoutePortsDeleteFuture struct {
12335	azure.FutureAPI
12336	// Result returns the result of the asynchronous operation.
12337	// If the operation has not completed it will return an error.
12338	Result func(ExpressRoutePortsClient) (autorest.Response, error)
12339}
12340
12341// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12342func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
12343	var azFuture azure.Future
12344	if err := json.Unmarshal(body, &azFuture); err != nil {
12345		return err
12346	}
12347	future.FutureAPI = &azFuture
12348	future.Result = future.result
12349	return nil
12350}
12351
12352// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
12353func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
12354	var done bool
12355	done, err = future.DoneWithContext(context.Background(), client)
12356	if err != nil {
12357		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
12358		return
12359	}
12360	if !done {
12361		ar.Response = future.Response()
12362		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
12363		return
12364	}
12365	ar.Response = future.Response()
12366	return
12367}
12368
12369// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
12370type ExpressRoutePortsLocation struct {
12371	autorest.Response `json:"-"`
12372	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
12373	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
12374	// ID - Resource ID.
12375	ID *string `json:"id,omitempty"`
12376	// Name - READ-ONLY; Resource name.
12377	Name *string `json:"name,omitempty"`
12378	// Type - READ-ONLY; Resource type.
12379	Type *string `json:"type,omitempty"`
12380	// Location - Resource location.
12381	Location *string `json:"location,omitempty"`
12382	// Tags - Resource tags.
12383	Tags map[string]*string `json:"tags"`
12384}
12385
12386// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
12387func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
12388	objectMap := make(map[string]interface{})
12389	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
12390		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
12391	}
12392	if erpl.ID != nil {
12393		objectMap["id"] = erpl.ID
12394	}
12395	if erpl.Location != nil {
12396		objectMap["location"] = erpl.Location
12397	}
12398	if erpl.Tags != nil {
12399		objectMap["tags"] = erpl.Tags
12400	}
12401	return json.Marshal(objectMap)
12402}
12403
12404// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
12405func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
12406	var m map[string]*json.RawMessage
12407	err := json.Unmarshal(body, &m)
12408	if err != nil {
12409		return err
12410	}
12411	for k, v := range m {
12412		switch k {
12413		case "properties":
12414			if v != nil {
12415				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
12416				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
12417				if err != nil {
12418					return err
12419				}
12420				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
12421			}
12422		case "id":
12423			if v != nil {
12424				var ID string
12425				err = json.Unmarshal(*v, &ID)
12426				if err != nil {
12427					return err
12428				}
12429				erpl.ID = &ID
12430			}
12431		case "name":
12432			if v != nil {
12433				var name string
12434				err = json.Unmarshal(*v, &name)
12435				if err != nil {
12436					return err
12437				}
12438				erpl.Name = &name
12439			}
12440		case "type":
12441			if v != nil {
12442				var typeVar string
12443				err = json.Unmarshal(*v, &typeVar)
12444				if err != nil {
12445					return err
12446				}
12447				erpl.Type = &typeVar
12448			}
12449		case "location":
12450			if v != nil {
12451				var location string
12452				err = json.Unmarshal(*v, &location)
12453				if err != nil {
12454					return err
12455				}
12456				erpl.Location = &location
12457			}
12458		case "tags":
12459			if v != nil {
12460				var tags map[string]*string
12461				err = json.Unmarshal(*v, &tags)
12462				if err != nil {
12463					return err
12464				}
12465				erpl.Tags = tags
12466			}
12467		}
12468	}
12469
12470	return nil
12471}
12472
12473// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
12474type ExpressRoutePortsLocationBandwidths struct {
12475	// OfferName - READ-ONLY; Bandwidth descriptive name.
12476	OfferName *string `json:"offerName,omitempty"`
12477	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
12478	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
12479}
12480
12481// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
12482func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
12483	objectMap := make(map[string]interface{})
12484	return json.Marshal(objectMap)
12485}
12486
12487// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
12488type ExpressRoutePortsLocationListResult struct {
12489	autorest.Response `json:"-"`
12490	// Value - The list of all ExpressRoutePort peering locations.
12491	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
12492	// NextLink - The URL to get the next set of results.
12493	NextLink *string `json:"nextLink,omitempty"`
12494}
12495
12496// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
12497// ExpressRoutePortsLocation values.
12498type ExpressRoutePortsLocationListResultIterator struct {
12499	i    int
12500	page ExpressRoutePortsLocationListResultPage
12501}
12502
12503// NextWithContext advances to the next value.  If there was an error making
12504// the request the iterator does not advance and the error is returned.
12505func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12506	if tracing.IsEnabled() {
12507		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
12508		defer func() {
12509			sc := -1
12510			if iter.Response().Response.Response != nil {
12511				sc = iter.Response().Response.Response.StatusCode
12512			}
12513			tracing.EndSpan(ctx, sc, err)
12514		}()
12515	}
12516	iter.i++
12517	if iter.i < len(iter.page.Values()) {
12518		return nil
12519	}
12520	err = iter.page.NextWithContext(ctx)
12521	if err != nil {
12522		iter.i--
12523		return err
12524	}
12525	iter.i = 0
12526	return nil
12527}
12528
12529// Next advances to the next value.  If there was an error making
12530// the request the iterator does not advance and the error is returned.
12531// Deprecated: Use NextWithContext() instead.
12532func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
12533	return iter.NextWithContext(context.Background())
12534}
12535
12536// NotDone returns true if the enumeration should be started or is not yet complete.
12537func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
12538	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12539}
12540
12541// Response returns the raw server response from the last page request.
12542func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
12543	return iter.page.Response()
12544}
12545
12546// Value returns the current value or a zero-initialized value if the
12547// iterator has advanced beyond the end of the collection.
12548func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
12549	if !iter.page.NotDone() {
12550		return ExpressRoutePortsLocation{}
12551	}
12552	return iter.page.Values()[iter.i]
12553}
12554
12555// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
12556func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
12557	return ExpressRoutePortsLocationListResultIterator{page: page}
12558}
12559
12560// IsEmpty returns true if the ListResult contains no values.
12561func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
12562	return erpllr.Value == nil || len(*erpllr.Value) == 0
12563}
12564
12565// hasNextLink returns true if the NextLink is not empty.
12566func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
12567	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
12568}
12569
12570// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
12571// It returns nil if no more results exist.
12572func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
12573	if !erpllr.hasNextLink() {
12574		return nil, nil
12575	}
12576	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12577		autorest.AsJSON(),
12578		autorest.AsGet(),
12579		autorest.WithBaseURL(to.String(erpllr.NextLink)))
12580}
12581
12582// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
12583type ExpressRoutePortsLocationListResultPage struct {
12584	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
12585	erpllr ExpressRoutePortsLocationListResult
12586}
12587
12588// NextWithContext advances to the next page of values.  If there was an error making
12589// the request the page does not advance and the error is returned.
12590func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
12591	if tracing.IsEnabled() {
12592		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
12593		defer func() {
12594			sc := -1
12595			if page.Response().Response.Response != nil {
12596				sc = page.Response().Response.Response.StatusCode
12597			}
12598			tracing.EndSpan(ctx, sc, err)
12599		}()
12600	}
12601	for {
12602		next, err := page.fn(ctx, page.erpllr)
12603		if err != nil {
12604			return err
12605		}
12606		page.erpllr = next
12607		if !next.hasNextLink() || !next.IsEmpty() {
12608			break
12609		}
12610	}
12611	return nil
12612}
12613
12614// Next advances to the next page of values.  If there was an error making
12615// the request the page does not advance and the error is returned.
12616// Deprecated: Use NextWithContext() instead.
12617func (page *ExpressRoutePortsLocationListResultPage) Next() error {
12618	return page.NextWithContext(context.Background())
12619}
12620
12621// NotDone returns true if the page enumeration should be started or is not yet complete.
12622func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
12623	return !page.erpllr.IsEmpty()
12624}
12625
12626// Response returns the raw server response from the last page request.
12627func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
12628	return page.erpllr
12629}
12630
12631// Values returns the slice of values for the current page or nil if there are no values.
12632func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
12633	if page.erpllr.IsEmpty() {
12634		return nil
12635	}
12636	return *page.erpllr.Value
12637}
12638
12639// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
12640func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
12641	return ExpressRoutePortsLocationListResultPage{
12642		fn:     getNextPage,
12643		erpllr: cur,
12644	}
12645}
12646
12647// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
12648// resources.
12649type ExpressRoutePortsLocationPropertiesFormat struct {
12650	// Address - READ-ONLY; Address of peering location.
12651	Address *string `json:"address,omitempty"`
12652	// Contact - READ-ONLY; Contact details of peering locations.
12653	Contact *string `json:"contact,omitempty"`
12654	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
12655	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
12656	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
12657	ProvisioningState *string `json:"provisioningState,omitempty"`
12658}
12659
12660// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
12661func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
12662	objectMap := make(map[string]interface{})
12663	if erplpf.AvailableBandwidths != nil {
12664		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
12665	}
12666	return json.Marshal(objectMap)
12667}
12668
12669// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
12670// long-running operation.
12671type ExpressRoutePortsUpdateTagsFuture struct {
12672	azure.FutureAPI
12673	// Result returns the result of the asynchronous operation.
12674	// If the operation has not completed it will return an error.
12675	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
12676}
12677
12678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12679func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12680	var azFuture azure.Future
12681	if err := json.Unmarshal(body, &azFuture); err != nil {
12682		return err
12683	}
12684	future.FutureAPI = &azFuture
12685	future.Result = future.result
12686	return nil
12687}
12688
12689// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
12690func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
12691	var done bool
12692	done, err = future.DoneWithContext(context.Background(), client)
12693	if err != nil {
12694		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12695		return
12696	}
12697	if !done {
12698		erp.Response.Response = future.Response()
12699		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
12700		return
12701	}
12702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12703	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
12704		erp, err = client.UpdateTagsResponder(erp.Response.Response)
12705		if err != nil {
12706			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
12707		}
12708	}
12709	return
12710}
12711
12712// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
12713type ExpressRouteServiceProvider struct {
12714	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
12715	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
12716	// ID - Resource ID.
12717	ID *string `json:"id,omitempty"`
12718	// Name - READ-ONLY; Resource name.
12719	Name *string `json:"name,omitempty"`
12720	// Type - READ-ONLY; Resource type.
12721	Type *string `json:"type,omitempty"`
12722	// Location - Resource location.
12723	Location *string `json:"location,omitempty"`
12724	// Tags - Resource tags.
12725	Tags map[string]*string `json:"tags"`
12726}
12727
12728// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
12729func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
12730	objectMap := make(map[string]interface{})
12731	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
12732		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
12733	}
12734	if ersp.ID != nil {
12735		objectMap["id"] = ersp.ID
12736	}
12737	if ersp.Location != nil {
12738		objectMap["location"] = ersp.Location
12739	}
12740	if ersp.Tags != nil {
12741		objectMap["tags"] = ersp.Tags
12742	}
12743	return json.Marshal(objectMap)
12744}
12745
12746// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
12747func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
12748	var m map[string]*json.RawMessage
12749	err := json.Unmarshal(body, &m)
12750	if err != nil {
12751		return err
12752	}
12753	for k, v := range m {
12754		switch k {
12755		case "properties":
12756			if v != nil {
12757				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
12758				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
12759				if err != nil {
12760					return err
12761				}
12762				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
12763			}
12764		case "id":
12765			if v != nil {
12766				var ID string
12767				err = json.Unmarshal(*v, &ID)
12768				if err != nil {
12769					return err
12770				}
12771				ersp.ID = &ID
12772			}
12773		case "name":
12774			if v != nil {
12775				var name string
12776				err = json.Unmarshal(*v, &name)
12777				if err != nil {
12778					return err
12779				}
12780				ersp.Name = &name
12781			}
12782		case "type":
12783			if v != nil {
12784				var typeVar string
12785				err = json.Unmarshal(*v, &typeVar)
12786				if err != nil {
12787					return err
12788				}
12789				ersp.Type = &typeVar
12790			}
12791		case "location":
12792			if v != nil {
12793				var location string
12794				err = json.Unmarshal(*v, &location)
12795				if err != nil {
12796					return err
12797				}
12798				ersp.Location = &location
12799			}
12800		case "tags":
12801			if v != nil {
12802				var tags map[string]*string
12803				err = json.Unmarshal(*v, &tags)
12804				if err != nil {
12805					return err
12806				}
12807				ersp.Tags = tags
12808			}
12809		}
12810	}
12811
12812	return nil
12813}
12814
12815// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
12816// resources.
12817type ExpressRouteServiceProviderBandwidthsOffered struct {
12818	// OfferName - The OfferName.
12819	OfferName *string `json:"offerName,omitempty"`
12820	// ValueInMbps - The ValueInMbps.
12821	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
12822}
12823
12824// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
12825type ExpressRouteServiceProviderListResult struct {
12826	autorest.Response `json:"-"`
12827	// Value - A list of ExpressRouteResourceProvider resources.
12828	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
12829	// NextLink - The URL to get the next set of results.
12830	NextLink *string `json:"nextLink,omitempty"`
12831}
12832
12833// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
12834// ExpressRouteServiceProvider values.
12835type ExpressRouteServiceProviderListResultIterator struct {
12836	i    int
12837	page ExpressRouteServiceProviderListResultPage
12838}
12839
12840// NextWithContext advances to the next value.  If there was an error making
12841// the request the iterator does not advance and the error is returned.
12842func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
12843	if tracing.IsEnabled() {
12844		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
12845		defer func() {
12846			sc := -1
12847			if iter.Response().Response.Response != nil {
12848				sc = iter.Response().Response.Response.StatusCode
12849			}
12850			tracing.EndSpan(ctx, sc, err)
12851		}()
12852	}
12853	iter.i++
12854	if iter.i < len(iter.page.Values()) {
12855		return nil
12856	}
12857	err = iter.page.NextWithContext(ctx)
12858	if err != nil {
12859		iter.i--
12860		return err
12861	}
12862	iter.i = 0
12863	return nil
12864}
12865
12866// Next advances to the next value.  If there was an error making
12867// the request the iterator does not advance and the error is returned.
12868// Deprecated: Use NextWithContext() instead.
12869func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
12870	return iter.NextWithContext(context.Background())
12871}
12872
12873// NotDone returns true if the enumeration should be started or is not yet complete.
12874func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
12875	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12876}
12877
12878// Response returns the raw server response from the last page request.
12879func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
12880	return iter.page.Response()
12881}
12882
12883// Value returns the current value or a zero-initialized value if the
12884// iterator has advanced beyond the end of the collection.
12885func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
12886	if !iter.page.NotDone() {
12887		return ExpressRouteServiceProvider{}
12888	}
12889	return iter.page.Values()[iter.i]
12890}
12891
12892// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
12893func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
12894	return ExpressRouteServiceProviderListResultIterator{page: page}
12895}
12896
12897// IsEmpty returns true if the ListResult contains no values.
12898func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
12899	return ersplr.Value == nil || len(*ersplr.Value) == 0
12900}
12901
12902// hasNextLink returns true if the NextLink is not empty.
12903func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
12904	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
12905}
12906
12907// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
12908// It returns nil if no more results exist.
12909func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
12910	if !ersplr.hasNextLink() {
12911		return nil, nil
12912	}
12913	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12914		autorest.AsJSON(),
12915		autorest.AsGet(),
12916		autorest.WithBaseURL(to.String(ersplr.NextLink)))
12917}
12918
12919// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
12920type ExpressRouteServiceProviderListResultPage struct {
12921	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
12922	ersplr ExpressRouteServiceProviderListResult
12923}
12924
12925// NextWithContext advances to the next page of values.  If there was an error making
12926// the request the page does not advance and the error is returned.
12927func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
12928	if tracing.IsEnabled() {
12929		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
12930		defer func() {
12931			sc := -1
12932			if page.Response().Response.Response != nil {
12933				sc = page.Response().Response.Response.StatusCode
12934			}
12935			tracing.EndSpan(ctx, sc, err)
12936		}()
12937	}
12938	for {
12939		next, err := page.fn(ctx, page.ersplr)
12940		if err != nil {
12941			return err
12942		}
12943		page.ersplr = next
12944		if !next.hasNextLink() || !next.IsEmpty() {
12945			break
12946		}
12947	}
12948	return nil
12949}
12950
12951// Next advances to the next page of values.  If there was an error making
12952// the request the page does not advance and the error is returned.
12953// Deprecated: Use NextWithContext() instead.
12954func (page *ExpressRouteServiceProviderListResultPage) Next() error {
12955	return page.NextWithContext(context.Background())
12956}
12957
12958// NotDone returns true if the page enumeration should be started or is not yet complete.
12959func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
12960	return !page.ersplr.IsEmpty()
12961}
12962
12963// Response returns the raw server response from the last page request.
12964func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
12965	return page.ersplr
12966}
12967
12968// Values returns the slice of values for the current page or nil if there are no values.
12969func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
12970	if page.ersplr.IsEmpty() {
12971		return nil
12972	}
12973	return *page.ersplr.Value
12974}
12975
12976// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
12977func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
12978	return ExpressRouteServiceProviderListResultPage{
12979		fn:     getNextPage,
12980		ersplr: cur,
12981	}
12982}
12983
12984// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
12985type ExpressRouteServiceProviderPropertiesFormat struct {
12986	// PeeringLocations - Get a list of peering locations.
12987	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
12988	// BandwidthsOffered - Gets bandwidths offered.
12989	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
12990	// ProvisioningState - Gets the provisioning state of the resource.
12991	ProvisioningState *string `json:"provisioningState,omitempty"`
12992}
12993
12994// FlowLogFormatParameters parameters that define the flow log format.
12995type FlowLogFormatParameters struct {
12996	// Type - The file type of flow log. Possible values include: 'JSON'
12997	Type FlowLogFormatType `json:"type,omitempty"`
12998	// Version - The version (revision) of the flow log.
12999	Version *int32 `json:"version,omitempty"`
13000}
13001
13002// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
13003type FlowLogInformation struct {
13004	autorest.Response `json:"-"`
13005	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
13006	TargetResourceID *string `json:"targetResourceId,omitempty"`
13007	// FlowLogProperties - Properties of the flow log.
13008	*FlowLogProperties `json:"properties,omitempty"`
13009	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
13010	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
13011}
13012
13013// MarshalJSON is the custom marshaler for FlowLogInformation.
13014func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
13015	objectMap := make(map[string]interface{})
13016	if fli.TargetResourceID != nil {
13017		objectMap["targetResourceId"] = fli.TargetResourceID
13018	}
13019	if fli.FlowLogProperties != nil {
13020		objectMap["properties"] = fli.FlowLogProperties
13021	}
13022	if fli.FlowAnalyticsConfiguration != nil {
13023		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
13024	}
13025	return json.Marshal(objectMap)
13026}
13027
13028// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
13029func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
13030	var m map[string]*json.RawMessage
13031	err := json.Unmarshal(body, &m)
13032	if err != nil {
13033		return err
13034	}
13035	for k, v := range m {
13036		switch k {
13037		case "targetResourceId":
13038			if v != nil {
13039				var targetResourceID string
13040				err = json.Unmarshal(*v, &targetResourceID)
13041				if err != nil {
13042					return err
13043				}
13044				fli.TargetResourceID = &targetResourceID
13045			}
13046		case "properties":
13047			if v != nil {
13048				var flowLogProperties FlowLogProperties
13049				err = json.Unmarshal(*v, &flowLogProperties)
13050				if err != nil {
13051					return err
13052				}
13053				fli.FlowLogProperties = &flowLogProperties
13054			}
13055		case "flowAnalyticsConfiguration":
13056			if v != nil {
13057				var flowAnalyticsConfiguration TrafficAnalyticsProperties
13058				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
13059				if err != nil {
13060					return err
13061				}
13062				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
13063			}
13064		}
13065	}
13066
13067	return nil
13068}
13069
13070// FlowLogProperties parameters that define the configuration of flow log.
13071type FlowLogProperties struct {
13072	// StorageID - ID of the storage account which is used to store the flow log.
13073	StorageID *string `json:"storageId,omitempty"`
13074	// Enabled - Flag to enable/disable flow logging.
13075	Enabled *bool `json:"enabled,omitempty"`
13076	// RetentionPolicy - Parameters that define the retention policy for flow log.
13077	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
13078	// Format - Parameters that define the flow log format.
13079	Format *FlowLogFormatParameters `json:"format,omitempty"`
13080}
13081
13082// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
13083// (optional) status.
13084type FlowLogStatusParameters struct {
13085	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
13086	TargetResourceID *string `json:"targetResourceId,omitempty"`
13087}
13088
13089// FrontendIPConfiguration frontend IP address of the load balancer.
13090type FrontendIPConfiguration struct {
13091	autorest.Response `json:"-"`
13092	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
13093	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13094	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13095	Name *string `json:"name,omitempty"`
13096	// Etag - A unique read-only string that changes whenever the resource is updated.
13097	Etag *string `json:"etag,omitempty"`
13098	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
13099	Zones *[]string `json:"zones,omitempty"`
13100	// ID - Resource ID.
13101	ID *string `json:"id,omitempty"`
13102}
13103
13104// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
13105func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
13106	objectMap := make(map[string]interface{})
13107	if fic.FrontendIPConfigurationPropertiesFormat != nil {
13108		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
13109	}
13110	if fic.Name != nil {
13111		objectMap["name"] = fic.Name
13112	}
13113	if fic.Etag != nil {
13114		objectMap["etag"] = fic.Etag
13115	}
13116	if fic.Zones != nil {
13117		objectMap["zones"] = fic.Zones
13118	}
13119	if fic.ID != nil {
13120		objectMap["id"] = fic.ID
13121	}
13122	return json.Marshal(objectMap)
13123}
13124
13125// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
13126func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
13127	var m map[string]*json.RawMessage
13128	err := json.Unmarshal(body, &m)
13129	if err != nil {
13130		return err
13131	}
13132	for k, v := range m {
13133		switch k {
13134		case "properties":
13135			if v != nil {
13136				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
13137				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
13138				if err != nil {
13139					return err
13140				}
13141				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
13142			}
13143		case "name":
13144			if v != nil {
13145				var name string
13146				err = json.Unmarshal(*v, &name)
13147				if err != nil {
13148					return err
13149				}
13150				fic.Name = &name
13151			}
13152		case "etag":
13153			if v != nil {
13154				var etag string
13155				err = json.Unmarshal(*v, &etag)
13156				if err != nil {
13157					return err
13158				}
13159				fic.Etag = &etag
13160			}
13161		case "zones":
13162			if v != nil {
13163				var zones []string
13164				err = json.Unmarshal(*v, &zones)
13165				if err != nil {
13166					return err
13167				}
13168				fic.Zones = &zones
13169			}
13170		case "id":
13171			if v != nil {
13172				var ID string
13173				err = json.Unmarshal(*v, &ID)
13174				if err != nil {
13175					return err
13176				}
13177				fic.ID = &ID
13178			}
13179		}
13180	}
13181
13182	return nil
13183}
13184
13185// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
13186type FrontendIPConfigurationPropertiesFormat struct {
13187	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
13188	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
13189	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
13190	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
13191	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
13192	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
13193	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
13194	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
13195	// PrivateIPAddress - The private IP address of the IP configuration.
13196	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13197	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
13198	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13199	// PrivateIPAddressVersion - It represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
13200	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13201	// Subnet - The reference of the subnet resource.
13202	Subnet *Subnet `json:"subnet,omitempty"`
13203	// PublicIPAddress - The reference of the Public IP resource.
13204	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13205	// PublicIPPrefix - The reference of the Public IP Prefix resource.
13206	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
13207	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13208	ProvisioningState *string `json:"provisioningState,omitempty"`
13209}
13210
13211// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
13212func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
13213	objectMap := make(map[string]interface{})
13214	if ficpf.PrivateIPAddress != nil {
13215		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
13216	}
13217	if ficpf.PrivateIPAllocationMethod != "" {
13218		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
13219	}
13220	if ficpf.PrivateIPAddressVersion != "" {
13221		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
13222	}
13223	if ficpf.Subnet != nil {
13224		objectMap["subnet"] = ficpf.Subnet
13225	}
13226	if ficpf.PublicIPAddress != nil {
13227		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
13228	}
13229	if ficpf.PublicIPPrefix != nil {
13230		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
13231	}
13232	if ficpf.ProvisioningState != nil {
13233		objectMap["provisioningState"] = ficpf.ProvisioningState
13234	}
13235	return json.Marshal(objectMap)
13236}
13237
13238// GatewayRoute gateway routing details.
13239type GatewayRoute struct {
13240	// LocalAddress - READ-ONLY; The gateway's local address.
13241	LocalAddress *string `json:"localAddress,omitempty"`
13242	// NetworkProperty - READ-ONLY; The route's network prefix.
13243	NetworkProperty *string `json:"network,omitempty"`
13244	// NextHop - READ-ONLY; The route's next hop.
13245	NextHop *string `json:"nextHop,omitempty"`
13246	// SourcePeer - READ-ONLY; The peer this route was learned from.
13247	SourcePeer *string `json:"sourcePeer,omitempty"`
13248	// Origin - READ-ONLY; The source this route was learned from.
13249	Origin *string `json:"origin,omitempty"`
13250	// AsPath - READ-ONLY; The route's AS path sequence.
13251	AsPath *string `json:"asPath,omitempty"`
13252	// Weight - READ-ONLY; The route's weight.
13253	Weight *int32 `json:"weight,omitempty"`
13254}
13255
13256// MarshalJSON is the custom marshaler for GatewayRoute.
13257func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
13258	objectMap := make(map[string]interface{})
13259	return json.Marshal(objectMap)
13260}
13261
13262// GatewayRouteListResult list of virtual network gateway routes.
13263type GatewayRouteListResult struct {
13264	autorest.Response `json:"-"`
13265	// Value - List of gateway routes.
13266	Value *[]GatewayRoute `json:"value,omitempty"`
13267}
13268
13269// GetVpnSitesConfigurationRequest list of Vpn-Sites.
13270type GetVpnSitesConfigurationRequest struct {
13271	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
13272	VpnSites *[]string `json:"vpnSites,omitempty"`
13273	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
13274	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
13275}
13276
13277// HTTPConfiguration HTTP configuration of the connectivity check.
13278type HTTPConfiguration struct {
13279	// Method - HTTP method. Possible values include: 'Get'
13280	Method HTTPMethod `json:"method,omitempty"`
13281	// Headers - List of HTTP headers.
13282	Headers *[]HTTPHeader `json:"headers,omitempty"`
13283	// ValidStatusCodes - Valid status codes.
13284	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
13285}
13286
13287// HTTPHeader describes the HTTP header.
13288type HTTPHeader struct {
13289	// Name - The name in HTTP header.
13290	Name *string `json:"name,omitempty"`
13291	// Value - The value in HTTP header.
13292	Value *string `json:"value,omitempty"`
13293}
13294
13295// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
13296type HubVirtualNetworkConnection struct {
13297	autorest.Response `json:"-"`
13298	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
13299	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
13300	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13301	Name *string `json:"name,omitempty"`
13302	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
13303	Etag *string `json:"etag,omitempty"`
13304	// ID - Resource ID.
13305	ID *string `json:"id,omitempty"`
13306}
13307
13308// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
13309func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
13310	objectMap := make(map[string]interface{})
13311	if hvnc.HubVirtualNetworkConnectionProperties != nil {
13312		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
13313	}
13314	if hvnc.Name != nil {
13315		objectMap["name"] = hvnc.Name
13316	}
13317	if hvnc.ID != nil {
13318		objectMap["id"] = hvnc.ID
13319	}
13320	return json.Marshal(objectMap)
13321}
13322
13323// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
13324func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
13325	var m map[string]*json.RawMessage
13326	err := json.Unmarshal(body, &m)
13327	if err != nil {
13328		return err
13329	}
13330	for k, v := range m {
13331		switch k {
13332		case "properties":
13333			if v != nil {
13334				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
13335				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
13336				if err != nil {
13337					return err
13338				}
13339				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
13340			}
13341		case "name":
13342			if v != nil {
13343				var name string
13344				err = json.Unmarshal(*v, &name)
13345				if err != nil {
13346					return err
13347				}
13348				hvnc.Name = &name
13349			}
13350		case "etag":
13351			if v != nil {
13352				var etag string
13353				err = json.Unmarshal(*v, &etag)
13354				if err != nil {
13355					return err
13356				}
13357				hvnc.Etag = &etag
13358			}
13359		case "id":
13360			if v != nil {
13361				var ID string
13362				err = json.Unmarshal(*v, &ID)
13363				if err != nil {
13364					return err
13365				}
13366				hvnc.ID = &ID
13367			}
13368		}
13369	}
13370
13371	return nil
13372}
13373
13374// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
13375type HubVirtualNetworkConnectionProperties struct {
13376	// RemoteVirtualNetwork - Reference to the remote virtual network.
13377	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
13378	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
13379	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
13380	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
13381	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
13382	// EnableInternetSecurity - Enable internet security.
13383	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
13384	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13385	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13386}
13387
13388// InboundNatPool inbound NAT pool of the load balancer.
13389type InboundNatPool struct {
13390	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
13391	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
13392	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13393	Name *string `json:"name,omitempty"`
13394	// Etag - A unique read-only string that changes whenever the resource is updated.
13395	Etag *string `json:"etag,omitempty"`
13396	// ID - Resource ID.
13397	ID *string `json:"id,omitempty"`
13398}
13399
13400// MarshalJSON is the custom marshaler for InboundNatPool.
13401func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
13402	objectMap := make(map[string]interface{})
13403	if inp.InboundNatPoolPropertiesFormat != nil {
13404		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
13405	}
13406	if inp.Name != nil {
13407		objectMap["name"] = inp.Name
13408	}
13409	if inp.Etag != nil {
13410		objectMap["etag"] = inp.Etag
13411	}
13412	if inp.ID != nil {
13413		objectMap["id"] = inp.ID
13414	}
13415	return json.Marshal(objectMap)
13416}
13417
13418// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
13419func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
13420	var m map[string]*json.RawMessage
13421	err := json.Unmarshal(body, &m)
13422	if err != nil {
13423		return err
13424	}
13425	for k, v := range m {
13426		switch k {
13427		case "properties":
13428			if v != nil {
13429				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
13430				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
13431				if err != nil {
13432					return err
13433				}
13434				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
13435			}
13436		case "name":
13437			if v != nil {
13438				var name string
13439				err = json.Unmarshal(*v, &name)
13440				if err != nil {
13441					return err
13442				}
13443				inp.Name = &name
13444			}
13445		case "etag":
13446			if v != nil {
13447				var etag string
13448				err = json.Unmarshal(*v, &etag)
13449				if err != nil {
13450					return err
13451				}
13452				inp.Etag = &etag
13453			}
13454		case "id":
13455			if v != nil {
13456				var ID string
13457				err = json.Unmarshal(*v, &ID)
13458				if err != nil {
13459					return err
13460				}
13461				inp.ID = &ID
13462			}
13463		}
13464	}
13465
13466	return nil
13467}
13468
13469// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
13470type InboundNatPoolPropertiesFormat struct {
13471	// FrontendIPConfiguration - A reference to frontend IP addresses.
13472	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
13473	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
13474	Protocol TransportProtocol `json:"protocol,omitempty"`
13475	// 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.
13476	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
13477	// 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.
13478	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
13479	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
13480	BackendPort *int32 `json:"backendPort,omitempty"`
13481	// 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.
13482	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
13483	// 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.
13484	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
13485	// 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.
13486	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
13487	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13488	ProvisioningState *string `json:"provisioningState,omitempty"`
13489}
13490
13491// InboundNatRule inbound NAT rule of the load balancer.
13492type InboundNatRule struct {
13493	autorest.Response `json:"-"`
13494	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
13495	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
13496	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
13497	Name *string `json:"name,omitempty"`
13498	// Etag - A unique read-only string that changes whenever the resource is updated.
13499	Etag *string `json:"etag,omitempty"`
13500	// ID - Resource ID.
13501	ID *string `json:"id,omitempty"`
13502}
13503
13504// MarshalJSON is the custom marshaler for InboundNatRule.
13505func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
13506	objectMap := make(map[string]interface{})
13507	if inr.InboundNatRulePropertiesFormat != nil {
13508		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
13509	}
13510	if inr.Name != nil {
13511		objectMap["name"] = inr.Name
13512	}
13513	if inr.Etag != nil {
13514		objectMap["etag"] = inr.Etag
13515	}
13516	if inr.ID != nil {
13517		objectMap["id"] = inr.ID
13518	}
13519	return json.Marshal(objectMap)
13520}
13521
13522// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
13523func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
13524	var m map[string]*json.RawMessage
13525	err := json.Unmarshal(body, &m)
13526	if err != nil {
13527		return err
13528	}
13529	for k, v := range m {
13530		switch k {
13531		case "properties":
13532			if v != nil {
13533				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
13534				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
13535				if err != nil {
13536					return err
13537				}
13538				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
13539			}
13540		case "name":
13541			if v != nil {
13542				var name string
13543				err = json.Unmarshal(*v, &name)
13544				if err != nil {
13545					return err
13546				}
13547				inr.Name = &name
13548			}
13549		case "etag":
13550			if v != nil {
13551				var etag string
13552				err = json.Unmarshal(*v, &etag)
13553				if err != nil {
13554					return err
13555				}
13556				inr.Etag = &etag
13557			}
13558		case "id":
13559			if v != nil {
13560				var ID string
13561				err = json.Unmarshal(*v, &ID)
13562				if err != nil {
13563					return err
13564				}
13565				inr.ID = &ID
13566			}
13567		}
13568	}
13569
13570	return nil
13571}
13572
13573// InboundNatRuleListResult response for ListInboundNatRule API service call.
13574type InboundNatRuleListResult struct {
13575	autorest.Response `json:"-"`
13576	// Value - A list of inbound nat rules in a load balancer.
13577	Value *[]InboundNatRule `json:"value,omitempty"`
13578	// NextLink - READ-ONLY; The URL to get the next set of results.
13579	NextLink *string `json:"nextLink,omitempty"`
13580}
13581
13582// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
13583func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
13584	objectMap := make(map[string]interface{})
13585	if inrlr.Value != nil {
13586		objectMap["value"] = inrlr.Value
13587	}
13588	return json.Marshal(objectMap)
13589}
13590
13591// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
13592type InboundNatRuleListResultIterator struct {
13593	i    int
13594	page InboundNatRuleListResultPage
13595}
13596
13597// NextWithContext advances to the next value.  If there was an error making
13598// the request the iterator does not advance and the error is returned.
13599func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13600	if tracing.IsEnabled() {
13601		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
13602		defer func() {
13603			sc := -1
13604			if iter.Response().Response.Response != nil {
13605				sc = iter.Response().Response.Response.StatusCode
13606			}
13607			tracing.EndSpan(ctx, sc, err)
13608		}()
13609	}
13610	iter.i++
13611	if iter.i < len(iter.page.Values()) {
13612		return nil
13613	}
13614	err = iter.page.NextWithContext(ctx)
13615	if err != nil {
13616		iter.i--
13617		return err
13618	}
13619	iter.i = 0
13620	return nil
13621}
13622
13623// Next advances to the next value.  If there was an error making
13624// the request the iterator does not advance and the error is returned.
13625// Deprecated: Use NextWithContext() instead.
13626func (iter *InboundNatRuleListResultIterator) Next() error {
13627	return iter.NextWithContext(context.Background())
13628}
13629
13630// NotDone returns true if the enumeration should be started or is not yet complete.
13631func (iter InboundNatRuleListResultIterator) NotDone() bool {
13632	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13633}
13634
13635// Response returns the raw server response from the last page request.
13636func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
13637	return iter.page.Response()
13638}
13639
13640// Value returns the current value or a zero-initialized value if the
13641// iterator has advanced beyond the end of the collection.
13642func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
13643	if !iter.page.NotDone() {
13644		return InboundNatRule{}
13645	}
13646	return iter.page.Values()[iter.i]
13647}
13648
13649// Creates a new instance of the InboundNatRuleListResultIterator type.
13650func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
13651	return InboundNatRuleListResultIterator{page: page}
13652}
13653
13654// IsEmpty returns true if the ListResult contains no values.
13655func (inrlr InboundNatRuleListResult) IsEmpty() bool {
13656	return inrlr.Value == nil || len(*inrlr.Value) == 0
13657}
13658
13659// hasNextLink returns true if the NextLink is not empty.
13660func (inrlr InboundNatRuleListResult) hasNextLink() bool {
13661	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
13662}
13663
13664// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
13665// It returns nil if no more results exist.
13666func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13667	if !inrlr.hasNextLink() {
13668		return nil, nil
13669	}
13670	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13671		autorest.AsJSON(),
13672		autorest.AsGet(),
13673		autorest.WithBaseURL(to.String(inrlr.NextLink)))
13674}
13675
13676// InboundNatRuleListResultPage contains a page of InboundNatRule values.
13677type InboundNatRuleListResultPage struct {
13678	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
13679	inrlr InboundNatRuleListResult
13680}
13681
13682// NextWithContext advances to the next page of values.  If there was an error making
13683// the request the page does not advance and the error is returned.
13684func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13685	if tracing.IsEnabled() {
13686		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
13687		defer func() {
13688			sc := -1
13689			if page.Response().Response.Response != nil {
13690				sc = page.Response().Response.Response.StatusCode
13691			}
13692			tracing.EndSpan(ctx, sc, err)
13693		}()
13694	}
13695	for {
13696		next, err := page.fn(ctx, page.inrlr)
13697		if err != nil {
13698			return err
13699		}
13700		page.inrlr = next
13701		if !next.hasNextLink() || !next.IsEmpty() {
13702			break
13703		}
13704	}
13705	return nil
13706}
13707
13708// Next advances to the next page of values.  If there was an error making
13709// the request the page does not advance and the error is returned.
13710// Deprecated: Use NextWithContext() instead.
13711func (page *InboundNatRuleListResultPage) Next() error {
13712	return page.NextWithContext(context.Background())
13713}
13714
13715// NotDone returns true if the page enumeration should be started or is not yet complete.
13716func (page InboundNatRuleListResultPage) NotDone() bool {
13717	return !page.inrlr.IsEmpty()
13718}
13719
13720// Response returns the raw server response from the last page request.
13721func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
13722	return page.inrlr
13723}
13724
13725// Values returns the slice of values for the current page or nil if there are no values.
13726func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
13727	if page.inrlr.IsEmpty() {
13728		return nil
13729	}
13730	return *page.inrlr.Value
13731}
13732
13733// Creates a new instance of the InboundNatRuleListResultPage type.
13734func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
13735	return InboundNatRuleListResultPage{
13736		fn:    getNextPage,
13737		inrlr: cur,
13738	}
13739}
13740
13741// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
13742type InboundNatRulePropertiesFormat struct {
13743	// FrontendIPConfiguration - A reference to frontend IP addresses.
13744	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
13745	// 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.
13746	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
13747	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
13748	Protocol TransportProtocol `json:"protocol,omitempty"`
13749	// 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.
13750	FrontendPort *int32 `json:"frontendPort,omitempty"`
13751	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
13752	BackendPort *int32 `json:"backendPort,omitempty"`
13753	// 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.
13754	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
13755	// 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.
13756	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
13757	// 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.
13758	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
13759	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13760	ProvisioningState *string `json:"provisioningState,omitempty"`
13761}
13762
13763// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
13764func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
13765	objectMap := make(map[string]interface{})
13766	if inrpf.FrontendIPConfiguration != nil {
13767		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
13768	}
13769	if inrpf.Protocol != "" {
13770		objectMap["protocol"] = inrpf.Protocol
13771	}
13772	if inrpf.FrontendPort != nil {
13773		objectMap["frontendPort"] = inrpf.FrontendPort
13774	}
13775	if inrpf.BackendPort != nil {
13776		objectMap["backendPort"] = inrpf.BackendPort
13777	}
13778	if inrpf.IdleTimeoutInMinutes != nil {
13779		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
13780	}
13781	if inrpf.EnableFloatingIP != nil {
13782		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
13783	}
13784	if inrpf.EnableTCPReset != nil {
13785		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
13786	}
13787	if inrpf.ProvisioningState != nil {
13788		objectMap["provisioningState"] = inrpf.ProvisioningState
13789	}
13790	return json.Marshal(objectMap)
13791}
13792
13793// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13794// long-running operation.
13795type InboundNatRulesCreateOrUpdateFuture struct {
13796	azure.FutureAPI
13797	// Result returns the result of the asynchronous operation.
13798	// If the operation has not completed it will return an error.
13799	Result func(InboundNatRulesClient) (InboundNatRule, error)
13800}
13801
13802// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13803func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13804	var azFuture azure.Future
13805	if err := json.Unmarshal(body, &azFuture); err != nil {
13806		return err
13807	}
13808	future.FutureAPI = &azFuture
13809	future.Result = future.result
13810	return nil
13811}
13812
13813// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
13814func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
13815	var done bool
13816	done, err = future.DoneWithContext(context.Background(), client)
13817	if err != nil {
13818		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13819		return
13820	}
13821	if !done {
13822		inr.Response.Response = future.Response()
13823		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
13824		return
13825	}
13826	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13827	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
13828		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
13829		if err != nil {
13830			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
13831		}
13832	}
13833	return
13834}
13835
13836// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13837// operation.
13838type InboundNatRulesDeleteFuture struct {
13839	azure.FutureAPI
13840	// Result returns the result of the asynchronous operation.
13841	// If the operation has not completed it will return an error.
13842	Result func(InboundNatRulesClient) (autorest.Response, error)
13843}
13844
13845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13846func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
13847	var azFuture azure.Future
13848	if err := json.Unmarshal(body, &azFuture); err != nil {
13849		return err
13850	}
13851	future.FutureAPI = &azFuture
13852	future.Result = future.result
13853	return nil
13854}
13855
13856// result is the default implementation for InboundNatRulesDeleteFuture.Result.
13857func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
13858	var done bool
13859	done, err = future.DoneWithContext(context.Background(), client)
13860	if err != nil {
13861		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
13862		return
13863	}
13864	if !done {
13865		ar.Response = future.Response()
13866		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
13867		return
13868	}
13869	ar.Response = future.Response()
13870	return
13871}
13872
13873// IntentPolicy network Intent Policy resource.
13874type IntentPolicy struct {
13875	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13876	Etag *string `json:"etag,omitempty"`
13877	// ID - Resource ID.
13878	ID *string `json:"id,omitempty"`
13879	// Name - READ-ONLY; Resource name.
13880	Name *string `json:"name,omitempty"`
13881	// Type - READ-ONLY; Resource type.
13882	Type *string `json:"type,omitempty"`
13883	// Location - Resource location.
13884	Location *string `json:"location,omitempty"`
13885	// Tags - Resource tags.
13886	Tags map[string]*string `json:"tags"`
13887}
13888
13889// MarshalJSON is the custom marshaler for IntentPolicy.
13890func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
13891	objectMap := make(map[string]interface{})
13892	if IP.Etag != nil {
13893		objectMap["etag"] = IP.Etag
13894	}
13895	if IP.ID != nil {
13896		objectMap["id"] = IP.ID
13897	}
13898	if IP.Location != nil {
13899		objectMap["location"] = IP.Location
13900	}
13901	if IP.Tags != nil {
13902		objectMap["tags"] = IP.Tags
13903	}
13904	return json.Marshal(objectMap)
13905}
13906
13907// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
13908type IntentPolicyConfiguration struct {
13909	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
13910	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
13911	// SourceNetworkIntentPolicy - Source network intent policy.
13912	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
13913}
13914
13915// Interface a network interface in a resource group.
13916type Interface struct {
13917	autorest.Response `json:"-"`
13918	// InterfacePropertiesFormat - Properties of the network interface.
13919	*InterfacePropertiesFormat `json:"properties,omitempty"`
13920	// Etag - A unique read-only string that changes whenever the resource is updated.
13921	Etag *string `json:"etag,omitempty"`
13922	// ID - Resource ID.
13923	ID *string `json:"id,omitempty"`
13924	// Name - READ-ONLY; Resource name.
13925	Name *string `json:"name,omitempty"`
13926	// Type - READ-ONLY; Resource type.
13927	Type *string `json:"type,omitempty"`
13928	// Location - Resource location.
13929	Location *string `json:"location,omitempty"`
13930	// Tags - Resource tags.
13931	Tags map[string]*string `json:"tags"`
13932}
13933
13934// MarshalJSON is the custom marshaler for Interface.
13935func (i Interface) MarshalJSON() ([]byte, error) {
13936	objectMap := make(map[string]interface{})
13937	if i.InterfacePropertiesFormat != nil {
13938		objectMap["properties"] = i.InterfacePropertiesFormat
13939	}
13940	if i.Etag != nil {
13941		objectMap["etag"] = i.Etag
13942	}
13943	if i.ID != nil {
13944		objectMap["id"] = i.ID
13945	}
13946	if i.Location != nil {
13947		objectMap["location"] = i.Location
13948	}
13949	if i.Tags != nil {
13950		objectMap["tags"] = i.Tags
13951	}
13952	return json.Marshal(objectMap)
13953}
13954
13955// UnmarshalJSON is the custom unmarshaler for Interface struct.
13956func (i *Interface) UnmarshalJSON(body []byte) error {
13957	var m map[string]*json.RawMessage
13958	err := json.Unmarshal(body, &m)
13959	if err != nil {
13960		return err
13961	}
13962	for k, v := range m {
13963		switch k {
13964		case "properties":
13965			if v != nil {
13966				var interfacePropertiesFormat InterfacePropertiesFormat
13967				err = json.Unmarshal(*v, &interfacePropertiesFormat)
13968				if err != nil {
13969					return err
13970				}
13971				i.InterfacePropertiesFormat = &interfacePropertiesFormat
13972			}
13973		case "etag":
13974			if v != nil {
13975				var etag string
13976				err = json.Unmarshal(*v, &etag)
13977				if err != nil {
13978					return err
13979				}
13980				i.Etag = &etag
13981			}
13982		case "id":
13983			if v != nil {
13984				var ID string
13985				err = json.Unmarshal(*v, &ID)
13986				if err != nil {
13987					return err
13988				}
13989				i.ID = &ID
13990			}
13991		case "name":
13992			if v != nil {
13993				var name string
13994				err = json.Unmarshal(*v, &name)
13995				if err != nil {
13996					return err
13997				}
13998				i.Name = &name
13999			}
14000		case "type":
14001			if v != nil {
14002				var typeVar string
14003				err = json.Unmarshal(*v, &typeVar)
14004				if err != nil {
14005					return err
14006				}
14007				i.Type = &typeVar
14008			}
14009		case "location":
14010			if v != nil {
14011				var location string
14012				err = json.Unmarshal(*v, &location)
14013				if err != nil {
14014					return err
14015				}
14016				i.Location = &location
14017			}
14018		case "tags":
14019			if v != nil {
14020				var tags map[string]*string
14021				err = json.Unmarshal(*v, &tags)
14022				if err != nil {
14023					return err
14024				}
14025				i.Tags = tags
14026			}
14027		}
14028	}
14029
14030	return nil
14031}
14032
14033// InterfaceAssociation network interface and its custom security rules.
14034type InterfaceAssociation struct {
14035	// ID - READ-ONLY; Network interface ID.
14036	ID *string `json:"id,omitempty"`
14037	// SecurityRules - Collection of custom security rules.
14038	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
14039}
14040
14041// MarshalJSON is the custom marshaler for InterfaceAssociation.
14042func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
14043	objectMap := make(map[string]interface{})
14044	if ia.SecurityRules != nil {
14045		objectMap["securityRules"] = ia.SecurityRules
14046	}
14047	return json.Marshal(objectMap)
14048}
14049
14050// InterfaceDNSSettings DNS settings of a network interface.
14051type InterfaceDNSSettings struct {
14052	// 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.
14053	DNSServers *[]string `json:"dnsServers,omitempty"`
14054	// 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.
14055	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
14056	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
14057	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
14058	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
14059	InternalFqdn *string `json:"internalFqdn,omitempty"`
14060	// 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.
14061	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
14062}
14063
14064// InterfaceIPConfiguration iPConfiguration in a network interface.
14065type InterfaceIPConfiguration struct {
14066	autorest.Response `json:"-"`
14067	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
14068	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
14069	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14070	Name *string `json:"name,omitempty"`
14071	// Etag - A unique read-only string that changes whenever the resource is updated.
14072	Etag *string `json:"etag,omitempty"`
14073	// ID - Resource ID.
14074	ID *string `json:"id,omitempty"`
14075}
14076
14077// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
14078func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
14079	objectMap := make(map[string]interface{})
14080	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
14081		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
14082	}
14083	if iic.Name != nil {
14084		objectMap["name"] = iic.Name
14085	}
14086	if iic.Etag != nil {
14087		objectMap["etag"] = iic.Etag
14088	}
14089	if iic.ID != nil {
14090		objectMap["id"] = iic.ID
14091	}
14092	return json.Marshal(objectMap)
14093}
14094
14095// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
14096func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
14097	var m map[string]*json.RawMessage
14098	err := json.Unmarshal(body, &m)
14099	if err != nil {
14100		return err
14101	}
14102	for k, v := range m {
14103		switch k {
14104		case "properties":
14105			if v != nil {
14106				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
14107				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
14108				if err != nil {
14109					return err
14110				}
14111				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
14112			}
14113		case "name":
14114			if v != nil {
14115				var name string
14116				err = json.Unmarshal(*v, &name)
14117				if err != nil {
14118					return err
14119				}
14120				iic.Name = &name
14121			}
14122		case "etag":
14123			if v != nil {
14124				var etag string
14125				err = json.Unmarshal(*v, &etag)
14126				if err != nil {
14127					return err
14128				}
14129				iic.Etag = &etag
14130			}
14131		case "id":
14132			if v != nil {
14133				var ID string
14134				err = json.Unmarshal(*v, &ID)
14135				if err != nil {
14136					return err
14137				}
14138				iic.ID = &ID
14139			}
14140		}
14141	}
14142
14143	return nil
14144}
14145
14146// InterfaceIPConfigurationListResult response for list ip configurations API service call.
14147type InterfaceIPConfigurationListResult struct {
14148	autorest.Response `json:"-"`
14149	// Value - A list of ip configurations.
14150	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
14151	// NextLink - READ-ONLY; The URL to get the next set of results.
14152	NextLink *string `json:"nextLink,omitempty"`
14153}
14154
14155// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
14156func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
14157	objectMap := make(map[string]interface{})
14158	if iiclr.Value != nil {
14159		objectMap["value"] = iiclr.Value
14160	}
14161	return json.Marshal(objectMap)
14162}
14163
14164// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
14165// InterfaceIPConfiguration values.
14166type InterfaceIPConfigurationListResultIterator struct {
14167	i    int
14168	page InterfaceIPConfigurationListResultPage
14169}
14170
14171// NextWithContext advances to the next value.  If there was an error making
14172// the request the iterator does not advance and the error is returned.
14173func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14174	if tracing.IsEnabled() {
14175		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
14176		defer func() {
14177			sc := -1
14178			if iter.Response().Response.Response != nil {
14179				sc = iter.Response().Response.Response.StatusCode
14180			}
14181			tracing.EndSpan(ctx, sc, err)
14182		}()
14183	}
14184	iter.i++
14185	if iter.i < len(iter.page.Values()) {
14186		return nil
14187	}
14188	err = iter.page.NextWithContext(ctx)
14189	if err != nil {
14190		iter.i--
14191		return err
14192	}
14193	iter.i = 0
14194	return nil
14195}
14196
14197// Next advances to the next value.  If there was an error making
14198// the request the iterator does not advance and the error is returned.
14199// Deprecated: Use NextWithContext() instead.
14200func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
14201	return iter.NextWithContext(context.Background())
14202}
14203
14204// NotDone returns true if the enumeration should be started or is not yet complete.
14205func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
14206	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14207}
14208
14209// Response returns the raw server response from the last page request.
14210func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
14211	return iter.page.Response()
14212}
14213
14214// Value returns the current value or a zero-initialized value if the
14215// iterator has advanced beyond the end of the collection.
14216func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
14217	if !iter.page.NotDone() {
14218		return InterfaceIPConfiguration{}
14219	}
14220	return iter.page.Values()[iter.i]
14221}
14222
14223// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
14224func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
14225	return InterfaceIPConfigurationListResultIterator{page: page}
14226}
14227
14228// IsEmpty returns true if the ListResult contains no values.
14229func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
14230	return iiclr.Value == nil || len(*iiclr.Value) == 0
14231}
14232
14233// hasNextLink returns true if the NextLink is not empty.
14234func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
14235	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
14236}
14237
14238// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14239// It returns nil if no more results exist.
14240func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14241	if !iiclr.hasNextLink() {
14242		return nil, nil
14243	}
14244	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14245		autorest.AsJSON(),
14246		autorest.AsGet(),
14247		autorest.WithBaseURL(to.String(iiclr.NextLink)))
14248}
14249
14250// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
14251type InterfaceIPConfigurationListResultPage struct {
14252	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
14253	iiclr InterfaceIPConfigurationListResult
14254}
14255
14256// NextWithContext advances to the next page of values.  If there was an error making
14257// the request the page does not advance and the error is returned.
14258func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14259	if tracing.IsEnabled() {
14260		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
14261		defer func() {
14262			sc := -1
14263			if page.Response().Response.Response != nil {
14264				sc = page.Response().Response.Response.StatusCode
14265			}
14266			tracing.EndSpan(ctx, sc, err)
14267		}()
14268	}
14269	for {
14270		next, err := page.fn(ctx, page.iiclr)
14271		if err != nil {
14272			return err
14273		}
14274		page.iiclr = next
14275		if !next.hasNextLink() || !next.IsEmpty() {
14276			break
14277		}
14278	}
14279	return nil
14280}
14281
14282// Next advances to the next page of values.  If there was an error making
14283// the request the page does not advance and the error is returned.
14284// Deprecated: Use NextWithContext() instead.
14285func (page *InterfaceIPConfigurationListResultPage) Next() error {
14286	return page.NextWithContext(context.Background())
14287}
14288
14289// NotDone returns true if the page enumeration should be started or is not yet complete.
14290func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
14291	return !page.iiclr.IsEmpty()
14292}
14293
14294// Response returns the raw server response from the last page request.
14295func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
14296	return page.iiclr
14297}
14298
14299// Values returns the slice of values for the current page or nil if there are no values.
14300func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
14301	if page.iiclr.IsEmpty() {
14302		return nil
14303	}
14304	return *page.iiclr.Value
14305}
14306
14307// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
14308func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
14309	return InterfaceIPConfigurationListResultPage{
14310		fn:    getNextPage,
14311		iiclr: cur,
14312	}
14313}
14314
14315// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
14316type InterfaceIPConfigurationPropertiesFormat struct {
14317	// VirtualNetworkTaps - The reference to Virtual Network Taps.
14318	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
14319	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
14320	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
14321	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
14322	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
14323	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
14324	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
14325	// PrivateIPAddress - Private IP address of the IP configuration.
14326	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14327	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
14328	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14329	// 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 include: 'IPv4', 'IPv6'
14330	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
14331	// Subnet - Subnet bound to the IP configuration.
14332	Subnet *Subnet `json:"subnet,omitempty"`
14333	// Primary - Gets whether this is a primary customer address on the network interface.
14334	Primary *bool `json:"primary,omitempty"`
14335	// PublicIPAddress - Public IP address bound to the IP configuration.
14336	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14337	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
14338	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
14339	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14340	ProvisioningState *string `json:"provisioningState,omitempty"`
14341}
14342
14343// InterfaceListResult response for the ListNetworkInterface API service call.
14344type InterfaceListResult struct {
14345	autorest.Response `json:"-"`
14346	// Value - A list of network interfaces in a resource group.
14347	Value *[]Interface `json:"value,omitempty"`
14348	// NextLink - READ-ONLY; The URL to get the next set of results.
14349	NextLink *string `json:"nextLink,omitempty"`
14350}
14351
14352// MarshalJSON is the custom marshaler for InterfaceListResult.
14353func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
14354	objectMap := make(map[string]interface{})
14355	if ilr.Value != nil {
14356		objectMap["value"] = ilr.Value
14357	}
14358	return json.Marshal(objectMap)
14359}
14360
14361// InterfaceListResultIterator provides access to a complete listing of Interface values.
14362type InterfaceListResultIterator struct {
14363	i    int
14364	page InterfaceListResultPage
14365}
14366
14367// NextWithContext advances to the next value.  If there was an error making
14368// the request the iterator does not advance and the error is returned.
14369func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
14370	if tracing.IsEnabled() {
14371		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
14372		defer func() {
14373			sc := -1
14374			if iter.Response().Response.Response != nil {
14375				sc = iter.Response().Response.Response.StatusCode
14376			}
14377			tracing.EndSpan(ctx, sc, err)
14378		}()
14379	}
14380	iter.i++
14381	if iter.i < len(iter.page.Values()) {
14382		return nil
14383	}
14384	err = iter.page.NextWithContext(ctx)
14385	if err != nil {
14386		iter.i--
14387		return err
14388	}
14389	iter.i = 0
14390	return nil
14391}
14392
14393// Next advances to the next value.  If there was an error making
14394// the request the iterator does not advance and the error is returned.
14395// Deprecated: Use NextWithContext() instead.
14396func (iter *InterfaceListResultIterator) Next() error {
14397	return iter.NextWithContext(context.Background())
14398}
14399
14400// NotDone returns true if the enumeration should be started or is not yet complete.
14401func (iter InterfaceListResultIterator) NotDone() bool {
14402	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14403}
14404
14405// Response returns the raw server response from the last page request.
14406func (iter InterfaceListResultIterator) Response() InterfaceListResult {
14407	return iter.page.Response()
14408}
14409
14410// Value returns the current value or a zero-initialized value if the
14411// iterator has advanced beyond the end of the collection.
14412func (iter InterfaceListResultIterator) Value() Interface {
14413	if !iter.page.NotDone() {
14414		return Interface{}
14415	}
14416	return iter.page.Values()[iter.i]
14417}
14418
14419// Creates a new instance of the InterfaceListResultIterator type.
14420func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
14421	return InterfaceListResultIterator{page: page}
14422}
14423
14424// IsEmpty returns true if the ListResult contains no values.
14425func (ilr InterfaceListResult) IsEmpty() bool {
14426	return ilr.Value == nil || len(*ilr.Value) == 0
14427}
14428
14429// hasNextLink returns true if the NextLink is not empty.
14430func (ilr InterfaceListResult) hasNextLink() bool {
14431	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
14432}
14433
14434// interfaceListResultPreparer prepares a request to retrieve the next set of results.
14435// It returns nil if no more results exist.
14436func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
14437	if !ilr.hasNextLink() {
14438		return nil, nil
14439	}
14440	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14441		autorest.AsJSON(),
14442		autorest.AsGet(),
14443		autorest.WithBaseURL(to.String(ilr.NextLink)))
14444}
14445
14446// InterfaceListResultPage contains a page of Interface values.
14447type InterfaceListResultPage struct {
14448	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
14449	ilr InterfaceListResult
14450}
14451
14452// NextWithContext advances to the next page of values.  If there was an error making
14453// the request the page does not advance and the error is returned.
14454func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
14455	if tracing.IsEnabled() {
14456		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
14457		defer func() {
14458			sc := -1
14459			if page.Response().Response.Response != nil {
14460				sc = page.Response().Response.Response.StatusCode
14461			}
14462			tracing.EndSpan(ctx, sc, err)
14463		}()
14464	}
14465	for {
14466		next, err := page.fn(ctx, page.ilr)
14467		if err != nil {
14468			return err
14469		}
14470		page.ilr = next
14471		if !next.hasNextLink() || !next.IsEmpty() {
14472			break
14473		}
14474	}
14475	return nil
14476}
14477
14478// Next advances to the next page of values.  If there was an error making
14479// the request the page does not advance and the error is returned.
14480// Deprecated: Use NextWithContext() instead.
14481func (page *InterfaceListResultPage) Next() error {
14482	return page.NextWithContext(context.Background())
14483}
14484
14485// NotDone returns true if the page enumeration should be started or is not yet complete.
14486func (page InterfaceListResultPage) NotDone() bool {
14487	return !page.ilr.IsEmpty()
14488}
14489
14490// Response returns the raw server response from the last page request.
14491func (page InterfaceListResultPage) Response() InterfaceListResult {
14492	return page.ilr
14493}
14494
14495// Values returns the slice of values for the current page or nil if there are no values.
14496func (page InterfaceListResultPage) Values() []Interface {
14497	if page.ilr.IsEmpty() {
14498		return nil
14499	}
14500	return *page.ilr.Value
14501}
14502
14503// Creates a new instance of the InterfaceListResultPage type.
14504func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
14505	return InterfaceListResultPage{
14506		fn:  getNextPage,
14507		ilr: cur,
14508	}
14509}
14510
14511// InterfaceLoadBalancerListResult response for list ip configurations API service call.
14512type InterfaceLoadBalancerListResult struct {
14513	autorest.Response `json:"-"`
14514	// Value - A list of load balancers.
14515	Value *[]LoadBalancer `json:"value,omitempty"`
14516	// NextLink - READ-ONLY; The URL to get the next set of results.
14517	NextLink *string `json:"nextLink,omitempty"`
14518}
14519
14520// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
14521func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
14522	objectMap := make(map[string]interface{})
14523	if ilblr.Value != nil {
14524		objectMap["value"] = ilblr.Value
14525	}
14526	return json.Marshal(objectMap)
14527}
14528
14529// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
14530type InterfaceLoadBalancerListResultIterator struct {
14531	i    int
14532	page InterfaceLoadBalancerListResultPage
14533}
14534
14535// NextWithContext advances to the next value.  If there was an error making
14536// the request the iterator does not advance and the error is returned.
14537func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
14538	if tracing.IsEnabled() {
14539		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
14540		defer func() {
14541			sc := -1
14542			if iter.Response().Response.Response != nil {
14543				sc = iter.Response().Response.Response.StatusCode
14544			}
14545			tracing.EndSpan(ctx, sc, err)
14546		}()
14547	}
14548	iter.i++
14549	if iter.i < len(iter.page.Values()) {
14550		return nil
14551	}
14552	err = iter.page.NextWithContext(ctx)
14553	if err != nil {
14554		iter.i--
14555		return err
14556	}
14557	iter.i = 0
14558	return nil
14559}
14560
14561// Next advances to the next value.  If there was an error making
14562// the request the iterator does not advance and the error is returned.
14563// Deprecated: Use NextWithContext() instead.
14564func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
14565	return iter.NextWithContext(context.Background())
14566}
14567
14568// NotDone returns true if the enumeration should be started or is not yet complete.
14569func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
14570	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14571}
14572
14573// Response returns the raw server response from the last page request.
14574func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
14575	return iter.page.Response()
14576}
14577
14578// Value returns the current value or a zero-initialized value if the
14579// iterator has advanced beyond the end of the collection.
14580func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
14581	if !iter.page.NotDone() {
14582		return LoadBalancer{}
14583	}
14584	return iter.page.Values()[iter.i]
14585}
14586
14587// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
14588func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
14589	return InterfaceLoadBalancerListResultIterator{page: page}
14590}
14591
14592// IsEmpty returns true if the ListResult contains no values.
14593func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
14594	return ilblr.Value == nil || len(*ilblr.Value) == 0
14595}
14596
14597// hasNextLink returns true if the NextLink is not empty.
14598func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
14599	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
14600}
14601
14602// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
14603// It returns nil if no more results exist.
14604func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
14605	if !ilblr.hasNextLink() {
14606		return nil, nil
14607	}
14608	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14609		autorest.AsJSON(),
14610		autorest.AsGet(),
14611		autorest.WithBaseURL(to.String(ilblr.NextLink)))
14612}
14613
14614// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
14615type InterfaceLoadBalancerListResultPage struct {
14616	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
14617	ilblr InterfaceLoadBalancerListResult
14618}
14619
14620// NextWithContext advances to the next page of values.  If there was an error making
14621// the request the page does not advance and the error is returned.
14622func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14623	if tracing.IsEnabled() {
14624		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
14625		defer func() {
14626			sc := -1
14627			if page.Response().Response.Response != nil {
14628				sc = page.Response().Response.Response.StatusCode
14629			}
14630			tracing.EndSpan(ctx, sc, err)
14631		}()
14632	}
14633	for {
14634		next, err := page.fn(ctx, page.ilblr)
14635		if err != nil {
14636			return err
14637		}
14638		page.ilblr = next
14639		if !next.hasNextLink() || !next.IsEmpty() {
14640			break
14641		}
14642	}
14643	return nil
14644}
14645
14646// Next advances to the next page of values.  If there was an error making
14647// the request the page does not advance and the error is returned.
14648// Deprecated: Use NextWithContext() instead.
14649func (page *InterfaceLoadBalancerListResultPage) Next() error {
14650	return page.NextWithContext(context.Background())
14651}
14652
14653// NotDone returns true if the page enumeration should be started or is not yet complete.
14654func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
14655	return !page.ilblr.IsEmpty()
14656}
14657
14658// Response returns the raw server response from the last page request.
14659func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
14660	return page.ilblr
14661}
14662
14663// Values returns the slice of values for the current page or nil if there are no values.
14664func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
14665	if page.ilblr.IsEmpty() {
14666		return nil
14667	}
14668	return *page.ilblr.Value
14669}
14670
14671// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
14672func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
14673	return InterfaceLoadBalancerListResultPage{
14674		fn:    getNextPage,
14675		ilblr: cur,
14676	}
14677}
14678
14679// InterfacePropertiesFormat networkInterface properties.
14680type InterfacePropertiesFormat struct {
14681	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
14682	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
14683	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14684	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14685	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
14686	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
14687	// IPConfigurations - A list of IPConfigurations of the network interface.
14688	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
14689	// TapConfigurations - A list of TapConfigurations of the network interface.
14690	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
14691	// DNSSettings - The DNS settings in network interface.
14692	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
14693	// MacAddress - The MAC address of the network interface.
14694	MacAddress *string `json:"macAddress,omitempty"`
14695	// Primary - Gets whether this is a primary network interface on a virtual machine.
14696	Primary *bool `json:"primary,omitempty"`
14697	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
14698	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14699	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
14700	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14701	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
14702	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
14703	// ResourceGUID - The resource GUID property of the network interface resource.
14704	ResourceGUID *string `json:"resourceGuid,omitempty"`
14705	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14706	ProvisioningState *string `json:"provisioningState,omitempty"`
14707}
14708
14709// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
14710func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
14711	objectMap := make(map[string]interface{})
14712	if ipf.NetworkSecurityGroup != nil {
14713		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
14714	}
14715	if ipf.IPConfigurations != nil {
14716		objectMap["ipConfigurations"] = ipf.IPConfigurations
14717	}
14718	if ipf.TapConfigurations != nil {
14719		objectMap["tapConfigurations"] = ipf.TapConfigurations
14720	}
14721	if ipf.DNSSettings != nil {
14722		objectMap["dnsSettings"] = ipf.DNSSettings
14723	}
14724	if ipf.MacAddress != nil {
14725		objectMap["macAddress"] = ipf.MacAddress
14726	}
14727	if ipf.Primary != nil {
14728		objectMap["primary"] = ipf.Primary
14729	}
14730	if ipf.EnableAcceleratedNetworking != nil {
14731		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
14732	}
14733	if ipf.EnableIPForwarding != nil {
14734		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
14735	}
14736	if ipf.ResourceGUID != nil {
14737		objectMap["resourceGuid"] = ipf.ResourceGUID
14738	}
14739	if ipf.ProvisioningState != nil {
14740		objectMap["provisioningState"] = ipf.ProvisioningState
14741	}
14742	return json.Marshal(objectMap)
14743}
14744
14745// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14746// long-running operation.
14747type InterfacesCreateOrUpdateFuture struct {
14748	azure.FutureAPI
14749	// Result returns the result of the asynchronous operation.
14750	// If the operation has not completed it will return an error.
14751	Result func(InterfacesClient) (Interface, error)
14752}
14753
14754// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14755func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14756	var azFuture azure.Future
14757	if err := json.Unmarshal(body, &azFuture); err != nil {
14758		return err
14759	}
14760	future.FutureAPI = &azFuture
14761	future.Result = future.result
14762	return nil
14763}
14764
14765// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
14766func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
14767	var done bool
14768	done, err = future.DoneWithContext(context.Background(), client)
14769	if err != nil {
14770		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14771		return
14772	}
14773	if !done {
14774		i.Response.Response = future.Response()
14775		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
14776		return
14777	}
14778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14779	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14780		i, err = client.CreateOrUpdateResponder(i.Response.Response)
14781		if err != nil {
14782			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
14783		}
14784	}
14785	return
14786}
14787
14788// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14789// operation.
14790type InterfacesDeleteFuture struct {
14791	azure.FutureAPI
14792	// Result returns the result of the asynchronous operation.
14793	// If the operation has not completed it will return an error.
14794	Result func(InterfacesClient) (autorest.Response, error)
14795}
14796
14797// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14798func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
14799	var azFuture azure.Future
14800	if err := json.Unmarshal(body, &azFuture); err != nil {
14801		return err
14802	}
14803	future.FutureAPI = &azFuture
14804	future.Result = future.result
14805	return nil
14806}
14807
14808// result is the default implementation for InterfacesDeleteFuture.Result.
14809func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
14810	var done bool
14811	done, err = future.DoneWithContext(context.Background(), client)
14812	if err != nil {
14813		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
14814		return
14815	}
14816	if !done {
14817		ar.Response = future.Response()
14818		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
14819		return
14820	}
14821	ar.Response = future.Response()
14822	return
14823}
14824
14825// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
14826// long-running operation.
14827type InterfacesGetEffectiveRouteTableFuture struct {
14828	azure.FutureAPI
14829	// Result returns the result of the asynchronous operation.
14830	// If the operation has not completed it will return an error.
14831	Result func(InterfacesClient) (EffectiveRouteListResult, error)
14832}
14833
14834// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14835func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
14836	var azFuture azure.Future
14837	if err := json.Unmarshal(body, &azFuture); err != nil {
14838		return err
14839	}
14840	future.FutureAPI = &azFuture
14841	future.Result = future.result
14842	return nil
14843}
14844
14845// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
14846func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
14847	var done bool
14848	done, err = future.DoneWithContext(context.Background(), client)
14849	if err != nil {
14850		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
14851		return
14852	}
14853	if !done {
14854		erlr.Response.Response = future.Response()
14855		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
14856		return
14857	}
14858	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14859	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
14860		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
14861		if err != nil {
14862			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
14863		}
14864	}
14865	return
14866}
14867
14868// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
14869// results of a long-running operation.
14870type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
14871	azure.FutureAPI
14872	// Result returns the result of the asynchronous operation.
14873	// If the operation has not completed it will return an error.
14874	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
14875}
14876
14877// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14878func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
14879	var azFuture azure.Future
14880	if err := json.Unmarshal(body, &azFuture); err != nil {
14881		return err
14882	}
14883	future.FutureAPI = &azFuture
14884	future.Result = future.result
14885	return nil
14886}
14887
14888// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
14889func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
14890	var done bool
14891	done, err = future.DoneWithContext(context.Background(), client)
14892	if err != nil {
14893		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
14894		return
14895	}
14896	if !done {
14897		ensglr.Response.Response = future.Response()
14898		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
14899		return
14900	}
14901	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14902	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
14903		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
14904		if err != nil {
14905			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
14906		}
14907	}
14908	return
14909}
14910
14911// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14912// operation.
14913type InterfacesUpdateTagsFuture struct {
14914	azure.FutureAPI
14915	// Result returns the result of the asynchronous operation.
14916	// If the operation has not completed it will return an error.
14917	Result func(InterfacesClient) (Interface, error)
14918}
14919
14920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14921func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14922	var azFuture azure.Future
14923	if err := json.Unmarshal(body, &azFuture); err != nil {
14924		return err
14925	}
14926	future.FutureAPI = &azFuture
14927	future.Result = future.result
14928	return nil
14929}
14930
14931// result is the default implementation for InterfacesUpdateTagsFuture.Result.
14932func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
14933	var done bool
14934	done, err = future.DoneWithContext(context.Background(), client)
14935	if err != nil {
14936		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14937		return
14938	}
14939	if !done {
14940		i.Response.Response = future.Response()
14941		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
14942		return
14943	}
14944	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14945	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14946		i, err = client.UpdateTagsResponder(i.Response.Response)
14947		if err != nil {
14948			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
14949		}
14950	}
14951	return
14952}
14953
14954// InterfaceTapConfiguration tap configuration in a Network Interface.
14955type InterfaceTapConfiguration struct {
14956	autorest.Response `json:"-"`
14957	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
14958	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
14959	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14960	Name *string `json:"name,omitempty"`
14961	// Etag - A unique read-only string that changes whenever the resource is updated.
14962	Etag *string `json:"etag,omitempty"`
14963	// Type - READ-ONLY; Sub Resource type.
14964	Type *string `json:"type,omitempty"`
14965	// ID - Resource ID.
14966	ID *string `json:"id,omitempty"`
14967}
14968
14969// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
14970func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
14971	objectMap := make(map[string]interface{})
14972	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
14973		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
14974	}
14975	if itc.Name != nil {
14976		objectMap["name"] = itc.Name
14977	}
14978	if itc.Etag != nil {
14979		objectMap["etag"] = itc.Etag
14980	}
14981	if itc.ID != nil {
14982		objectMap["id"] = itc.ID
14983	}
14984	return json.Marshal(objectMap)
14985}
14986
14987// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
14988func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
14989	var m map[string]*json.RawMessage
14990	err := json.Unmarshal(body, &m)
14991	if err != nil {
14992		return err
14993	}
14994	for k, v := range m {
14995		switch k {
14996		case "properties":
14997			if v != nil {
14998				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
14999				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
15000				if err != nil {
15001					return err
15002				}
15003				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
15004			}
15005		case "name":
15006			if v != nil {
15007				var name string
15008				err = json.Unmarshal(*v, &name)
15009				if err != nil {
15010					return err
15011				}
15012				itc.Name = &name
15013			}
15014		case "etag":
15015			if v != nil {
15016				var etag string
15017				err = json.Unmarshal(*v, &etag)
15018				if err != nil {
15019					return err
15020				}
15021				itc.Etag = &etag
15022			}
15023		case "type":
15024			if v != nil {
15025				var typeVar string
15026				err = json.Unmarshal(*v, &typeVar)
15027				if err != nil {
15028					return err
15029				}
15030				itc.Type = &typeVar
15031			}
15032		case "id":
15033			if v != nil {
15034				var ID string
15035				err = json.Unmarshal(*v, &ID)
15036				if err != nil {
15037					return err
15038				}
15039				itc.ID = &ID
15040			}
15041		}
15042	}
15043
15044	return nil
15045}
15046
15047// InterfaceTapConfigurationListResult response for list tap configurations API service call.
15048type InterfaceTapConfigurationListResult struct {
15049	autorest.Response `json:"-"`
15050	// Value - A list of tap configurations.
15051	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
15052	// NextLink - READ-ONLY; The URL to get the next set of results.
15053	NextLink *string `json:"nextLink,omitempty"`
15054}
15055
15056// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
15057func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
15058	objectMap := make(map[string]interface{})
15059	if itclr.Value != nil {
15060		objectMap["value"] = itclr.Value
15061	}
15062	return json.Marshal(objectMap)
15063}
15064
15065// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
15066// InterfaceTapConfiguration values.
15067type InterfaceTapConfigurationListResultIterator struct {
15068	i    int
15069	page InterfaceTapConfigurationListResultPage
15070}
15071
15072// NextWithContext advances to the next value.  If there was an error making
15073// the request the iterator does not advance and the error is returned.
15074func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
15075	if tracing.IsEnabled() {
15076		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
15077		defer func() {
15078			sc := -1
15079			if iter.Response().Response.Response != nil {
15080				sc = iter.Response().Response.Response.StatusCode
15081			}
15082			tracing.EndSpan(ctx, sc, err)
15083		}()
15084	}
15085	iter.i++
15086	if iter.i < len(iter.page.Values()) {
15087		return nil
15088	}
15089	err = iter.page.NextWithContext(ctx)
15090	if err != nil {
15091		iter.i--
15092		return err
15093	}
15094	iter.i = 0
15095	return nil
15096}
15097
15098// Next advances to the next value.  If there was an error making
15099// the request the iterator does not advance and the error is returned.
15100// Deprecated: Use NextWithContext() instead.
15101func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
15102	return iter.NextWithContext(context.Background())
15103}
15104
15105// NotDone returns true if the enumeration should be started or is not yet complete.
15106func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
15107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15108}
15109
15110// Response returns the raw server response from the last page request.
15111func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
15112	return iter.page.Response()
15113}
15114
15115// Value returns the current value or a zero-initialized value if the
15116// iterator has advanced beyond the end of the collection.
15117func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
15118	if !iter.page.NotDone() {
15119		return InterfaceTapConfiguration{}
15120	}
15121	return iter.page.Values()[iter.i]
15122}
15123
15124// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
15125func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
15126	return InterfaceTapConfigurationListResultIterator{page: page}
15127}
15128
15129// IsEmpty returns true if the ListResult contains no values.
15130func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
15131	return itclr.Value == nil || len(*itclr.Value) == 0
15132}
15133
15134// hasNextLink returns true if the NextLink is not empty.
15135func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
15136	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
15137}
15138
15139// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
15140// It returns nil if no more results exist.
15141func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
15142	if !itclr.hasNextLink() {
15143		return nil, nil
15144	}
15145	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15146		autorest.AsJSON(),
15147		autorest.AsGet(),
15148		autorest.WithBaseURL(to.String(itclr.NextLink)))
15149}
15150
15151// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
15152type InterfaceTapConfigurationListResultPage struct {
15153	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
15154	itclr InterfaceTapConfigurationListResult
15155}
15156
15157// NextWithContext advances to the next page of values.  If there was an error making
15158// the request the page does not advance and the error is returned.
15159func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
15160	if tracing.IsEnabled() {
15161		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
15162		defer func() {
15163			sc := -1
15164			if page.Response().Response.Response != nil {
15165				sc = page.Response().Response.Response.StatusCode
15166			}
15167			tracing.EndSpan(ctx, sc, err)
15168		}()
15169	}
15170	for {
15171		next, err := page.fn(ctx, page.itclr)
15172		if err != nil {
15173			return err
15174		}
15175		page.itclr = next
15176		if !next.hasNextLink() || !next.IsEmpty() {
15177			break
15178		}
15179	}
15180	return nil
15181}
15182
15183// Next advances to the next page of values.  If there was an error making
15184// the request the page does not advance and the error is returned.
15185// Deprecated: Use NextWithContext() instead.
15186func (page *InterfaceTapConfigurationListResultPage) Next() error {
15187	return page.NextWithContext(context.Background())
15188}
15189
15190// NotDone returns true if the page enumeration should be started or is not yet complete.
15191func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
15192	return !page.itclr.IsEmpty()
15193}
15194
15195// Response returns the raw server response from the last page request.
15196func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
15197	return page.itclr
15198}
15199
15200// Values returns the slice of values for the current page or nil if there are no values.
15201func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
15202	if page.itclr.IsEmpty() {
15203		return nil
15204	}
15205	return *page.itclr.Value
15206}
15207
15208// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
15209func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
15210	return InterfaceTapConfigurationListResultPage{
15211		fn:    getNextPage,
15212		itclr: cur,
15213	}
15214}
15215
15216// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
15217type InterfaceTapConfigurationPropertiesFormat struct {
15218	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
15219	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
15220	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15221	ProvisioningState *string `json:"provisioningState,omitempty"`
15222}
15223
15224// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
15225func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
15226	objectMap := make(map[string]interface{})
15227	if itcpf.VirtualNetworkTap != nil {
15228		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
15229	}
15230	return json.Marshal(objectMap)
15231}
15232
15233// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
15234// of a long-running operation.
15235type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
15236	azure.FutureAPI
15237	// Result returns the result of the asynchronous operation.
15238	// If the operation has not completed it will return an error.
15239	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
15240}
15241
15242// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15243func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15244	var azFuture azure.Future
15245	if err := json.Unmarshal(body, &azFuture); err != nil {
15246		return err
15247	}
15248	future.FutureAPI = &azFuture
15249	future.Result = future.result
15250	return nil
15251}
15252
15253// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
15254func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
15255	var done bool
15256	done, err = future.DoneWithContext(context.Background(), client)
15257	if err != nil {
15258		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15259		return
15260	}
15261	if !done {
15262		itc.Response.Response = future.Response()
15263		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
15264		return
15265	}
15266	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15267	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
15268		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
15269		if err != nil {
15270			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
15271		}
15272	}
15273	return
15274}
15275
15276// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
15277// long-running operation.
15278type InterfaceTapConfigurationsDeleteFuture struct {
15279	azure.FutureAPI
15280	// Result returns the result of the asynchronous operation.
15281	// If the operation has not completed it will return an error.
15282	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
15283}
15284
15285// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15286func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
15287	var azFuture azure.Future
15288	if err := json.Unmarshal(body, &azFuture); err != nil {
15289		return err
15290	}
15291	future.FutureAPI = &azFuture
15292	future.Result = future.result
15293	return nil
15294}
15295
15296// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
15297func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
15298	var done bool
15299	done, err = future.DoneWithContext(context.Background(), client)
15300	if err != nil {
15301		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
15302		return
15303	}
15304	if !done {
15305		ar.Response = future.Response()
15306		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
15307		return
15308	}
15309	ar.Response = future.Response()
15310	return
15311}
15312
15313// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
15314type IPAddressAvailabilityResult struct {
15315	autorest.Response `json:"-"`
15316	// Available - Private IP address availability.
15317	Available *bool `json:"available,omitempty"`
15318	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
15319	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
15320}
15321
15322// IPConfiguration IP configuration.
15323type IPConfiguration struct {
15324	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
15325	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
15326	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15327	Name *string `json:"name,omitempty"`
15328	// Etag - A unique read-only string that changes whenever the resource is updated.
15329	Etag *string `json:"etag,omitempty"`
15330	// ID - Resource ID.
15331	ID *string `json:"id,omitempty"`
15332}
15333
15334// MarshalJSON is the custom marshaler for IPConfiguration.
15335func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
15336	objectMap := make(map[string]interface{})
15337	if ic.IPConfigurationPropertiesFormat != nil {
15338		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
15339	}
15340	if ic.Name != nil {
15341		objectMap["name"] = ic.Name
15342	}
15343	if ic.Etag != nil {
15344		objectMap["etag"] = ic.Etag
15345	}
15346	if ic.ID != nil {
15347		objectMap["id"] = ic.ID
15348	}
15349	return json.Marshal(objectMap)
15350}
15351
15352// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
15353func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
15354	var m map[string]*json.RawMessage
15355	err := json.Unmarshal(body, &m)
15356	if err != nil {
15357		return err
15358	}
15359	for k, v := range m {
15360		switch k {
15361		case "properties":
15362			if v != nil {
15363				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
15364				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
15365				if err != nil {
15366					return err
15367				}
15368				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
15369			}
15370		case "name":
15371			if v != nil {
15372				var name string
15373				err = json.Unmarshal(*v, &name)
15374				if err != nil {
15375					return err
15376				}
15377				ic.Name = &name
15378			}
15379		case "etag":
15380			if v != nil {
15381				var etag string
15382				err = json.Unmarshal(*v, &etag)
15383				if err != nil {
15384					return err
15385				}
15386				ic.Etag = &etag
15387			}
15388		case "id":
15389			if v != nil {
15390				var ID string
15391				err = json.Unmarshal(*v, &ID)
15392				if err != nil {
15393					return err
15394				}
15395				ic.ID = &ID
15396			}
15397		}
15398	}
15399
15400	return nil
15401}
15402
15403// IPConfigurationProfile IP configuration profile child resource.
15404type IPConfigurationProfile struct {
15405	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
15406	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
15407	// Name - The name of the resource. This name can be used to access the resource.
15408	Name *string `json:"name,omitempty"`
15409	// Type - READ-ONLY; Sub Resource type.
15410	Type *string `json:"type,omitempty"`
15411	// Etag - A unique read-only string that changes whenever the resource is updated.
15412	Etag *string `json:"etag,omitempty"`
15413	// ID - Resource ID.
15414	ID *string `json:"id,omitempty"`
15415}
15416
15417// MarshalJSON is the custom marshaler for IPConfigurationProfile.
15418func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
15419	objectMap := make(map[string]interface{})
15420	if icp.IPConfigurationProfilePropertiesFormat != nil {
15421		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
15422	}
15423	if icp.Name != nil {
15424		objectMap["name"] = icp.Name
15425	}
15426	if icp.Etag != nil {
15427		objectMap["etag"] = icp.Etag
15428	}
15429	if icp.ID != nil {
15430		objectMap["id"] = icp.ID
15431	}
15432	return json.Marshal(objectMap)
15433}
15434
15435// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
15436func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
15437	var m map[string]*json.RawMessage
15438	err := json.Unmarshal(body, &m)
15439	if err != nil {
15440		return err
15441	}
15442	for k, v := range m {
15443		switch k {
15444		case "properties":
15445			if v != nil {
15446				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
15447				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
15448				if err != nil {
15449					return err
15450				}
15451				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
15452			}
15453		case "name":
15454			if v != nil {
15455				var name string
15456				err = json.Unmarshal(*v, &name)
15457				if err != nil {
15458					return err
15459				}
15460				icp.Name = &name
15461			}
15462		case "type":
15463			if v != nil {
15464				var typeVar string
15465				err = json.Unmarshal(*v, &typeVar)
15466				if err != nil {
15467					return err
15468				}
15469				icp.Type = &typeVar
15470			}
15471		case "etag":
15472			if v != nil {
15473				var etag string
15474				err = json.Unmarshal(*v, &etag)
15475				if err != nil {
15476					return err
15477				}
15478				icp.Etag = &etag
15479			}
15480		case "id":
15481			if v != nil {
15482				var ID string
15483				err = json.Unmarshal(*v, &ID)
15484				if err != nil {
15485					return err
15486				}
15487				icp.ID = &ID
15488			}
15489		}
15490	}
15491
15492	return nil
15493}
15494
15495// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
15496type IPConfigurationProfilePropertiesFormat struct {
15497	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
15498	Subnet *Subnet `json:"subnet,omitempty"`
15499	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
15500	ProvisioningState *string `json:"provisioningState,omitempty"`
15501}
15502
15503// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
15504func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
15505	objectMap := make(map[string]interface{})
15506	if icppf.Subnet != nil {
15507		objectMap["subnet"] = icppf.Subnet
15508	}
15509	return json.Marshal(objectMap)
15510}
15511
15512// IPConfigurationPropertiesFormat properties of IP configuration.
15513type IPConfigurationPropertiesFormat struct {
15514	// PrivateIPAddress - The private IP address of the IP configuration.
15515	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
15516	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
15517	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
15518	// Subnet - The reference of the subnet resource.
15519	Subnet *Subnet `json:"subnet,omitempty"`
15520	// PublicIPAddress - The reference of the public IP resource.
15521	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
15522	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15523	ProvisioningState *string `json:"provisioningState,omitempty"`
15524}
15525
15526// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
15527type IpsecPolicy struct {
15528	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
15529	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
15530	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
15531	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
15532	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
15533	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
15534	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
15535	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
15536	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
15537	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
15538	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
15539	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
15540	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
15541	DhGroup DhGroup `json:"dhGroup,omitempty"`
15542	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
15543	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
15544}
15545
15546// IPTag contains the IpTag associated with the object.
15547type IPTag struct {
15548	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
15549	IPTagType *string `json:"ipTagType,omitempty"`
15550	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc.
15551	Tag *string `json:"tag,omitempty"`
15552}
15553
15554// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
15555type Ipv6ExpressRouteCircuitPeeringConfig struct {
15556	// PrimaryPeerAddressPrefix - The primary address prefix.
15557	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
15558	// SecondaryPeerAddressPrefix - The secondary address prefix.
15559	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
15560	// MicrosoftPeeringConfig - The Microsoft peering configuration.
15561	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
15562	// RouteFilter - The reference of the RouteFilter resource.
15563	RouteFilter *SubResource `json:"routeFilter,omitempty"`
15564	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
15565	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
15566}
15567
15568// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
15569// the next set of results.
15570type ListHubVirtualNetworkConnectionsResult struct {
15571	autorest.Response `json:"-"`
15572	// Value - List of HubVirtualNetworkConnections.
15573	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
15574	// NextLink - URL to get the next set of operation list results if there are any.
15575	NextLink *string `json:"nextLink,omitempty"`
15576}
15577
15578// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
15579// HubVirtualNetworkConnection values.
15580type ListHubVirtualNetworkConnectionsResultIterator struct {
15581	i    int
15582	page ListHubVirtualNetworkConnectionsResultPage
15583}
15584
15585// NextWithContext advances to the next value.  If there was an error making
15586// the request the iterator does not advance and the error is returned.
15587func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15588	if tracing.IsEnabled() {
15589		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
15590		defer func() {
15591			sc := -1
15592			if iter.Response().Response.Response != nil {
15593				sc = iter.Response().Response.Response.StatusCode
15594			}
15595			tracing.EndSpan(ctx, sc, err)
15596		}()
15597	}
15598	iter.i++
15599	if iter.i < len(iter.page.Values()) {
15600		return nil
15601	}
15602	err = iter.page.NextWithContext(ctx)
15603	if err != nil {
15604		iter.i--
15605		return err
15606	}
15607	iter.i = 0
15608	return nil
15609}
15610
15611// Next advances to the next value.  If there was an error making
15612// the request the iterator does not advance and the error is returned.
15613// Deprecated: Use NextWithContext() instead.
15614func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
15615	return iter.NextWithContext(context.Background())
15616}
15617
15618// NotDone returns true if the enumeration should be started or is not yet complete.
15619func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
15620	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15621}
15622
15623// Response returns the raw server response from the last page request.
15624func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
15625	return iter.page.Response()
15626}
15627
15628// Value returns the current value or a zero-initialized value if the
15629// iterator has advanced beyond the end of the collection.
15630func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
15631	if !iter.page.NotDone() {
15632		return HubVirtualNetworkConnection{}
15633	}
15634	return iter.page.Values()[iter.i]
15635}
15636
15637// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
15638func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
15639	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
15640}
15641
15642// IsEmpty returns true if the ListResult contains no values.
15643func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
15644	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
15645}
15646
15647// hasNextLink returns true if the NextLink is not empty.
15648func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
15649	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
15650}
15651
15652// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
15653// It returns nil if no more results exist.
15654func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15655	if !lhvncr.hasNextLink() {
15656		return nil, nil
15657	}
15658	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15659		autorest.AsJSON(),
15660		autorest.AsGet(),
15661		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
15662}
15663
15664// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
15665type ListHubVirtualNetworkConnectionsResultPage struct {
15666	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
15667	lhvncr ListHubVirtualNetworkConnectionsResult
15668}
15669
15670// NextWithContext advances to the next page of values.  If there was an error making
15671// the request the page does not advance and the error is returned.
15672func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15673	if tracing.IsEnabled() {
15674		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
15675		defer func() {
15676			sc := -1
15677			if page.Response().Response.Response != nil {
15678				sc = page.Response().Response.Response.StatusCode
15679			}
15680			tracing.EndSpan(ctx, sc, err)
15681		}()
15682	}
15683	for {
15684		next, err := page.fn(ctx, page.lhvncr)
15685		if err != nil {
15686			return err
15687		}
15688		page.lhvncr = next
15689		if !next.hasNextLink() || !next.IsEmpty() {
15690			break
15691		}
15692	}
15693	return nil
15694}
15695
15696// Next advances to the next page of values.  If there was an error making
15697// the request the page does not advance and the error is returned.
15698// Deprecated: Use NextWithContext() instead.
15699func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
15700	return page.NextWithContext(context.Background())
15701}
15702
15703// NotDone returns true if the page enumeration should be started or is not yet complete.
15704func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
15705	return !page.lhvncr.IsEmpty()
15706}
15707
15708// Response returns the raw server response from the last page request.
15709func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
15710	return page.lhvncr
15711}
15712
15713// Values returns the slice of values for the current page or nil if there are no values.
15714func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
15715	if page.lhvncr.IsEmpty() {
15716		return nil
15717	}
15718	return *page.lhvncr.Value
15719}
15720
15721// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
15722func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
15723	return ListHubVirtualNetworkConnectionsResultPage{
15724		fn:     getNextPage,
15725		lhvncr: cur,
15726	}
15727}
15728
15729// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
15730// P2SVpnGateways and a URL nextLink to get the next set of results.
15731type ListP2SVpnGatewaysResult struct {
15732	autorest.Response `json:"-"`
15733	// Value - List of P2SVpnGateways.
15734	Value *[]P2SVpnGateway `json:"value,omitempty"`
15735	// NextLink - URL to get the next set of operation list results if there are any.
15736	NextLink *string `json:"nextLink,omitempty"`
15737}
15738
15739// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
15740type ListP2SVpnGatewaysResultIterator struct {
15741	i    int
15742	page ListP2SVpnGatewaysResultPage
15743}
15744
15745// NextWithContext advances to the next value.  If there was an error making
15746// the request the iterator does not advance and the error is returned.
15747func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15748	if tracing.IsEnabled() {
15749		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
15750		defer func() {
15751			sc := -1
15752			if iter.Response().Response.Response != nil {
15753				sc = iter.Response().Response.Response.StatusCode
15754			}
15755			tracing.EndSpan(ctx, sc, err)
15756		}()
15757	}
15758	iter.i++
15759	if iter.i < len(iter.page.Values()) {
15760		return nil
15761	}
15762	err = iter.page.NextWithContext(ctx)
15763	if err != nil {
15764		iter.i--
15765		return err
15766	}
15767	iter.i = 0
15768	return nil
15769}
15770
15771// Next advances to the next value.  If there was an error making
15772// the request the iterator does not advance and the error is returned.
15773// Deprecated: Use NextWithContext() instead.
15774func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
15775	return iter.NextWithContext(context.Background())
15776}
15777
15778// NotDone returns true if the enumeration should be started or is not yet complete.
15779func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
15780	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15781}
15782
15783// Response returns the raw server response from the last page request.
15784func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
15785	return iter.page.Response()
15786}
15787
15788// Value returns the current value or a zero-initialized value if the
15789// iterator has advanced beyond the end of the collection.
15790func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
15791	if !iter.page.NotDone() {
15792		return P2SVpnGateway{}
15793	}
15794	return iter.page.Values()[iter.i]
15795}
15796
15797// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
15798func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
15799	return ListP2SVpnGatewaysResultIterator{page: page}
15800}
15801
15802// IsEmpty returns true if the ListResult contains no values.
15803func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
15804	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
15805}
15806
15807// hasNextLink returns true if the NextLink is not empty.
15808func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
15809	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
15810}
15811
15812// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15813// It returns nil if no more results exist.
15814func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15815	if !lpvgr.hasNextLink() {
15816		return nil, nil
15817	}
15818	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15819		autorest.AsJSON(),
15820		autorest.AsGet(),
15821		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
15822}
15823
15824// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
15825type ListP2SVpnGatewaysResultPage struct {
15826	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
15827	lpvgr ListP2SVpnGatewaysResult
15828}
15829
15830// NextWithContext advances to the next page of values.  If there was an error making
15831// the request the page does not advance and the error is returned.
15832func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15833	if tracing.IsEnabled() {
15834		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
15835		defer func() {
15836			sc := -1
15837			if page.Response().Response.Response != nil {
15838				sc = page.Response().Response.Response.StatusCode
15839			}
15840			tracing.EndSpan(ctx, sc, err)
15841		}()
15842	}
15843	for {
15844		next, err := page.fn(ctx, page.lpvgr)
15845		if err != nil {
15846			return err
15847		}
15848		page.lpvgr = next
15849		if !next.hasNextLink() || !next.IsEmpty() {
15850			break
15851		}
15852	}
15853	return nil
15854}
15855
15856// Next advances to the next page of values.  If there was an error making
15857// the request the page does not advance and the error is returned.
15858// Deprecated: Use NextWithContext() instead.
15859func (page *ListP2SVpnGatewaysResultPage) Next() error {
15860	return page.NextWithContext(context.Background())
15861}
15862
15863// NotDone returns true if the page enumeration should be started or is not yet complete.
15864func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
15865	return !page.lpvgr.IsEmpty()
15866}
15867
15868// Response returns the raw server response from the last page request.
15869func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
15870	return page.lpvgr
15871}
15872
15873// Values returns the slice of values for the current page or nil if there are no values.
15874func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
15875	if page.lpvgr.IsEmpty() {
15876		return nil
15877	}
15878	return *page.lpvgr.Value
15879}
15880
15881// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
15882func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
15883	return ListP2SVpnGatewaysResultPage{
15884		fn:    getNextPage,
15885		lpvgr: cur,
15886	}
15887}
15888
15889// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
15890// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
15891// the next set of results.
15892type ListP2SVpnServerConfigurationsResult struct {
15893	autorest.Response `json:"-"`
15894	// Value - List of P2SVpnServerConfigurations.
15895	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
15896	// NextLink - URL to get the next set of operation list results if there are any.
15897	NextLink *string `json:"nextLink,omitempty"`
15898}
15899
15900// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
15901// P2SVpnServerConfiguration values.
15902type ListP2SVpnServerConfigurationsResultIterator struct {
15903	i    int
15904	page ListP2SVpnServerConfigurationsResultPage
15905}
15906
15907// NextWithContext advances to the next value.  If there was an error making
15908// the request the iterator does not advance and the error is returned.
15909func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
15910	if tracing.IsEnabled() {
15911		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
15912		defer func() {
15913			sc := -1
15914			if iter.Response().Response.Response != nil {
15915				sc = iter.Response().Response.Response.StatusCode
15916			}
15917			tracing.EndSpan(ctx, sc, err)
15918		}()
15919	}
15920	iter.i++
15921	if iter.i < len(iter.page.Values()) {
15922		return nil
15923	}
15924	err = iter.page.NextWithContext(ctx)
15925	if err != nil {
15926		iter.i--
15927		return err
15928	}
15929	iter.i = 0
15930	return nil
15931}
15932
15933// Next advances to the next value.  If there was an error making
15934// the request the iterator does not advance and the error is returned.
15935// Deprecated: Use NextWithContext() instead.
15936func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
15937	return iter.NextWithContext(context.Background())
15938}
15939
15940// NotDone returns true if the enumeration should be started or is not yet complete.
15941func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
15942	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15943}
15944
15945// Response returns the raw server response from the last page request.
15946func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
15947	return iter.page.Response()
15948}
15949
15950// Value returns the current value or a zero-initialized value if the
15951// iterator has advanced beyond the end of the collection.
15952func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
15953	if !iter.page.NotDone() {
15954		return P2SVpnServerConfiguration{}
15955	}
15956	return iter.page.Values()[iter.i]
15957}
15958
15959// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
15960func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
15961	return ListP2SVpnServerConfigurationsResultIterator{page: page}
15962}
15963
15964// IsEmpty returns true if the ListResult contains no values.
15965func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
15966	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
15967}
15968
15969// hasNextLink returns true if the NextLink is not empty.
15970func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
15971	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
15972}
15973
15974// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
15975// It returns nil if no more results exist.
15976func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
15977	if !lpvscr.hasNextLink() {
15978		return nil, nil
15979	}
15980	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15981		autorest.AsJSON(),
15982		autorest.AsGet(),
15983		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
15984}
15985
15986// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
15987type ListP2SVpnServerConfigurationsResultPage struct {
15988	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
15989	lpvscr ListP2SVpnServerConfigurationsResult
15990}
15991
15992// NextWithContext advances to the next page of values.  If there was an error making
15993// the request the page does not advance and the error is returned.
15994func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
15995	if tracing.IsEnabled() {
15996		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
15997		defer func() {
15998			sc := -1
15999			if page.Response().Response.Response != nil {
16000				sc = page.Response().Response.Response.StatusCode
16001			}
16002			tracing.EndSpan(ctx, sc, err)
16003		}()
16004	}
16005	for {
16006		next, err := page.fn(ctx, page.lpvscr)
16007		if err != nil {
16008			return err
16009		}
16010		page.lpvscr = next
16011		if !next.hasNextLink() || !next.IsEmpty() {
16012			break
16013		}
16014	}
16015	return nil
16016}
16017
16018// Next advances to the next page of values.  If there was an error making
16019// the request the page does not advance and the error is returned.
16020// Deprecated: Use NextWithContext() instead.
16021func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
16022	return page.NextWithContext(context.Background())
16023}
16024
16025// NotDone returns true if the page enumeration should be started or is not yet complete.
16026func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
16027	return !page.lpvscr.IsEmpty()
16028}
16029
16030// Response returns the raw server response from the last page request.
16031func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
16032	return page.lpvscr
16033}
16034
16035// Values returns the slice of values for the current page or nil if there are no values.
16036func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
16037	if page.lpvscr.IsEmpty() {
16038		return nil
16039	}
16040	return *page.lpvscr.Value
16041}
16042
16043// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
16044func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
16045	return ListP2SVpnServerConfigurationsResultPage{
16046		fn:     getNextPage,
16047		lpvscr: cur,
16048	}
16049}
16050
16051// ListString ...
16052type ListString struct {
16053	autorest.Response `json:"-"`
16054	Value             *[]string `json:"value,omitempty"`
16055}
16056
16057// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
16058// URL nextLink to get the next set of results.
16059type ListVirtualHubsResult struct {
16060	autorest.Response `json:"-"`
16061	// Value - List of VirtualHubs.
16062	Value *[]VirtualHub `json:"value,omitempty"`
16063	// NextLink - URL to get the next set of operation list results if there are any.
16064	NextLink *string `json:"nextLink,omitempty"`
16065}
16066
16067// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
16068type ListVirtualHubsResultIterator struct {
16069	i    int
16070	page ListVirtualHubsResultPage
16071}
16072
16073// NextWithContext advances to the next value.  If there was an error making
16074// the request the iterator does not advance and the error is returned.
16075func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
16076	if tracing.IsEnabled() {
16077		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
16078		defer func() {
16079			sc := -1
16080			if iter.Response().Response.Response != nil {
16081				sc = iter.Response().Response.Response.StatusCode
16082			}
16083			tracing.EndSpan(ctx, sc, err)
16084		}()
16085	}
16086	iter.i++
16087	if iter.i < len(iter.page.Values()) {
16088		return nil
16089	}
16090	err = iter.page.NextWithContext(ctx)
16091	if err != nil {
16092		iter.i--
16093		return err
16094	}
16095	iter.i = 0
16096	return nil
16097}
16098
16099// Next advances to the next value.  If there was an error making
16100// the request the iterator does not advance and the error is returned.
16101// Deprecated: Use NextWithContext() instead.
16102func (iter *ListVirtualHubsResultIterator) Next() error {
16103	return iter.NextWithContext(context.Background())
16104}
16105
16106// NotDone returns true if the enumeration should be started or is not yet complete.
16107func (iter ListVirtualHubsResultIterator) NotDone() bool {
16108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16109}
16110
16111// Response returns the raw server response from the last page request.
16112func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
16113	return iter.page.Response()
16114}
16115
16116// Value returns the current value or a zero-initialized value if the
16117// iterator has advanced beyond the end of the collection.
16118func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
16119	if !iter.page.NotDone() {
16120		return VirtualHub{}
16121	}
16122	return iter.page.Values()[iter.i]
16123}
16124
16125// Creates a new instance of the ListVirtualHubsResultIterator type.
16126func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
16127	return ListVirtualHubsResultIterator{page: page}
16128}
16129
16130// IsEmpty returns true if the ListResult contains no values.
16131func (lvhr ListVirtualHubsResult) IsEmpty() bool {
16132	return lvhr.Value == nil || len(*lvhr.Value) == 0
16133}
16134
16135// hasNextLink returns true if the NextLink is not empty.
16136func (lvhr ListVirtualHubsResult) hasNextLink() bool {
16137	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
16138}
16139
16140// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
16141// It returns nil if no more results exist.
16142func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
16143	if !lvhr.hasNextLink() {
16144		return nil, nil
16145	}
16146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16147		autorest.AsJSON(),
16148		autorest.AsGet(),
16149		autorest.WithBaseURL(to.String(lvhr.NextLink)))
16150}
16151
16152// ListVirtualHubsResultPage contains a page of VirtualHub values.
16153type ListVirtualHubsResultPage struct {
16154	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
16155	lvhr ListVirtualHubsResult
16156}
16157
16158// NextWithContext advances to the next page of values.  If there was an error making
16159// the request the page does not advance and the error is returned.
16160func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
16161	if tracing.IsEnabled() {
16162		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
16163		defer func() {
16164			sc := -1
16165			if page.Response().Response.Response != nil {
16166				sc = page.Response().Response.Response.StatusCode
16167			}
16168			tracing.EndSpan(ctx, sc, err)
16169		}()
16170	}
16171	for {
16172		next, err := page.fn(ctx, page.lvhr)
16173		if err != nil {
16174			return err
16175		}
16176		page.lvhr = next
16177		if !next.hasNextLink() || !next.IsEmpty() {
16178			break
16179		}
16180	}
16181	return nil
16182}
16183
16184// Next advances to the next page of values.  If there was an error making
16185// the request the page does not advance and the error is returned.
16186// Deprecated: Use NextWithContext() instead.
16187func (page *ListVirtualHubsResultPage) Next() error {
16188	return page.NextWithContext(context.Background())
16189}
16190
16191// NotDone returns true if the page enumeration should be started or is not yet complete.
16192func (page ListVirtualHubsResultPage) NotDone() bool {
16193	return !page.lvhr.IsEmpty()
16194}
16195
16196// Response returns the raw server response from the last page request.
16197func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
16198	return page.lvhr
16199}
16200
16201// Values returns the slice of values for the current page or nil if there are no values.
16202func (page ListVirtualHubsResultPage) Values() []VirtualHub {
16203	if page.lvhr.IsEmpty() {
16204		return nil
16205	}
16206	return *page.lvhr.Value
16207}
16208
16209// Creates a new instance of the ListVirtualHubsResultPage type.
16210func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
16211	return ListVirtualHubsResultPage{
16212		fn:   getNextPage,
16213		lvhr: cur,
16214	}
16215}
16216
16217// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
16218// URL nextLink to get the next set of results.
16219type ListVirtualWANsResult struct {
16220	autorest.Response `json:"-"`
16221	// Value - List of VirtualWANs.
16222	Value *[]VirtualWAN `json:"value,omitempty"`
16223	// NextLink - URL to get the next set of operation list results if there are any.
16224	NextLink *string `json:"nextLink,omitempty"`
16225}
16226
16227// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
16228type ListVirtualWANsResultIterator struct {
16229	i    int
16230	page ListVirtualWANsResultPage
16231}
16232
16233// NextWithContext advances to the next value.  If there was an error making
16234// the request the iterator does not advance and the error is returned.
16235func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
16236	if tracing.IsEnabled() {
16237		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
16238		defer func() {
16239			sc := -1
16240			if iter.Response().Response.Response != nil {
16241				sc = iter.Response().Response.Response.StatusCode
16242			}
16243			tracing.EndSpan(ctx, sc, err)
16244		}()
16245	}
16246	iter.i++
16247	if iter.i < len(iter.page.Values()) {
16248		return nil
16249	}
16250	err = iter.page.NextWithContext(ctx)
16251	if err != nil {
16252		iter.i--
16253		return err
16254	}
16255	iter.i = 0
16256	return nil
16257}
16258
16259// Next advances to the next value.  If there was an error making
16260// the request the iterator does not advance and the error is returned.
16261// Deprecated: Use NextWithContext() instead.
16262func (iter *ListVirtualWANsResultIterator) Next() error {
16263	return iter.NextWithContext(context.Background())
16264}
16265
16266// NotDone returns true if the enumeration should be started or is not yet complete.
16267func (iter ListVirtualWANsResultIterator) NotDone() bool {
16268	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16269}
16270
16271// Response returns the raw server response from the last page request.
16272func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
16273	return iter.page.Response()
16274}
16275
16276// Value returns the current value or a zero-initialized value if the
16277// iterator has advanced beyond the end of the collection.
16278func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
16279	if !iter.page.NotDone() {
16280		return VirtualWAN{}
16281	}
16282	return iter.page.Values()[iter.i]
16283}
16284
16285// Creates a new instance of the ListVirtualWANsResultIterator type.
16286func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
16287	return ListVirtualWANsResultIterator{page: page}
16288}
16289
16290// IsEmpty returns true if the ListResult contains no values.
16291func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
16292	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
16293}
16294
16295// hasNextLink returns true if the NextLink is not empty.
16296func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
16297	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
16298}
16299
16300// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
16301// It returns nil if no more results exist.
16302func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
16303	if !lvwnr.hasNextLink() {
16304		return nil, nil
16305	}
16306	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16307		autorest.AsJSON(),
16308		autorest.AsGet(),
16309		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
16310}
16311
16312// ListVirtualWANsResultPage contains a page of VirtualWAN values.
16313type ListVirtualWANsResultPage struct {
16314	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
16315	lvwnr ListVirtualWANsResult
16316}
16317
16318// NextWithContext advances to the next page of values.  If there was an error making
16319// the request the page does not advance and the error is returned.
16320func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
16321	if tracing.IsEnabled() {
16322		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
16323		defer func() {
16324			sc := -1
16325			if page.Response().Response.Response != nil {
16326				sc = page.Response().Response.Response.StatusCode
16327			}
16328			tracing.EndSpan(ctx, sc, err)
16329		}()
16330	}
16331	for {
16332		next, err := page.fn(ctx, page.lvwnr)
16333		if err != nil {
16334			return err
16335		}
16336		page.lvwnr = next
16337		if !next.hasNextLink() || !next.IsEmpty() {
16338			break
16339		}
16340	}
16341	return nil
16342}
16343
16344// Next advances to the next page of values.  If there was an error making
16345// the request the page does not advance and the error is returned.
16346// Deprecated: Use NextWithContext() instead.
16347func (page *ListVirtualWANsResultPage) Next() error {
16348	return page.NextWithContext(context.Background())
16349}
16350
16351// NotDone returns true if the page enumeration should be started or is not yet complete.
16352func (page ListVirtualWANsResultPage) NotDone() bool {
16353	return !page.lvwnr.IsEmpty()
16354}
16355
16356// Response returns the raw server response from the last page request.
16357func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
16358	return page.lvwnr
16359}
16360
16361// Values returns the slice of values for the current page or nil if there are no values.
16362func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
16363	if page.lvwnr.IsEmpty() {
16364		return nil
16365	}
16366	return *page.lvwnr.Value
16367}
16368
16369// Creates a new instance of the ListVirtualWANsResultPage type.
16370func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
16371	return ListVirtualWANsResultPage{
16372		fn:    getNextPage,
16373		lvwnr: cur,
16374	}
16375}
16376
16377// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
16378// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
16379type ListVpnConnectionsResult struct {
16380	autorest.Response `json:"-"`
16381	// Value - List of Vpn Connections.
16382	Value *[]VpnConnection `json:"value,omitempty"`
16383	// NextLink - URL to get the next set of operation list results if there are any.
16384	NextLink *string `json:"nextLink,omitempty"`
16385}
16386
16387// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
16388type ListVpnConnectionsResultIterator struct {
16389	i    int
16390	page ListVpnConnectionsResultPage
16391}
16392
16393// NextWithContext advances to the next value.  If there was an error making
16394// the request the iterator does not advance and the error is returned.
16395func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
16396	if tracing.IsEnabled() {
16397		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
16398		defer func() {
16399			sc := -1
16400			if iter.Response().Response.Response != nil {
16401				sc = iter.Response().Response.Response.StatusCode
16402			}
16403			tracing.EndSpan(ctx, sc, err)
16404		}()
16405	}
16406	iter.i++
16407	if iter.i < len(iter.page.Values()) {
16408		return nil
16409	}
16410	err = iter.page.NextWithContext(ctx)
16411	if err != nil {
16412		iter.i--
16413		return err
16414	}
16415	iter.i = 0
16416	return nil
16417}
16418
16419// Next advances to the next value.  If there was an error making
16420// the request the iterator does not advance and the error is returned.
16421// Deprecated: Use NextWithContext() instead.
16422func (iter *ListVpnConnectionsResultIterator) Next() error {
16423	return iter.NextWithContext(context.Background())
16424}
16425
16426// NotDone returns true if the enumeration should be started or is not yet complete.
16427func (iter ListVpnConnectionsResultIterator) NotDone() bool {
16428	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16429}
16430
16431// Response returns the raw server response from the last page request.
16432func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
16433	return iter.page.Response()
16434}
16435
16436// Value returns the current value or a zero-initialized value if the
16437// iterator has advanced beyond the end of the collection.
16438func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
16439	if !iter.page.NotDone() {
16440		return VpnConnection{}
16441	}
16442	return iter.page.Values()[iter.i]
16443}
16444
16445// Creates a new instance of the ListVpnConnectionsResultIterator type.
16446func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
16447	return ListVpnConnectionsResultIterator{page: page}
16448}
16449
16450// IsEmpty returns true if the ListResult contains no values.
16451func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
16452	return lvcr.Value == nil || len(*lvcr.Value) == 0
16453}
16454
16455// hasNextLink returns true if the NextLink is not empty.
16456func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
16457	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
16458}
16459
16460// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
16461// It returns nil if no more results exist.
16462func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
16463	if !lvcr.hasNextLink() {
16464		return nil, nil
16465	}
16466	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16467		autorest.AsJSON(),
16468		autorest.AsGet(),
16469		autorest.WithBaseURL(to.String(lvcr.NextLink)))
16470}
16471
16472// ListVpnConnectionsResultPage contains a page of VpnConnection values.
16473type ListVpnConnectionsResultPage struct {
16474	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
16475	lvcr ListVpnConnectionsResult
16476}
16477
16478// NextWithContext advances to the next page of values.  If there was an error making
16479// the request the page does not advance and the error is returned.
16480func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
16481	if tracing.IsEnabled() {
16482		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
16483		defer func() {
16484			sc := -1
16485			if page.Response().Response.Response != nil {
16486				sc = page.Response().Response.Response.StatusCode
16487			}
16488			tracing.EndSpan(ctx, sc, err)
16489		}()
16490	}
16491	for {
16492		next, err := page.fn(ctx, page.lvcr)
16493		if err != nil {
16494			return err
16495		}
16496		page.lvcr = next
16497		if !next.hasNextLink() || !next.IsEmpty() {
16498			break
16499		}
16500	}
16501	return nil
16502}
16503
16504// Next advances to the next page of values.  If there was an error making
16505// the request the page does not advance and the error is returned.
16506// Deprecated: Use NextWithContext() instead.
16507func (page *ListVpnConnectionsResultPage) Next() error {
16508	return page.NextWithContext(context.Background())
16509}
16510
16511// NotDone returns true if the page enumeration should be started or is not yet complete.
16512func (page ListVpnConnectionsResultPage) NotDone() bool {
16513	return !page.lvcr.IsEmpty()
16514}
16515
16516// Response returns the raw server response from the last page request.
16517func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
16518	return page.lvcr
16519}
16520
16521// Values returns the slice of values for the current page or nil if there are no values.
16522func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
16523	if page.lvcr.IsEmpty() {
16524		return nil
16525	}
16526	return *page.lvcr.Value
16527}
16528
16529// Creates a new instance of the ListVpnConnectionsResultPage type.
16530func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
16531	return ListVpnConnectionsResultPage{
16532		fn:   getNextPage,
16533		lvcr: cur,
16534	}
16535}
16536
16537// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
16538// URL nextLink to get the next set of results.
16539type ListVpnGatewaysResult struct {
16540	autorest.Response `json:"-"`
16541	// Value - List of VpnGateways.
16542	Value *[]VpnGateway `json:"value,omitempty"`
16543	// NextLink - URL to get the next set of operation list results if there are any.
16544	NextLink *string `json:"nextLink,omitempty"`
16545}
16546
16547// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
16548type ListVpnGatewaysResultIterator struct {
16549	i    int
16550	page ListVpnGatewaysResultPage
16551}
16552
16553// NextWithContext advances to the next value.  If there was an error making
16554// the request the iterator does not advance and the error is returned.
16555func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
16556	if tracing.IsEnabled() {
16557		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
16558		defer func() {
16559			sc := -1
16560			if iter.Response().Response.Response != nil {
16561				sc = iter.Response().Response.Response.StatusCode
16562			}
16563			tracing.EndSpan(ctx, sc, err)
16564		}()
16565	}
16566	iter.i++
16567	if iter.i < len(iter.page.Values()) {
16568		return nil
16569	}
16570	err = iter.page.NextWithContext(ctx)
16571	if err != nil {
16572		iter.i--
16573		return err
16574	}
16575	iter.i = 0
16576	return nil
16577}
16578
16579// Next advances to the next value.  If there was an error making
16580// the request the iterator does not advance and the error is returned.
16581// Deprecated: Use NextWithContext() instead.
16582func (iter *ListVpnGatewaysResultIterator) Next() error {
16583	return iter.NextWithContext(context.Background())
16584}
16585
16586// NotDone returns true if the enumeration should be started or is not yet complete.
16587func (iter ListVpnGatewaysResultIterator) NotDone() bool {
16588	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16589}
16590
16591// Response returns the raw server response from the last page request.
16592func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
16593	return iter.page.Response()
16594}
16595
16596// Value returns the current value or a zero-initialized value if the
16597// iterator has advanced beyond the end of the collection.
16598func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
16599	if !iter.page.NotDone() {
16600		return VpnGateway{}
16601	}
16602	return iter.page.Values()[iter.i]
16603}
16604
16605// Creates a new instance of the ListVpnGatewaysResultIterator type.
16606func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
16607	return ListVpnGatewaysResultIterator{page: page}
16608}
16609
16610// IsEmpty returns true if the ListResult contains no values.
16611func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
16612	return lvgr.Value == nil || len(*lvgr.Value) == 0
16613}
16614
16615// hasNextLink returns true if the NextLink is not empty.
16616func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
16617	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
16618}
16619
16620// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
16621// It returns nil if no more results exist.
16622func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
16623	if !lvgr.hasNextLink() {
16624		return nil, nil
16625	}
16626	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16627		autorest.AsJSON(),
16628		autorest.AsGet(),
16629		autorest.WithBaseURL(to.String(lvgr.NextLink)))
16630}
16631
16632// ListVpnGatewaysResultPage contains a page of VpnGateway values.
16633type ListVpnGatewaysResultPage struct {
16634	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
16635	lvgr ListVpnGatewaysResult
16636}
16637
16638// NextWithContext advances to the next page of values.  If there was an error making
16639// the request the page does not advance and the error is returned.
16640func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
16641	if tracing.IsEnabled() {
16642		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
16643		defer func() {
16644			sc := -1
16645			if page.Response().Response.Response != nil {
16646				sc = page.Response().Response.Response.StatusCode
16647			}
16648			tracing.EndSpan(ctx, sc, err)
16649		}()
16650	}
16651	for {
16652		next, err := page.fn(ctx, page.lvgr)
16653		if err != nil {
16654			return err
16655		}
16656		page.lvgr = next
16657		if !next.hasNextLink() || !next.IsEmpty() {
16658			break
16659		}
16660	}
16661	return nil
16662}
16663
16664// Next advances to the next page of values.  If there was an error making
16665// the request the page does not advance and the error is returned.
16666// Deprecated: Use NextWithContext() instead.
16667func (page *ListVpnGatewaysResultPage) Next() error {
16668	return page.NextWithContext(context.Background())
16669}
16670
16671// NotDone returns true if the page enumeration should be started or is not yet complete.
16672func (page ListVpnGatewaysResultPage) NotDone() bool {
16673	return !page.lvgr.IsEmpty()
16674}
16675
16676// Response returns the raw server response from the last page request.
16677func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
16678	return page.lvgr
16679}
16680
16681// Values returns the slice of values for the current page or nil if there are no values.
16682func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
16683	if page.lvgr.IsEmpty() {
16684		return nil
16685	}
16686	return *page.lvgr.Value
16687}
16688
16689// Creates a new instance of the ListVpnGatewaysResultPage type.
16690func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
16691	return ListVpnGatewaysResultPage{
16692		fn:   getNextPage,
16693		lvgr: cur,
16694	}
16695}
16696
16697// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
16698// nextLink to get the next set of results.
16699type ListVpnSitesResult struct {
16700	autorest.Response `json:"-"`
16701	// Value - List of VpnSites.
16702	Value *[]VpnSite `json:"value,omitempty"`
16703	// NextLink - URL to get the next set of operation list results if there are any.
16704	NextLink *string `json:"nextLink,omitempty"`
16705}
16706
16707// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
16708type ListVpnSitesResultIterator struct {
16709	i    int
16710	page ListVpnSitesResultPage
16711}
16712
16713// NextWithContext advances to the next value.  If there was an error making
16714// the request the iterator does not advance and the error is returned.
16715func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
16716	if tracing.IsEnabled() {
16717		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
16718		defer func() {
16719			sc := -1
16720			if iter.Response().Response.Response != nil {
16721				sc = iter.Response().Response.Response.StatusCode
16722			}
16723			tracing.EndSpan(ctx, sc, err)
16724		}()
16725	}
16726	iter.i++
16727	if iter.i < len(iter.page.Values()) {
16728		return nil
16729	}
16730	err = iter.page.NextWithContext(ctx)
16731	if err != nil {
16732		iter.i--
16733		return err
16734	}
16735	iter.i = 0
16736	return nil
16737}
16738
16739// Next advances to the next value.  If there was an error making
16740// the request the iterator does not advance and the error is returned.
16741// Deprecated: Use NextWithContext() instead.
16742func (iter *ListVpnSitesResultIterator) Next() error {
16743	return iter.NextWithContext(context.Background())
16744}
16745
16746// NotDone returns true if the enumeration should be started or is not yet complete.
16747func (iter ListVpnSitesResultIterator) NotDone() bool {
16748	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16749}
16750
16751// Response returns the raw server response from the last page request.
16752func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
16753	return iter.page.Response()
16754}
16755
16756// Value returns the current value or a zero-initialized value if the
16757// iterator has advanced beyond the end of the collection.
16758func (iter ListVpnSitesResultIterator) Value() VpnSite {
16759	if !iter.page.NotDone() {
16760		return VpnSite{}
16761	}
16762	return iter.page.Values()[iter.i]
16763}
16764
16765// Creates a new instance of the ListVpnSitesResultIterator type.
16766func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
16767	return ListVpnSitesResultIterator{page: page}
16768}
16769
16770// IsEmpty returns true if the ListResult contains no values.
16771func (lvsr ListVpnSitesResult) IsEmpty() bool {
16772	return lvsr.Value == nil || len(*lvsr.Value) == 0
16773}
16774
16775// hasNextLink returns true if the NextLink is not empty.
16776func (lvsr ListVpnSitesResult) hasNextLink() bool {
16777	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
16778}
16779
16780// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
16781// It returns nil if no more results exist.
16782func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
16783	if !lvsr.hasNextLink() {
16784		return nil, nil
16785	}
16786	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16787		autorest.AsJSON(),
16788		autorest.AsGet(),
16789		autorest.WithBaseURL(to.String(lvsr.NextLink)))
16790}
16791
16792// ListVpnSitesResultPage contains a page of VpnSite values.
16793type ListVpnSitesResultPage struct {
16794	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
16795	lvsr ListVpnSitesResult
16796}
16797
16798// NextWithContext advances to the next page of values.  If there was an error making
16799// the request the page does not advance and the error is returned.
16800func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
16801	if tracing.IsEnabled() {
16802		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
16803		defer func() {
16804			sc := -1
16805			if page.Response().Response.Response != nil {
16806				sc = page.Response().Response.Response.StatusCode
16807			}
16808			tracing.EndSpan(ctx, sc, err)
16809		}()
16810	}
16811	for {
16812		next, err := page.fn(ctx, page.lvsr)
16813		if err != nil {
16814			return err
16815		}
16816		page.lvsr = next
16817		if !next.hasNextLink() || !next.IsEmpty() {
16818			break
16819		}
16820	}
16821	return nil
16822}
16823
16824// Next advances to the next page of values.  If there was an error making
16825// the request the page does not advance and the error is returned.
16826// Deprecated: Use NextWithContext() instead.
16827func (page *ListVpnSitesResultPage) Next() error {
16828	return page.NextWithContext(context.Background())
16829}
16830
16831// NotDone returns true if the page enumeration should be started or is not yet complete.
16832func (page ListVpnSitesResultPage) NotDone() bool {
16833	return !page.lvsr.IsEmpty()
16834}
16835
16836// Response returns the raw server response from the last page request.
16837func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
16838	return page.lvsr
16839}
16840
16841// Values returns the slice of values for the current page or nil if there are no values.
16842func (page ListVpnSitesResultPage) Values() []VpnSite {
16843	if page.lvsr.IsEmpty() {
16844		return nil
16845	}
16846	return *page.lvsr.Value
16847}
16848
16849// Creates a new instance of the ListVpnSitesResultPage type.
16850func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
16851	return ListVpnSitesResultPage{
16852		fn:   getNextPage,
16853		lvsr: cur,
16854	}
16855}
16856
16857// LoadBalancer loadBalancer resource.
16858type LoadBalancer struct {
16859	autorest.Response `json:"-"`
16860	// Sku - The load balancer SKU.
16861	Sku *LoadBalancerSku `json:"sku,omitempty"`
16862	// LoadBalancerPropertiesFormat - Properties of load balancer.
16863	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
16864	// Etag - A unique read-only string that changes whenever the resource is updated.
16865	Etag *string `json:"etag,omitempty"`
16866	// ID - Resource ID.
16867	ID *string `json:"id,omitempty"`
16868	// Name - READ-ONLY; Resource name.
16869	Name *string `json:"name,omitempty"`
16870	// Type - READ-ONLY; Resource type.
16871	Type *string `json:"type,omitempty"`
16872	// Location - Resource location.
16873	Location *string `json:"location,omitempty"`
16874	// Tags - Resource tags.
16875	Tags map[string]*string `json:"tags"`
16876}
16877
16878// MarshalJSON is the custom marshaler for LoadBalancer.
16879func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
16880	objectMap := make(map[string]interface{})
16881	if lb.Sku != nil {
16882		objectMap["sku"] = lb.Sku
16883	}
16884	if lb.LoadBalancerPropertiesFormat != nil {
16885		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
16886	}
16887	if lb.Etag != nil {
16888		objectMap["etag"] = lb.Etag
16889	}
16890	if lb.ID != nil {
16891		objectMap["id"] = lb.ID
16892	}
16893	if lb.Location != nil {
16894		objectMap["location"] = lb.Location
16895	}
16896	if lb.Tags != nil {
16897		objectMap["tags"] = lb.Tags
16898	}
16899	return json.Marshal(objectMap)
16900}
16901
16902// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
16903func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
16904	var m map[string]*json.RawMessage
16905	err := json.Unmarshal(body, &m)
16906	if err != nil {
16907		return err
16908	}
16909	for k, v := range m {
16910		switch k {
16911		case "sku":
16912			if v != nil {
16913				var sku LoadBalancerSku
16914				err = json.Unmarshal(*v, &sku)
16915				if err != nil {
16916					return err
16917				}
16918				lb.Sku = &sku
16919			}
16920		case "properties":
16921			if v != nil {
16922				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
16923				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
16924				if err != nil {
16925					return err
16926				}
16927				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
16928			}
16929		case "etag":
16930			if v != nil {
16931				var etag string
16932				err = json.Unmarshal(*v, &etag)
16933				if err != nil {
16934					return err
16935				}
16936				lb.Etag = &etag
16937			}
16938		case "id":
16939			if v != nil {
16940				var ID string
16941				err = json.Unmarshal(*v, &ID)
16942				if err != nil {
16943					return err
16944				}
16945				lb.ID = &ID
16946			}
16947		case "name":
16948			if v != nil {
16949				var name string
16950				err = json.Unmarshal(*v, &name)
16951				if err != nil {
16952					return err
16953				}
16954				lb.Name = &name
16955			}
16956		case "type":
16957			if v != nil {
16958				var typeVar string
16959				err = json.Unmarshal(*v, &typeVar)
16960				if err != nil {
16961					return err
16962				}
16963				lb.Type = &typeVar
16964			}
16965		case "location":
16966			if v != nil {
16967				var location string
16968				err = json.Unmarshal(*v, &location)
16969				if err != nil {
16970					return err
16971				}
16972				lb.Location = &location
16973			}
16974		case "tags":
16975			if v != nil {
16976				var tags map[string]*string
16977				err = json.Unmarshal(*v, &tags)
16978				if err != nil {
16979					return err
16980				}
16981				lb.Tags = tags
16982			}
16983		}
16984	}
16985
16986	return nil
16987}
16988
16989// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
16990type LoadBalancerBackendAddressPoolListResult struct {
16991	autorest.Response `json:"-"`
16992	// Value - A list of backend address pools in a load balancer.
16993	Value *[]BackendAddressPool `json:"value,omitempty"`
16994	// NextLink - READ-ONLY; The URL to get the next set of results.
16995	NextLink *string `json:"nextLink,omitempty"`
16996}
16997
16998// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
16999func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
17000	objectMap := make(map[string]interface{})
17001	if lbbaplr.Value != nil {
17002		objectMap["value"] = lbbaplr.Value
17003	}
17004	return json.Marshal(objectMap)
17005}
17006
17007// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
17008// BackendAddressPool values.
17009type LoadBalancerBackendAddressPoolListResultIterator struct {
17010	i    int
17011	page LoadBalancerBackendAddressPoolListResultPage
17012}
17013
17014// NextWithContext advances to the next value.  If there was an error making
17015// the request the iterator does not advance and the error is returned.
17016func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
17017	if tracing.IsEnabled() {
17018		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
17019		defer func() {
17020			sc := -1
17021			if iter.Response().Response.Response != nil {
17022				sc = iter.Response().Response.Response.StatusCode
17023			}
17024			tracing.EndSpan(ctx, sc, err)
17025		}()
17026	}
17027	iter.i++
17028	if iter.i < len(iter.page.Values()) {
17029		return nil
17030	}
17031	err = iter.page.NextWithContext(ctx)
17032	if err != nil {
17033		iter.i--
17034		return err
17035	}
17036	iter.i = 0
17037	return nil
17038}
17039
17040// Next advances to the next value.  If there was an error making
17041// the request the iterator does not advance and the error is returned.
17042// Deprecated: Use NextWithContext() instead.
17043func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
17044	return iter.NextWithContext(context.Background())
17045}
17046
17047// NotDone returns true if the enumeration should be started or is not yet complete.
17048func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
17049	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17050}
17051
17052// Response returns the raw server response from the last page request.
17053func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
17054	return iter.page.Response()
17055}
17056
17057// Value returns the current value or a zero-initialized value if the
17058// iterator has advanced beyond the end of the collection.
17059func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
17060	if !iter.page.NotDone() {
17061		return BackendAddressPool{}
17062	}
17063	return iter.page.Values()[iter.i]
17064}
17065
17066// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
17067func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
17068	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
17069}
17070
17071// IsEmpty returns true if the ListResult contains no values.
17072func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
17073	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
17074}
17075
17076// hasNextLink returns true if the NextLink is not empty.
17077func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
17078	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
17079}
17080
17081// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
17082// It returns nil if no more results exist.
17083func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
17084	if !lbbaplr.hasNextLink() {
17085		return nil, nil
17086	}
17087	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17088		autorest.AsJSON(),
17089		autorest.AsGet(),
17090		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
17091}
17092
17093// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
17094type LoadBalancerBackendAddressPoolListResultPage struct {
17095	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
17096	lbbaplr LoadBalancerBackendAddressPoolListResult
17097}
17098
17099// NextWithContext advances to the next page of values.  If there was an error making
17100// the request the page does not advance and the error is returned.
17101func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
17102	if tracing.IsEnabled() {
17103		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
17104		defer func() {
17105			sc := -1
17106			if page.Response().Response.Response != nil {
17107				sc = page.Response().Response.Response.StatusCode
17108			}
17109			tracing.EndSpan(ctx, sc, err)
17110		}()
17111	}
17112	for {
17113		next, err := page.fn(ctx, page.lbbaplr)
17114		if err != nil {
17115			return err
17116		}
17117		page.lbbaplr = next
17118		if !next.hasNextLink() || !next.IsEmpty() {
17119			break
17120		}
17121	}
17122	return nil
17123}
17124
17125// Next advances to the next page of values.  If there was an error making
17126// the request the page does not advance and the error is returned.
17127// Deprecated: Use NextWithContext() instead.
17128func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
17129	return page.NextWithContext(context.Background())
17130}
17131
17132// NotDone returns true if the page enumeration should be started or is not yet complete.
17133func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
17134	return !page.lbbaplr.IsEmpty()
17135}
17136
17137// Response returns the raw server response from the last page request.
17138func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
17139	return page.lbbaplr
17140}
17141
17142// Values returns the slice of values for the current page or nil if there are no values.
17143func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
17144	if page.lbbaplr.IsEmpty() {
17145		return nil
17146	}
17147	return *page.lbbaplr.Value
17148}
17149
17150// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
17151func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
17152	return LoadBalancerBackendAddressPoolListResultPage{
17153		fn:      getNextPage,
17154		lbbaplr: cur,
17155	}
17156}
17157
17158// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
17159type LoadBalancerFrontendIPConfigurationListResult struct {
17160	autorest.Response `json:"-"`
17161	// Value - A list of frontend IP configurations in a load balancer.
17162	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
17163	// NextLink - READ-ONLY; The URL to get the next set of results.
17164	NextLink *string `json:"nextLink,omitempty"`
17165}
17166
17167// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
17168func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
17169	objectMap := make(map[string]interface{})
17170	if lbficlr.Value != nil {
17171		objectMap["value"] = lbficlr.Value
17172	}
17173	return json.Marshal(objectMap)
17174}
17175
17176// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
17177// FrontendIPConfiguration values.
17178type LoadBalancerFrontendIPConfigurationListResultIterator struct {
17179	i    int
17180	page LoadBalancerFrontendIPConfigurationListResultPage
17181}
17182
17183// NextWithContext advances to the next value.  If there was an error making
17184// the request the iterator does not advance and the error is returned.
17185func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17186	if tracing.IsEnabled() {
17187		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
17188		defer func() {
17189			sc := -1
17190			if iter.Response().Response.Response != nil {
17191				sc = iter.Response().Response.Response.StatusCode
17192			}
17193			tracing.EndSpan(ctx, sc, err)
17194		}()
17195	}
17196	iter.i++
17197	if iter.i < len(iter.page.Values()) {
17198		return nil
17199	}
17200	err = iter.page.NextWithContext(ctx)
17201	if err != nil {
17202		iter.i--
17203		return err
17204	}
17205	iter.i = 0
17206	return nil
17207}
17208
17209// Next advances to the next value.  If there was an error making
17210// the request the iterator does not advance and the error is returned.
17211// Deprecated: Use NextWithContext() instead.
17212func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
17213	return iter.NextWithContext(context.Background())
17214}
17215
17216// NotDone returns true if the enumeration should be started or is not yet complete.
17217func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
17218	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17219}
17220
17221// Response returns the raw server response from the last page request.
17222func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
17223	return iter.page.Response()
17224}
17225
17226// Value returns the current value or a zero-initialized value if the
17227// iterator has advanced beyond the end of the collection.
17228func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
17229	if !iter.page.NotDone() {
17230		return FrontendIPConfiguration{}
17231	}
17232	return iter.page.Values()[iter.i]
17233}
17234
17235// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
17236func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
17237	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
17238}
17239
17240// IsEmpty returns true if the ListResult contains no values.
17241func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
17242	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
17243}
17244
17245// hasNextLink returns true if the NextLink is not empty.
17246func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
17247	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
17248}
17249
17250// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
17251// It returns nil if no more results exist.
17252func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
17253	if !lbficlr.hasNextLink() {
17254		return nil, nil
17255	}
17256	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17257		autorest.AsJSON(),
17258		autorest.AsGet(),
17259		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
17260}
17261
17262// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
17263type LoadBalancerFrontendIPConfigurationListResultPage struct {
17264	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
17265	lbficlr LoadBalancerFrontendIPConfigurationListResult
17266}
17267
17268// NextWithContext advances to the next page of values.  If there was an error making
17269// the request the page does not advance and the error is returned.
17270func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
17271	if tracing.IsEnabled() {
17272		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
17273		defer func() {
17274			sc := -1
17275			if page.Response().Response.Response != nil {
17276				sc = page.Response().Response.Response.StatusCode
17277			}
17278			tracing.EndSpan(ctx, sc, err)
17279		}()
17280	}
17281	for {
17282		next, err := page.fn(ctx, page.lbficlr)
17283		if err != nil {
17284			return err
17285		}
17286		page.lbficlr = next
17287		if !next.hasNextLink() || !next.IsEmpty() {
17288			break
17289		}
17290	}
17291	return nil
17292}
17293
17294// Next advances to the next page of values.  If there was an error making
17295// the request the page does not advance and the error is returned.
17296// Deprecated: Use NextWithContext() instead.
17297func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
17298	return page.NextWithContext(context.Background())
17299}
17300
17301// NotDone returns true if the page enumeration should be started or is not yet complete.
17302func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
17303	return !page.lbficlr.IsEmpty()
17304}
17305
17306// Response returns the raw server response from the last page request.
17307func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
17308	return page.lbficlr
17309}
17310
17311// Values returns the slice of values for the current page or nil if there are no values.
17312func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
17313	if page.lbficlr.IsEmpty() {
17314		return nil
17315	}
17316	return *page.lbficlr.Value
17317}
17318
17319// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
17320func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
17321	return LoadBalancerFrontendIPConfigurationListResultPage{
17322		fn:      getNextPage,
17323		lbficlr: cur,
17324	}
17325}
17326
17327// LoadBalancerListResult response for ListLoadBalancers API service call.
17328type LoadBalancerListResult struct {
17329	autorest.Response `json:"-"`
17330	// Value - A list of load balancers in a resource group.
17331	Value *[]LoadBalancer `json:"value,omitempty"`
17332	// NextLink - READ-ONLY; The URL to get the next set of results.
17333	NextLink *string `json:"nextLink,omitempty"`
17334}
17335
17336// MarshalJSON is the custom marshaler for LoadBalancerListResult.
17337func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
17338	objectMap := make(map[string]interface{})
17339	if lblr.Value != nil {
17340		objectMap["value"] = lblr.Value
17341	}
17342	return json.Marshal(objectMap)
17343}
17344
17345// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
17346type LoadBalancerListResultIterator struct {
17347	i    int
17348	page LoadBalancerListResultPage
17349}
17350
17351// NextWithContext advances to the next value.  If there was an error making
17352// the request the iterator does not advance and the error is returned.
17353func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
17354	if tracing.IsEnabled() {
17355		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
17356		defer func() {
17357			sc := -1
17358			if iter.Response().Response.Response != nil {
17359				sc = iter.Response().Response.Response.StatusCode
17360			}
17361			tracing.EndSpan(ctx, sc, err)
17362		}()
17363	}
17364	iter.i++
17365	if iter.i < len(iter.page.Values()) {
17366		return nil
17367	}
17368	err = iter.page.NextWithContext(ctx)
17369	if err != nil {
17370		iter.i--
17371		return err
17372	}
17373	iter.i = 0
17374	return nil
17375}
17376
17377// Next advances to the next value.  If there was an error making
17378// the request the iterator does not advance and the error is returned.
17379// Deprecated: Use NextWithContext() instead.
17380func (iter *LoadBalancerListResultIterator) Next() error {
17381	return iter.NextWithContext(context.Background())
17382}
17383
17384// NotDone returns true if the enumeration should be started or is not yet complete.
17385func (iter LoadBalancerListResultIterator) NotDone() bool {
17386	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17387}
17388
17389// Response returns the raw server response from the last page request.
17390func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
17391	return iter.page.Response()
17392}
17393
17394// Value returns the current value or a zero-initialized value if the
17395// iterator has advanced beyond the end of the collection.
17396func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
17397	if !iter.page.NotDone() {
17398		return LoadBalancer{}
17399	}
17400	return iter.page.Values()[iter.i]
17401}
17402
17403// Creates a new instance of the LoadBalancerListResultIterator type.
17404func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
17405	return LoadBalancerListResultIterator{page: page}
17406}
17407
17408// IsEmpty returns true if the ListResult contains no values.
17409func (lblr LoadBalancerListResult) IsEmpty() bool {
17410	return lblr.Value == nil || len(*lblr.Value) == 0
17411}
17412
17413// hasNextLink returns true if the NextLink is not empty.
17414func (lblr LoadBalancerListResult) hasNextLink() bool {
17415	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
17416}
17417
17418// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
17419// It returns nil if no more results exist.
17420func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
17421	if !lblr.hasNextLink() {
17422		return nil, nil
17423	}
17424	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17425		autorest.AsJSON(),
17426		autorest.AsGet(),
17427		autorest.WithBaseURL(to.String(lblr.NextLink)))
17428}
17429
17430// LoadBalancerListResultPage contains a page of LoadBalancer values.
17431type LoadBalancerListResultPage struct {
17432	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
17433	lblr LoadBalancerListResult
17434}
17435
17436// NextWithContext advances to the next page of values.  If there was an error making
17437// the request the page does not advance and the error is returned.
17438func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
17439	if tracing.IsEnabled() {
17440		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
17441		defer func() {
17442			sc := -1
17443			if page.Response().Response.Response != nil {
17444				sc = page.Response().Response.Response.StatusCode
17445			}
17446			tracing.EndSpan(ctx, sc, err)
17447		}()
17448	}
17449	for {
17450		next, err := page.fn(ctx, page.lblr)
17451		if err != nil {
17452			return err
17453		}
17454		page.lblr = next
17455		if !next.hasNextLink() || !next.IsEmpty() {
17456			break
17457		}
17458	}
17459	return nil
17460}
17461
17462// Next advances to the next page of values.  If there was an error making
17463// the request the page does not advance and the error is returned.
17464// Deprecated: Use NextWithContext() instead.
17465func (page *LoadBalancerListResultPage) Next() error {
17466	return page.NextWithContext(context.Background())
17467}
17468
17469// NotDone returns true if the page enumeration should be started or is not yet complete.
17470func (page LoadBalancerListResultPage) NotDone() bool {
17471	return !page.lblr.IsEmpty()
17472}
17473
17474// Response returns the raw server response from the last page request.
17475func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
17476	return page.lblr
17477}
17478
17479// Values returns the slice of values for the current page or nil if there are no values.
17480func (page LoadBalancerListResultPage) Values() []LoadBalancer {
17481	if page.lblr.IsEmpty() {
17482		return nil
17483	}
17484	return *page.lblr.Value
17485}
17486
17487// Creates a new instance of the LoadBalancerListResultPage type.
17488func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
17489	return LoadBalancerListResultPage{
17490		fn:   getNextPage,
17491		lblr: cur,
17492	}
17493}
17494
17495// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
17496type LoadBalancerLoadBalancingRuleListResult struct {
17497	autorest.Response `json:"-"`
17498	// Value - A list of load balancing rules in a load balancer.
17499	Value *[]LoadBalancingRule `json:"value,omitempty"`
17500	// NextLink - READ-ONLY; The URL to get the next set of results.
17501	NextLink *string `json:"nextLink,omitempty"`
17502}
17503
17504// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
17505func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
17506	objectMap := make(map[string]interface{})
17507	if lblbrlr.Value != nil {
17508		objectMap["value"] = lblbrlr.Value
17509	}
17510	return json.Marshal(objectMap)
17511}
17512
17513// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
17514// LoadBalancingRule values.
17515type LoadBalancerLoadBalancingRuleListResultIterator struct {
17516	i    int
17517	page LoadBalancerLoadBalancingRuleListResultPage
17518}
17519
17520// NextWithContext advances to the next value.  If there was an error making
17521// the request the iterator does not advance and the error is returned.
17522func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17523	if tracing.IsEnabled() {
17524		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
17525		defer func() {
17526			sc := -1
17527			if iter.Response().Response.Response != nil {
17528				sc = iter.Response().Response.Response.StatusCode
17529			}
17530			tracing.EndSpan(ctx, sc, err)
17531		}()
17532	}
17533	iter.i++
17534	if iter.i < len(iter.page.Values()) {
17535		return nil
17536	}
17537	err = iter.page.NextWithContext(ctx)
17538	if err != nil {
17539		iter.i--
17540		return err
17541	}
17542	iter.i = 0
17543	return nil
17544}
17545
17546// Next advances to the next value.  If there was an error making
17547// the request the iterator does not advance and the error is returned.
17548// Deprecated: Use NextWithContext() instead.
17549func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
17550	return iter.NextWithContext(context.Background())
17551}
17552
17553// NotDone returns true if the enumeration should be started or is not yet complete.
17554func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
17555	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17556}
17557
17558// Response returns the raw server response from the last page request.
17559func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
17560	return iter.page.Response()
17561}
17562
17563// Value returns the current value or a zero-initialized value if the
17564// iterator has advanced beyond the end of the collection.
17565func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
17566	if !iter.page.NotDone() {
17567		return LoadBalancingRule{}
17568	}
17569	return iter.page.Values()[iter.i]
17570}
17571
17572// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
17573func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
17574	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
17575}
17576
17577// IsEmpty returns true if the ListResult contains no values.
17578func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
17579	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
17580}
17581
17582// hasNextLink returns true if the NextLink is not empty.
17583func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
17584	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
17585}
17586
17587// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
17588// It returns nil if no more results exist.
17589func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17590	if !lblbrlr.hasNextLink() {
17591		return nil, nil
17592	}
17593	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17594		autorest.AsJSON(),
17595		autorest.AsGet(),
17596		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
17597}
17598
17599// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
17600type LoadBalancerLoadBalancingRuleListResultPage struct {
17601	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
17602	lblbrlr LoadBalancerLoadBalancingRuleListResult
17603}
17604
17605// NextWithContext advances to the next page of values.  If there was an error making
17606// the request the page does not advance and the error is returned.
17607func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17608	if tracing.IsEnabled() {
17609		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
17610		defer func() {
17611			sc := -1
17612			if page.Response().Response.Response != nil {
17613				sc = page.Response().Response.Response.StatusCode
17614			}
17615			tracing.EndSpan(ctx, sc, err)
17616		}()
17617	}
17618	for {
17619		next, err := page.fn(ctx, page.lblbrlr)
17620		if err != nil {
17621			return err
17622		}
17623		page.lblbrlr = next
17624		if !next.hasNextLink() || !next.IsEmpty() {
17625			break
17626		}
17627	}
17628	return nil
17629}
17630
17631// Next advances to the next page of values.  If there was an error making
17632// the request the page does not advance and the error is returned.
17633// Deprecated: Use NextWithContext() instead.
17634func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
17635	return page.NextWithContext(context.Background())
17636}
17637
17638// NotDone returns true if the page enumeration should be started or is not yet complete.
17639func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
17640	return !page.lblbrlr.IsEmpty()
17641}
17642
17643// Response returns the raw server response from the last page request.
17644func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
17645	return page.lblbrlr
17646}
17647
17648// Values returns the slice of values for the current page or nil if there are no values.
17649func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
17650	if page.lblbrlr.IsEmpty() {
17651		return nil
17652	}
17653	return *page.lblbrlr.Value
17654}
17655
17656// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
17657func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
17658	return LoadBalancerLoadBalancingRuleListResultPage{
17659		fn:      getNextPage,
17660		lblbrlr: cur,
17661	}
17662}
17663
17664// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
17665type LoadBalancerOutboundRuleListResult struct {
17666	autorest.Response `json:"-"`
17667	// Value - A list of outbound rules in a load balancer.
17668	Value *[]OutboundRule `json:"value,omitempty"`
17669	// NextLink - READ-ONLY; The URL to get the next set of results.
17670	NextLink *string `json:"nextLink,omitempty"`
17671}
17672
17673// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
17674func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
17675	objectMap := make(map[string]interface{})
17676	if lborlr.Value != nil {
17677		objectMap["value"] = lborlr.Value
17678	}
17679	return json.Marshal(objectMap)
17680}
17681
17682// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
17683type LoadBalancerOutboundRuleListResultIterator struct {
17684	i    int
17685	page LoadBalancerOutboundRuleListResultPage
17686}
17687
17688// NextWithContext advances to the next value.  If there was an error making
17689// the request the iterator does not advance and the error is returned.
17690func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17691	if tracing.IsEnabled() {
17692		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
17693		defer func() {
17694			sc := -1
17695			if iter.Response().Response.Response != nil {
17696				sc = iter.Response().Response.Response.StatusCode
17697			}
17698			tracing.EndSpan(ctx, sc, err)
17699		}()
17700	}
17701	iter.i++
17702	if iter.i < len(iter.page.Values()) {
17703		return nil
17704	}
17705	err = iter.page.NextWithContext(ctx)
17706	if err != nil {
17707		iter.i--
17708		return err
17709	}
17710	iter.i = 0
17711	return nil
17712}
17713
17714// Next advances to the next value.  If there was an error making
17715// the request the iterator does not advance and the error is returned.
17716// Deprecated: Use NextWithContext() instead.
17717func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
17718	return iter.NextWithContext(context.Background())
17719}
17720
17721// NotDone returns true if the enumeration should be started or is not yet complete.
17722func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
17723	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17724}
17725
17726// Response returns the raw server response from the last page request.
17727func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
17728	return iter.page.Response()
17729}
17730
17731// Value returns the current value or a zero-initialized value if the
17732// iterator has advanced beyond the end of the collection.
17733func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
17734	if !iter.page.NotDone() {
17735		return OutboundRule{}
17736	}
17737	return iter.page.Values()[iter.i]
17738}
17739
17740// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
17741func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
17742	return LoadBalancerOutboundRuleListResultIterator{page: page}
17743}
17744
17745// IsEmpty returns true if the ListResult contains no values.
17746func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
17747	return lborlr.Value == nil || len(*lborlr.Value) == 0
17748}
17749
17750// hasNextLink returns true if the NextLink is not empty.
17751func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
17752	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
17753}
17754
17755// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
17756// It returns nil if no more results exist.
17757func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17758	if !lborlr.hasNextLink() {
17759		return nil, nil
17760	}
17761	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17762		autorest.AsJSON(),
17763		autorest.AsGet(),
17764		autorest.WithBaseURL(to.String(lborlr.NextLink)))
17765}
17766
17767// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
17768type LoadBalancerOutboundRuleListResultPage struct {
17769	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
17770	lborlr LoadBalancerOutboundRuleListResult
17771}
17772
17773// NextWithContext advances to the next page of values.  If there was an error making
17774// the request the page does not advance and the error is returned.
17775func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17776	if tracing.IsEnabled() {
17777		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
17778		defer func() {
17779			sc := -1
17780			if page.Response().Response.Response != nil {
17781				sc = page.Response().Response.Response.StatusCode
17782			}
17783			tracing.EndSpan(ctx, sc, err)
17784		}()
17785	}
17786	for {
17787		next, err := page.fn(ctx, page.lborlr)
17788		if err != nil {
17789			return err
17790		}
17791		page.lborlr = next
17792		if !next.hasNextLink() || !next.IsEmpty() {
17793			break
17794		}
17795	}
17796	return nil
17797}
17798
17799// Next advances to the next page of values.  If there was an error making
17800// the request the page does not advance and the error is returned.
17801// Deprecated: Use NextWithContext() instead.
17802func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
17803	return page.NextWithContext(context.Background())
17804}
17805
17806// NotDone returns true if the page enumeration should be started or is not yet complete.
17807func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
17808	return !page.lborlr.IsEmpty()
17809}
17810
17811// Response returns the raw server response from the last page request.
17812func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
17813	return page.lborlr
17814}
17815
17816// Values returns the slice of values for the current page or nil if there are no values.
17817func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
17818	if page.lborlr.IsEmpty() {
17819		return nil
17820	}
17821	return *page.lborlr.Value
17822}
17823
17824// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
17825func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
17826	return LoadBalancerOutboundRuleListResultPage{
17827		fn:     getNextPage,
17828		lborlr: cur,
17829	}
17830}
17831
17832// LoadBalancerProbeListResult response for ListProbe API service call.
17833type LoadBalancerProbeListResult struct {
17834	autorest.Response `json:"-"`
17835	// Value - A list of probes in a load balancer.
17836	Value *[]Probe `json:"value,omitempty"`
17837	// NextLink - READ-ONLY; The URL to get the next set of results.
17838	NextLink *string `json:"nextLink,omitempty"`
17839}
17840
17841// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
17842func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
17843	objectMap := make(map[string]interface{})
17844	if lbplr.Value != nil {
17845		objectMap["value"] = lbplr.Value
17846	}
17847	return json.Marshal(objectMap)
17848}
17849
17850// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
17851type LoadBalancerProbeListResultIterator struct {
17852	i    int
17853	page LoadBalancerProbeListResultPage
17854}
17855
17856// NextWithContext advances to the next value.  If there was an error making
17857// the request the iterator does not advance and the error is returned.
17858func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
17859	if tracing.IsEnabled() {
17860		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
17861		defer func() {
17862			sc := -1
17863			if iter.Response().Response.Response != nil {
17864				sc = iter.Response().Response.Response.StatusCode
17865			}
17866			tracing.EndSpan(ctx, sc, err)
17867		}()
17868	}
17869	iter.i++
17870	if iter.i < len(iter.page.Values()) {
17871		return nil
17872	}
17873	err = iter.page.NextWithContext(ctx)
17874	if err != nil {
17875		iter.i--
17876		return err
17877	}
17878	iter.i = 0
17879	return nil
17880}
17881
17882// Next advances to the next value.  If there was an error making
17883// the request the iterator does not advance and the error is returned.
17884// Deprecated: Use NextWithContext() instead.
17885func (iter *LoadBalancerProbeListResultIterator) Next() error {
17886	return iter.NextWithContext(context.Background())
17887}
17888
17889// NotDone returns true if the enumeration should be started or is not yet complete.
17890func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
17891	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17892}
17893
17894// Response returns the raw server response from the last page request.
17895func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
17896	return iter.page.Response()
17897}
17898
17899// Value returns the current value or a zero-initialized value if the
17900// iterator has advanced beyond the end of the collection.
17901func (iter LoadBalancerProbeListResultIterator) Value() Probe {
17902	if !iter.page.NotDone() {
17903		return Probe{}
17904	}
17905	return iter.page.Values()[iter.i]
17906}
17907
17908// Creates a new instance of the LoadBalancerProbeListResultIterator type.
17909func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
17910	return LoadBalancerProbeListResultIterator{page: page}
17911}
17912
17913// IsEmpty returns true if the ListResult contains no values.
17914func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
17915	return lbplr.Value == nil || len(*lbplr.Value) == 0
17916}
17917
17918// hasNextLink returns true if the NextLink is not empty.
17919func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
17920	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
17921}
17922
17923// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
17924// It returns nil if no more results exist.
17925func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
17926	if !lbplr.hasNextLink() {
17927		return nil, nil
17928	}
17929	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17930		autorest.AsJSON(),
17931		autorest.AsGet(),
17932		autorest.WithBaseURL(to.String(lbplr.NextLink)))
17933}
17934
17935// LoadBalancerProbeListResultPage contains a page of Probe values.
17936type LoadBalancerProbeListResultPage struct {
17937	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
17938	lbplr LoadBalancerProbeListResult
17939}
17940
17941// NextWithContext advances to the next page of values.  If there was an error making
17942// the request the page does not advance and the error is returned.
17943func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
17944	if tracing.IsEnabled() {
17945		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
17946		defer func() {
17947			sc := -1
17948			if page.Response().Response.Response != nil {
17949				sc = page.Response().Response.Response.StatusCode
17950			}
17951			tracing.EndSpan(ctx, sc, err)
17952		}()
17953	}
17954	for {
17955		next, err := page.fn(ctx, page.lbplr)
17956		if err != nil {
17957			return err
17958		}
17959		page.lbplr = next
17960		if !next.hasNextLink() || !next.IsEmpty() {
17961			break
17962		}
17963	}
17964	return nil
17965}
17966
17967// Next advances to the next page of values.  If there was an error making
17968// the request the page does not advance and the error is returned.
17969// Deprecated: Use NextWithContext() instead.
17970func (page *LoadBalancerProbeListResultPage) Next() error {
17971	return page.NextWithContext(context.Background())
17972}
17973
17974// NotDone returns true if the page enumeration should be started or is not yet complete.
17975func (page LoadBalancerProbeListResultPage) NotDone() bool {
17976	return !page.lbplr.IsEmpty()
17977}
17978
17979// Response returns the raw server response from the last page request.
17980func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
17981	return page.lbplr
17982}
17983
17984// Values returns the slice of values for the current page or nil if there are no values.
17985func (page LoadBalancerProbeListResultPage) Values() []Probe {
17986	if page.lbplr.IsEmpty() {
17987		return nil
17988	}
17989	return *page.lbplr.Value
17990}
17991
17992// Creates a new instance of the LoadBalancerProbeListResultPage type.
17993func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
17994	return LoadBalancerProbeListResultPage{
17995		fn:    getNextPage,
17996		lbplr: cur,
17997	}
17998}
17999
18000// LoadBalancerPropertiesFormat properties of the load balancer.
18001type LoadBalancerPropertiesFormat struct {
18002	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
18003	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
18004	// BackendAddressPools - Collection of backend address pools used by a load balancer.
18005	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
18006	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
18007	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
18008	// Probes - Collection of probe objects used in the load balancer.
18009	Probes *[]Probe `json:"probes,omitempty"`
18010	// 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.
18011	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
18012	// 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.
18013	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
18014	// OutboundRules - The outbound rules.
18015	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
18016	// ResourceGUID - The resource GUID property of the load balancer resource.
18017	ResourceGUID *string `json:"resourceGuid,omitempty"`
18018	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18019	ProvisioningState *string `json:"provisioningState,omitempty"`
18020}
18021
18022// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18023// long-running operation.
18024type LoadBalancersCreateOrUpdateFuture struct {
18025	azure.FutureAPI
18026	// Result returns the result of the asynchronous operation.
18027	// If the operation has not completed it will return an error.
18028	Result func(LoadBalancersClient) (LoadBalancer, error)
18029}
18030
18031// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18032func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18033	var azFuture azure.Future
18034	if err := json.Unmarshal(body, &azFuture); err != nil {
18035		return err
18036	}
18037	future.FutureAPI = &azFuture
18038	future.Result = future.result
18039	return nil
18040}
18041
18042// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
18043func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
18044	var done bool
18045	done, err = future.DoneWithContext(context.Background(), client)
18046	if err != nil {
18047		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18048		return
18049	}
18050	if !done {
18051		lb.Response.Response = future.Response()
18052		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
18053		return
18054	}
18055	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18056	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
18057		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
18058		if err != nil {
18059			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
18060		}
18061	}
18062	return
18063}
18064
18065// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18066// operation.
18067type LoadBalancersDeleteFuture struct {
18068	azure.FutureAPI
18069	// Result returns the result of the asynchronous operation.
18070	// If the operation has not completed it will return an error.
18071	Result func(LoadBalancersClient) (autorest.Response, error)
18072}
18073
18074// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18075func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
18076	var azFuture azure.Future
18077	if err := json.Unmarshal(body, &azFuture); err != nil {
18078		return err
18079	}
18080	future.FutureAPI = &azFuture
18081	future.Result = future.result
18082	return nil
18083}
18084
18085// result is the default implementation for LoadBalancersDeleteFuture.Result.
18086func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
18087	var done bool
18088	done, err = future.DoneWithContext(context.Background(), client)
18089	if err != nil {
18090		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
18091		return
18092	}
18093	if !done {
18094		ar.Response = future.Response()
18095		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
18096		return
18097	}
18098	ar.Response = future.Response()
18099	return
18100}
18101
18102// LoadBalancerSku SKU of a load balancer.
18103type LoadBalancerSku struct {
18104	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
18105	Name LoadBalancerSkuName `json:"name,omitempty"`
18106}
18107
18108// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
18109// operation.
18110type LoadBalancersUpdateTagsFuture struct {
18111	azure.FutureAPI
18112	// Result returns the result of the asynchronous operation.
18113	// If the operation has not completed it will return an error.
18114	Result func(LoadBalancersClient) (LoadBalancer, error)
18115}
18116
18117// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18118func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18119	var azFuture azure.Future
18120	if err := json.Unmarshal(body, &azFuture); err != nil {
18121		return err
18122	}
18123	future.FutureAPI = &azFuture
18124	future.Result = future.result
18125	return nil
18126}
18127
18128// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
18129func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
18130	var done bool
18131	done, err = future.DoneWithContext(context.Background(), client)
18132	if err != nil {
18133		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18134		return
18135	}
18136	if !done {
18137		lb.Response.Response = future.Response()
18138		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
18139		return
18140	}
18141	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18142	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
18143		lb, err = client.UpdateTagsResponder(lb.Response.Response)
18144		if err != nil {
18145			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
18146		}
18147	}
18148	return
18149}
18150
18151// LoadBalancingRule a load balancing rule for a load balancer.
18152type LoadBalancingRule struct {
18153	autorest.Response `json:"-"`
18154	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
18155	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
18156	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18157	Name *string `json:"name,omitempty"`
18158	// Etag - A unique read-only string that changes whenever the resource is updated.
18159	Etag *string `json:"etag,omitempty"`
18160	// ID - Resource ID.
18161	ID *string `json:"id,omitempty"`
18162}
18163
18164// MarshalJSON is the custom marshaler for LoadBalancingRule.
18165func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
18166	objectMap := make(map[string]interface{})
18167	if lbr.LoadBalancingRulePropertiesFormat != nil {
18168		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
18169	}
18170	if lbr.Name != nil {
18171		objectMap["name"] = lbr.Name
18172	}
18173	if lbr.Etag != nil {
18174		objectMap["etag"] = lbr.Etag
18175	}
18176	if lbr.ID != nil {
18177		objectMap["id"] = lbr.ID
18178	}
18179	return json.Marshal(objectMap)
18180}
18181
18182// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
18183func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
18184	var m map[string]*json.RawMessage
18185	err := json.Unmarshal(body, &m)
18186	if err != nil {
18187		return err
18188	}
18189	for k, v := range m {
18190		switch k {
18191		case "properties":
18192			if v != nil {
18193				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
18194				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
18195				if err != nil {
18196					return err
18197				}
18198				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
18199			}
18200		case "name":
18201			if v != nil {
18202				var name string
18203				err = json.Unmarshal(*v, &name)
18204				if err != nil {
18205					return err
18206				}
18207				lbr.Name = &name
18208			}
18209		case "etag":
18210			if v != nil {
18211				var etag string
18212				err = json.Unmarshal(*v, &etag)
18213				if err != nil {
18214					return err
18215				}
18216				lbr.Etag = &etag
18217			}
18218		case "id":
18219			if v != nil {
18220				var ID string
18221				err = json.Unmarshal(*v, &ID)
18222				if err != nil {
18223					return err
18224				}
18225				lbr.ID = &ID
18226			}
18227		}
18228	}
18229
18230	return nil
18231}
18232
18233// LoadBalancingRulePropertiesFormat properties of the load balancer.
18234type LoadBalancingRulePropertiesFormat struct {
18235	// FrontendIPConfiguration - A reference to frontend IP addresses.
18236	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
18237	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
18238	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
18239	// Probe - The reference of the load balancer probe used by the load balancing rule.
18240	Probe *SubResource `json:"probe,omitempty"`
18241	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
18242	Protocol TransportProtocol `json:"protocol,omitempty"`
18243	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
18244	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
18245	// 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".
18246	FrontendPort *int32 `json:"frontendPort,omitempty"`
18247	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
18248	BackendPort *int32 `json:"backendPort,omitempty"`
18249	// 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.
18250	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18251	// 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.
18252	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
18253	// 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.
18254	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
18255	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
18256	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
18257	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18258	ProvisioningState *string `json:"provisioningState,omitempty"`
18259}
18260
18261// LocalNetworkGateway a common class for general resource information.
18262type LocalNetworkGateway struct {
18263	autorest.Response `json:"-"`
18264	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
18265	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
18266	// Etag - A unique read-only string that changes whenever the resource is updated.
18267	Etag *string `json:"etag,omitempty"`
18268	// ID - Resource ID.
18269	ID *string `json:"id,omitempty"`
18270	// Name - READ-ONLY; Resource name.
18271	Name *string `json:"name,omitempty"`
18272	// Type - READ-ONLY; Resource type.
18273	Type *string `json:"type,omitempty"`
18274	// Location - Resource location.
18275	Location *string `json:"location,omitempty"`
18276	// Tags - Resource tags.
18277	Tags map[string]*string `json:"tags"`
18278}
18279
18280// MarshalJSON is the custom marshaler for LocalNetworkGateway.
18281func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
18282	objectMap := make(map[string]interface{})
18283	if lng.LocalNetworkGatewayPropertiesFormat != nil {
18284		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
18285	}
18286	if lng.Etag != nil {
18287		objectMap["etag"] = lng.Etag
18288	}
18289	if lng.ID != nil {
18290		objectMap["id"] = lng.ID
18291	}
18292	if lng.Location != nil {
18293		objectMap["location"] = lng.Location
18294	}
18295	if lng.Tags != nil {
18296		objectMap["tags"] = lng.Tags
18297	}
18298	return json.Marshal(objectMap)
18299}
18300
18301// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
18302func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
18303	var m map[string]*json.RawMessage
18304	err := json.Unmarshal(body, &m)
18305	if err != nil {
18306		return err
18307	}
18308	for k, v := range m {
18309		switch k {
18310		case "properties":
18311			if v != nil {
18312				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
18313				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
18314				if err != nil {
18315					return err
18316				}
18317				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
18318			}
18319		case "etag":
18320			if v != nil {
18321				var etag string
18322				err = json.Unmarshal(*v, &etag)
18323				if err != nil {
18324					return err
18325				}
18326				lng.Etag = &etag
18327			}
18328		case "id":
18329			if v != nil {
18330				var ID string
18331				err = json.Unmarshal(*v, &ID)
18332				if err != nil {
18333					return err
18334				}
18335				lng.ID = &ID
18336			}
18337		case "name":
18338			if v != nil {
18339				var name string
18340				err = json.Unmarshal(*v, &name)
18341				if err != nil {
18342					return err
18343				}
18344				lng.Name = &name
18345			}
18346		case "type":
18347			if v != nil {
18348				var typeVar string
18349				err = json.Unmarshal(*v, &typeVar)
18350				if err != nil {
18351					return err
18352				}
18353				lng.Type = &typeVar
18354			}
18355		case "location":
18356			if v != nil {
18357				var location string
18358				err = json.Unmarshal(*v, &location)
18359				if err != nil {
18360					return err
18361				}
18362				lng.Location = &location
18363			}
18364		case "tags":
18365			if v != nil {
18366				var tags map[string]*string
18367				err = json.Unmarshal(*v, &tags)
18368				if err != nil {
18369					return err
18370				}
18371				lng.Tags = tags
18372			}
18373		}
18374	}
18375
18376	return nil
18377}
18378
18379// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
18380type LocalNetworkGatewayListResult struct {
18381	autorest.Response `json:"-"`
18382	// Value - A list of local network gateways that exists in a resource group.
18383	Value *[]LocalNetworkGateway `json:"value,omitempty"`
18384	// NextLink - READ-ONLY; The URL to get the next set of results.
18385	NextLink *string `json:"nextLink,omitempty"`
18386}
18387
18388// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
18389func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
18390	objectMap := make(map[string]interface{})
18391	if lnglr.Value != nil {
18392		objectMap["value"] = lnglr.Value
18393	}
18394	return json.Marshal(objectMap)
18395}
18396
18397// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
18398// values.
18399type LocalNetworkGatewayListResultIterator struct {
18400	i    int
18401	page LocalNetworkGatewayListResultPage
18402}
18403
18404// NextWithContext advances to the next value.  If there was an error making
18405// the request the iterator does not advance and the error is returned.
18406func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
18407	if tracing.IsEnabled() {
18408		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
18409		defer func() {
18410			sc := -1
18411			if iter.Response().Response.Response != nil {
18412				sc = iter.Response().Response.Response.StatusCode
18413			}
18414			tracing.EndSpan(ctx, sc, err)
18415		}()
18416	}
18417	iter.i++
18418	if iter.i < len(iter.page.Values()) {
18419		return nil
18420	}
18421	err = iter.page.NextWithContext(ctx)
18422	if err != nil {
18423		iter.i--
18424		return err
18425	}
18426	iter.i = 0
18427	return nil
18428}
18429
18430// Next advances to the next value.  If there was an error making
18431// the request the iterator does not advance and the error is returned.
18432// Deprecated: Use NextWithContext() instead.
18433func (iter *LocalNetworkGatewayListResultIterator) Next() error {
18434	return iter.NextWithContext(context.Background())
18435}
18436
18437// NotDone returns true if the enumeration should be started or is not yet complete.
18438func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
18439	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18440}
18441
18442// Response returns the raw server response from the last page request.
18443func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
18444	return iter.page.Response()
18445}
18446
18447// Value returns the current value or a zero-initialized value if the
18448// iterator has advanced beyond the end of the collection.
18449func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
18450	if !iter.page.NotDone() {
18451		return LocalNetworkGateway{}
18452	}
18453	return iter.page.Values()[iter.i]
18454}
18455
18456// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
18457func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
18458	return LocalNetworkGatewayListResultIterator{page: page}
18459}
18460
18461// IsEmpty returns true if the ListResult contains no values.
18462func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
18463	return lnglr.Value == nil || len(*lnglr.Value) == 0
18464}
18465
18466// hasNextLink returns true if the NextLink is not empty.
18467func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
18468	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
18469}
18470
18471// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
18472// It returns nil if no more results exist.
18473func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
18474	if !lnglr.hasNextLink() {
18475		return nil, nil
18476	}
18477	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18478		autorest.AsJSON(),
18479		autorest.AsGet(),
18480		autorest.WithBaseURL(to.String(lnglr.NextLink)))
18481}
18482
18483// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
18484type LocalNetworkGatewayListResultPage struct {
18485	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
18486	lnglr LocalNetworkGatewayListResult
18487}
18488
18489// NextWithContext advances to the next page of values.  If there was an error making
18490// the request the page does not advance and the error is returned.
18491func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18492	if tracing.IsEnabled() {
18493		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
18494		defer func() {
18495			sc := -1
18496			if page.Response().Response.Response != nil {
18497				sc = page.Response().Response.Response.StatusCode
18498			}
18499			tracing.EndSpan(ctx, sc, err)
18500		}()
18501	}
18502	for {
18503		next, err := page.fn(ctx, page.lnglr)
18504		if err != nil {
18505			return err
18506		}
18507		page.lnglr = next
18508		if !next.hasNextLink() || !next.IsEmpty() {
18509			break
18510		}
18511	}
18512	return nil
18513}
18514
18515// Next advances to the next page of values.  If there was an error making
18516// the request the page does not advance and the error is returned.
18517// Deprecated: Use NextWithContext() instead.
18518func (page *LocalNetworkGatewayListResultPage) Next() error {
18519	return page.NextWithContext(context.Background())
18520}
18521
18522// NotDone returns true if the page enumeration should be started or is not yet complete.
18523func (page LocalNetworkGatewayListResultPage) NotDone() bool {
18524	return !page.lnglr.IsEmpty()
18525}
18526
18527// Response returns the raw server response from the last page request.
18528func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
18529	return page.lnglr
18530}
18531
18532// Values returns the slice of values for the current page or nil if there are no values.
18533func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
18534	if page.lnglr.IsEmpty() {
18535		return nil
18536	}
18537	return *page.lnglr.Value
18538}
18539
18540// Creates a new instance of the LocalNetworkGatewayListResultPage type.
18541func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
18542	return LocalNetworkGatewayListResultPage{
18543		fn:    getNextPage,
18544		lnglr: cur,
18545	}
18546}
18547
18548// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
18549type LocalNetworkGatewayPropertiesFormat struct {
18550	// LocalNetworkAddressSpace - Local network site address space.
18551	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
18552	// GatewayIPAddress - IP address of local network gateway.
18553	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
18554	// BgpSettings - Local network gateway's BGP speaker settings.
18555	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
18556	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
18557	ResourceGUID *string `json:"resourceGuid,omitempty"`
18558	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18559	ProvisioningState *string `json:"provisioningState,omitempty"`
18560}
18561
18562// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
18563func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
18564	objectMap := make(map[string]interface{})
18565	if lngpf.LocalNetworkAddressSpace != nil {
18566		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
18567	}
18568	if lngpf.GatewayIPAddress != nil {
18569		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
18570	}
18571	if lngpf.BgpSettings != nil {
18572		objectMap["bgpSettings"] = lngpf.BgpSettings
18573	}
18574	if lngpf.ResourceGUID != nil {
18575		objectMap["resourceGuid"] = lngpf.ResourceGUID
18576	}
18577	return json.Marshal(objectMap)
18578}
18579
18580// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18581// long-running operation.
18582type LocalNetworkGatewaysCreateOrUpdateFuture struct {
18583	azure.FutureAPI
18584	// Result returns the result of the asynchronous operation.
18585	// If the operation has not completed it will return an error.
18586	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18587}
18588
18589// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18590func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18591	var azFuture azure.Future
18592	if err := json.Unmarshal(body, &azFuture); err != nil {
18593		return err
18594	}
18595	future.FutureAPI = &azFuture
18596	future.Result = future.result
18597	return nil
18598}
18599
18600// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
18601func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
18602	var done bool
18603	done, err = future.DoneWithContext(context.Background(), client)
18604	if err != nil {
18605		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18606		return
18607	}
18608	if !done {
18609		lng.Response.Response = future.Response()
18610		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
18611		return
18612	}
18613	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18614	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18615		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
18616		if err != nil {
18617			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
18618		}
18619	}
18620	return
18621}
18622
18623// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
18624// long-running operation.
18625type LocalNetworkGatewaysDeleteFuture struct {
18626	azure.FutureAPI
18627	// Result returns the result of the asynchronous operation.
18628	// If the operation has not completed it will return an error.
18629	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
18630}
18631
18632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18633func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18634	var azFuture azure.Future
18635	if err := json.Unmarshal(body, &azFuture); err != nil {
18636		return err
18637	}
18638	future.FutureAPI = &azFuture
18639	future.Result = future.result
18640	return nil
18641}
18642
18643// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
18644func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
18645	var done bool
18646	done, err = future.DoneWithContext(context.Background(), client)
18647	if err != nil {
18648		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18649		return
18650	}
18651	if !done {
18652		ar.Response = future.Response()
18653		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
18654		return
18655	}
18656	ar.Response = future.Response()
18657	return
18658}
18659
18660// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18661// long-running operation.
18662type LocalNetworkGatewaysUpdateTagsFuture struct {
18663	azure.FutureAPI
18664	// Result returns the result of the asynchronous operation.
18665	// If the operation has not completed it will return an error.
18666	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18667}
18668
18669// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18670func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18671	var azFuture azure.Future
18672	if err := json.Unmarshal(body, &azFuture); err != nil {
18673		return err
18674	}
18675	future.FutureAPI = &azFuture
18676	future.Result = future.result
18677	return nil
18678}
18679
18680// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
18681func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
18682	var done bool
18683	done, err = future.DoneWithContext(context.Background(), client)
18684	if err != nil {
18685		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18686		return
18687	}
18688	if !done {
18689		lng.Response.Response = future.Response()
18690		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
18691		return
18692	}
18693	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18694	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
18695		lng, err = client.UpdateTagsResponder(lng.Response.Response)
18696		if err != nil {
18697			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
18698		}
18699	}
18700	return
18701}
18702
18703// LogSpecification description of logging specification.
18704type LogSpecification struct {
18705	// Name - The name of the specification.
18706	Name *string `json:"name,omitempty"`
18707	// DisplayName - The display name of the specification.
18708	DisplayName *string `json:"displayName,omitempty"`
18709	// BlobDuration - Duration of the blob.
18710	BlobDuration *string `json:"blobDuration,omitempty"`
18711}
18712
18713// ManagedServiceIdentity identity for the resource.
18714type ManagedServiceIdentity struct {
18715	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
18716	PrincipalID *string `json:"principalId,omitempty"`
18717	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
18718	TenantID *string `json:"tenantId,omitempty"`
18719	// 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'
18720	Type ResourceIdentityType `json:"type,omitempty"`
18721	// 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}'.
18722	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
18723}
18724
18725// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
18726func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
18727	objectMap := make(map[string]interface{})
18728	if msi.Type != "" {
18729		objectMap["type"] = msi.Type
18730	}
18731	if msi.UserAssignedIdentities != nil {
18732		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
18733	}
18734	return json.Marshal(objectMap)
18735}
18736
18737// ManagedServiceIdentityUserAssignedIdentitiesValue ...
18738type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
18739	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
18740	PrincipalID *string `json:"principalId,omitempty"`
18741	// ClientID - READ-ONLY; The client id of user assigned identity.
18742	ClientID *string `json:"clientId,omitempty"`
18743}
18744
18745// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
18746func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
18747	objectMap := make(map[string]interface{})
18748	return json.Marshal(objectMap)
18749}
18750
18751// MatchCondition define match conditions.
18752type MatchCondition struct {
18753	// MatchVariables - List of match variables.
18754	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
18755	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
18756	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
18757	// NegationConditon - Describes if this is negate condition or not.
18758	NegationConditon *bool `json:"negationConditon,omitempty"`
18759	// MatchValues - Match value.
18760	MatchValues *[]string `json:"matchValues,omitempty"`
18761	// Transforms - List of transforms.
18762	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
18763}
18764
18765// MatchedRule matched rule.
18766type MatchedRule struct {
18767	// RuleName - Name of the matched network security rule.
18768	RuleName *string `json:"ruleName,omitempty"`
18769	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
18770	Action *string `json:"action,omitempty"`
18771}
18772
18773// MatchVariable define match variables.
18774type MatchVariable struct {
18775	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
18776	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
18777	// Selector - Describes field of the matchVariable collection.
18778	Selector *string `json:"selector,omitempty"`
18779}
18780
18781// MetricSpecification description of metrics specification.
18782type MetricSpecification struct {
18783	// Name - The name of the metric.
18784	Name *string `json:"name,omitempty"`
18785	// DisplayName - The display name of the metric.
18786	DisplayName *string `json:"displayName,omitempty"`
18787	// DisplayDescription - The description of the metric.
18788	DisplayDescription *string `json:"displayDescription,omitempty"`
18789	// Unit - Units the metric to be displayed in.
18790	Unit *string `json:"unit,omitempty"`
18791	// AggregationType - The aggregation type.
18792	AggregationType *string `json:"aggregationType,omitempty"`
18793	// Availabilities - List of availability.
18794	Availabilities *[]Availability `json:"availabilities,omitempty"`
18795	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
18796	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
18797	// FillGapWithZero - Whether gaps would be filled with zeros.
18798	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
18799	// MetricFilterPattern - Pattern for the filter of the metric.
18800	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
18801	// Dimensions - List of dimensions.
18802	Dimensions *[]Dimension `json:"dimensions,omitempty"`
18803	// IsInternal - Whether the metric is internal.
18804	IsInternal *bool `json:"isInternal,omitempty"`
18805	// SourceMdmAccount - The source MDM account.
18806	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
18807	// SourceMdmNamespace - The source MDM namespace.
18808	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
18809	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
18810	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
18811}
18812
18813// NatGateway nat Gateway resource.
18814type NatGateway struct {
18815	autorest.Response `json:"-"`
18816	// Sku - The nat gateway SKU.
18817	Sku *NatGatewaySku `json:"sku,omitempty"`
18818	// NatGatewayPropertiesFormat - Nat Gateway properties.
18819	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
18820	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
18821	Zones *[]string `json:"zones,omitempty"`
18822	// Etag - A unique read-only string that changes whenever the resource is updated.
18823	Etag *string `json:"etag,omitempty"`
18824	// ID - Resource ID.
18825	ID *string `json:"id,omitempty"`
18826	// Name - READ-ONLY; Resource name.
18827	Name *string `json:"name,omitempty"`
18828	// Type - READ-ONLY; Resource type.
18829	Type *string `json:"type,omitempty"`
18830	// Location - Resource location.
18831	Location *string `json:"location,omitempty"`
18832	// Tags - Resource tags.
18833	Tags map[string]*string `json:"tags"`
18834}
18835
18836// MarshalJSON is the custom marshaler for NatGateway.
18837func (ng NatGateway) MarshalJSON() ([]byte, error) {
18838	objectMap := make(map[string]interface{})
18839	if ng.Sku != nil {
18840		objectMap["sku"] = ng.Sku
18841	}
18842	if ng.NatGatewayPropertiesFormat != nil {
18843		objectMap["properties"] = ng.NatGatewayPropertiesFormat
18844	}
18845	if ng.Zones != nil {
18846		objectMap["zones"] = ng.Zones
18847	}
18848	if ng.Etag != nil {
18849		objectMap["etag"] = ng.Etag
18850	}
18851	if ng.ID != nil {
18852		objectMap["id"] = ng.ID
18853	}
18854	if ng.Location != nil {
18855		objectMap["location"] = ng.Location
18856	}
18857	if ng.Tags != nil {
18858		objectMap["tags"] = ng.Tags
18859	}
18860	return json.Marshal(objectMap)
18861}
18862
18863// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
18864func (ng *NatGateway) UnmarshalJSON(body []byte) error {
18865	var m map[string]*json.RawMessage
18866	err := json.Unmarshal(body, &m)
18867	if err != nil {
18868		return err
18869	}
18870	for k, v := range m {
18871		switch k {
18872		case "sku":
18873			if v != nil {
18874				var sku NatGatewaySku
18875				err = json.Unmarshal(*v, &sku)
18876				if err != nil {
18877					return err
18878				}
18879				ng.Sku = &sku
18880			}
18881		case "properties":
18882			if v != nil {
18883				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
18884				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
18885				if err != nil {
18886					return err
18887				}
18888				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
18889			}
18890		case "zones":
18891			if v != nil {
18892				var zones []string
18893				err = json.Unmarshal(*v, &zones)
18894				if err != nil {
18895					return err
18896				}
18897				ng.Zones = &zones
18898			}
18899		case "etag":
18900			if v != nil {
18901				var etag string
18902				err = json.Unmarshal(*v, &etag)
18903				if err != nil {
18904					return err
18905				}
18906				ng.Etag = &etag
18907			}
18908		case "id":
18909			if v != nil {
18910				var ID string
18911				err = json.Unmarshal(*v, &ID)
18912				if err != nil {
18913					return err
18914				}
18915				ng.ID = &ID
18916			}
18917		case "name":
18918			if v != nil {
18919				var name string
18920				err = json.Unmarshal(*v, &name)
18921				if err != nil {
18922					return err
18923				}
18924				ng.Name = &name
18925			}
18926		case "type":
18927			if v != nil {
18928				var typeVar string
18929				err = json.Unmarshal(*v, &typeVar)
18930				if err != nil {
18931					return err
18932				}
18933				ng.Type = &typeVar
18934			}
18935		case "location":
18936			if v != nil {
18937				var location string
18938				err = json.Unmarshal(*v, &location)
18939				if err != nil {
18940					return err
18941				}
18942				ng.Location = &location
18943			}
18944		case "tags":
18945			if v != nil {
18946				var tags map[string]*string
18947				err = json.Unmarshal(*v, &tags)
18948				if err != nil {
18949					return err
18950				}
18951				ng.Tags = tags
18952			}
18953		}
18954	}
18955
18956	return nil
18957}
18958
18959// NatGatewayListResult response for ListNatGateways API service call.
18960type NatGatewayListResult struct {
18961	autorest.Response `json:"-"`
18962	// Value - A list of Nat Gateways that exists in a resource group.
18963	Value *[]NatGateway `json:"value,omitempty"`
18964	// NextLink - The URL to get the next set of results.
18965	NextLink *string `json:"nextLink,omitempty"`
18966}
18967
18968// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
18969type NatGatewayListResultIterator struct {
18970	i    int
18971	page NatGatewayListResultPage
18972}
18973
18974// NextWithContext advances to the next value.  If there was an error making
18975// the request the iterator does not advance and the error is returned.
18976func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
18977	if tracing.IsEnabled() {
18978		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
18979		defer func() {
18980			sc := -1
18981			if iter.Response().Response.Response != nil {
18982				sc = iter.Response().Response.Response.StatusCode
18983			}
18984			tracing.EndSpan(ctx, sc, err)
18985		}()
18986	}
18987	iter.i++
18988	if iter.i < len(iter.page.Values()) {
18989		return nil
18990	}
18991	err = iter.page.NextWithContext(ctx)
18992	if err != nil {
18993		iter.i--
18994		return err
18995	}
18996	iter.i = 0
18997	return nil
18998}
18999
19000// Next advances to the next value.  If there was an error making
19001// the request the iterator does not advance and the error is returned.
19002// Deprecated: Use NextWithContext() instead.
19003func (iter *NatGatewayListResultIterator) Next() error {
19004	return iter.NextWithContext(context.Background())
19005}
19006
19007// NotDone returns true if the enumeration should be started or is not yet complete.
19008func (iter NatGatewayListResultIterator) NotDone() bool {
19009	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19010}
19011
19012// Response returns the raw server response from the last page request.
19013func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
19014	return iter.page.Response()
19015}
19016
19017// Value returns the current value or a zero-initialized value if the
19018// iterator has advanced beyond the end of the collection.
19019func (iter NatGatewayListResultIterator) Value() NatGateway {
19020	if !iter.page.NotDone() {
19021		return NatGateway{}
19022	}
19023	return iter.page.Values()[iter.i]
19024}
19025
19026// Creates a new instance of the NatGatewayListResultIterator type.
19027func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
19028	return NatGatewayListResultIterator{page: page}
19029}
19030
19031// IsEmpty returns true if the ListResult contains no values.
19032func (nglr NatGatewayListResult) IsEmpty() bool {
19033	return nglr.Value == nil || len(*nglr.Value) == 0
19034}
19035
19036// hasNextLink returns true if the NextLink is not empty.
19037func (nglr NatGatewayListResult) hasNextLink() bool {
19038	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
19039}
19040
19041// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
19042// It returns nil if no more results exist.
19043func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
19044	if !nglr.hasNextLink() {
19045		return nil, nil
19046	}
19047	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19048		autorest.AsJSON(),
19049		autorest.AsGet(),
19050		autorest.WithBaseURL(to.String(nglr.NextLink)))
19051}
19052
19053// NatGatewayListResultPage contains a page of NatGateway values.
19054type NatGatewayListResultPage struct {
19055	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
19056	nglr NatGatewayListResult
19057}
19058
19059// NextWithContext advances to the next page of values.  If there was an error making
19060// the request the page does not advance and the error is returned.
19061func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
19062	if tracing.IsEnabled() {
19063		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
19064		defer func() {
19065			sc := -1
19066			if page.Response().Response.Response != nil {
19067				sc = page.Response().Response.Response.StatusCode
19068			}
19069			tracing.EndSpan(ctx, sc, err)
19070		}()
19071	}
19072	for {
19073		next, err := page.fn(ctx, page.nglr)
19074		if err != nil {
19075			return err
19076		}
19077		page.nglr = next
19078		if !next.hasNextLink() || !next.IsEmpty() {
19079			break
19080		}
19081	}
19082	return nil
19083}
19084
19085// Next advances to the next page of values.  If there was an error making
19086// the request the page does not advance and the error is returned.
19087// Deprecated: Use NextWithContext() instead.
19088func (page *NatGatewayListResultPage) Next() error {
19089	return page.NextWithContext(context.Background())
19090}
19091
19092// NotDone returns true if the page enumeration should be started or is not yet complete.
19093func (page NatGatewayListResultPage) NotDone() bool {
19094	return !page.nglr.IsEmpty()
19095}
19096
19097// Response returns the raw server response from the last page request.
19098func (page NatGatewayListResultPage) Response() NatGatewayListResult {
19099	return page.nglr
19100}
19101
19102// Values returns the slice of values for the current page or nil if there are no values.
19103func (page NatGatewayListResultPage) Values() []NatGateway {
19104	if page.nglr.IsEmpty() {
19105		return nil
19106	}
19107	return *page.nglr.Value
19108}
19109
19110// Creates a new instance of the NatGatewayListResultPage type.
19111func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
19112	return NatGatewayListResultPage{
19113		fn:   getNextPage,
19114		nglr: cur,
19115	}
19116}
19117
19118// NatGatewayPropertiesFormat nat Gateway properties.
19119type NatGatewayPropertiesFormat struct {
19120	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
19121	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19122	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
19123	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
19124	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
19125	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
19126	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
19127	Subnets *[]SubResource `json:"subnets,omitempty"`
19128	// ResourceGUID - The resource GUID property of the nat gateway resource.
19129	ResourceGUID *string `json:"resourceGuid,omitempty"`
19130	// ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19131	ProvisioningState *string `json:"provisioningState,omitempty"`
19132}
19133
19134// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
19135func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
19136	objectMap := make(map[string]interface{})
19137	if ngpf.IdleTimeoutInMinutes != nil {
19138		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
19139	}
19140	if ngpf.PublicIPAddresses != nil {
19141		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
19142	}
19143	if ngpf.PublicIPPrefixes != nil {
19144		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
19145	}
19146	if ngpf.ResourceGUID != nil {
19147		objectMap["resourceGuid"] = ngpf.ResourceGUID
19148	}
19149	if ngpf.ProvisioningState != nil {
19150		objectMap["provisioningState"] = ngpf.ProvisioningState
19151	}
19152	return json.Marshal(objectMap)
19153}
19154
19155// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19156// long-running operation.
19157type NatGatewaysCreateOrUpdateFuture struct {
19158	azure.FutureAPI
19159	// Result returns the result of the asynchronous operation.
19160	// If the operation has not completed it will return an error.
19161	Result func(NatGatewaysClient) (NatGateway, error)
19162}
19163
19164// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19165func (future *NatGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19166	var azFuture azure.Future
19167	if err := json.Unmarshal(body, &azFuture); err != nil {
19168		return err
19169	}
19170	future.FutureAPI = &azFuture
19171	future.Result = future.result
19172	return nil
19173}
19174
19175// result is the default implementation for NatGatewaysCreateOrUpdateFuture.Result.
19176func (future *NatGatewaysCreateOrUpdateFuture) result(client NatGatewaysClient) (ng NatGateway, err error) {
19177	var done bool
19178	done, err = future.DoneWithContext(context.Background(), client)
19179	if err != nil {
19180		err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19181		return
19182	}
19183	if !done {
19184		ng.Response.Response = future.Response()
19185		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture")
19186		return
19187	}
19188	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19189	if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent {
19190		ng, err = client.CreateOrUpdateResponder(ng.Response.Response)
19191		if err != nil {
19192			err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request")
19193		}
19194	}
19195	return
19196}
19197
19198// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19199// operation.
19200type NatGatewaysDeleteFuture struct {
19201	azure.FutureAPI
19202	// Result returns the result of the asynchronous operation.
19203	// If the operation has not completed it will return an error.
19204	Result func(NatGatewaysClient) (autorest.Response, error)
19205}
19206
19207// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19208func (future *NatGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
19209	var azFuture azure.Future
19210	if err := json.Unmarshal(body, &azFuture); err != nil {
19211		return err
19212	}
19213	future.FutureAPI = &azFuture
19214	future.Result = future.result
19215	return nil
19216}
19217
19218// result is the default implementation for NatGatewaysDeleteFuture.Result.
19219func (future *NatGatewaysDeleteFuture) result(client NatGatewaysClient) (ar autorest.Response, err error) {
19220	var done bool
19221	done, err = future.DoneWithContext(context.Background(), client)
19222	if err != nil {
19223		err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
19224		return
19225	}
19226	if !done {
19227		ar.Response = future.Response()
19228		err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture")
19229		return
19230	}
19231	ar.Response = future.Response()
19232	return
19233}
19234
19235// NatGatewaySku SKU of nat gateway.
19236type NatGatewaySku struct {
19237	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
19238	Name NatGatewaySkuName `json:"name,omitempty"`
19239}
19240
19241// NextHopParameters parameters that define the source and destination endpoint.
19242type NextHopParameters struct {
19243	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
19244	TargetResourceID *string `json:"targetResourceId,omitempty"`
19245	// SourceIPAddress - The source IP address.
19246	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
19247	// DestinationIPAddress - The destination IP address.
19248	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
19249	// 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).
19250	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
19251}
19252
19253// NextHopResult the information about next hop from the specified VM.
19254type NextHopResult struct {
19255	autorest.Response `json:"-"`
19256	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
19257	NextHopType NextHopType `json:"nextHopType,omitempty"`
19258	// NextHopIPAddress - Next hop IP Address.
19259	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
19260	// 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'.
19261	RouteTableID *string `json:"routeTableId,omitempty"`
19262}
19263
19264// Operation network REST API operation definition.
19265type Operation struct {
19266	// Name - Operation name: {provider}/{resource}/{operation}.
19267	Name *string `json:"name,omitempty"`
19268	// Display - Display metadata associated with the operation.
19269	Display *OperationDisplay `json:"display,omitempty"`
19270	// Origin - Origin of the operation.
19271	Origin *string `json:"origin,omitempty"`
19272	// OperationPropertiesFormat - Operation properties format.
19273	*OperationPropertiesFormat `json:"properties,omitempty"`
19274}
19275
19276// MarshalJSON is the custom marshaler for Operation.
19277func (o Operation) MarshalJSON() ([]byte, error) {
19278	objectMap := make(map[string]interface{})
19279	if o.Name != nil {
19280		objectMap["name"] = o.Name
19281	}
19282	if o.Display != nil {
19283		objectMap["display"] = o.Display
19284	}
19285	if o.Origin != nil {
19286		objectMap["origin"] = o.Origin
19287	}
19288	if o.OperationPropertiesFormat != nil {
19289		objectMap["properties"] = o.OperationPropertiesFormat
19290	}
19291	return json.Marshal(objectMap)
19292}
19293
19294// UnmarshalJSON is the custom unmarshaler for Operation struct.
19295func (o *Operation) UnmarshalJSON(body []byte) error {
19296	var m map[string]*json.RawMessage
19297	err := json.Unmarshal(body, &m)
19298	if err != nil {
19299		return err
19300	}
19301	for k, v := range m {
19302		switch k {
19303		case "name":
19304			if v != nil {
19305				var name string
19306				err = json.Unmarshal(*v, &name)
19307				if err != nil {
19308					return err
19309				}
19310				o.Name = &name
19311			}
19312		case "display":
19313			if v != nil {
19314				var display OperationDisplay
19315				err = json.Unmarshal(*v, &display)
19316				if err != nil {
19317					return err
19318				}
19319				o.Display = &display
19320			}
19321		case "origin":
19322			if v != nil {
19323				var origin string
19324				err = json.Unmarshal(*v, &origin)
19325				if err != nil {
19326					return err
19327				}
19328				o.Origin = &origin
19329			}
19330		case "properties":
19331			if v != nil {
19332				var operationPropertiesFormat OperationPropertiesFormat
19333				err = json.Unmarshal(*v, &operationPropertiesFormat)
19334				if err != nil {
19335					return err
19336				}
19337				o.OperationPropertiesFormat = &operationPropertiesFormat
19338			}
19339		}
19340	}
19341
19342	return nil
19343}
19344
19345// OperationDisplay display metadata associated with the operation.
19346type OperationDisplay struct {
19347	// Provider - Service provider: Microsoft Network.
19348	Provider *string `json:"provider,omitempty"`
19349	// Resource - Resource on which the operation is performed.
19350	Resource *string `json:"resource,omitempty"`
19351	// Operation - Type of the operation: get, read, delete, etc.
19352	Operation *string `json:"operation,omitempty"`
19353	// Description - Description of the operation.
19354	Description *string `json:"description,omitempty"`
19355}
19356
19357// OperationListResult result of the request to list Network operations. It contains a list of operations
19358// and a URL link to get the next set of results.
19359type OperationListResult struct {
19360	autorest.Response `json:"-"`
19361	// Value - List of Network operations supported by the Network resource provider.
19362	Value *[]Operation `json:"value,omitempty"`
19363	// NextLink - URL to get the next set of operation list results if there are any.
19364	NextLink *string `json:"nextLink,omitempty"`
19365}
19366
19367// OperationListResultIterator provides access to a complete listing of Operation values.
19368type OperationListResultIterator struct {
19369	i    int
19370	page OperationListResultPage
19371}
19372
19373// NextWithContext advances to the next value.  If there was an error making
19374// the request the iterator does not advance and the error is returned.
19375func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
19376	if tracing.IsEnabled() {
19377		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
19378		defer func() {
19379			sc := -1
19380			if iter.Response().Response.Response != nil {
19381				sc = iter.Response().Response.Response.StatusCode
19382			}
19383			tracing.EndSpan(ctx, sc, err)
19384		}()
19385	}
19386	iter.i++
19387	if iter.i < len(iter.page.Values()) {
19388		return nil
19389	}
19390	err = iter.page.NextWithContext(ctx)
19391	if err != nil {
19392		iter.i--
19393		return err
19394	}
19395	iter.i = 0
19396	return nil
19397}
19398
19399// Next advances to the next value.  If there was an error making
19400// the request the iterator does not advance and the error is returned.
19401// Deprecated: Use NextWithContext() instead.
19402func (iter *OperationListResultIterator) Next() error {
19403	return iter.NextWithContext(context.Background())
19404}
19405
19406// NotDone returns true if the enumeration should be started or is not yet complete.
19407func (iter OperationListResultIterator) NotDone() bool {
19408	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19409}
19410
19411// Response returns the raw server response from the last page request.
19412func (iter OperationListResultIterator) Response() OperationListResult {
19413	return iter.page.Response()
19414}
19415
19416// Value returns the current value or a zero-initialized value if the
19417// iterator has advanced beyond the end of the collection.
19418func (iter OperationListResultIterator) Value() Operation {
19419	if !iter.page.NotDone() {
19420		return Operation{}
19421	}
19422	return iter.page.Values()[iter.i]
19423}
19424
19425// Creates a new instance of the OperationListResultIterator type.
19426func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
19427	return OperationListResultIterator{page: page}
19428}
19429
19430// IsEmpty returns true if the ListResult contains no values.
19431func (olr OperationListResult) IsEmpty() bool {
19432	return olr.Value == nil || len(*olr.Value) == 0
19433}
19434
19435// hasNextLink returns true if the NextLink is not empty.
19436func (olr OperationListResult) hasNextLink() bool {
19437	return olr.NextLink != nil && len(*olr.NextLink) != 0
19438}
19439
19440// operationListResultPreparer prepares a request to retrieve the next set of results.
19441// It returns nil if no more results exist.
19442func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
19443	if !olr.hasNextLink() {
19444		return nil, nil
19445	}
19446	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19447		autorest.AsJSON(),
19448		autorest.AsGet(),
19449		autorest.WithBaseURL(to.String(olr.NextLink)))
19450}
19451
19452// OperationListResultPage contains a page of Operation values.
19453type OperationListResultPage struct {
19454	fn  func(context.Context, OperationListResult) (OperationListResult, error)
19455	olr OperationListResult
19456}
19457
19458// NextWithContext advances to the next page of values.  If there was an error making
19459// the request the page does not advance and the error is returned.
19460func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
19461	if tracing.IsEnabled() {
19462		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
19463		defer func() {
19464			sc := -1
19465			if page.Response().Response.Response != nil {
19466				sc = page.Response().Response.Response.StatusCode
19467			}
19468			tracing.EndSpan(ctx, sc, err)
19469		}()
19470	}
19471	for {
19472		next, err := page.fn(ctx, page.olr)
19473		if err != nil {
19474			return err
19475		}
19476		page.olr = next
19477		if !next.hasNextLink() || !next.IsEmpty() {
19478			break
19479		}
19480	}
19481	return nil
19482}
19483
19484// Next advances to the next page of values.  If there was an error making
19485// the request the page does not advance and the error is returned.
19486// Deprecated: Use NextWithContext() instead.
19487func (page *OperationListResultPage) Next() error {
19488	return page.NextWithContext(context.Background())
19489}
19490
19491// NotDone returns true if the page enumeration should be started or is not yet complete.
19492func (page OperationListResultPage) NotDone() bool {
19493	return !page.olr.IsEmpty()
19494}
19495
19496// Response returns the raw server response from the last page request.
19497func (page OperationListResultPage) Response() OperationListResult {
19498	return page.olr
19499}
19500
19501// Values returns the slice of values for the current page or nil if there are no values.
19502func (page OperationListResultPage) Values() []Operation {
19503	if page.olr.IsEmpty() {
19504		return nil
19505	}
19506	return *page.olr.Value
19507}
19508
19509// Creates a new instance of the OperationListResultPage type.
19510func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
19511	return OperationListResultPage{
19512		fn:  getNextPage,
19513		olr: cur,
19514	}
19515}
19516
19517// OperationPropertiesFormat description of operation properties format.
19518type OperationPropertiesFormat struct {
19519	// ServiceSpecification - Specification of the service.
19520	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
19521}
19522
19523// OperationPropertiesFormatServiceSpecification specification of the service.
19524type OperationPropertiesFormatServiceSpecification struct {
19525	// MetricSpecifications - Operation service specification.
19526	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
19527	// LogSpecifications - Operation log specification.
19528	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
19529}
19530
19531// OutboundRule outbound rule of the load balancer.
19532type OutboundRule struct {
19533	autorest.Response `json:"-"`
19534	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
19535	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
19536	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19537	Name *string `json:"name,omitempty"`
19538	// Etag - A unique read-only string that changes whenever the resource is updated.
19539	Etag *string `json:"etag,omitempty"`
19540	// ID - Resource ID.
19541	ID *string `json:"id,omitempty"`
19542}
19543
19544// MarshalJSON is the custom marshaler for OutboundRule.
19545func (or OutboundRule) MarshalJSON() ([]byte, error) {
19546	objectMap := make(map[string]interface{})
19547	if or.OutboundRulePropertiesFormat != nil {
19548		objectMap["properties"] = or.OutboundRulePropertiesFormat
19549	}
19550	if or.Name != nil {
19551		objectMap["name"] = or.Name
19552	}
19553	if or.Etag != nil {
19554		objectMap["etag"] = or.Etag
19555	}
19556	if or.ID != nil {
19557		objectMap["id"] = or.ID
19558	}
19559	return json.Marshal(objectMap)
19560}
19561
19562// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
19563func (or *OutboundRule) UnmarshalJSON(body []byte) error {
19564	var m map[string]*json.RawMessage
19565	err := json.Unmarshal(body, &m)
19566	if err != nil {
19567		return err
19568	}
19569	for k, v := range m {
19570		switch k {
19571		case "properties":
19572			if v != nil {
19573				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
19574				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
19575				if err != nil {
19576					return err
19577				}
19578				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
19579			}
19580		case "name":
19581			if v != nil {
19582				var name string
19583				err = json.Unmarshal(*v, &name)
19584				if err != nil {
19585					return err
19586				}
19587				or.Name = &name
19588			}
19589		case "etag":
19590			if v != nil {
19591				var etag string
19592				err = json.Unmarshal(*v, &etag)
19593				if err != nil {
19594					return err
19595				}
19596				or.Etag = &etag
19597			}
19598		case "id":
19599			if v != nil {
19600				var ID string
19601				err = json.Unmarshal(*v, &ID)
19602				if err != nil {
19603					return err
19604				}
19605				or.ID = &ID
19606			}
19607		}
19608	}
19609
19610	return nil
19611}
19612
19613// OutboundRulePropertiesFormat outbound rule of the load balancer.
19614type OutboundRulePropertiesFormat struct {
19615	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
19616	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
19617	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
19618	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
19619	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
19620	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
19621	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19622	ProvisioningState *string `json:"provisioningState,omitempty"`
19623	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
19624	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
19625	// 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.
19626	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
19627	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
19628	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19629}
19630
19631// P2SVpnGateway p2SVpnGateway Resource.
19632type P2SVpnGateway struct {
19633	autorest.Response `json:"-"`
19634	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
19635	*P2SVpnGatewayProperties `json:"properties,omitempty"`
19636	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19637	Etag *string `json:"etag,omitempty"`
19638	// ID - Resource ID.
19639	ID *string `json:"id,omitempty"`
19640	// Name - READ-ONLY; Resource name.
19641	Name *string `json:"name,omitempty"`
19642	// Type - READ-ONLY; Resource type.
19643	Type *string `json:"type,omitempty"`
19644	// Location - Resource location.
19645	Location *string `json:"location,omitempty"`
19646	// Tags - Resource tags.
19647	Tags map[string]*string `json:"tags"`
19648}
19649
19650// MarshalJSON is the custom marshaler for P2SVpnGateway.
19651func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
19652	objectMap := make(map[string]interface{})
19653	if pvg.P2SVpnGatewayProperties != nil {
19654		objectMap["properties"] = pvg.P2SVpnGatewayProperties
19655	}
19656	if pvg.ID != nil {
19657		objectMap["id"] = pvg.ID
19658	}
19659	if pvg.Location != nil {
19660		objectMap["location"] = pvg.Location
19661	}
19662	if pvg.Tags != nil {
19663		objectMap["tags"] = pvg.Tags
19664	}
19665	return json.Marshal(objectMap)
19666}
19667
19668// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
19669func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
19670	var m map[string]*json.RawMessage
19671	err := json.Unmarshal(body, &m)
19672	if err != nil {
19673		return err
19674	}
19675	for k, v := range m {
19676		switch k {
19677		case "properties":
19678			if v != nil {
19679				var p2SVpnGatewayProperties P2SVpnGatewayProperties
19680				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
19681				if err != nil {
19682					return err
19683				}
19684				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
19685			}
19686		case "etag":
19687			if v != nil {
19688				var etag string
19689				err = json.Unmarshal(*v, &etag)
19690				if err != nil {
19691					return err
19692				}
19693				pvg.Etag = &etag
19694			}
19695		case "id":
19696			if v != nil {
19697				var ID string
19698				err = json.Unmarshal(*v, &ID)
19699				if err != nil {
19700					return err
19701				}
19702				pvg.ID = &ID
19703			}
19704		case "name":
19705			if v != nil {
19706				var name string
19707				err = json.Unmarshal(*v, &name)
19708				if err != nil {
19709					return err
19710				}
19711				pvg.Name = &name
19712			}
19713		case "type":
19714			if v != nil {
19715				var typeVar string
19716				err = json.Unmarshal(*v, &typeVar)
19717				if err != nil {
19718					return err
19719				}
19720				pvg.Type = &typeVar
19721			}
19722		case "location":
19723			if v != nil {
19724				var location string
19725				err = json.Unmarshal(*v, &location)
19726				if err != nil {
19727					return err
19728				}
19729				pvg.Location = &location
19730			}
19731		case "tags":
19732			if v != nil {
19733				var tags map[string]*string
19734				err = json.Unmarshal(*v, &tags)
19735				if err != nil {
19736					return err
19737				}
19738				pvg.Tags = tags
19739			}
19740		}
19741	}
19742
19743	return nil
19744}
19745
19746// P2SVpnGatewayProperties parameters for P2SVpnGateway.
19747type P2SVpnGatewayProperties struct {
19748	// VirtualHub - The VirtualHub to which the gateway belongs.
19749	VirtualHub *SubResource `json:"virtualHub,omitempty"`
19750	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19751	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19752	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
19753	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
19754	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
19755	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
19756	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
19757	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
19758	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
19759	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
19760	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
19761	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
19762}
19763
19764// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
19765func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
19766	objectMap := make(map[string]interface{})
19767	if pvgp.VirtualHub != nil {
19768		objectMap["virtualHub"] = pvgp.VirtualHub
19769	}
19770	if pvgp.ProvisioningState != "" {
19771		objectMap["provisioningState"] = pvgp.ProvisioningState
19772	}
19773	if pvgp.VpnGatewayScaleUnit != nil {
19774		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
19775	}
19776	if pvgp.P2SVpnServerConfiguration != nil {
19777		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
19778	}
19779	if pvgp.VpnClientAddressPool != nil {
19780		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
19781	}
19782	if pvgp.CustomRoutes != nil {
19783		objectMap["customRoutes"] = pvgp.CustomRoutes
19784	}
19785	return json.Marshal(objectMap)
19786}
19787
19788// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19789// long-running operation.
19790type P2sVpnGatewaysCreateOrUpdateFuture struct {
19791	azure.FutureAPI
19792	// Result returns the result of the asynchronous operation.
19793	// If the operation has not completed it will return an error.
19794	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19795}
19796
19797// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19798func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19799	var azFuture azure.Future
19800	if err := json.Unmarshal(body, &azFuture); err != nil {
19801		return err
19802	}
19803	future.FutureAPI = &azFuture
19804	future.Result = future.result
19805	return nil
19806}
19807
19808// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
19809func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
19810	var done bool
19811	done, err = future.DoneWithContext(context.Background(), client)
19812	if err != nil {
19813		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19814		return
19815	}
19816	if !done {
19817		pvg.Response.Response = future.Response()
19818		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
19819		return
19820	}
19821	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19822	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
19823		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
19824		if err != nil {
19825			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
19826		}
19827	}
19828	return
19829}
19830
19831// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19832// operation.
19833type P2sVpnGatewaysDeleteFuture struct {
19834	azure.FutureAPI
19835	// Result returns the result of the asynchronous operation.
19836	// If the operation has not completed it will return an error.
19837	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
19838}
19839
19840// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19841func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
19842	var azFuture azure.Future
19843	if err := json.Unmarshal(body, &azFuture); err != nil {
19844		return err
19845	}
19846	future.FutureAPI = &azFuture
19847	future.Result = future.result
19848	return nil
19849}
19850
19851// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
19852func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
19853	var done bool
19854	done, err = future.DoneWithContext(context.Background(), client)
19855	if err != nil {
19856		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
19857		return
19858	}
19859	if !done {
19860		ar.Response = future.Response()
19861		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
19862		return
19863	}
19864	ar.Response = future.Response()
19865	return
19866}
19867
19868// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
19869// long-running operation.
19870type P2sVpnGatewaysGenerateVpnProfileFuture struct {
19871	azure.FutureAPI
19872	// Result returns the result of the asynchronous operation.
19873	// If the operation has not completed it will return an error.
19874	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
19875}
19876
19877// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19878func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
19879	var azFuture azure.Future
19880	if err := json.Unmarshal(body, &azFuture); err != nil {
19881		return err
19882	}
19883	future.FutureAPI = &azFuture
19884	future.Result = future.result
19885	return nil
19886}
19887
19888// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
19889func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
19890	var done bool
19891	done, err = future.DoneWithContext(context.Background(), client)
19892	if err != nil {
19893		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
19894		return
19895	}
19896	if !done {
19897		vpr.Response.Response = future.Response()
19898		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
19899		return
19900	}
19901	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19902	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
19903		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
19904		if err != nil {
19905			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
19906		}
19907	}
19908	return
19909}
19910
19911// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
19912// of a long-running operation.
19913type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
19914	azure.FutureAPI
19915	// Result returns the result of the asynchronous operation.
19916	// If the operation has not completed it will return an error.
19917	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19918}
19919
19920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19921func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) UnmarshalJSON(body []byte) error {
19922	var azFuture azure.Future
19923	if err := json.Unmarshal(body, &azFuture); err != nil {
19924		return err
19925	}
19926	future.FutureAPI = &azFuture
19927	future.Result = future.result
19928	return nil
19929}
19930
19931// result is the default implementation for P2sVpnGatewaysGetP2sVpnConnectionHealthFuture.Result.
19932func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
19933	var done bool
19934	done, err = future.DoneWithContext(context.Background(), client)
19935	if err != nil {
19936		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure")
19937		return
19938	}
19939	if !done {
19940		pvg.Response.Response = future.Response()
19941		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture")
19942		return
19943	}
19944	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19945	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
19946		pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response)
19947		if err != nil {
19948			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request")
19949		}
19950	}
19951	return
19952}
19953
19954// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19955// long-running operation.
19956type P2sVpnGatewaysUpdateTagsFuture struct {
19957	azure.FutureAPI
19958	// Result returns the result of the asynchronous operation.
19959	// If the operation has not completed it will return an error.
19960	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19961}
19962
19963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19964func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19965	var azFuture azure.Future
19966	if err := json.Unmarshal(body, &azFuture); err != nil {
19967		return err
19968	}
19969	future.FutureAPI = &azFuture
19970	future.Result = future.result
19971	return nil
19972}
19973
19974// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
19975func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
19976	var done bool
19977	done, err = future.DoneWithContext(context.Background(), client)
19978	if err != nil {
19979		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19980		return
19981	}
19982	if !done {
19983		pvg.Response.Response = future.Response()
19984		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
19985		return
19986	}
19987	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19988	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
19989		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
19990		if err != nil {
19991			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
19992		}
19993	}
19994	return
19995}
19996
19997// P2SVpnProfileParameters vpn Client Parameters for package generation.
19998type P2SVpnProfileParameters struct {
19999	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
20000	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
20001}
20002
20003// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
20004// P2SVpnServerConfiguration.
20005type P2SVpnServerConfigRadiusClientRootCertificate struct {
20006	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
20007	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
20008	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20009	Name *string `json:"name,omitempty"`
20010	// Etag - A unique read-only string that changes whenever the resource is updated.
20011	Etag *string `json:"etag,omitempty"`
20012	// ID - Resource ID.
20013	ID *string `json:"id,omitempty"`
20014}
20015
20016// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
20017func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
20018	objectMap := make(map[string]interface{})
20019	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
20020		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
20021	}
20022	if pvscrcrc.Name != nil {
20023		objectMap["name"] = pvscrcrc.Name
20024	}
20025	if pvscrcrc.Etag != nil {
20026		objectMap["etag"] = pvscrcrc.Etag
20027	}
20028	if pvscrcrc.ID != nil {
20029		objectMap["id"] = pvscrcrc.ID
20030	}
20031	return json.Marshal(objectMap)
20032}
20033
20034// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
20035func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
20036	var m map[string]*json.RawMessage
20037	err := json.Unmarshal(body, &m)
20038	if err != nil {
20039		return err
20040	}
20041	for k, v := range m {
20042		switch k {
20043		case "properties":
20044			if v != nil {
20045				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
20046				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
20047				if err != nil {
20048					return err
20049				}
20050				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
20051			}
20052		case "name":
20053			if v != nil {
20054				var name string
20055				err = json.Unmarshal(*v, &name)
20056				if err != nil {
20057					return err
20058				}
20059				pvscrcrc.Name = &name
20060			}
20061		case "etag":
20062			if v != nil {
20063				var etag string
20064				err = json.Unmarshal(*v, &etag)
20065				if err != nil {
20066					return err
20067				}
20068				pvscrcrc.Etag = &etag
20069			}
20070		case "id":
20071			if v != nil {
20072				var ID string
20073				err = json.Unmarshal(*v, &ID)
20074				if err != nil {
20075					return err
20076				}
20077				pvscrcrc.ID = &ID
20078			}
20079		}
20080	}
20081
20082	return nil
20083}
20084
20085// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
20086// certificate of P2SVpnServerConfiguration.
20087type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
20088	// Thumbprint - The Radius client root certificate thumbprint.
20089	Thumbprint *string `json:"thumbprint,omitempty"`
20090	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20091	ProvisioningState *string `json:"provisioningState,omitempty"`
20092}
20093
20094// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
20095func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
20096	objectMap := make(map[string]interface{})
20097	if pvscrcrcpf.Thumbprint != nil {
20098		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
20099	}
20100	return json.Marshal(objectMap)
20101}
20102
20103// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
20104// P2SVpnServerConfiguration.
20105type P2SVpnServerConfigRadiusServerRootCertificate struct {
20106	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
20107	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
20108	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20109	Name *string `json:"name,omitempty"`
20110	// Etag - A unique read-only string that changes whenever the resource is updated.
20111	Etag *string `json:"etag,omitempty"`
20112	// ID - Resource ID.
20113	ID *string `json:"id,omitempty"`
20114}
20115
20116// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
20117func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
20118	objectMap := make(map[string]interface{})
20119	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
20120		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
20121	}
20122	if pvscrsrc.Name != nil {
20123		objectMap["name"] = pvscrsrc.Name
20124	}
20125	if pvscrsrc.Etag != nil {
20126		objectMap["etag"] = pvscrsrc.Etag
20127	}
20128	if pvscrsrc.ID != nil {
20129		objectMap["id"] = pvscrsrc.ID
20130	}
20131	return json.Marshal(objectMap)
20132}
20133
20134// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
20135func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
20136	var m map[string]*json.RawMessage
20137	err := json.Unmarshal(body, &m)
20138	if err != nil {
20139		return err
20140	}
20141	for k, v := range m {
20142		switch k {
20143		case "properties":
20144			if v != nil {
20145				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
20146				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
20147				if err != nil {
20148					return err
20149				}
20150				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
20151			}
20152		case "name":
20153			if v != nil {
20154				var name string
20155				err = json.Unmarshal(*v, &name)
20156				if err != nil {
20157					return err
20158				}
20159				pvscrsrc.Name = &name
20160			}
20161		case "etag":
20162			if v != nil {
20163				var etag string
20164				err = json.Unmarshal(*v, &etag)
20165				if err != nil {
20166					return err
20167				}
20168				pvscrsrc.Etag = &etag
20169			}
20170		case "id":
20171			if v != nil {
20172				var ID string
20173				err = json.Unmarshal(*v, &ID)
20174				if err != nil {
20175					return err
20176				}
20177				pvscrsrc.ID = &ID
20178			}
20179		}
20180	}
20181
20182	return nil
20183}
20184
20185// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
20186// certificate of P2SVpnServerConfiguration.
20187type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
20188	// PublicCertData - The certificate public data.
20189	PublicCertData *string `json:"publicCertData,omitempty"`
20190	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20191	ProvisioningState *string `json:"provisioningState,omitempty"`
20192}
20193
20194// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
20195func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
20196	objectMap := make(map[string]interface{})
20197	if pvscrsrcpf.PublicCertData != nil {
20198		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
20199	}
20200	return json.Marshal(objectMap)
20201}
20202
20203// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
20204type P2SVpnServerConfiguration struct {
20205	autorest.Response `json:"-"`
20206	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
20207	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
20208	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20209	Name *string `json:"name,omitempty"`
20210	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
20211	Etag *string `json:"etag,omitempty"`
20212	// ID - Resource ID.
20213	ID *string `json:"id,omitempty"`
20214}
20215
20216// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
20217func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
20218	objectMap := make(map[string]interface{})
20219	if pvsc.P2SVpnServerConfigurationProperties != nil {
20220		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
20221	}
20222	if pvsc.Name != nil {
20223		objectMap["name"] = pvsc.Name
20224	}
20225	if pvsc.ID != nil {
20226		objectMap["id"] = pvsc.ID
20227	}
20228	return json.Marshal(objectMap)
20229}
20230
20231// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
20232func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
20233	var m map[string]*json.RawMessage
20234	err := json.Unmarshal(body, &m)
20235	if err != nil {
20236		return err
20237	}
20238	for k, v := range m {
20239		switch k {
20240		case "properties":
20241			if v != nil {
20242				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
20243				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
20244				if err != nil {
20245					return err
20246				}
20247				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
20248			}
20249		case "name":
20250			if v != nil {
20251				var name string
20252				err = json.Unmarshal(*v, &name)
20253				if err != nil {
20254					return err
20255				}
20256				pvsc.Name = &name
20257			}
20258		case "etag":
20259			if v != nil {
20260				var etag string
20261				err = json.Unmarshal(*v, &etag)
20262				if err != nil {
20263					return err
20264				}
20265				pvsc.Etag = &etag
20266			}
20267		case "id":
20268			if v != nil {
20269				var ID string
20270				err = json.Unmarshal(*v, &ID)
20271				if err != nil {
20272					return err
20273				}
20274				pvsc.ID = &ID
20275			}
20276		}
20277	}
20278
20279	return nil
20280}
20281
20282// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration.
20283type P2SVpnServerConfigurationProperties struct {
20284	// 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 Paren VirtualWan resource name.
20285	Name *string `json:"name,omitempty"`
20286	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
20287	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
20288	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
20289	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
20290	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
20291	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
20292	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
20293	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
20294	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
20295	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
20296	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
20297	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
20298	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
20299	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
20300	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
20301	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
20302	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20303	ProvisioningState *string `json:"provisioningState,omitempty"`
20304	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
20305	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
20306	// Etag - A unique read-only string that changes whenever the resource is updated.
20307	Etag *string `json:"etag,omitempty"`
20308}
20309
20310// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
20311func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
20312	objectMap := make(map[string]interface{})
20313	if pvscp.Name != nil {
20314		objectMap["name"] = pvscp.Name
20315	}
20316	if pvscp.VpnProtocols != nil {
20317		objectMap["vpnProtocols"] = pvscp.VpnProtocols
20318	}
20319	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
20320		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
20321	}
20322	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
20323		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
20324	}
20325	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
20326		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
20327	}
20328	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
20329		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
20330	}
20331	if pvscp.VpnClientIpsecPolicies != nil {
20332		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
20333	}
20334	if pvscp.RadiusServerAddress != nil {
20335		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
20336	}
20337	if pvscp.RadiusServerSecret != nil {
20338		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
20339	}
20340	if pvscp.Etag != nil {
20341		objectMap["etag"] = pvscp.Etag
20342	}
20343	return json.Marshal(objectMap)
20344}
20345
20346// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
20347// of a long-running operation.
20348type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
20349	azure.FutureAPI
20350	// Result returns the result of the asynchronous operation.
20351	// If the operation has not completed it will return an error.
20352	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
20353}
20354
20355// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20356func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20357	var azFuture azure.Future
20358	if err := json.Unmarshal(body, &azFuture); err != nil {
20359		return err
20360	}
20361	future.FutureAPI = &azFuture
20362	future.Result = future.result
20363	return nil
20364}
20365
20366// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
20367func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
20368	var done bool
20369	done, err = future.DoneWithContext(context.Background(), client)
20370	if err != nil {
20371		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20372		return
20373	}
20374	if !done {
20375		pvsc.Response.Response = future.Response()
20376		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
20377		return
20378	}
20379	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20380	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
20381		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
20382		if err != nil {
20383			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
20384		}
20385	}
20386	return
20387}
20388
20389// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
20390// long-running operation.
20391type P2sVpnServerConfigurationsDeleteFuture struct {
20392	azure.FutureAPI
20393	// Result returns the result of the asynchronous operation.
20394	// If the operation has not completed it will return an error.
20395	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
20396}
20397
20398// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20399func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
20400	var azFuture azure.Future
20401	if err := json.Unmarshal(body, &azFuture); err != nil {
20402		return err
20403	}
20404	future.FutureAPI = &azFuture
20405	future.Result = future.result
20406	return nil
20407}
20408
20409// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
20410func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
20411	var done bool
20412	done, err = future.DoneWithContext(context.Background(), client)
20413	if err != nil {
20414		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
20415		return
20416	}
20417	if !done {
20418		ar.Response = future.Response()
20419		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
20420		return
20421	}
20422	ar.Response = future.Response()
20423	return
20424}
20425
20426// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
20427// P2SVpnServerConfiguration.
20428type P2SVpnServerConfigVpnClientRevokedCertificate struct {
20429	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
20430	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
20431	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20432	Name *string `json:"name,omitempty"`
20433	// Etag - A unique read-only string that changes whenever the resource is updated.
20434	Etag *string `json:"etag,omitempty"`
20435	// ID - Resource ID.
20436	ID *string `json:"id,omitempty"`
20437}
20438
20439// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
20440func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
20441	objectMap := make(map[string]interface{})
20442	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
20443		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
20444	}
20445	if pvscvcrc.Name != nil {
20446		objectMap["name"] = pvscvcrc.Name
20447	}
20448	if pvscvcrc.Etag != nil {
20449		objectMap["etag"] = pvscvcrc.Etag
20450	}
20451	if pvscvcrc.ID != nil {
20452		objectMap["id"] = pvscvcrc.ID
20453	}
20454	return json.Marshal(objectMap)
20455}
20456
20457// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
20458func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
20459	var m map[string]*json.RawMessage
20460	err := json.Unmarshal(body, &m)
20461	if err != nil {
20462		return err
20463	}
20464	for k, v := range m {
20465		switch k {
20466		case "properties":
20467			if v != nil {
20468				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
20469				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
20470				if err != nil {
20471					return err
20472				}
20473				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
20474			}
20475		case "name":
20476			if v != nil {
20477				var name string
20478				err = json.Unmarshal(*v, &name)
20479				if err != nil {
20480					return err
20481				}
20482				pvscvcrc.Name = &name
20483			}
20484		case "etag":
20485			if v != nil {
20486				var etag string
20487				err = json.Unmarshal(*v, &etag)
20488				if err != nil {
20489					return err
20490				}
20491				pvscvcrc.Etag = &etag
20492			}
20493		case "id":
20494			if v != nil {
20495				var ID string
20496				err = json.Unmarshal(*v, &ID)
20497				if err != nil {
20498					return err
20499				}
20500				pvscvcrc.ID = &ID
20501			}
20502		}
20503	}
20504
20505	return nil
20506}
20507
20508// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
20509// certificate of P2SVpnServerConfiguration.
20510type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
20511	// Thumbprint - The revoked VPN client certificate thumbprint.
20512	Thumbprint *string `json:"thumbprint,omitempty"`
20513	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20514	ProvisioningState *string `json:"provisioningState,omitempty"`
20515}
20516
20517// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
20518func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
20519	objectMap := make(map[string]interface{})
20520	if pvscvcrcpf.Thumbprint != nil {
20521		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
20522	}
20523	return json.Marshal(objectMap)
20524}
20525
20526// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
20527type P2SVpnServerConfigVpnClientRootCertificate struct {
20528	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
20529	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
20530	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20531	Name *string `json:"name,omitempty"`
20532	// Etag - A unique read-only string that changes whenever the resource is updated.
20533	Etag *string `json:"etag,omitempty"`
20534	// ID - Resource ID.
20535	ID *string `json:"id,omitempty"`
20536}
20537
20538// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
20539func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
20540	objectMap := make(map[string]interface{})
20541	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
20542		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20543	}
20544	if pvscvcrc.Name != nil {
20545		objectMap["name"] = pvscvcrc.Name
20546	}
20547	if pvscvcrc.Etag != nil {
20548		objectMap["etag"] = pvscvcrc.Etag
20549	}
20550	if pvscvcrc.ID != nil {
20551		objectMap["id"] = pvscvcrc.ID
20552	}
20553	return json.Marshal(objectMap)
20554}
20555
20556// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
20557func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
20558	var m map[string]*json.RawMessage
20559	err := json.Unmarshal(body, &m)
20560	if err != nil {
20561		return err
20562	}
20563	for k, v := range m {
20564		switch k {
20565		case "properties":
20566			if v != nil {
20567				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20568				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
20569				if err != nil {
20570					return err
20571				}
20572				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
20573			}
20574		case "name":
20575			if v != nil {
20576				var name string
20577				err = json.Unmarshal(*v, &name)
20578				if err != nil {
20579					return err
20580				}
20581				pvscvcrc.Name = &name
20582			}
20583		case "etag":
20584			if v != nil {
20585				var etag string
20586				err = json.Unmarshal(*v, &etag)
20587				if err != nil {
20588					return err
20589				}
20590				pvscvcrc.Etag = &etag
20591			}
20592		case "id":
20593			if v != nil {
20594				var ID string
20595				err = json.Unmarshal(*v, &ID)
20596				if err != nil {
20597					return err
20598				}
20599				pvscvcrc.ID = &ID
20600			}
20601		}
20602	}
20603
20604	return nil
20605}
20606
20607// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
20608// P2SVpnServerConfiguration.
20609type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
20610	// PublicCertData - The certificate public data.
20611	PublicCertData *string `json:"publicCertData,omitempty"`
20612	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20613	ProvisioningState *string `json:"provisioningState,omitempty"`
20614}
20615
20616// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
20617func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
20618	objectMap := make(map[string]interface{})
20619	if pvscvcrcpf.PublicCertData != nil {
20620		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
20621	}
20622	return json.Marshal(objectMap)
20623}
20624
20625// PacketCapture parameters that define the create packet capture operation.
20626type PacketCapture struct {
20627	// PacketCaptureParameters - Properties of the packet capture.
20628	*PacketCaptureParameters `json:"properties,omitempty"`
20629}
20630
20631// MarshalJSON is the custom marshaler for PacketCapture.
20632func (pc PacketCapture) MarshalJSON() ([]byte, error) {
20633	objectMap := make(map[string]interface{})
20634	if pc.PacketCaptureParameters != nil {
20635		objectMap["properties"] = pc.PacketCaptureParameters
20636	}
20637	return json.Marshal(objectMap)
20638}
20639
20640// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
20641func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
20642	var m map[string]*json.RawMessage
20643	err := json.Unmarshal(body, &m)
20644	if err != nil {
20645		return err
20646	}
20647	for k, v := range m {
20648		switch k {
20649		case "properties":
20650			if v != nil {
20651				var packetCaptureParameters PacketCaptureParameters
20652				err = json.Unmarshal(*v, &packetCaptureParameters)
20653				if err != nil {
20654					return err
20655				}
20656				pc.PacketCaptureParameters = &packetCaptureParameters
20657			}
20658		}
20659	}
20660
20661	return nil
20662}
20663
20664// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
20665type PacketCaptureFilter struct {
20666	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
20667	Protocol PcProtocol `json:"protocol,omitempty"`
20668	// 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.
20669	LocalIPAddress *string `json:"localIPAddress,omitempty"`
20670	// 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.
20671	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
20672	// 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.
20673	LocalPort *string `json:"localPort,omitempty"`
20674	// 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.
20675	RemotePort *string `json:"remotePort,omitempty"`
20676}
20677
20678// PacketCaptureListResult list of packet capture sessions.
20679type PacketCaptureListResult struct {
20680	autorest.Response `json:"-"`
20681	// Value - Information about packet capture sessions.
20682	Value *[]PacketCaptureResult `json:"value,omitempty"`
20683}
20684
20685// PacketCaptureParameters parameters that define the create packet capture operation.
20686type PacketCaptureParameters struct {
20687	// Target - The ID of the targeted resource, only VM is currently supported.
20688	Target *string `json:"target,omitempty"`
20689	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
20690	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
20691	// TotalBytesPerSession - Maximum size of the capture output.
20692	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
20693	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
20694	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
20695	// StorageLocation - Describes the storage location for a packet capture session.
20696	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
20697	// Filters - A list of packet capture filters.
20698	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
20699}
20700
20701// PacketCaptureQueryStatusResult status of packet capture session.
20702type PacketCaptureQueryStatusResult struct {
20703	autorest.Response `json:"-"`
20704	// Name - The name of the packet capture resource.
20705	Name *string `json:"name,omitempty"`
20706	// ID - The ID of the packet capture resource.
20707	ID *string `json:"id,omitempty"`
20708	// CaptureStartTime - The start time of the packet capture session.
20709	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
20710	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
20711	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
20712	// StopReason - The reason the current packet capture session was stopped.
20713	StopReason *string `json:"stopReason,omitempty"`
20714	// PacketCaptureError - List of errors of packet capture session.
20715	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
20716}
20717
20718// PacketCaptureResult information about packet capture session.
20719type PacketCaptureResult struct {
20720	autorest.Response `json:"-"`
20721	// Name - READ-ONLY; Name of the packet capture session.
20722	Name *string `json:"name,omitempty"`
20723	// ID - READ-ONLY; ID of the packet capture operation.
20724	ID *string `json:"id,omitempty"`
20725	// Etag - A unique read-only string that changes whenever the resource is updated.
20726	Etag *string `json:"etag,omitempty"`
20727	// PacketCaptureResultProperties - Properties of the packet capture result.
20728	*PacketCaptureResultProperties `json:"properties,omitempty"`
20729}
20730
20731// MarshalJSON is the custom marshaler for PacketCaptureResult.
20732func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
20733	objectMap := make(map[string]interface{})
20734	if pcr.Etag != nil {
20735		objectMap["etag"] = pcr.Etag
20736	}
20737	if pcr.PacketCaptureResultProperties != nil {
20738		objectMap["properties"] = pcr.PacketCaptureResultProperties
20739	}
20740	return json.Marshal(objectMap)
20741}
20742
20743// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
20744func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
20745	var m map[string]*json.RawMessage
20746	err := json.Unmarshal(body, &m)
20747	if err != nil {
20748		return err
20749	}
20750	for k, v := range m {
20751		switch k {
20752		case "name":
20753			if v != nil {
20754				var name string
20755				err = json.Unmarshal(*v, &name)
20756				if err != nil {
20757					return err
20758				}
20759				pcr.Name = &name
20760			}
20761		case "id":
20762			if v != nil {
20763				var ID string
20764				err = json.Unmarshal(*v, &ID)
20765				if err != nil {
20766					return err
20767				}
20768				pcr.ID = &ID
20769			}
20770		case "etag":
20771			if v != nil {
20772				var etag string
20773				err = json.Unmarshal(*v, &etag)
20774				if err != nil {
20775					return err
20776				}
20777				pcr.Etag = &etag
20778			}
20779		case "properties":
20780			if v != nil {
20781				var packetCaptureResultProperties PacketCaptureResultProperties
20782				err = json.Unmarshal(*v, &packetCaptureResultProperties)
20783				if err != nil {
20784					return err
20785				}
20786				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
20787			}
20788		}
20789	}
20790
20791	return nil
20792}
20793
20794// PacketCaptureResultProperties describes the properties of a packet capture session.
20795type PacketCaptureResultProperties struct {
20796	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20797	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20798	// Target - The ID of the targeted resource, only VM is currently supported.
20799	Target *string `json:"target,omitempty"`
20800	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
20801	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
20802	// TotalBytesPerSession - Maximum size of the capture output.
20803	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
20804	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
20805	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
20806	// StorageLocation - Describes the storage location for a packet capture session.
20807	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
20808	// Filters - A list of packet capture filters.
20809	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
20810}
20811
20812// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
20813// operation.
20814type PacketCapturesCreateFuture struct {
20815	azure.FutureAPI
20816	// Result returns the result of the asynchronous operation.
20817	// If the operation has not completed it will return an error.
20818	Result func(PacketCapturesClient) (PacketCaptureResult, error)
20819}
20820
20821// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20822func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
20823	var azFuture azure.Future
20824	if err := json.Unmarshal(body, &azFuture); err != nil {
20825		return err
20826	}
20827	future.FutureAPI = &azFuture
20828	future.Result = future.result
20829	return nil
20830}
20831
20832// result is the default implementation for PacketCapturesCreateFuture.Result.
20833func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
20834	var done bool
20835	done, err = future.DoneWithContext(context.Background(), client)
20836	if err != nil {
20837		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
20838		return
20839	}
20840	if !done {
20841		pcr.Response.Response = future.Response()
20842		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
20843		return
20844	}
20845	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20846	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
20847		pcr, err = client.CreateResponder(pcr.Response.Response)
20848		if err != nil {
20849			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
20850		}
20851	}
20852	return
20853}
20854
20855// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20856// operation.
20857type PacketCapturesDeleteFuture struct {
20858	azure.FutureAPI
20859	// Result returns the result of the asynchronous operation.
20860	// If the operation has not completed it will return an error.
20861	Result func(PacketCapturesClient) (autorest.Response, error)
20862}
20863
20864// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20865func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
20866	var azFuture azure.Future
20867	if err := json.Unmarshal(body, &azFuture); err != nil {
20868		return err
20869	}
20870	future.FutureAPI = &azFuture
20871	future.Result = future.result
20872	return nil
20873}
20874
20875// result is the default implementation for PacketCapturesDeleteFuture.Result.
20876func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
20877	var done bool
20878	done, err = future.DoneWithContext(context.Background(), client)
20879	if err != nil {
20880		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
20881		return
20882	}
20883	if !done {
20884		ar.Response = future.Response()
20885		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
20886		return
20887	}
20888	ar.Response = future.Response()
20889	return
20890}
20891
20892// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
20893// operation.
20894type PacketCapturesGetStatusFuture struct {
20895	azure.FutureAPI
20896	// Result returns the result of the asynchronous operation.
20897	// If the operation has not completed it will return an error.
20898	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
20899}
20900
20901// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20902func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
20903	var azFuture azure.Future
20904	if err := json.Unmarshal(body, &azFuture); err != nil {
20905		return err
20906	}
20907	future.FutureAPI = &azFuture
20908	future.Result = future.result
20909	return nil
20910}
20911
20912// result is the default implementation for PacketCapturesGetStatusFuture.Result.
20913func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
20914	var done bool
20915	done, err = future.DoneWithContext(context.Background(), client)
20916	if err != nil {
20917		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
20918		return
20919	}
20920	if !done {
20921		pcqsr.Response.Response = future.Response()
20922		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
20923		return
20924	}
20925	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20926	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
20927		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
20928		if err != nil {
20929			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
20930		}
20931	}
20932	return
20933}
20934
20935// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
20936// operation.
20937type PacketCapturesStopFuture struct {
20938	azure.FutureAPI
20939	// Result returns the result of the asynchronous operation.
20940	// If the operation has not completed it will return an error.
20941	Result func(PacketCapturesClient) (autorest.Response, error)
20942}
20943
20944// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20945func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
20946	var azFuture azure.Future
20947	if err := json.Unmarshal(body, &azFuture); err != nil {
20948		return err
20949	}
20950	future.FutureAPI = &azFuture
20951	future.Result = future.result
20952	return nil
20953}
20954
20955// result is the default implementation for PacketCapturesStopFuture.Result.
20956func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
20957	var done bool
20958	done, err = future.DoneWithContext(context.Background(), client)
20959	if err != nil {
20960		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
20961		return
20962	}
20963	if !done {
20964		ar.Response = future.Response()
20965		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
20966		return
20967	}
20968	ar.Response = future.Response()
20969	return
20970}
20971
20972// PacketCaptureStorageLocation describes the storage location for a packet capture session.
20973type PacketCaptureStorageLocation struct {
20974	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
20975	StorageID *string `json:"storageId,omitempty"`
20976	// 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.
20977	StoragePath *string `json:"storagePath,omitempty"`
20978	// 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.
20979	FilePath *string `json:"filePath,omitempty"`
20980}
20981
20982// PatchRouteFilter route Filter Resource.
20983type PatchRouteFilter struct {
20984	// RouteFilterPropertiesFormat - Properties of the route filter.
20985	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
20986	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
20987	Name *string `json:"name,omitempty"`
20988	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20989	Etag *string `json:"etag,omitempty"`
20990	// Type - READ-ONLY; Resource type.
20991	Type *string `json:"type,omitempty"`
20992	// Tags - Resource tags.
20993	Tags map[string]*string `json:"tags"`
20994	// ID - Resource ID.
20995	ID *string `json:"id,omitempty"`
20996}
20997
20998// MarshalJSON is the custom marshaler for PatchRouteFilter.
20999func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
21000	objectMap := make(map[string]interface{})
21001	if prf.RouteFilterPropertiesFormat != nil {
21002		objectMap["properties"] = prf.RouteFilterPropertiesFormat
21003	}
21004	if prf.Tags != nil {
21005		objectMap["tags"] = prf.Tags
21006	}
21007	if prf.ID != nil {
21008		objectMap["id"] = prf.ID
21009	}
21010	return json.Marshal(objectMap)
21011}
21012
21013// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
21014func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
21015	var m map[string]*json.RawMessage
21016	err := json.Unmarshal(body, &m)
21017	if err != nil {
21018		return err
21019	}
21020	for k, v := range m {
21021		switch k {
21022		case "properties":
21023			if v != nil {
21024				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
21025				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
21026				if err != nil {
21027					return err
21028				}
21029				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
21030			}
21031		case "name":
21032			if v != nil {
21033				var name string
21034				err = json.Unmarshal(*v, &name)
21035				if err != nil {
21036					return err
21037				}
21038				prf.Name = &name
21039			}
21040		case "etag":
21041			if v != nil {
21042				var etag string
21043				err = json.Unmarshal(*v, &etag)
21044				if err != nil {
21045					return err
21046				}
21047				prf.Etag = &etag
21048			}
21049		case "type":
21050			if v != nil {
21051				var typeVar string
21052				err = json.Unmarshal(*v, &typeVar)
21053				if err != nil {
21054					return err
21055				}
21056				prf.Type = &typeVar
21057			}
21058		case "tags":
21059			if v != nil {
21060				var tags map[string]*string
21061				err = json.Unmarshal(*v, &tags)
21062				if err != nil {
21063					return err
21064				}
21065				prf.Tags = tags
21066			}
21067		case "id":
21068			if v != nil {
21069				var ID string
21070				err = json.Unmarshal(*v, &ID)
21071				if err != nil {
21072					return err
21073				}
21074				prf.ID = &ID
21075			}
21076		}
21077	}
21078
21079	return nil
21080}
21081
21082// PatchRouteFilterRule route Filter Rule Resource.
21083type PatchRouteFilterRule struct {
21084	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
21085	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
21086	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
21087	Name *string `json:"name,omitempty"`
21088	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21089	Etag *string `json:"etag,omitempty"`
21090	// ID - Resource ID.
21091	ID *string `json:"id,omitempty"`
21092}
21093
21094// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
21095func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
21096	objectMap := make(map[string]interface{})
21097	if prfr.RouteFilterRulePropertiesFormat != nil {
21098		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
21099	}
21100	if prfr.ID != nil {
21101		objectMap["id"] = prfr.ID
21102	}
21103	return json.Marshal(objectMap)
21104}
21105
21106// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
21107func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
21108	var m map[string]*json.RawMessage
21109	err := json.Unmarshal(body, &m)
21110	if err != nil {
21111		return err
21112	}
21113	for k, v := range m {
21114		switch k {
21115		case "properties":
21116			if v != nil {
21117				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
21118				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
21119				if err != nil {
21120					return err
21121				}
21122				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
21123			}
21124		case "name":
21125			if v != nil {
21126				var name string
21127				err = json.Unmarshal(*v, &name)
21128				if err != nil {
21129					return err
21130				}
21131				prfr.Name = &name
21132			}
21133		case "etag":
21134			if v != nil {
21135				var etag string
21136				err = json.Unmarshal(*v, &etag)
21137				if err != nil {
21138					return err
21139				}
21140				prfr.Etag = &etag
21141			}
21142		case "id":
21143			if v != nil {
21144				var ID string
21145				err = json.Unmarshal(*v, &ID)
21146				if err != nil {
21147					return err
21148				}
21149				prfr.ID = &ID
21150			}
21151		}
21152	}
21153
21154	return nil
21155}
21156
21157// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
21158// resource.
21159type PeerExpressRouteCircuitConnection struct {
21160	autorest.Response `json:"-"`
21161	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
21162	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
21163	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
21164	Name *string `json:"name,omitempty"`
21165	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21166	Etag *string `json:"etag,omitempty"`
21167	// Type - READ-ONLY; Type of the resource.
21168	Type *string `json:"type,omitempty"`
21169	// ID - Resource ID.
21170	ID *string `json:"id,omitempty"`
21171}
21172
21173// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
21174func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
21175	objectMap := make(map[string]interface{})
21176	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
21177		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
21178	}
21179	if percc.Name != nil {
21180		objectMap["name"] = percc.Name
21181	}
21182	if percc.ID != nil {
21183		objectMap["id"] = percc.ID
21184	}
21185	return json.Marshal(objectMap)
21186}
21187
21188// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
21189func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
21190	var m map[string]*json.RawMessage
21191	err := json.Unmarshal(body, &m)
21192	if err != nil {
21193		return err
21194	}
21195	for k, v := range m {
21196		switch k {
21197		case "properties":
21198			if v != nil {
21199				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
21200				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
21201				if err != nil {
21202					return err
21203				}
21204				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
21205			}
21206		case "name":
21207			if v != nil {
21208				var name string
21209				err = json.Unmarshal(*v, &name)
21210				if err != nil {
21211					return err
21212				}
21213				percc.Name = &name
21214			}
21215		case "etag":
21216			if v != nil {
21217				var etag string
21218				err = json.Unmarshal(*v, &etag)
21219				if err != nil {
21220					return err
21221				}
21222				percc.Etag = &etag
21223			}
21224		case "type":
21225			if v != nil {
21226				var typeVar string
21227				err = json.Unmarshal(*v, &typeVar)
21228				if err != nil {
21229					return err
21230				}
21231				percc.Type = &typeVar
21232			}
21233		case "id":
21234			if v != nil {
21235				var ID string
21236				err = json.Unmarshal(*v, &ID)
21237				if err != nil {
21238					return err
21239				}
21240				percc.ID = &ID
21241			}
21242		}
21243	}
21244
21245	return nil
21246}
21247
21248// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
21249// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
21250// ExpressRouteCircuit.
21251type PeerExpressRouteCircuitConnectionListResult struct {
21252	autorest.Response `json:"-"`
21253	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
21254	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
21255	// NextLink - The URL to get the next set of results.
21256	NextLink *string `json:"nextLink,omitempty"`
21257}
21258
21259// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
21260// PeerExpressRouteCircuitConnection values.
21261type PeerExpressRouteCircuitConnectionListResultIterator struct {
21262	i    int
21263	page PeerExpressRouteCircuitConnectionListResultPage
21264}
21265
21266// NextWithContext advances to the next value.  If there was an error making
21267// the request the iterator does not advance and the error is returned.
21268func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
21269	if tracing.IsEnabled() {
21270		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
21271		defer func() {
21272			sc := -1
21273			if iter.Response().Response.Response != nil {
21274				sc = iter.Response().Response.Response.StatusCode
21275			}
21276			tracing.EndSpan(ctx, sc, err)
21277		}()
21278	}
21279	iter.i++
21280	if iter.i < len(iter.page.Values()) {
21281		return nil
21282	}
21283	err = iter.page.NextWithContext(ctx)
21284	if err != nil {
21285		iter.i--
21286		return err
21287	}
21288	iter.i = 0
21289	return nil
21290}
21291
21292// Next advances to the next value.  If there was an error making
21293// the request the iterator does not advance and the error is returned.
21294// Deprecated: Use NextWithContext() instead.
21295func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
21296	return iter.NextWithContext(context.Background())
21297}
21298
21299// NotDone returns true if the enumeration should be started or is not yet complete.
21300func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
21301	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21302}
21303
21304// Response returns the raw server response from the last page request.
21305func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
21306	return iter.page.Response()
21307}
21308
21309// Value returns the current value or a zero-initialized value if the
21310// iterator has advanced beyond the end of the collection.
21311func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
21312	if !iter.page.NotDone() {
21313		return PeerExpressRouteCircuitConnection{}
21314	}
21315	return iter.page.Values()[iter.i]
21316}
21317
21318// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
21319func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
21320	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
21321}
21322
21323// IsEmpty returns true if the ListResult contains no values.
21324func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
21325	return percclr.Value == nil || len(*percclr.Value) == 0
21326}
21327
21328// hasNextLink returns true if the NextLink is not empty.
21329func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
21330	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
21331}
21332
21333// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
21334// It returns nil if no more results exist.
21335func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
21336	if !percclr.hasNextLink() {
21337		return nil, nil
21338	}
21339	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21340		autorest.AsJSON(),
21341		autorest.AsGet(),
21342		autorest.WithBaseURL(to.String(percclr.NextLink)))
21343}
21344
21345// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
21346// values.
21347type PeerExpressRouteCircuitConnectionListResultPage struct {
21348	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
21349	percclr PeerExpressRouteCircuitConnectionListResult
21350}
21351
21352// NextWithContext advances to the next page of values.  If there was an error making
21353// the request the page does not advance and the error is returned.
21354func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
21355	if tracing.IsEnabled() {
21356		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
21357		defer func() {
21358			sc := -1
21359			if page.Response().Response.Response != nil {
21360				sc = page.Response().Response.Response.StatusCode
21361			}
21362			tracing.EndSpan(ctx, sc, err)
21363		}()
21364	}
21365	for {
21366		next, err := page.fn(ctx, page.percclr)
21367		if err != nil {
21368			return err
21369		}
21370		page.percclr = next
21371		if !next.hasNextLink() || !next.IsEmpty() {
21372			break
21373		}
21374	}
21375	return nil
21376}
21377
21378// Next advances to the next page of values.  If there was an error making
21379// the request the page does not advance and the error is returned.
21380// Deprecated: Use NextWithContext() instead.
21381func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
21382	return page.NextWithContext(context.Background())
21383}
21384
21385// NotDone returns true if the page enumeration should be started or is not yet complete.
21386func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
21387	return !page.percclr.IsEmpty()
21388}
21389
21390// Response returns the raw server response from the last page request.
21391func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
21392	return page.percclr
21393}
21394
21395// Values returns the slice of values for the current page or nil if there are no values.
21396func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
21397	if page.percclr.IsEmpty() {
21398		return nil
21399	}
21400	return *page.percclr.Value
21401}
21402
21403// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
21404func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
21405	return PeerExpressRouteCircuitConnectionListResultPage{
21406		fn:      getNextPage,
21407		percclr: cur,
21408	}
21409}
21410
21411// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
21412// connection.
21413type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
21414	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
21415	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
21416	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
21417	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
21418	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
21419	AddressPrefix *string `json:"addressPrefix,omitempty"`
21420	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
21421	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
21422	// ConnectionName - The name of the express route circuit connection resource.
21423	ConnectionName *string `json:"connectionName,omitempty"`
21424	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
21425	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
21426	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
21427	ProvisioningState *string `json:"provisioningState,omitempty"`
21428}
21429
21430// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
21431func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
21432	objectMap := make(map[string]interface{})
21433	if perccpf.ExpressRouteCircuitPeering != nil {
21434		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
21435	}
21436	if perccpf.PeerExpressRouteCircuitPeering != nil {
21437		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
21438	}
21439	if perccpf.AddressPrefix != nil {
21440		objectMap["addressPrefix"] = perccpf.AddressPrefix
21441	}
21442	if perccpf.CircuitConnectionStatus != "" {
21443		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
21444	}
21445	if perccpf.ConnectionName != nil {
21446		objectMap["connectionName"] = perccpf.ConnectionName
21447	}
21448	if perccpf.AuthResourceGUID != nil {
21449		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
21450	}
21451	return json.Marshal(objectMap)
21452}
21453
21454// PolicySettings defines contents of a web application firewall global configuration.
21455type PolicySettings struct {
21456	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
21457	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
21458	// Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
21459	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
21460}
21461
21462// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
21463type PrepareNetworkPoliciesRequest struct {
21464	// ServiceName - The name of the service for which subnet is being prepared for.
21465	ServiceName *string `json:"serviceName,omitempty"`
21466	// ResourceGroupName - The name of the resource group where the Network Intent Policy will be stored.
21467	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
21468	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
21469	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
21470}
21471
21472// PrivateEndpoint private endpoint resource.
21473type PrivateEndpoint struct {
21474	autorest.Response `json:"-"`
21475	// PrivateEndpointProperties - Properties of the private endpoint.
21476	*PrivateEndpointProperties `json:"properties,omitempty"`
21477	// Etag - A unique read-only string that changes whenever the resource is updated.
21478	Etag *string `json:"etag,omitempty"`
21479	// ID - Resource ID.
21480	ID *string `json:"id,omitempty"`
21481	// Name - READ-ONLY; Resource name.
21482	Name *string `json:"name,omitempty"`
21483	// Type - READ-ONLY; Resource type.
21484	Type *string `json:"type,omitempty"`
21485	// Location - Resource location.
21486	Location *string `json:"location,omitempty"`
21487	// Tags - Resource tags.
21488	Tags map[string]*string `json:"tags"`
21489}
21490
21491// MarshalJSON is the custom marshaler for PrivateEndpoint.
21492func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
21493	objectMap := make(map[string]interface{})
21494	if peVar.PrivateEndpointProperties != nil {
21495		objectMap["properties"] = peVar.PrivateEndpointProperties
21496	}
21497	if peVar.Etag != nil {
21498		objectMap["etag"] = peVar.Etag
21499	}
21500	if peVar.ID != nil {
21501		objectMap["id"] = peVar.ID
21502	}
21503	if peVar.Location != nil {
21504		objectMap["location"] = peVar.Location
21505	}
21506	if peVar.Tags != nil {
21507		objectMap["tags"] = peVar.Tags
21508	}
21509	return json.Marshal(objectMap)
21510}
21511
21512// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
21513func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
21514	var m map[string]*json.RawMessage
21515	err := json.Unmarshal(body, &m)
21516	if err != nil {
21517		return err
21518	}
21519	for k, v := range m {
21520		switch k {
21521		case "properties":
21522			if v != nil {
21523				var privateEndpointProperties PrivateEndpointProperties
21524				err = json.Unmarshal(*v, &privateEndpointProperties)
21525				if err != nil {
21526					return err
21527				}
21528				peVar.PrivateEndpointProperties = &privateEndpointProperties
21529			}
21530		case "etag":
21531			if v != nil {
21532				var etag string
21533				err = json.Unmarshal(*v, &etag)
21534				if err != nil {
21535					return err
21536				}
21537				peVar.Etag = &etag
21538			}
21539		case "id":
21540			if v != nil {
21541				var ID string
21542				err = json.Unmarshal(*v, &ID)
21543				if err != nil {
21544					return err
21545				}
21546				peVar.ID = &ID
21547			}
21548		case "name":
21549			if v != nil {
21550				var name string
21551				err = json.Unmarshal(*v, &name)
21552				if err != nil {
21553					return err
21554				}
21555				peVar.Name = &name
21556			}
21557		case "type":
21558			if v != nil {
21559				var typeVar string
21560				err = json.Unmarshal(*v, &typeVar)
21561				if err != nil {
21562					return err
21563				}
21564				peVar.Type = &typeVar
21565			}
21566		case "location":
21567			if v != nil {
21568				var location string
21569				err = json.Unmarshal(*v, &location)
21570				if err != nil {
21571					return err
21572				}
21573				peVar.Location = &location
21574			}
21575		case "tags":
21576			if v != nil {
21577				var tags map[string]*string
21578				err = json.Unmarshal(*v, &tags)
21579				if err != nil {
21580					return err
21581				}
21582				peVar.Tags = tags
21583			}
21584		}
21585	}
21586
21587	return nil
21588}
21589
21590// PrivateEndpointConnection privateEndpointConnection resource.
21591type PrivateEndpointConnection struct {
21592	autorest.Response `json:"-"`
21593	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
21594	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
21595	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21596	Name *string `json:"name,omitempty"`
21597	// Type - READ-ONLY; The resource type.
21598	Type *string `json:"type,omitempty"`
21599	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21600	Etag *string `json:"etag,omitempty"`
21601	// ID - Resource ID.
21602	ID *string `json:"id,omitempty"`
21603}
21604
21605// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
21606func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
21607	objectMap := make(map[string]interface{})
21608	if pec.PrivateEndpointConnectionProperties != nil {
21609		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
21610	}
21611	if pec.Name != nil {
21612		objectMap["name"] = pec.Name
21613	}
21614	if pec.ID != nil {
21615		objectMap["id"] = pec.ID
21616	}
21617	return json.Marshal(objectMap)
21618}
21619
21620// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
21621func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
21622	var m map[string]*json.RawMessage
21623	err := json.Unmarshal(body, &m)
21624	if err != nil {
21625		return err
21626	}
21627	for k, v := range m {
21628		switch k {
21629		case "properties":
21630			if v != nil {
21631				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
21632				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
21633				if err != nil {
21634					return err
21635				}
21636				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
21637			}
21638		case "name":
21639			if v != nil {
21640				var name string
21641				err = json.Unmarshal(*v, &name)
21642				if err != nil {
21643					return err
21644				}
21645				pec.Name = &name
21646			}
21647		case "type":
21648			if v != nil {
21649				var typeVar string
21650				err = json.Unmarshal(*v, &typeVar)
21651				if err != nil {
21652					return err
21653				}
21654				pec.Type = &typeVar
21655			}
21656		case "etag":
21657			if v != nil {
21658				var etag string
21659				err = json.Unmarshal(*v, &etag)
21660				if err != nil {
21661					return err
21662				}
21663				pec.Etag = &etag
21664			}
21665		case "id":
21666			if v != nil {
21667				var ID string
21668				err = json.Unmarshal(*v, &ID)
21669				if err != nil {
21670					return err
21671				}
21672				pec.ID = &ID
21673			}
21674		}
21675	}
21676
21677	return nil
21678}
21679
21680// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
21681type PrivateEndpointConnectionProperties struct {
21682	// PrivateEndpoint - The resource of private end point.
21683	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
21684	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
21685	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
21686	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21687	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21688}
21689
21690// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
21691func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
21692	objectMap := make(map[string]interface{})
21693	if pecp.PrivateEndpoint != nil {
21694		objectMap["privateEndpoint"] = pecp.PrivateEndpoint
21695	}
21696	if pecp.PrivateLinkServiceConnectionState != nil {
21697		objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
21698	}
21699	return json.Marshal(objectMap)
21700}
21701
21702// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
21703type PrivateEndpointListResult struct {
21704	autorest.Response `json:"-"`
21705	// Value - Gets a list of private endpoint resources in a resource group.
21706	Value *[]PrivateEndpoint `json:"value,omitempty"`
21707	// NextLink - READ-ONLY; The URL to get the next set of results.
21708	NextLink *string `json:"nextLink,omitempty"`
21709}
21710
21711// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
21712func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
21713	objectMap := make(map[string]interface{})
21714	if pelr.Value != nil {
21715		objectMap["value"] = pelr.Value
21716	}
21717	return json.Marshal(objectMap)
21718}
21719
21720// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
21721type PrivateEndpointListResultIterator struct {
21722	i    int
21723	page PrivateEndpointListResultPage
21724}
21725
21726// NextWithContext advances to the next value.  If there was an error making
21727// the request the iterator does not advance and the error is returned.
21728func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
21729	if tracing.IsEnabled() {
21730		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
21731		defer func() {
21732			sc := -1
21733			if iter.Response().Response.Response != nil {
21734				sc = iter.Response().Response.Response.StatusCode
21735			}
21736			tracing.EndSpan(ctx, sc, err)
21737		}()
21738	}
21739	iter.i++
21740	if iter.i < len(iter.page.Values()) {
21741		return nil
21742	}
21743	err = iter.page.NextWithContext(ctx)
21744	if err != nil {
21745		iter.i--
21746		return err
21747	}
21748	iter.i = 0
21749	return nil
21750}
21751
21752// Next advances to the next value.  If there was an error making
21753// the request the iterator does not advance and the error is returned.
21754// Deprecated: Use NextWithContext() instead.
21755func (iter *PrivateEndpointListResultIterator) Next() error {
21756	return iter.NextWithContext(context.Background())
21757}
21758
21759// NotDone returns true if the enumeration should be started or is not yet complete.
21760func (iter PrivateEndpointListResultIterator) NotDone() bool {
21761	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21762}
21763
21764// Response returns the raw server response from the last page request.
21765func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
21766	return iter.page.Response()
21767}
21768
21769// Value returns the current value or a zero-initialized value if the
21770// iterator has advanced beyond the end of the collection.
21771func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
21772	if !iter.page.NotDone() {
21773		return PrivateEndpoint{}
21774	}
21775	return iter.page.Values()[iter.i]
21776}
21777
21778// Creates a new instance of the PrivateEndpointListResultIterator type.
21779func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
21780	return PrivateEndpointListResultIterator{page: page}
21781}
21782
21783// IsEmpty returns true if the ListResult contains no values.
21784func (pelr PrivateEndpointListResult) IsEmpty() bool {
21785	return pelr.Value == nil || len(*pelr.Value) == 0
21786}
21787
21788// hasNextLink returns true if the NextLink is not empty.
21789func (pelr PrivateEndpointListResult) hasNextLink() bool {
21790	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
21791}
21792
21793// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
21794// It returns nil if no more results exist.
21795func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
21796	if !pelr.hasNextLink() {
21797		return nil, nil
21798	}
21799	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21800		autorest.AsJSON(),
21801		autorest.AsGet(),
21802		autorest.WithBaseURL(to.String(pelr.NextLink)))
21803}
21804
21805// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
21806type PrivateEndpointListResultPage struct {
21807	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
21808	pelr PrivateEndpointListResult
21809}
21810
21811// NextWithContext advances to the next page of values.  If there was an error making
21812// the request the page does not advance and the error is returned.
21813func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
21814	if tracing.IsEnabled() {
21815		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
21816		defer func() {
21817			sc := -1
21818			if page.Response().Response.Response != nil {
21819				sc = page.Response().Response.Response.StatusCode
21820			}
21821			tracing.EndSpan(ctx, sc, err)
21822		}()
21823	}
21824	for {
21825		next, err := page.fn(ctx, page.pelr)
21826		if err != nil {
21827			return err
21828		}
21829		page.pelr = next
21830		if !next.hasNextLink() || !next.IsEmpty() {
21831			break
21832		}
21833	}
21834	return nil
21835}
21836
21837// Next advances to the next page of values.  If there was an error making
21838// the request the page does not advance and the error is returned.
21839// Deprecated: Use NextWithContext() instead.
21840func (page *PrivateEndpointListResultPage) Next() error {
21841	return page.NextWithContext(context.Background())
21842}
21843
21844// NotDone returns true if the page enumeration should be started or is not yet complete.
21845func (page PrivateEndpointListResultPage) NotDone() bool {
21846	return !page.pelr.IsEmpty()
21847}
21848
21849// Response returns the raw server response from the last page request.
21850func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
21851	return page.pelr
21852}
21853
21854// Values returns the slice of values for the current page or nil if there are no values.
21855func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
21856	if page.pelr.IsEmpty() {
21857		return nil
21858	}
21859	return *page.pelr.Value
21860}
21861
21862// Creates a new instance of the PrivateEndpointListResultPage type.
21863func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
21864	return PrivateEndpointListResultPage{
21865		fn:   getNextPage,
21866		pelr: cur,
21867	}
21868}
21869
21870// PrivateEndpointProperties properties of the private endpoint.
21871type PrivateEndpointProperties struct {
21872	// Subnet - The ID of the subnet from which the private IP will be allocated.
21873	Subnet *Subnet `json:"subnet,omitempty"`
21874	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private endpoint.
21875	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
21876	// ProvisioningState - READ-ONLY; The provisioning state of the private endpoint. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21877	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21878	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
21879	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
21880	// ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource.
21881	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
21882}
21883
21884// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
21885func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
21886	objectMap := make(map[string]interface{})
21887	if pep.Subnet != nil {
21888		objectMap["subnet"] = pep.Subnet
21889	}
21890	if pep.PrivateLinkServiceConnections != nil {
21891		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
21892	}
21893	if pep.ManualPrivateLinkServiceConnections != nil {
21894		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
21895	}
21896	return json.Marshal(objectMap)
21897}
21898
21899// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21900// long-running operation.
21901type PrivateEndpointsCreateOrUpdateFuture struct {
21902	azure.FutureAPI
21903	// Result returns the result of the asynchronous operation.
21904	// If the operation has not completed it will return an error.
21905	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
21906}
21907
21908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21909func (future *PrivateEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21910	var azFuture azure.Future
21911	if err := json.Unmarshal(body, &azFuture); err != nil {
21912		return err
21913	}
21914	future.FutureAPI = &azFuture
21915	future.Result = future.result
21916	return nil
21917}
21918
21919// result is the default implementation for PrivateEndpointsCreateOrUpdateFuture.Result.
21920func (future *PrivateEndpointsCreateOrUpdateFuture) result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) {
21921	var done bool
21922	done, err = future.DoneWithContext(context.Background(), client)
21923	if err != nil {
21924		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21925		return
21926	}
21927	if !done {
21928		peVar.Response.Response = future.Response()
21929		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture")
21930		return
21931	}
21932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21933	if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent {
21934		peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response)
21935		if err != nil {
21936			err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request")
21937		}
21938	}
21939	return
21940}
21941
21942// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21943// operation.
21944type PrivateEndpointsDeleteFuture struct {
21945	azure.FutureAPI
21946	// Result returns the result of the asynchronous operation.
21947	// If the operation has not completed it will return an error.
21948	Result func(PrivateEndpointsClient) (autorest.Response, error)
21949}
21950
21951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21952func (future *PrivateEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
21953	var azFuture azure.Future
21954	if err := json.Unmarshal(body, &azFuture); err != nil {
21955		return err
21956	}
21957	future.FutureAPI = &azFuture
21958	future.Result = future.result
21959	return nil
21960}
21961
21962// result is the default implementation for PrivateEndpointsDeleteFuture.Result.
21963func (future *PrivateEndpointsDeleteFuture) result(client PrivateEndpointsClient) (ar autorest.Response, err error) {
21964	var done bool
21965	done, err = future.DoneWithContext(context.Background(), client)
21966	if err != nil {
21967		err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
21968		return
21969	}
21970	if !done {
21971		ar.Response = future.Response()
21972		err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture")
21973		return
21974	}
21975	ar.Response = future.Response()
21976	return
21977}
21978
21979// PrivateLinkService private link service resource.
21980type PrivateLinkService struct {
21981	autorest.Response `json:"-"`
21982	// PrivateLinkServiceProperties - Properties of the private link service.
21983	*PrivateLinkServiceProperties `json:"properties,omitempty"`
21984	// Etag - A unique read-only string that changes whenever the resource is updated.
21985	Etag *string `json:"etag,omitempty"`
21986	// ID - Resource ID.
21987	ID *string `json:"id,omitempty"`
21988	// Name - READ-ONLY; Resource name.
21989	Name *string `json:"name,omitempty"`
21990	// Type - READ-ONLY; Resource type.
21991	Type *string `json:"type,omitempty"`
21992	// Location - Resource location.
21993	Location *string `json:"location,omitempty"`
21994	// Tags - Resource tags.
21995	Tags map[string]*string `json:"tags"`
21996}
21997
21998// MarshalJSON is the custom marshaler for PrivateLinkService.
21999func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
22000	objectMap := make(map[string]interface{})
22001	if pls.PrivateLinkServiceProperties != nil {
22002		objectMap["properties"] = pls.PrivateLinkServiceProperties
22003	}
22004	if pls.Etag != nil {
22005		objectMap["etag"] = pls.Etag
22006	}
22007	if pls.ID != nil {
22008		objectMap["id"] = pls.ID
22009	}
22010	if pls.Location != nil {
22011		objectMap["location"] = pls.Location
22012	}
22013	if pls.Tags != nil {
22014		objectMap["tags"] = pls.Tags
22015	}
22016	return json.Marshal(objectMap)
22017}
22018
22019// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
22020func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
22021	var m map[string]*json.RawMessage
22022	err := json.Unmarshal(body, &m)
22023	if err != nil {
22024		return err
22025	}
22026	for k, v := range m {
22027		switch k {
22028		case "properties":
22029			if v != nil {
22030				var privateLinkServiceProperties PrivateLinkServiceProperties
22031				err = json.Unmarshal(*v, &privateLinkServiceProperties)
22032				if err != nil {
22033					return err
22034				}
22035				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
22036			}
22037		case "etag":
22038			if v != nil {
22039				var etag string
22040				err = json.Unmarshal(*v, &etag)
22041				if err != nil {
22042					return err
22043				}
22044				pls.Etag = &etag
22045			}
22046		case "id":
22047			if v != nil {
22048				var ID string
22049				err = json.Unmarshal(*v, &ID)
22050				if err != nil {
22051					return err
22052				}
22053				pls.ID = &ID
22054			}
22055		case "name":
22056			if v != nil {
22057				var name string
22058				err = json.Unmarshal(*v, &name)
22059				if err != nil {
22060					return err
22061				}
22062				pls.Name = &name
22063			}
22064		case "type":
22065			if v != nil {
22066				var typeVar string
22067				err = json.Unmarshal(*v, &typeVar)
22068				if err != nil {
22069					return err
22070				}
22071				pls.Type = &typeVar
22072			}
22073		case "location":
22074			if v != nil {
22075				var location string
22076				err = json.Unmarshal(*v, &location)
22077				if err != nil {
22078					return err
22079				}
22080				pls.Location = &location
22081			}
22082		case "tags":
22083			if v != nil {
22084				var tags map[string]*string
22085				err = json.Unmarshal(*v, &tags)
22086				if err != nil {
22087					return err
22088				}
22089				pls.Tags = tags
22090			}
22091		}
22092	}
22093
22094	return nil
22095}
22096
22097// PrivateLinkServiceConnection privateLinkServiceConnection resource.
22098type PrivateLinkServiceConnection struct {
22099	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
22100	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
22101	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22102	Name *string `json:"name,omitempty"`
22103	// Type - READ-ONLY; The resource type.
22104	Type *string `json:"type,omitempty"`
22105	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22106	Etag *string `json:"etag,omitempty"`
22107	// ID - Resource ID.
22108	ID *string `json:"id,omitempty"`
22109}
22110
22111// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
22112func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
22113	objectMap := make(map[string]interface{})
22114	if plsc.PrivateLinkServiceConnectionProperties != nil {
22115		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
22116	}
22117	if plsc.Name != nil {
22118		objectMap["name"] = plsc.Name
22119	}
22120	if plsc.ID != nil {
22121		objectMap["id"] = plsc.ID
22122	}
22123	return json.Marshal(objectMap)
22124}
22125
22126// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
22127func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
22128	var m map[string]*json.RawMessage
22129	err := json.Unmarshal(body, &m)
22130	if err != nil {
22131		return err
22132	}
22133	for k, v := range m {
22134		switch k {
22135		case "properties":
22136			if v != nil {
22137				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
22138				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
22139				if err != nil {
22140					return err
22141				}
22142				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
22143			}
22144		case "name":
22145			if v != nil {
22146				var name string
22147				err = json.Unmarshal(*v, &name)
22148				if err != nil {
22149					return err
22150				}
22151				plsc.Name = &name
22152			}
22153		case "type":
22154			if v != nil {
22155				var typeVar string
22156				err = json.Unmarshal(*v, &typeVar)
22157				if err != nil {
22158					return err
22159				}
22160				plsc.Type = &typeVar
22161			}
22162		case "etag":
22163			if v != nil {
22164				var etag string
22165				err = json.Unmarshal(*v, &etag)
22166				if err != nil {
22167					return err
22168				}
22169				plsc.Etag = &etag
22170			}
22171		case "id":
22172			if v != nil {
22173				var ID string
22174				err = json.Unmarshal(*v, &ID)
22175				if err != nil {
22176					return err
22177				}
22178				plsc.ID = &ID
22179			}
22180		}
22181	}
22182
22183	return nil
22184}
22185
22186// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
22187type PrivateLinkServiceConnectionProperties struct {
22188	// ProvisioningState - READ-ONLY; The provisioning state of the private link service connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22189	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22190	// PrivateLinkServiceID - The resource id of private link service.
22191	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
22192	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
22193	GroupIds *[]string `json:"groupIds,omitempty"`
22194	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
22195	RequestMessage *string `json:"requestMessage,omitempty"`
22196	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
22197	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
22198}
22199
22200// MarshalJSON is the custom marshaler for PrivateLinkServiceConnectionProperties.
22201func (plscp PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) {
22202	objectMap := make(map[string]interface{})
22203	if plscp.PrivateLinkServiceID != nil {
22204		objectMap["privateLinkServiceId"] = plscp.PrivateLinkServiceID
22205	}
22206	if plscp.GroupIds != nil {
22207		objectMap["groupIds"] = plscp.GroupIds
22208	}
22209	if plscp.RequestMessage != nil {
22210		objectMap["requestMessage"] = plscp.RequestMessage
22211	}
22212	if plscp.PrivateLinkServiceConnectionState != nil {
22213		objectMap["privateLinkServiceConnectionState"] = plscp.PrivateLinkServiceConnectionState
22214	}
22215	return json.Marshal(objectMap)
22216}
22217
22218// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
22219// service consumer and provider.
22220type PrivateLinkServiceConnectionState struct {
22221	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
22222	Status *string `json:"status,omitempty"`
22223	// Description - The reason for approval/rejection of the connection.
22224	Description *string `json:"description,omitempty"`
22225	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
22226	ActionsRequired *string `json:"actionsRequired,omitempty"`
22227}
22228
22229// PrivateLinkServiceIPConfiguration the private link service ip configuration.
22230type PrivateLinkServiceIPConfiguration struct {
22231	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
22232	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
22233	// Name - The name of private link service ip configuration.
22234	Name *string `json:"name,omitempty"`
22235	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22236	Etag *string `json:"etag,omitempty"`
22237	// Type - READ-ONLY; The resource type.
22238	Type *string `json:"type,omitempty"`
22239	// ID - Resource ID.
22240	ID *string `json:"id,omitempty"`
22241}
22242
22243// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
22244func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
22245	objectMap := make(map[string]interface{})
22246	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
22247		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
22248	}
22249	if plsic.Name != nil {
22250		objectMap["name"] = plsic.Name
22251	}
22252	if plsic.ID != nil {
22253		objectMap["id"] = plsic.ID
22254	}
22255	return json.Marshal(objectMap)
22256}
22257
22258// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
22259func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
22260	var m map[string]*json.RawMessage
22261	err := json.Unmarshal(body, &m)
22262	if err != nil {
22263		return err
22264	}
22265	for k, v := range m {
22266		switch k {
22267		case "properties":
22268			if v != nil {
22269				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
22270				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
22271				if err != nil {
22272					return err
22273				}
22274				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
22275			}
22276		case "name":
22277			if v != nil {
22278				var name string
22279				err = json.Unmarshal(*v, &name)
22280				if err != nil {
22281					return err
22282				}
22283				plsic.Name = &name
22284			}
22285		case "etag":
22286			if v != nil {
22287				var etag string
22288				err = json.Unmarshal(*v, &etag)
22289				if err != nil {
22290					return err
22291				}
22292				plsic.Etag = &etag
22293			}
22294		case "type":
22295			if v != nil {
22296				var typeVar string
22297				err = json.Unmarshal(*v, &typeVar)
22298				if err != nil {
22299					return err
22300				}
22301				plsic.Type = &typeVar
22302			}
22303		case "id":
22304			if v != nil {
22305				var ID string
22306				err = json.Unmarshal(*v, &ID)
22307				if err != nil {
22308					return err
22309				}
22310				plsic.ID = &ID
22311			}
22312		}
22313	}
22314
22315	return nil
22316}
22317
22318// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
22319type PrivateLinkServiceIPConfigurationProperties struct {
22320	// PrivateIPAddress - The private IP address of the IP configuration.
22321	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
22322	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
22323	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
22324	// Subnet - The reference of the subnet resource.
22325	Subnet *Subnet `json:"subnet,omitempty"`
22326	// Primary - Whether the ip configuration is primary or not.
22327	Primary *bool `json:"primary,omitempty"`
22328	// ProvisioningState - READ-ONLY; The provisioning state of the private link service ip configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22329	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22330	// 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 include: 'IPv4', 'IPv6'
22331	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
22332}
22333
22334// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfigurationProperties.
22335func (plsicp PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
22336	objectMap := make(map[string]interface{})
22337	if plsicp.PrivateIPAddress != nil {
22338		objectMap["privateIPAddress"] = plsicp.PrivateIPAddress
22339	}
22340	if plsicp.PrivateIPAllocationMethod != "" {
22341		objectMap["privateIPAllocationMethod"] = plsicp.PrivateIPAllocationMethod
22342	}
22343	if plsicp.Subnet != nil {
22344		objectMap["subnet"] = plsicp.Subnet
22345	}
22346	if plsicp.Primary != nil {
22347		objectMap["primary"] = plsicp.Primary
22348	}
22349	if plsicp.PrivateIPAddressVersion != "" {
22350		objectMap["privateIPAddressVersion"] = plsicp.PrivateIPAddressVersion
22351	}
22352	return json.Marshal(objectMap)
22353}
22354
22355// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
22356type PrivateLinkServiceListResult struct {
22357	autorest.Response `json:"-"`
22358	// Value - Gets a list of PrivateLinkService resources in a resource group.
22359	Value *[]PrivateLinkService `json:"value,omitempty"`
22360	// NextLink - READ-ONLY; The URL to get the next set of results.
22361	NextLink *string `json:"nextLink,omitempty"`
22362}
22363
22364// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
22365func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
22366	objectMap := make(map[string]interface{})
22367	if plslr.Value != nil {
22368		objectMap["value"] = plslr.Value
22369	}
22370	return json.Marshal(objectMap)
22371}
22372
22373// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
22374type PrivateLinkServiceListResultIterator struct {
22375	i    int
22376	page PrivateLinkServiceListResultPage
22377}
22378
22379// NextWithContext advances to the next value.  If there was an error making
22380// the request the iterator does not advance and the error is returned.
22381func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
22382	if tracing.IsEnabled() {
22383		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
22384		defer func() {
22385			sc := -1
22386			if iter.Response().Response.Response != nil {
22387				sc = iter.Response().Response.Response.StatusCode
22388			}
22389			tracing.EndSpan(ctx, sc, err)
22390		}()
22391	}
22392	iter.i++
22393	if iter.i < len(iter.page.Values()) {
22394		return nil
22395	}
22396	err = iter.page.NextWithContext(ctx)
22397	if err != nil {
22398		iter.i--
22399		return err
22400	}
22401	iter.i = 0
22402	return nil
22403}
22404
22405// Next advances to the next value.  If there was an error making
22406// the request the iterator does not advance and the error is returned.
22407// Deprecated: Use NextWithContext() instead.
22408func (iter *PrivateLinkServiceListResultIterator) Next() error {
22409	return iter.NextWithContext(context.Background())
22410}
22411
22412// NotDone returns true if the enumeration should be started or is not yet complete.
22413func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
22414	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22415}
22416
22417// Response returns the raw server response from the last page request.
22418func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
22419	return iter.page.Response()
22420}
22421
22422// Value returns the current value or a zero-initialized value if the
22423// iterator has advanced beyond the end of the collection.
22424func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
22425	if !iter.page.NotDone() {
22426		return PrivateLinkService{}
22427	}
22428	return iter.page.Values()[iter.i]
22429}
22430
22431// Creates a new instance of the PrivateLinkServiceListResultIterator type.
22432func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
22433	return PrivateLinkServiceListResultIterator{page: page}
22434}
22435
22436// IsEmpty returns true if the ListResult contains no values.
22437func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
22438	return plslr.Value == nil || len(*plslr.Value) == 0
22439}
22440
22441// hasNextLink returns true if the NextLink is not empty.
22442func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
22443	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
22444}
22445
22446// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
22447// It returns nil if no more results exist.
22448func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
22449	if !plslr.hasNextLink() {
22450		return nil, nil
22451	}
22452	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22453		autorest.AsJSON(),
22454		autorest.AsGet(),
22455		autorest.WithBaseURL(to.String(plslr.NextLink)))
22456}
22457
22458// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
22459type PrivateLinkServiceListResultPage struct {
22460	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
22461	plslr PrivateLinkServiceListResult
22462}
22463
22464// NextWithContext advances to the next page of values.  If there was an error making
22465// the request the page does not advance and the error is returned.
22466func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
22467	if tracing.IsEnabled() {
22468		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
22469		defer func() {
22470			sc := -1
22471			if page.Response().Response.Response != nil {
22472				sc = page.Response().Response.Response.StatusCode
22473			}
22474			tracing.EndSpan(ctx, sc, err)
22475		}()
22476	}
22477	for {
22478		next, err := page.fn(ctx, page.plslr)
22479		if err != nil {
22480			return err
22481		}
22482		page.plslr = next
22483		if !next.hasNextLink() || !next.IsEmpty() {
22484			break
22485		}
22486	}
22487	return nil
22488}
22489
22490// Next advances to the next page of values.  If there was an error making
22491// the request the page does not advance and the error is returned.
22492// Deprecated: Use NextWithContext() instead.
22493func (page *PrivateLinkServiceListResultPage) Next() error {
22494	return page.NextWithContext(context.Background())
22495}
22496
22497// NotDone returns true if the page enumeration should be started or is not yet complete.
22498func (page PrivateLinkServiceListResultPage) NotDone() bool {
22499	return !page.plslr.IsEmpty()
22500}
22501
22502// Response returns the raw server response from the last page request.
22503func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
22504	return page.plslr
22505}
22506
22507// Values returns the slice of values for the current page or nil if there are no values.
22508func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
22509	if page.plslr.IsEmpty() {
22510		return nil
22511	}
22512	return *page.plslr.Value
22513}
22514
22515// Creates a new instance of the PrivateLinkServiceListResultPage type.
22516func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
22517	return PrivateLinkServiceListResultPage{
22518		fn:    getNextPage,
22519		plslr: cur,
22520	}
22521}
22522
22523// PrivateLinkServiceProperties properties of the private link service.
22524type PrivateLinkServiceProperties struct {
22525	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
22526	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
22527	// IPConfigurations - An array of references to the private link service IP configuration.
22528	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
22529	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private link service.
22530	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
22531	// ProvisioningState - READ-ONLY; The provisioning state of the private link service. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22532	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22533	// PrivateEndpointConnections - An array of list about connections to the private endpoint.
22534	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
22535	// Visibility - The visibility list of the private link service.
22536	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
22537	// AutoApproval - The auto-approval list of the private link service.
22538	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
22539	// Fqdns - The list of Fqdn.
22540	Fqdns *[]string `json:"fqdns,omitempty"`
22541	// Alias - READ-ONLY; The alias of the private link service.
22542	Alias *string `json:"alias,omitempty"`
22543}
22544
22545// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
22546func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
22547	objectMap := make(map[string]interface{})
22548	if plsp.LoadBalancerFrontendIPConfigurations != nil {
22549		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
22550	}
22551	if plsp.IPConfigurations != nil {
22552		objectMap["ipConfigurations"] = plsp.IPConfigurations
22553	}
22554	if plsp.PrivateEndpointConnections != nil {
22555		objectMap["privateEndpointConnections"] = plsp.PrivateEndpointConnections
22556	}
22557	if plsp.Visibility != nil {
22558		objectMap["visibility"] = plsp.Visibility
22559	}
22560	if plsp.AutoApproval != nil {
22561		objectMap["autoApproval"] = plsp.AutoApproval
22562	}
22563	if plsp.Fqdns != nil {
22564		objectMap["fqdns"] = plsp.Fqdns
22565	}
22566	return json.Marshal(objectMap)
22567}
22568
22569// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
22570type PrivateLinkServicePropertiesAutoApproval struct {
22571	// Subscriptions - The list of subscriptions.
22572	Subscriptions *[]string `json:"subscriptions,omitempty"`
22573}
22574
22575// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
22576type PrivateLinkServicePropertiesVisibility struct {
22577	// Subscriptions - The list of subscriptions.
22578	Subscriptions *[]string `json:"subscriptions,omitempty"`
22579}
22580
22581// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
22582// and retrieving the results of a long-running operation.
22583type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
22584	azure.FutureAPI
22585	// Result returns the result of the asynchronous operation.
22586	// If the operation has not completed it will return an error.
22587	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
22588}
22589
22590// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22591func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) UnmarshalJSON(body []byte) error {
22592	var azFuture azure.Future
22593	if err := json.Unmarshal(body, &azFuture); err != nil {
22594		return err
22595	}
22596	future.FutureAPI = &azFuture
22597	future.Result = future.result
22598	return nil
22599}
22600
22601// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture.Result.
22602func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
22603	var done bool
22604	done, err = future.DoneWithContext(context.Background(), client)
22605	if err != nil {
22606		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", future.Response(), "Polling failure")
22607		return
22608	}
22609	if !done {
22610		plsv.Response.Response = future.Response()
22611		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture")
22612		return
22613	}
22614	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22615	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
22616		plsv, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(plsv.Response.Response)
22617		if err != nil {
22618			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture", "Result", plsv.Response.Response, "Failure responding to request")
22619		}
22620	}
22621	return
22622}
22623
22624// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
22625// the results of a long-running operation.
22626type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
22627	azure.FutureAPI
22628	// Result returns the result of the asynchronous operation.
22629	// If the operation has not completed it will return an error.
22630	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
22631}
22632
22633// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22634func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) UnmarshalJSON(body []byte) error {
22635	var azFuture azure.Future
22636	if err := json.Unmarshal(body, &azFuture); err != nil {
22637		return err
22638	}
22639	future.FutureAPI = &azFuture
22640	future.Result = future.result
22641	return nil
22642}
22643
22644// result is the default implementation for PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture.Result.
22645func (future *PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture) result(client PrivateLinkServicesClient) (plsv PrivateLinkServiceVisibility, err error) {
22646	var done bool
22647	done, err = future.DoneWithContext(context.Background(), client)
22648	if err != nil {
22649		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", future.Response(), "Polling failure")
22650		return
22651	}
22652	if !done {
22653		plsv.Response.Response = future.Response()
22654		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture")
22655		return
22656	}
22657	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22658	if plsv.Response.Response, err = future.GetResult(sender); err == nil && plsv.Response.Response.StatusCode != http.StatusNoContent {
22659		plsv, err = client.CheckPrivateLinkServiceVisibilityResponder(plsv.Response.Response)
22660		if err != nil {
22661			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture", "Result", plsv.Response.Response, "Failure responding to request")
22662		}
22663	}
22664	return
22665}
22666
22667// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22668// long-running operation.
22669type PrivateLinkServicesCreateOrUpdateFuture struct {
22670	azure.FutureAPI
22671	// Result returns the result of the asynchronous operation.
22672	// If the operation has not completed it will return an error.
22673	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
22674}
22675
22676// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22677func (future *PrivateLinkServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22678	var azFuture azure.Future
22679	if err := json.Unmarshal(body, &azFuture); err != nil {
22680		return err
22681	}
22682	future.FutureAPI = &azFuture
22683	future.Result = future.result
22684	return nil
22685}
22686
22687// result is the default implementation for PrivateLinkServicesCreateOrUpdateFuture.Result.
22688func (future *PrivateLinkServicesCreateOrUpdateFuture) result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) {
22689	var done bool
22690	done, err = future.DoneWithContext(context.Background(), client)
22691	if err != nil {
22692		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22693		return
22694	}
22695	if !done {
22696		pls.Response.Response = future.Response()
22697		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture")
22698		return
22699	}
22700	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22701	if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent {
22702		pls, err = client.CreateOrUpdateResponder(pls.Response.Response)
22703		if err != nil {
22704			err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request")
22705		}
22706	}
22707	return
22708}
22709
22710// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
22711// long-running operation.
22712type PrivateLinkServicesDeleteFuture struct {
22713	azure.FutureAPI
22714	// Result returns the result of the asynchronous operation.
22715	// If the operation has not completed it will return an error.
22716	Result func(PrivateLinkServicesClient) (autorest.Response, error)
22717}
22718
22719// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22720func (future *PrivateLinkServicesDeleteFuture) UnmarshalJSON(body []byte) error {
22721	var azFuture azure.Future
22722	if err := json.Unmarshal(body, &azFuture); err != nil {
22723		return err
22724	}
22725	future.FutureAPI = &azFuture
22726	future.Result = future.result
22727	return nil
22728}
22729
22730// result is the default implementation for PrivateLinkServicesDeleteFuture.Result.
22731func (future *PrivateLinkServicesDeleteFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
22732	var done bool
22733	done, err = future.DoneWithContext(context.Background(), client)
22734	if err != nil {
22735		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure")
22736		return
22737	}
22738	if !done {
22739		ar.Response = future.Response()
22740		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture")
22741		return
22742	}
22743	ar.Response = future.Response()
22744	return
22745}
22746
22747// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
22748// the results of a long-running operation.
22749type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
22750	azure.FutureAPI
22751	// Result returns the result of the asynchronous operation.
22752	// If the operation has not completed it will return an error.
22753	Result func(PrivateLinkServicesClient) (autorest.Response, error)
22754}
22755
22756// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22757func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
22758	var azFuture azure.Future
22759	if err := json.Unmarshal(body, &azFuture); err != nil {
22760		return err
22761	}
22762	future.FutureAPI = &azFuture
22763	future.Result = future.result
22764	return nil
22765}
22766
22767// result is the default implementation for PrivateLinkServicesDeletePrivateEndpointConnectionFuture.Result.
22768func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) result(client PrivateLinkServicesClient) (ar autorest.Response, err error) {
22769	var done bool
22770	done, err = future.DoneWithContext(context.Background(), client)
22771	if err != nil {
22772		err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
22773		return
22774	}
22775	if !done {
22776		ar.Response = future.Response()
22777		err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture")
22778		return
22779	}
22780	ar.Response = future.Response()
22781	return
22782}
22783
22784// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
22785type PrivateLinkServiceVisibility struct {
22786	autorest.Response `json:"-"`
22787	// Visible - Private Link Service Visibility (True/False).
22788	Visible *bool `json:"visible,omitempty"`
22789}
22790
22791// Probe a load balancer probe.
22792type Probe struct {
22793	autorest.Response `json:"-"`
22794	// ProbePropertiesFormat - Properties of load balancer probe.
22795	*ProbePropertiesFormat `json:"properties,omitempty"`
22796	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
22797	Name *string `json:"name,omitempty"`
22798	// Etag - A unique read-only string that changes whenever the resource is updated.
22799	Etag *string `json:"etag,omitempty"`
22800	// ID - Resource ID.
22801	ID *string `json:"id,omitempty"`
22802}
22803
22804// MarshalJSON is the custom marshaler for Probe.
22805func (p Probe) MarshalJSON() ([]byte, error) {
22806	objectMap := make(map[string]interface{})
22807	if p.ProbePropertiesFormat != nil {
22808		objectMap["properties"] = p.ProbePropertiesFormat
22809	}
22810	if p.Name != nil {
22811		objectMap["name"] = p.Name
22812	}
22813	if p.Etag != nil {
22814		objectMap["etag"] = p.Etag
22815	}
22816	if p.ID != nil {
22817		objectMap["id"] = p.ID
22818	}
22819	return json.Marshal(objectMap)
22820}
22821
22822// UnmarshalJSON is the custom unmarshaler for Probe struct.
22823func (p *Probe) UnmarshalJSON(body []byte) error {
22824	var m map[string]*json.RawMessage
22825	err := json.Unmarshal(body, &m)
22826	if err != nil {
22827		return err
22828	}
22829	for k, v := range m {
22830		switch k {
22831		case "properties":
22832			if v != nil {
22833				var probePropertiesFormat ProbePropertiesFormat
22834				err = json.Unmarshal(*v, &probePropertiesFormat)
22835				if err != nil {
22836					return err
22837				}
22838				p.ProbePropertiesFormat = &probePropertiesFormat
22839			}
22840		case "name":
22841			if v != nil {
22842				var name string
22843				err = json.Unmarshal(*v, &name)
22844				if err != nil {
22845					return err
22846				}
22847				p.Name = &name
22848			}
22849		case "etag":
22850			if v != nil {
22851				var etag string
22852				err = json.Unmarshal(*v, &etag)
22853				if err != nil {
22854					return err
22855				}
22856				p.Etag = &etag
22857			}
22858		case "id":
22859			if v != nil {
22860				var ID string
22861				err = json.Unmarshal(*v, &ID)
22862				if err != nil {
22863					return err
22864				}
22865				p.ID = &ID
22866			}
22867		}
22868	}
22869
22870	return nil
22871}
22872
22873// ProbePropertiesFormat load balancer probe resource.
22874type ProbePropertiesFormat struct {
22875	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
22876	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
22877	// Protocol - The protocol of the end point. 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'
22878	Protocol ProbeProtocol `json:"protocol,omitempty"`
22879	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
22880	Port *int32 `json:"port,omitempty"`
22881	// 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.
22882	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
22883	// 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.
22884	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
22885	// 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.
22886	RequestPath *string `json:"requestPath,omitempty"`
22887	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22888	ProvisioningState *string `json:"provisioningState,omitempty"`
22889}
22890
22891// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
22892func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
22893	objectMap := make(map[string]interface{})
22894	if ppf.Protocol != "" {
22895		objectMap["protocol"] = ppf.Protocol
22896	}
22897	if ppf.Port != nil {
22898		objectMap["port"] = ppf.Port
22899	}
22900	if ppf.IntervalInSeconds != nil {
22901		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
22902	}
22903	if ppf.NumberOfProbes != nil {
22904		objectMap["numberOfProbes"] = ppf.NumberOfProbes
22905	}
22906	if ppf.RequestPath != nil {
22907		objectMap["requestPath"] = ppf.RequestPath
22908	}
22909	if ppf.ProvisioningState != nil {
22910		objectMap["provisioningState"] = ppf.ProvisioningState
22911	}
22912	return json.Marshal(objectMap)
22913}
22914
22915// Profile network profile resource.
22916type Profile struct {
22917	autorest.Response `json:"-"`
22918	// ProfilePropertiesFormat - Network profile properties.
22919	*ProfilePropertiesFormat `json:"properties,omitempty"`
22920	// Etag - A unique read-only string that changes whenever the resource is updated.
22921	Etag *string `json:"etag,omitempty"`
22922	// ID - Resource ID.
22923	ID *string `json:"id,omitempty"`
22924	// Name - READ-ONLY; Resource name.
22925	Name *string `json:"name,omitempty"`
22926	// Type - READ-ONLY; Resource type.
22927	Type *string `json:"type,omitempty"`
22928	// Location - Resource location.
22929	Location *string `json:"location,omitempty"`
22930	// Tags - Resource tags.
22931	Tags map[string]*string `json:"tags"`
22932}
22933
22934// MarshalJSON is the custom marshaler for Profile.
22935func (p Profile) MarshalJSON() ([]byte, error) {
22936	objectMap := make(map[string]interface{})
22937	if p.ProfilePropertiesFormat != nil {
22938		objectMap["properties"] = p.ProfilePropertiesFormat
22939	}
22940	if p.Etag != nil {
22941		objectMap["etag"] = p.Etag
22942	}
22943	if p.ID != nil {
22944		objectMap["id"] = p.ID
22945	}
22946	if p.Location != nil {
22947		objectMap["location"] = p.Location
22948	}
22949	if p.Tags != nil {
22950		objectMap["tags"] = p.Tags
22951	}
22952	return json.Marshal(objectMap)
22953}
22954
22955// UnmarshalJSON is the custom unmarshaler for Profile struct.
22956func (p *Profile) UnmarshalJSON(body []byte) error {
22957	var m map[string]*json.RawMessage
22958	err := json.Unmarshal(body, &m)
22959	if err != nil {
22960		return err
22961	}
22962	for k, v := range m {
22963		switch k {
22964		case "properties":
22965			if v != nil {
22966				var profilePropertiesFormat ProfilePropertiesFormat
22967				err = json.Unmarshal(*v, &profilePropertiesFormat)
22968				if err != nil {
22969					return err
22970				}
22971				p.ProfilePropertiesFormat = &profilePropertiesFormat
22972			}
22973		case "etag":
22974			if v != nil {
22975				var etag string
22976				err = json.Unmarshal(*v, &etag)
22977				if err != nil {
22978					return err
22979				}
22980				p.Etag = &etag
22981			}
22982		case "id":
22983			if v != nil {
22984				var ID string
22985				err = json.Unmarshal(*v, &ID)
22986				if err != nil {
22987					return err
22988				}
22989				p.ID = &ID
22990			}
22991		case "name":
22992			if v != nil {
22993				var name string
22994				err = json.Unmarshal(*v, &name)
22995				if err != nil {
22996					return err
22997				}
22998				p.Name = &name
22999			}
23000		case "type":
23001			if v != nil {
23002				var typeVar string
23003				err = json.Unmarshal(*v, &typeVar)
23004				if err != nil {
23005					return err
23006				}
23007				p.Type = &typeVar
23008			}
23009		case "location":
23010			if v != nil {
23011				var location string
23012				err = json.Unmarshal(*v, &location)
23013				if err != nil {
23014					return err
23015				}
23016				p.Location = &location
23017			}
23018		case "tags":
23019			if v != nil {
23020				var tags map[string]*string
23021				err = json.Unmarshal(*v, &tags)
23022				if err != nil {
23023					return err
23024				}
23025				p.Tags = tags
23026			}
23027		}
23028	}
23029
23030	return nil
23031}
23032
23033// ProfileListResult response for ListNetworkProfiles API service call.
23034type ProfileListResult struct {
23035	autorest.Response `json:"-"`
23036	// Value - A list of network profiles that exist in a resource group.
23037	Value *[]Profile `json:"value,omitempty"`
23038	// NextLink - The URL to get the next set of results.
23039	NextLink *string `json:"nextLink,omitempty"`
23040}
23041
23042// ProfileListResultIterator provides access to a complete listing of Profile values.
23043type ProfileListResultIterator struct {
23044	i    int
23045	page ProfileListResultPage
23046}
23047
23048// NextWithContext advances to the next value.  If there was an error making
23049// the request the iterator does not advance and the error is returned.
23050func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
23051	if tracing.IsEnabled() {
23052		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
23053		defer func() {
23054			sc := -1
23055			if iter.Response().Response.Response != nil {
23056				sc = iter.Response().Response.Response.StatusCode
23057			}
23058			tracing.EndSpan(ctx, sc, err)
23059		}()
23060	}
23061	iter.i++
23062	if iter.i < len(iter.page.Values()) {
23063		return nil
23064	}
23065	err = iter.page.NextWithContext(ctx)
23066	if err != nil {
23067		iter.i--
23068		return err
23069	}
23070	iter.i = 0
23071	return nil
23072}
23073
23074// Next advances to the next value.  If there was an error making
23075// the request the iterator does not advance and the error is returned.
23076// Deprecated: Use NextWithContext() instead.
23077func (iter *ProfileListResultIterator) Next() error {
23078	return iter.NextWithContext(context.Background())
23079}
23080
23081// NotDone returns true if the enumeration should be started or is not yet complete.
23082func (iter ProfileListResultIterator) NotDone() bool {
23083	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23084}
23085
23086// Response returns the raw server response from the last page request.
23087func (iter ProfileListResultIterator) Response() ProfileListResult {
23088	return iter.page.Response()
23089}
23090
23091// Value returns the current value or a zero-initialized value if the
23092// iterator has advanced beyond the end of the collection.
23093func (iter ProfileListResultIterator) Value() Profile {
23094	if !iter.page.NotDone() {
23095		return Profile{}
23096	}
23097	return iter.page.Values()[iter.i]
23098}
23099
23100// Creates a new instance of the ProfileListResultIterator type.
23101func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
23102	return ProfileListResultIterator{page: page}
23103}
23104
23105// IsEmpty returns true if the ListResult contains no values.
23106func (plr ProfileListResult) IsEmpty() bool {
23107	return plr.Value == nil || len(*plr.Value) == 0
23108}
23109
23110// hasNextLink returns true if the NextLink is not empty.
23111func (plr ProfileListResult) hasNextLink() bool {
23112	return plr.NextLink != nil && len(*plr.NextLink) != 0
23113}
23114
23115// profileListResultPreparer prepares a request to retrieve the next set of results.
23116// It returns nil if no more results exist.
23117func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
23118	if !plr.hasNextLink() {
23119		return nil, nil
23120	}
23121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23122		autorest.AsJSON(),
23123		autorest.AsGet(),
23124		autorest.WithBaseURL(to.String(plr.NextLink)))
23125}
23126
23127// ProfileListResultPage contains a page of Profile values.
23128type ProfileListResultPage struct {
23129	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
23130	plr ProfileListResult
23131}
23132
23133// NextWithContext advances to the next page of values.  If there was an error making
23134// the request the page does not advance and the error is returned.
23135func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
23136	if tracing.IsEnabled() {
23137		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
23138		defer func() {
23139			sc := -1
23140			if page.Response().Response.Response != nil {
23141				sc = page.Response().Response.Response.StatusCode
23142			}
23143			tracing.EndSpan(ctx, sc, err)
23144		}()
23145	}
23146	for {
23147		next, err := page.fn(ctx, page.plr)
23148		if err != nil {
23149			return err
23150		}
23151		page.plr = next
23152		if !next.hasNextLink() || !next.IsEmpty() {
23153			break
23154		}
23155	}
23156	return nil
23157}
23158
23159// Next advances to the next page of values.  If there was an error making
23160// the request the page does not advance and the error is returned.
23161// Deprecated: Use NextWithContext() instead.
23162func (page *ProfileListResultPage) Next() error {
23163	return page.NextWithContext(context.Background())
23164}
23165
23166// NotDone returns true if the page enumeration should be started or is not yet complete.
23167func (page ProfileListResultPage) NotDone() bool {
23168	return !page.plr.IsEmpty()
23169}
23170
23171// Response returns the raw server response from the last page request.
23172func (page ProfileListResultPage) Response() ProfileListResult {
23173	return page.plr
23174}
23175
23176// Values returns the slice of values for the current page or nil if there are no values.
23177func (page ProfileListResultPage) Values() []Profile {
23178	if page.plr.IsEmpty() {
23179		return nil
23180	}
23181	return *page.plr.Value
23182}
23183
23184// Creates a new instance of the ProfileListResultPage type.
23185func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
23186	return ProfileListResultPage{
23187		fn:  getNextPage,
23188		plr: cur,
23189	}
23190}
23191
23192// ProfilePropertiesFormat network profile properties.
23193type ProfilePropertiesFormat struct {
23194	// ContainerNetworkInterfaces - List of child container network interfaces.
23195	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
23196	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
23197	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
23198	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
23199	ResourceGUID *string `json:"resourceGuid,omitempty"`
23200	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
23201	ProvisioningState *string `json:"provisioningState,omitempty"`
23202}
23203
23204// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
23205func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
23206	objectMap := make(map[string]interface{})
23207	if ppf.ContainerNetworkInterfaces != nil {
23208		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
23209	}
23210	if ppf.ContainerNetworkInterfaceConfigurations != nil {
23211		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
23212	}
23213	return json.Marshal(objectMap)
23214}
23215
23216// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23217// operation.
23218type ProfilesDeleteFuture struct {
23219	azure.FutureAPI
23220	// Result returns the result of the asynchronous operation.
23221	// If the operation has not completed it will return an error.
23222	Result func(ProfilesClient) (autorest.Response, error)
23223}
23224
23225// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23226func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
23227	var azFuture azure.Future
23228	if err := json.Unmarshal(body, &azFuture); err != nil {
23229		return err
23230	}
23231	future.FutureAPI = &azFuture
23232	future.Result = future.result
23233	return nil
23234}
23235
23236// result is the default implementation for ProfilesDeleteFuture.Result.
23237func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
23238	var done bool
23239	done, err = future.DoneWithContext(context.Background(), client)
23240	if err != nil {
23241		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
23242		return
23243	}
23244	if !done {
23245		ar.Response = future.Response()
23246		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
23247		return
23248	}
23249	ar.Response = future.Response()
23250	return
23251}
23252
23253// ProtocolConfiguration configuration of the protocol.
23254type ProtocolConfiguration struct {
23255	// HTTPConfiguration - HTTP configuration of the connectivity check.
23256	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
23257}
23258
23259// ProtocolCustomSettingsFormat dDoS custom policy properties.
23260type ProtocolCustomSettingsFormat struct {
23261	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
23262	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
23263	// TriggerRateOverride - The customized DDoS protection trigger rate.
23264	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
23265	// SourceRateOverride - The customized DDoS protection source rate.
23266	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
23267	// TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'
23268	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
23269}
23270
23271// PublicIPAddress public IP address resource.
23272type PublicIPAddress struct {
23273	autorest.Response `json:"-"`
23274	// Sku - The public IP address SKU.
23275	Sku *PublicIPAddressSku `json:"sku,omitempty"`
23276	// PublicIPAddressPropertiesFormat - Public IP address properties.
23277	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
23278	// Etag - A unique read-only string that changes whenever the resource is updated.
23279	Etag *string `json:"etag,omitempty"`
23280	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
23281	Zones *[]string `json:"zones,omitempty"`
23282	// ID - Resource ID.
23283	ID *string `json:"id,omitempty"`
23284	// Name - READ-ONLY; Resource name.
23285	Name *string `json:"name,omitempty"`
23286	// Type - READ-ONLY; Resource type.
23287	Type *string `json:"type,omitempty"`
23288	// Location - Resource location.
23289	Location *string `json:"location,omitempty"`
23290	// Tags - Resource tags.
23291	Tags map[string]*string `json:"tags"`
23292}
23293
23294// MarshalJSON is the custom marshaler for PublicIPAddress.
23295func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
23296	objectMap := make(map[string]interface{})
23297	if pia.Sku != nil {
23298		objectMap["sku"] = pia.Sku
23299	}
23300	if pia.PublicIPAddressPropertiesFormat != nil {
23301		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
23302	}
23303	if pia.Etag != nil {
23304		objectMap["etag"] = pia.Etag
23305	}
23306	if pia.Zones != nil {
23307		objectMap["zones"] = pia.Zones
23308	}
23309	if pia.ID != nil {
23310		objectMap["id"] = pia.ID
23311	}
23312	if pia.Location != nil {
23313		objectMap["location"] = pia.Location
23314	}
23315	if pia.Tags != nil {
23316		objectMap["tags"] = pia.Tags
23317	}
23318	return json.Marshal(objectMap)
23319}
23320
23321// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
23322func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
23323	var m map[string]*json.RawMessage
23324	err := json.Unmarshal(body, &m)
23325	if err != nil {
23326		return err
23327	}
23328	for k, v := range m {
23329		switch k {
23330		case "sku":
23331			if v != nil {
23332				var sku PublicIPAddressSku
23333				err = json.Unmarshal(*v, &sku)
23334				if err != nil {
23335					return err
23336				}
23337				pia.Sku = &sku
23338			}
23339		case "properties":
23340			if v != nil {
23341				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
23342				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
23343				if err != nil {
23344					return err
23345				}
23346				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
23347			}
23348		case "etag":
23349			if v != nil {
23350				var etag string
23351				err = json.Unmarshal(*v, &etag)
23352				if err != nil {
23353					return err
23354				}
23355				pia.Etag = &etag
23356			}
23357		case "zones":
23358			if v != nil {
23359				var zones []string
23360				err = json.Unmarshal(*v, &zones)
23361				if err != nil {
23362					return err
23363				}
23364				pia.Zones = &zones
23365			}
23366		case "id":
23367			if v != nil {
23368				var ID string
23369				err = json.Unmarshal(*v, &ID)
23370				if err != nil {
23371					return err
23372				}
23373				pia.ID = &ID
23374			}
23375		case "name":
23376			if v != nil {
23377				var name string
23378				err = json.Unmarshal(*v, &name)
23379				if err != nil {
23380					return err
23381				}
23382				pia.Name = &name
23383			}
23384		case "type":
23385			if v != nil {
23386				var typeVar string
23387				err = json.Unmarshal(*v, &typeVar)
23388				if err != nil {
23389					return err
23390				}
23391				pia.Type = &typeVar
23392			}
23393		case "location":
23394			if v != nil {
23395				var location string
23396				err = json.Unmarshal(*v, &location)
23397				if err != nil {
23398					return err
23399				}
23400				pia.Location = &location
23401			}
23402		case "tags":
23403			if v != nil {
23404				var tags map[string]*string
23405				err = json.Unmarshal(*v, &tags)
23406				if err != nil {
23407					return err
23408				}
23409				pia.Tags = tags
23410			}
23411		}
23412	}
23413
23414	return nil
23415}
23416
23417// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
23418type PublicIPAddressDNSSettings struct {
23419	// 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.
23420	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
23421	// 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.
23422	Fqdn *string `json:"fqdn,omitempty"`
23423	// 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.
23424	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
23425}
23426
23427// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23428// long-running operation.
23429type PublicIPAddressesCreateOrUpdateFuture struct {
23430	azure.FutureAPI
23431	// Result returns the result of the asynchronous operation.
23432	// If the operation has not completed it will return an error.
23433	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
23434}
23435
23436// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23437func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23438	var azFuture azure.Future
23439	if err := json.Unmarshal(body, &azFuture); err != nil {
23440		return err
23441	}
23442	future.FutureAPI = &azFuture
23443	future.Result = future.result
23444	return nil
23445}
23446
23447// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
23448func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
23449	var done bool
23450	done, err = future.DoneWithContext(context.Background(), client)
23451	if err != nil {
23452		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23453		return
23454	}
23455	if !done {
23456		pia.Response.Response = future.Response()
23457		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
23458		return
23459	}
23460	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23461	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
23462		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
23463		if err != nil {
23464			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
23465		}
23466	}
23467	return
23468}
23469
23470// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23471// operation.
23472type PublicIPAddressesDeleteFuture struct {
23473	azure.FutureAPI
23474	// Result returns the result of the asynchronous operation.
23475	// If the operation has not completed it will return an error.
23476	Result func(PublicIPAddressesClient) (autorest.Response, error)
23477}
23478
23479// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23480func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
23481	var azFuture azure.Future
23482	if err := json.Unmarshal(body, &azFuture); err != nil {
23483		return err
23484	}
23485	future.FutureAPI = &azFuture
23486	future.Result = future.result
23487	return nil
23488}
23489
23490// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
23491func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
23492	var done bool
23493	done, err = future.DoneWithContext(context.Background(), client)
23494	if err != nil {
23495		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
23496		return
23497	}
23498	if !done {
23499		ar.Response = future.Response()
23500		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
23501		return
23502	}
23503	ar.Response = future.Response()
23504	return
23505}
23506
23507// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
23508// long-running operation.
23509type PublicIPAddressesUpdateTagsFuture struct {
23510	azure.FutureAPI
23511	// Result returns the result of the asynchronous operation.
23512	// If the operation has not completed it will return an error.
23513	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
23514}
23515
23516// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23517func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23518	var azFuture azure.Future
23519	if err := json.Unmarshal(body, &azFuture); err != nil {
23520		return err
23521	}
23522	future.FutureAPI = &azFuture
23523	future.Result = future.result
23524	return nil
23525}
23526
23527// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
23528func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
23529	var done bool
23530	done, err = future.DoneWithContext(context.Background(), client)
23531	if err != nil {
23532		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23533		return
23534	}
23535	if !done {
23536		pia.Response.Response = future.Response()
23537		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
23538		return
23539	}
23540	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23541	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
23542		pia, err = client.UpdateTagsResponder(pia.Response.Response)
23543		if err != nil {
23544			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
23545		}
23546	}
23547	return
23548}
23549
23550// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
23551type PublicIPAddressListResult struct {
23552	autorest.Response `json:"-"`
23553	// Value - A list of public IP addresses that exists in a resource group.
23554	Value *[]PublicIPAddress `json:"value,omitempty"`
23555	// NextLink - The URL to get the next set of results.
23556	NextLink *string `json:"nextLink,omitempty"`
23557}
23558
23559// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
23560type PublicIPAddressListResultIterator struct {
23561	i    int
23562	page PublicIPAddressListResultPage
23563}
23564
23565// NextWithContext advances to the next value.  If there was an error making
23566// the request the iterator does not advance and the error is returned.
23567func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
23568	if tracing.IsEnabled() {
23569		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
23570		defer func() {
23571			sc := -1
23572			if iter.Response().Response.Response != nil {
23573				sc = iter.Response().Response.Response.StatusCode
23574			}
23575			tracing.EndSpan(ctx, sc, err)
23576		}()
23577	}
23578	iter.i++
23579	if iter.i < len(iter.page.Values()) {
23580		return nil
23581	}
23582	err = iter.page.NextWithContext(ctx)
23583	if err != nil {
23584		iter.i--
23585		return err
23586	}
23587	iter.i = 0
23588	return nil
23589}
23590
23591// Next advances to the next value.  If there was an error making
23592// the request the iterator does not advance and the error is returned.
23593// Deprecated: Use NextWithContext() instead.
23594func (iter *PublicIPAddressListResultIterator) Next() error {
23595	return iter.NextWithContext(context.Background())
23596}
23597
23598// NotDone returns true if the enumeration should be started or is not yet complete.
23599func (iter PublicIPAddressListResultIterator) NotDone() bool {
23600	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23601}
23602
23603// Response returns the raw server response from the last page request.
23604func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
23605	return iter.page.Response()
23606}
23607
23608// Value returns the current value or a zero-initialized value if the
23609// iterator has advanced beyond the end of the collection.
23610func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
23611	if !iter.page.NotDone() {
23612		return PublicIPAddress{}
23613	}
23614	return iter.page.Values()[iter.i]
23615}
23616
23617// Creates a new instance of the PublicIPAddressListResultIterator type.
23618func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
23619	return PublicIPAddressListResultIterator{page: page}
23620}
23621
23622// IsEmpty returns true if the ListResult contains no values.
23623func (pialr PublicIPAddressListResult) IsEmpty() bool {
23624	return pialr.Value == nil || len(*pialr.Value) == 0
23625}
23626
23627// hasNextLink returns true if the NextLink is not empty.
23628func (pialr PublicIPAddressListResult) hasNextLink() bool {
23629	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
23630}
23631
23632// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
23633// It returns nil if no more results exist.
23634func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
23635	if !pialr.hasNextLink() {
23636		return nil, nil
23637	}
23638	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23639		autorest.AsJSON(),
23640		autorest.AsGet(),
23641		autorest.WithBaseURL(to.String(pialr.NextLink)))
23642}
23643
23644// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
23645type PublicIPAddressListResultPage struct {
23646	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
23647	pialr PublicIPAddressListResult
23648}
23649
23650// NextWithContext advances to the next page of values.  If there was an error making
23651// the request the page does not advance and the error is returned.
23652func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
23653	if tracing.IsEnabled() {
23654		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
23655		defer func() {
23656			sc := -1
23657			if page.Response().Response.Response != nil {
23658				sc = page.Response().Response.Response.StatusCode
23659			}
23660			tracing.EndSpan(ctx, sc, err)
23661		}()
23662	}
23663	for {
23664		next, err := page.fn(ctx, page.pialr)
23665		if err != nil {
23666			return err
23667		}
23668		page.pialr = next
23669		if !next.hasNextLink() || !next.IsEmpty() {
23670			break
23671		}
23672	}
23673	return nil
23674}
23675
23676// Next advances to the next page of values.  If there was an error making
23677// the request the page does not advance and the error is returned.
23678// Deprecated: Use NextWithContext() instead.
23679func (page *PublicIPAddressListResultPage) Next() error {
23680	return page.NextWithContext(context.Background())
23681}
23682
23683// NotDone returns true if the page enumeration should be started or is not yet complete.
23684func (page PublicIPAddressListResultPage) NotDone() bool {
23685	return !page.pialr.IsEmpty()
23686}
23687
23688// Response returns the raw server response from the last page request.
23689func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
23690	return page.pialr
23691}
23692
23693// Values returns the slice of values for the current page or nil if there are no values.
23694func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
23695	if page.pialr.IsEmpty() {
23696		return nil
23697	}
23698	return *page.pialr.Value
23699}
23700
23701// Creates a new instance of the PublicIPAddressListResultPage type.
23702func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
23703	return PublicIPAddressListResultPage{
23704		fn:    getNextPage,
23705		pialr: cur,
23706	}
23707}
23708
23709// PublicIPAddressPropertiesFormat public IP address properties.
23710type PublicIPAddressPropertiesFormat struct {
23711	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
23712	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
23713	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
23714	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
23715	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
23716	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
23717	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
23718	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
23719	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
23720	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
23721	// IPTags - The list of tags associated with the public IP address.
23722	IPTags *[]IPTag `json:"ipTags,omitempty"`
23723	// IPAddress - The IP address associated with the public IP address resource.
23724	IPAddress *string `json:"ipAddress,omitempty"`
23725	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
23726	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
23727	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
23728	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
23729	// ResourceGUID - The resource GUID property of the public IP resource.
23730	ResourceGUID *string `json:"resourceGuid,omitempty"`
23731	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23732	ProvisioningState *string `json:"provisioningState,omitempty"`
23733}
23734
23735// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
23736func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
23737	objectMap := make(map[string]interface{})
23738	if piapf.PublicIPAllocationMethod != "" {
23739		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
23740	}
23741	if piapf.PublicIPAddressVersion != "" {
23742		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
23743	}
23744	if piapf.DNSSettings != nil {
23745		objectMap["dnsSettings"] = piapf.DNSSettings
23746	}
23747	if piapf.DdosSettings != nil {
23748		objectMap["ddosSettings"] = piapf.DdosSettings
23749	}
23750	if piapf.IPTags != nil {
23751		objectMap["ipTags"] = piapf.IPTags
23752	}
23753	if piapf.IPAddress != nil {
23754		objectMap["ipAddress"] = piapf.IPAddress
23755	}
23756	if piapf.PublicIPPrefix != nil {
23757		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
23758	}
23759	if piapf.IdleTimeoutInMinutes != nil {
23760		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
23761	}
23762	if piapf.ResourceGUID != nil {
23763		objectMap["resourceGuid"] = piapf.ResourceGUID
23764	}
23765	if piapf.ProvisioningState != nil {
23766		objectMap["provisioningState"] = piapf.ProvisioningState
23767	}
23768	return json.Marshal(objectMap)
23769}
23770
23771// PublicIPAddressSku SKU of a public IP address.
23772type PublicIPAddressSku struct {
23773	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
23774	Name PublicIPAddressSkuName `json:"name,omitempty"`
23775}
23776
23777// PublicIPPrefix public IP prefix resource.
23778type PublicIPPrefix struct {
23779	autorest.Response `json:"-"`
23780	// Sku - The public IP prefix SKU.
23781	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
23782	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
23783	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
23784	// Etag - A unique read-only string that changes whenever the resource is updated.
23785	Etag *string `json:"etag,omitempty"`
23786	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
23787	Zones *[]string `json:"zones,omitempty"`
23788	// ID - Resource ID.
23789	ID *string `json:"id,omitempty"`
23790	// Name - READ-ONLY; Resource name.
23791	Name *string `json:"name,omitempty"`
23792	// Type - READ-ONLY; Resource type.
23793	Type *string `json:"type,omitempty"`
23794	// Location - Resource location.
23795	Location *string `json:"location,omitempty"`
23796	// Tags - Resource tags.
23797	Tags map[string]*string `json:"tags"`
23798}
23799
23800// MarshalJSON is the custom marshaler for PublicIPPrefix.
23801func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
23802	objectMap := make(map[string]interface{})
23803	if pip.Sku != nil {
23804		objectMap["sku"] = pip.Sku
23805	}
23806	if pip.PublicIPPrefixPropertiesFormat != nil {
23807		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
23808	}
23809	if pip.Etag != nil {
23810		objectMap["etag"] = pip.Etag
23811	}
23812	if pip.Zones != nil {
23813		objectMap["zones"] = pip.Zones
23814	}
23815	if pip.ID != nil {
23816		objectMap["id"] = pip.ID
23817	}
23818	if pip.Location != nil {
23819		objectMap["location"] = pip.Location
23820	}
23821	if pip.Tags != nil {
23822		objectMap["tags"] = pip.Tags
23823	}
23824	return json.Marshal(objectMap)
23825}
23826
23827// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
23828func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
23829	var m map[string]*json.RawMessage
23830	err := json.Unmarshal(body, &m)
23831	if err != nil {
23832		return err
23833	}
23834	for k, v := range m {
23835		switch k {
23836		case "sku":
23837			if v != nil {
23838				var sku PublicIPPrefixSku
23839				err = json.Unmarshal(*v, &sku)
23840				if err != nil {
23841					return err
23842				}
23843				pip.Sku = &sku
23844			}
23845		case "properties":
23846			if v != nil {
23847				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
23848				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
23849				if err != nil {
23850					return err
23851				}
23852				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
23853			}
23854		case "etag":
23855			if v != nil {
23856				var etag string
23857				err = json.Unmarshal(*v, &etag)
23858				if err != nil {
23859					return err
23860				}
23861				pip.Etag = &etag
23862			}
23863		case "zones":
23864			if v != nil {
23865				var zones []string
23866				err = json.Unmarshal(*v, &zones)
23867				if err != nil {
23868					return err
23869				}
23870				pip.Zones = &zones
23871			}
23872		case "id":
23873			if v != nil {
23874				var ID string
23875				err = json.Unmarshal(*v, &ID)
23876				if err != nil {
23877					return err
23878				}
23879				pip.ID = &ID
23880			}
23881		case "name":
23882			if v != nil {
23883				var name string
23884				err = json.Unmarshal(*v, &name)
23885				if err != nil {
23886					return err
23887				}
23888				pip.Name = &name
23889			}
23890		case "type":
23891			if v != nil {
23892				var typeVar string
23893				err = json.Unmarshal(*v, &typeVar)
23894				if err != nil {
23895					return err
23896				}
23897				pip.Type = &typeVar
23898			}
23899		case "location":
23900			if v != nil {
23901				var location string
23902				err = json.Unmarshal(*v, &location)
23903				if err != nil {
23904					return err
23905				}
23906				pip.Location = &location
23907			}
23908		case "tags":
23909			if v != nil {
23910				var tags map[string]*string
23911				err = json.Unmarshal(*v, &tags)
23912				if err != nil {
23913					return err
23914				}
23915				pip.Tags = tags
23916			}
23917		}
23918	}
23919
23920	return nil
23921}
23922
23923// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23924// long-running operation.
23925type PublicIPPrefixesCreateOrUpdateFuture struct {
23926	azure.FutureAPI
23927	// Result returns the result of the asynchronous operation.
23928	// If the operation has not completed it will return an error.
23929	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
23930}
23931
23932// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23933func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23934	var azFuture azure.Future
23935	if err := json.Unmarshal(body, &azFuture); err != nil {
23936		return err
23937	}
23938	future.FutureAPI = &azFuture
23939	future.Result = future.result
23940	return nil
23941}
23942
23943// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
23944func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
23945	var done bool
23946	done, err = future.DoneWithContext(context.Background(), client)
23947	if err != nil {
23948		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23949		return
23950	}
23951	if !done {
23952		pip.Response.Response = future.Response()
23953		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
23954		return
23955	}
23956	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23957	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
23958		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
23959		if err != nil {
23960			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
23961		}
23962	}
23963	return
23964}
23965
23966// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23967// operation.
23968type PublicIPPrefixesDeleteFuture struct {
23969	azure.FutureAPI
23970	// Result returns the result of the asynchronous operation.
23971	// If the operation has not completed it will return an error.
23972	Result func(PublicIPPrefixesClient) (autorest.Response, error)
23973}
23974
23975// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23976func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
23977	var azFuture azure.Future
23978	if err := json.Unmarshal(body, &azFuture); err != nil {
23979		return err
23980	}
23981	future.FutureAPI = &azFuture
23982	future.Result = future.result
23983	return nil
23984}
23985
23986// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
23987func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
23988	var done bool
23989	done, err = future.DoneWithContext(context.Background(), client)
23990	if err != nil {
23991		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
23992		return
23993	}
23994	if !done {
23995		ar.Response = future.Response()
23996		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
23997		return
23998	}
23999	ar.Response = future.Response()
24000	return
24001}
24002
24003// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24004// long-running operation.
24005type PublicIPPrefixesUpdateTagsFuture struct {
24006	azure.FutureAPI
24007	// Result returns the result of the asynchronous operation.
24008	// If the operation has not completed it will return an error.
24009	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
24010}
24011
24012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24013func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
24014	var azFuture azure.Future
24015	if err := json.Unmarshal(body, &azFuture); err != nil {
24016		return err
24017	}
24018	future.FutureAPI = &azFuture
24019	future.Result = future.result
24020	return nil
24021}
24022
24023// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
24024func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
24025	var done bool
24026	done, err = future.DoneWithContext(context.Background(), client)
24027	if err != nil {
24028		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
24029		return
24030	}
24031	if !done {
24032		pip.Response.Response = future.Response()
24033		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
24034		return
24035	}
24036	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24037	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
24038		pip, err = client.UpdateTagsResponder(pip.Response.Response)
24039		if err != nil {
24040			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
24041		}
24042	}
24043	return
24044}
24045
24046// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
24047type PublicIPPrefixListResult struct {
24048	autorest.Response `json:"-"`
24049	// Value - A list of public IP prefixes that exists in a resource group.
24050	Value *[]PublicIPPrefix `json:"value,omitempty"`
24051	// NextLink - The URL to get the next set of results.
24052	NextLink *string `json:"nextLink,omitempty"`
24053}
24054
24055// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
24056type PublicIPPrefixListResultIterator struct {
24057	i    int
24058	page PublicIPPrefixListResultPage
24059}
24060
24061// NextWithContext advances to the next value.  If there was an error making
24062// the request the iterator does not advance and the error is returned.
24063func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
24064	if tracing.IsEnabled() {
24065		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
24066		defer func() {
24067			sc := -1
24068			if iter.Response().Response.Response != nil {
24069				sc = iter.Response().Response.Response.StatusCode
24070			}
24071			tracing.EndSpan(ctx, sc, err)
24072		}()
24073	}
24074	iter.i++
24075	if iter.i < len(iter.page.Values()) {
24076		return nil
24077	}
24078	err = iter.page.NextWithContext(ctx)
24079	if err != nil {
24080		iter.i--
24081		return err
24082	}
24083	iter.i = 0
24084	return nil
24085}
24086
24087// Next advances to the next value.  If there was an error making
24088// the request the iterator does not advance and the error is returned.
24089// Deprecated: Use NextWithContext() instead.
24090func (iter *PublicIPPrefixListResultIterator) Next() error {
24091	return iter.NextWithContext(context.Background())
24092}
24093
24094// NotDone returns true if the enumeration should be started or is not yet complete.
24095func (iter PublicIPPrefixListResultIterator) NotDone() bool {
24096	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24097}
24098
24099// Response returns the raw server response from the last page request.
24100func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
24101	return iter.page.Response()
24102}
24103
24104// Value returns the current value or a zero-initialized value if the
24105// iterator has advanced beyond the end of the collection.
24106func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
24107	if !iter.page.NotDone() {
24108		return PublicIPPrefix{}
24109	}
24110	return iter.page.Values()[iter.i]
24111}
24112
24113// Creates a new instance of the PublicIPPrefixListResultIterator type.
24114func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
24115	return PublicIPPrefixListResultIterator{page: page}
24116}
24117
24118// IsEmpty returns true if the ListResult contains no values.
24119func (piplr PublicIPPrefixListResult) IsEmpty() bool {
24120	return piplr.Value == nil || len(*piplr.Value) == 0
24121}
24122
24123// hasNextLink returns true if the NextLink is not empty.
24124func (piplr PublicIPPrefixListResult) hasNextLink() bool {
24125	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
24126}
24127
24128// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
24129// It returns nil if no more results exist.
24130func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
24131	if !piplr.hasNextLink() {
24132		return nil, nil
24133	}
24134	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24135		autorest.AsJSON(),
24136		autorest.AsGet(),
24137		autorest.WithBaseURL(to.String(piplr.NextLink)))
24138}
24139
24140// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
24141type PublicIPPrefixListResultPage struct {
24142	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
24143	piplr PublicIPPrefixListResult
24144}
24145
24146// NextWithContext advances to the next page of values.  If there was an error making
24147// the request the page does not advance and the error is returned.
24148func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
24149	if tracing.IsEnabled() {
24150		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
24151		defer func() {
24152			sc := -1
24153			if page.Response().Response.Response != nil {
24154				sc = page.Response().Response.Response.StatusCode
24155			}
24156			tracing.EndSpan(ctx, sc, err)
24157		}()
24158	}
24159	for {
24160		next, err := page.fn(ctx, page.piplr)
24161		if err != nil {
24162			return err
24163		}
24164		page.piplr = next
24165		if !next.hasNextLink() || !next.IsEmpty() {
24166			break
24167		}
24168	}
24169	return nil
24170}
24171
24172// Next advances to the next page of values.  If there was an error making
24173// the request the page does not advance and the error is returned.
24174// Deprecated: Use NextWithContext() instead.
24175func (page *PublicIPPrefixListResultPage) Next() error {
24176	return page.NextWithContext(context.Background())
24177}
24178
24179// NotDone returns true if the page enumeration should be started or is not yet complete.
24180func (page PublicIPPrefixListResultPage) NotDone() bool {
24181	return !page.piplr.IsEmpty()
24182}
24183
24184// Response returns the raw server response from the last page request.
24185func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
24186	return page.piplr
24187}
24188
24189// Values returns the slice of values for the current page or nil if there are no values.
24190func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
24191	if page.piplr.IsEmpty() {
24192		return nil
24193	}
24194	return *page.piplr.Value
24195}
24196
24197// Creates a new instance of the PublicIPPrefixListResultPage type.
24198func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
24199	return PublicIPPrefixListResultPage{
24200		fn:    getNextPage,
24201		piplr: cur,
24202	}
24203}
24204
24205// PublicIPPrefixPropertiesFormat public IP prefix properties.
24206type PublicIPPrefixPropertiesFormat struct {
24207	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
24208	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
24209	// IPTags - The list of tags associated with the public IP prefix.
24210	IPTags *[]IPTag `json:"ipTags,omitempty"`
24211	// PrefixLength - The Length of the Public IP Prefix.
24212	PrefixLength *int32 `json:"prefixLength,omitempty"`
24213	// IPPrefix - The allocated Prefix.
24214	IPPrefix *string `json:"ipPrefix,omitempty"`
24215	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
24216	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
24217	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
24218	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
24219	// ResourceGUID - The resource GUID property of the public IP prefix resource.
24220	ResourceGUID *string `json:"resourceGuid,omitempty"`
24221	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24222	ProvisioningState *string `json:"provisioningState,omitempty"`
24223}
24224
24225// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
24226func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
24227	objectMap := make(map[string]interface{})
24228	if pippf.PublicIPAddressVersion != "" {
24229		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
24230	}
24231	if pippf.IPTags != nil {
24232		objectMap["ipTags"] = pippf.IPTags
24233	}
24234	if pippf.PrefixLength != nil {
24235		objectMap["prefixLength"] = pippf.PrefixLength
24236	}
24237	if pippf.IPPrefix != nil {
24238		objectMap["ipPrefix"] = pippf.IPPrefix
24239	}
24240	if pippf.PublicIPAddresses != nil {
24241		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
24242	}
24243	if pippf.ResourceGUID != nil {
24244		objectMap["resourceGuid"] = pippf.ResourceGUID
24245	}
24246	if pippf.ProvisioningState != nil {
24247		objectMap["provisioningState"] = pippf.ProvisioningState
24248	}
24249	return json.Marshal(objectMap)
24250}
24251
24252// PublicIPPrefixSku SKU of a public IP prefix.
24253type PublicIPPrefixSku struct {
24254	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
24255	Name PublicIPPrefixSkuName `json:"name,omitempty"`
24256}
24257
24258// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
24259type QueryTroubleshootingParameters struct {
24260	// TargetResourceID - The target resource ID to query the troubleshooting result.
24261	TargetResourceID *string `json:"targetResourceId,omitempty"`
24262}
24263
24264// ReferencedPublicIPAddress reference to a public IP address.
24265type ReferencedPublicIPAddress struct {
24266	// ID - The PublicIPAddress Reference.
24267	ID *string `json:"id,omitempty"`
24268}
24269
24270// Resource common resource representation.
24271type Resource struct {
24272	// ID - Resource ID.
24273	ID *string `json:"id,omitempty"`
24274	// Name - READ-ONLY; Resource name.
24275	Name *string `json:"name,omitempty"`
24276	// Type - READ-ONLY; Resource type.
24277	Type *string `json:"type,omitempty"`
24278	// Location - Resource location.
24279	Location *string `json:"location,omitempty"`
24280	// Tags - Resource tags.
24281	Tags map[string]*string `json:"tags"`
24282}
24283
24284// MarshalJSON is the custom marshaler for Resource.
24285func (r Resource) MarshalJSON() ([]byte, error) {
24286	objectMap := make(map[string]interface{})
24287	if r.ID != nil {
24288		objectMap["id"] = r.ID
24289	}
24290	if r.Location != nil {
24291		objectMap["location"] = r.Location
24292	}
24293	if r.Tags != nil {
24294		objectMap["tags"] = r.Tags
24295	}
24296	return json.Marshal(objectMap)
24297}
24298
24299// ResourceNavigationLink resourceNavigationLink resource.
24300type ResourceNavigationLink struct {
24301	// ResourceNavigationLinkFormat - Resource navigation link properties format.
24302	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
24303	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
24304	Name *string `json:"name,omitempty"`
24305	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24306	Etag *string `json:"etag,omitempty"`
24307	// Type - READ-ONLY; Resource type.
24308	Type *string `json:"type,omitempty"`
24309	// ID - Resource ID.
24310	ID *string `json:"id,omitempty"`
24311}
24312
24313// MarshalJSON is the custom marshaler for ResourceNavigationLink.
24314func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
24315	objectMap := make(map[string]interface{})
24316	if rnl.ResourceNavigationLinkFormat != nil {
24317		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
24318	}
24319	if rnl.Name != nil {
24320		objectMap["name"] = rnl.Name
24321	}
24322	if rnl.ID != nil {
24323		objectMap["id"] = rnl.ID
24324	}
24325	return json.Marshal(objectMap)
24326}
24327
24328// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
24329func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
24330	var m map[string]*json.RawMessage
24331	err := json.Unmarshal(body, &m)
24332	if err != nil {
24333		return err
24334	}
24335	for k, v := range m {
24336		switch k {
24337		case "properties":
24338			if v != nil {
24339				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
24340				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
24341				if err != nil {
24342					return err
24343				}
24344				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
24345			}
24346		case "name":
24347			if v != nil {
24348				var name string
24349				err = json.Unmarshal(*v, &name)
24350				if err != nil {
24351					return err
24352				}
24353				rnl.Name = &name
24354			}
24355		case "etag":
24356			if v != nil {
24357				var etag string
24358				err = json.Unmarshal(*v, &etag)
24359				if err != nil {
24360					return err
24361				}
24362				rnl.Etag = &etag
24363			}
24364		case "type":
24365			if v != nil {
24366				var typeVar string
24367				err = json.Unmarshal(*v, &typeVar)
24368				if err != nil {
24369					return err
24370				}
24371				rnl.Type = &typeVar
24372			}
24373		case "id":
24374			if v != nil {
24375				var ID string
24376				err = json.Unmarshal(*v, &ID)
24377				if err != nil {
24378					return err
24379				}
24380				rnl.ID = &ID
24381			}
24382		}
24383	}
24384
24385	return nil
24386}
24387
24388// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
24389type ResourceNavigationLinkFormat struct {
24390	// LinkedResourceType - Resource type of the linked resource.
24391	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
24392	// Link - Link to the external resource.
24393	Link *string `json:"link,omitempty"`
24394	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
24395	ProvisioningState *string `json:"provisioningState,omitempty"`
24396}
24397
24398// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
24399func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
24400	objectMap := make(map[string]interface{})
24401	if rnlf.LinkedResourceType != nil {
24402		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
24403	}
24404	if rnlf.Link != nil {
24405		objectMap["link"] = rnlf.Link
24406	}
24407	return json.Marshal(objectMap)
24408}
24409
24410// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
24411type ResourceNavigationLinksListResult struct {
24412	autorest.Response `json:"-"`
24413	// Value - The resource navigation links in a subnet.
24414	Value *[]ResourceNavigationLink `json:"value,omitempty"`
24415	// NextLink - READ-ONLY; The URL to get the next set of results.
24416	NextLink *string `json:"nextLink,omitempty"`
24417}
24418
24419// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
24420func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
24421	objectMap := make(map[string]interface{})
24422	if rnllr.Value != nil {
24423		objectMap["value"] = rnllr.Value
24424	}
24425	return json.Marshal(objectMap)
24426}
24427
24428// ResourceSet the base resource set for visibility and auto-approval.
24429type ResourceSet struct {
24430	// Subscriptions - The list of subscriptions.
24431	Subscriptions *[]string `json:"subscriptions,omitempty"`
24432}
24433
24434// RetentionPolicyParameters parameters that define the retention policy for flow log.
24435type RetentionPolicyParameters struct {
24436	// Days - Number of days to retain flow log records.
24437	Days *int32 `json:"days,omitempty"`
24438	// Enabled - Flag to enable/disable retention.
24439	Enabled *bool `json:"enabled,omitempty"`
24440}
24441
24442// Route route resource.
24443type Route struct {
24444	autorest.Response `json:"-"`
24445	// RoutePropertiesFormat - Properties of the route.
24446	*RoutePropertiesFormat `json:"properties,omitempty"`
24447	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24448	Name *string `json:"name,omitempty"`
24449	// Etag - A unique read-only string that changes whenever the resource is updated.
24450	Etag *string `json:"etag,omitempty"`
24451	// ID - Resource ID.
24452	ID *string `json:"id,omitempty"`
24453}
24454
24455// MarshalJSON is the custom marshaler for Route.
24456func (r Route) MarshalJSON() ([]byte, error) {
24457	objectMap := make(map[string]interface{})
24458	if r.RoutePropertiesFormat != nil {
24459		objectMap["properties"] = r.RoutePropertiesFormat
24460	}
24461	if r.Name != nil {
24462		objectMap["name"] = r.Name
24463	}
24464	if r.Etag != nil {
24465		objectMap["etag"] = r.Etag
24466	}
24467	if r.ID != nil {
24468		objectMap["id"] = r.ID
24469	}
24470	return json.Marshal(objectMap)
24471}
24472
24473// UnmarshalJSON is the custom unmarshaler for Route struct.
24474func (r *Route) UnmarshalJSON(body []byte) error {
24475	var m map[string]*json.RawMessage
24476	err := json.Unmarshal(body, &m)
24477	if err != nil {
24478		return err
24479	}
24480	for k, v := range m {
24481		switch k {
24482		case "properties":
24483			if v != nil {
24484				var routePropertiesFormat RoutePropertiesFormat
24485				err = json.Unmarshal(*v, &routePropertiesFormat)
24486				if err != nil {
24487					return err
24488				}
24489				r.RoutePropertiesFormat = &routePropertiesFormat
24490			}
24491		case "name":
24492			if v != nil {
24493				var name string
24494				err = json.Unmarshal(*v, &name)
24495				if err != nil {
24496					return err
24497				}
24498				r.Name = &name
24499			}
24500		case "etag":
24501			if v != nil {
24502				var etag string
24503				err = json.Unmarshal(*v, &etag)
24504				if err != nil {
24505					return err
24506				}
24507				r.Etag = &etag
24508			}
24509		case "id":
24510			if v != nil {
24511				var ID string
24512				err = json.Unmarshal(*v, &ID)
24513				if err != nil {
24514					return err
24515				}
24516				r.ID = &ID
24517			}
24518		}
24519	}
24520
24521	return nil
24522}
24523
24524// RouteFilter route Filter Resource.
24525type RouteFilter struct {
24526	autorest.Response `json:"-"`
24527	// RouteFilterPropertiesFormat - Properties of the route filter.
24528	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
24529	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
24530	Etag *string `json:"etag,omitempty"`
24531	// ID - Resource ID.
24532	ID *string `json:"id,omitempty"`
24533	// Name - READ-ONLY; Resource name.
24534	Name *string `json:"name,omitempty"`
24535	// Type - READ-ONLY; Resource type.
24536	Type *string `json:"type,omitempty"`
24537	// Location - Resource location.
24538	Location *string `json:"location,omitempty"`
24539	// Tags - Resource tags.
24540	Tags map[string]*string `json:"tags"`
24541}
24542
24543// MarshalJSON is the custom marshaler for RouteFilter.
24544func (rf RouteFilter) MarshalJSON() ([]byte, error) {
24545	objectMap := make(map[string]interface{})
24546	if rf.RouteFilterPropertiesFormat != nil {
24547		objectMap["properties"] = rf.RouteFilterPropertiesFormat
24548	}
24549	if rf.ID != nil {
24550		objectMap["id"] = rf.ID
24551	}
24552	if rf.Location != nil {
24553		objectMap["location"] = rf.Location
24554	}
24555	if rf.Tags != nil {
24556		objectMap["tags"] = rf.Tags
24557	}
24558	return json.Marshal(objectMap)
24559}
24560
24561// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
24562func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
24563	var m map[string]*json.RawMessage
24564	err := json.Unmarshal(body, &m)
24565	if err != nil {
24566		return err
24567	}
24568	for k, v := range m {
24569		switch k {
24570		case "properties":
24571			if v != nil {
24572				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
24573				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
24574				if err != nil {
24575					return err
24576				}
24577				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
24578			}
24579		case "etag":
24580			if v != nil {
24581				var etag string
24582				err = json.Unmarshal(*v, &etag)
24583				if err != nil {
24584					return err
24585				}
24586				rf.Etag = &etag
24587			}
24588		case "id":
24589			if v != nil {
24590				var ID string
24591				err = json.Unmarshal(*v, &ID)
24592				if err != nil {
24593					return err
24594				}
24595				rf.ID = &ID
24596			}
24597		case "name":
24598			if v != nil {
24599				var name string
24600				err = json.Unmarshal(*v, &name)
24601				if err != nil {
24602					return err
24603				}
24604				rf.Name = &name
24605			}
24606		case "type":
24607			if v != nil {
24608				var typeVar string
24609				err = json.Unmarshal(*v, &typeVar)
24610				if err != nil {
24611					return err
24612				}
24613				rf.Type = &typeVar
24614			}
24615		case "location":
24616			if v != nil {
24617				var location string
24618				err = json.Unmarshal(*v, &location)
24619				if err != nil {
24620					return err
24621				}
24622				rf.Location = &location
24623			}
24624		case "tags":
24625			if v != nil {
24626				var tags map[string]*string
24627				err = json.Unmarshal(*v, &tags)
24628				if err != nil {
24629					return err
24630				}
24631				rf.Tags = tags
24632			}
24633		}
24634	}
24635
24636	return nil
24637}
24638
24639// RouteFilterListResult response for the ListRouteFilters API service call.
24640type RouteFilterListResult struct {
24641	autorest.Response `json:"-"`
24642	// Value - Gets a list of route filters in a resource group.
24643	Value *[]RouteFilter `json:"value,omitempty"`
24644	// NextLink - The URL to get the next set of results.
24645	NextLink *string `json:"nextLink,omitempty"`
24646}
24647
24648// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
24649type RouteFilterListResultIterator struct {
24650	i    int
24651	page RouteFilterListResultPage
24652}
24653
24654// NextWithContext advances to the next value.  If there was an error making
24655// the request the iterator does not advance and the error is returned.
24656func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
24657	if tracing.IsEnabled() {
24658		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
24659		defer func() {
24660			sc := -1
24661			if iter.Response().Response.Response != nil {
24662				sc = iter.Response().Response.Response.StatusCode
24663			}
24664			tracing.EndSpan(ctx, sc, err)
24665		}()
24666	}
24667	iter.i++
24668	if iter.i < len(iter.page.Values()) {
24669		return nil
24670	}
24671	err = iter.page.NextWithContext(ctx)
24672	if err != nil {
24673		iter.i--
24674		return err
24675	}
24676	iter.i = 0
24677	return nil
24678}
24679
24680// Next advances to the next value.  If there was an error making
24681// the request the iterator does not advance and the error is returned.
24682// Deprecated: Use NextWithContext() instead.
24683func (iter *RouteFilterListResultIterator) Next() error {
24684	return iter.NextWithContext(context.Background())
24685}
24686
24687// NotDone returns true if the enumeration should be started or is not yet complete.
24688func (iter RouteFilterListResultIterator) NotDone() bool {
24689	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24690}
24691
24692// Response returns the raw server response from the last page request.
24693func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
24694	return iter.page.Response()
24695}
24696
24697// Value returns the current value or a zero-initialized value if the
24698// iterator has advanced beyond the end of the collection.
24699func (iter RouteFilterListResultIterator) Value() RouteFilter {
24700	if !iter.page.NotDone() {
24701		return RouteFilter{}
24702	}
24703	return iter.page.Values()[iter.i]
24704}
24705
24706// Creates a new instance of the RouteFilterListResultIterator type.
24707func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
24708	return RouteFilterListResultIterator{page: page}
24709}
24710
24711// IsEmpty returns true if the ListResult contains no values.
24712func (rflr RouteFilterListResult) IsEmpty() bool {
24713	return rflr.Value == nil || len(*rflr.Value) == 0
24714}
24715
24716// hasNextLink returns true if the NextLink is not empty.
24717func (rflr RouteFilterListResult) hasNextLink() bool {
24718	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
24719}
24720
24721// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
24722// It returns nil if no more results exist.
24723func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
24724	if !rflr.hasNextLink() {
24725		return nil, nil
24726	}
24727	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24728		autorest.AsJSON(),
24729		autorest.AsGet(),
24730		autorest.WithBaseURL(to.String(rflr.NextLink)))
24731}
24732
24733// RouteFilterListResultPage contains a page of RouteFilter values.
24734type RouteFilterListResultPage struct {
24735	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
24736	rflr RouteFilterListResult
24737}
24738
24739// NextWithContext advances to the next page of values.  If there was an error making
24740// the request the page does not advance and the error is returned.
24741func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
24742	if tracing.IsEnabled() {
24743		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
24744		defer func() {
24745			sc := -1
24746			if page.Response().Response.Response != nil {
24747				sc = page.Response().Response.Response.StatusCode
24748			}
24749			tracing.EndSpan(ctx, sc, err)
24750		}()
24751	}
24752	for {
24753		next, err := page.fn(ctx, page.rflr)
24754		if err != nil {
24755			return err
24756		}
24757		page.rflr = next
24758		if !next.hasNextLink() || !next.IsEmpty() {
24759			break
24760		}
24761	}
24762	return nil
24763}
24764
24765// Next advances to the next page of values.  If there was an error making
24766// the request the page does not advance and the error is returned.
24767// Deprecated: Use NextWithContext() instead.
24768func (page *RouteFilterListResultPage) Next() error {
24769	return page.NextWithContext(context.Background())
24770}
24771
24772// NotDone returns true if the page enumeration should be started or is not yet complete.
24773func (page RouteFilterListResultPage) NotDone() bool {
24774	return !page.rflr.IsEmpty()
24775}
24776
24777// Response returns the raw server response from the last page request.
24778func (page RouteFilterListResultPage) Response() RouteFilterListResult {
24779	return page.rflr
24780}
24781
24782// Values returns the slice of values for the current page or nil if there are no values.
24783func (page RouteFilterListResultPage) Values() []RouteFilter {
24784	if page.rflr.IsEmpty() {
24785		return nil
24786	}
24787	return *page.rflr.Value
24788}
24789
24790// Creates a new instance of the RouteFilterListResultPage type.
24791func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
24792	return RouteFilterListResultPage{
24793		fn:   getNextPage,
24794		rflr: cur,
24795	}
24796}
24797
24798// RouteFilterPropertiesFormat route Filter Resource.
24799type RouteFilterPropertiesFormat struct {
24800	// Rules - Collection of RouteFilterRules contained within a route filter.
24801	Rules *[]RouteFilterRule `json:"rules,omitempty"`
24802	// Peerings - A collection of references to express route circuit peerings.
24803	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
24804	// Ipv6Peerings - A collection of references to express route circuit ipv6 peerings.
24805	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
24806	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
24807	ProvisioningState *string `json:"provisioningState,omitempty"`
24808}
24809
24810// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
24811func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
24812	objectMap := make(map[string]interface{})
24813	if rfpf.Rules != nil {
24814		objectMap["rules"] = rfpf.Rules
24815	}
24816	if rfpf.Peerings != nil {
24817		objectMap["peerings"] = rfpf.Peerings
24818	}
24819	if rfpf.Ipv6Peerings != nil {
24820		objectMap["ipv6Peerings"] = rfpf.Ipv6Peerings
24821	}
24822	return json.Marshal(objectMap)
24823}
24824
24825// RouteFilterRule route Filter Rule Resource.
24826type RouteFilterRule struct {
24827	autorest.Response `json:"-"`
24828	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
24829	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
24830	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24831	Name *string `json:"name,omitempty"`
24832	// Location - Resource location.
24833	Location *string `json:"location,omitempty"`
24834	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
24835	Etag *string `json:"etag,omitempty"`
24836	// ID - Resource ID.
24837	ID *string `json:"id,omitempty"`
24838}
24839
24840// MarshalJSON is the custom marshaler for RouteFilterRule.
24841func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
24842	objectMap := make(map[string]interface{})
24843	if rfr.RouteFilterRulePropertiesFormat != nil {
24844		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
24845	}
24846	if rfr.Name != nil {
24847		objectMap["name"] = rfr.Name
24848	}
24849	if rfr.Location != nil {
24850		objectMap["location"] = rfr.Location
24851	}
24852	if rfr.ID != nil {
24853		objectMap["id"] = rfr.ID
24854	}
24855	return json.Marshal(objectMap)
24856}
24857
24858// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
24859func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
24860	var m map[string]*json.RawMessage
24861	err := json.Unmarshal(body, &m)
24862	if err != nil {
24863		return err
24864	}
24865	for k, v := range m {
24866		switch k {
24867		case "properties":
24868			if v != nil {
24869				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
24870				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
24871				if err != nil {
24872					return err
24873				}
24874				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
24875			}
24876		case "name":
24877			if v != nil {
24878				var name string
24879				err = json.Unmarshal(*v, &name)
24880				if err != nil {
24881					return err
24882				}
24883				rfr.Name = &name
24884			}
24885		case "location":
24886			if v != nil {
24887				var location string
24888				err = json.Unmarshal(*v, &location)
24889				if err != nil {
24890					return err
24891				}
24892				rfr.Location = &location
24893			}
24894		case "etag":
24895			if v != nil {
24896				var etag string
24897				err = json.Unmarshal(*v, &etag)
24898				if err != nil {
24899					return err
24900				}
24901				rfr.Etag = &etag
24902			}
24903		case "id":
24904			if v != nil {
24905				var ID string
24906				err = json.Unmarshal(*v, &ID)
24907				if err != nil {
24908					return err
24909				}
24910				rfr.ID = &ID
24911			}
24912		}
24913	}
24914
24915	return nil
24916}
24917
24918// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
24919type RouteFilterRuleListResult struct {
24920	autorest.Response `json:"-"`
24921	// Value - Gets a list of RouteFilterRules in a resource group.
24922	Value *[]RouteFilterRule `json:"value,omitempty"`
24923	// NextLink - The URL to get the next set of results.
24924	NextLink *string `json:"nextLink,omitempty"`
24925}
24926
24927// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
24928type RouteFilterRuleListResultIterator struct {
24929	i    int
24930	page RouteFilterRuleListResultPage
24931}
24932
24933// NextWithContext advances to the next value.  If there was an error making
24934// the request the iterator does not advance and the error is returned.
24935func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
24936	if tracing.IsEnabled() {
24937		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
24938		defer func() {
24939			sc := -1
24940			if iter.Response().Response.Response != nil {
24941				sc = iter.Response().Response.Response.StatusCode
24942			}
24943			tracing.EndSpan(ctx, sc, err)
24944		}()
24945	}
24946	iter.i++
24947	if iter.i < len(iter.page.Values()) {
24948		return nil
24949	}
24950	err = iter.page.NextWithContext(ctx)
24951	if err != nil {
24952		iter.i--
24953		return err
24954	}
24955	iter.i = 0
24956	return nil
24957}
24958
24959// Next advances to the next value.  If there was an error making
24960// the request the iterator does not advance and the error is returned.
24961// Deprecated: Use NextWithContext() instead.
24962func (iter *RouteFilterRuleListResultIterator) Next() error {
24963	return iter.NextWithContext(context.Background())
24964}
24965
24966// NotDone returns true if the enumeration should be started or is not yet complete.
24967func (iter RouteFilterRuleListResultIterator) NotDone() bool {
24968	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24969}
24970
24971// Response returns the raw server response from the last page request.
24972func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
24973	return iter.page.Response()
24974}
24975
24976// Value returns the current value or a zero-initialized value if the
24977// iterator has advanced beyond the end of the collection.
24978func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
24979	if !iter.page.NotDone() {
24980		return RouteFilterRule{}
24981	}
24982	return iter.page.Values()[iter.i]
24983}
24984
24985// Creates a new instance of the RouteFilterRuleListResultIterator type.
24986func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
24987	return RouteFilterRuleListResultIterator{page: page}
24988}
24989
24990// IsEmpty returns true if the ListResult contains no values.
24991func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
24992	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
24993}
24994
24995// hasNextLink returns true if the NextLink is not empty.
24996func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
24997	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
24998}
24999
25000// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
25001// It returns nil if no more results exist.
25002func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
25003	if !rfrlr.hasNextLink() {
25004		return nil, nil
25005	}
25006	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25007		autorest.AsJSON(),
25008		autorest.AsGet(),
25009		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
25010}
25011
25012// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
25013type RouteFilterRuleListResultPage struct {
25014	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
25015	rfrlr RouteFilterRuleListResult
25016}
25017
25018// NextWithContext advances to the next page of values.  If there was an error making
25019// the request the page does not advance and the error is returned.
25020func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
25021	if tracing.IsEnabled() {
25022		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
25023		defer func() {
25024			sc := -1
25025			if page.Response().Response.Response != nil {
25026				sc = page.Response().Response.Response.StatusCode
25027			}
25028			tracing.EndSpan(ctx, sc, err)
25029		}()
25030	}
25031	for {
25032		next, err := page.fn(ctx, page.rfrlr)
25033		if err != nil {
25034			return err
25035		}
25036		page.rfrlr = next
25037		if !next.hasNextLink() || !next.IsEmpty() {
25038			break
25039		}
25040	}
25041	return nil
25042}
25043
25044// Next advances to the next page of values.  If there was an error making
25045// the request the page does not advance and the error is returned.
25046// Deprecated: Use NextWithContext() instead.
25047func (page *RouteFilterRuleListResultPage) Next() error {
25048	return page.NextWithContext(context.Background())
25049}
25050
25051// NotDone returns true if the page enumeration should be started or is not yet complete.
25052func (page RouteFilterRuleListResultPage) NotDone() bool {
25053	return !page.rfrlr.IsEmpty()
25054}
25055
25056// Response returns the raw server response from the last page request.
25057func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
25058	return page.rfrlr
25059}
25060
25061// Values returns the slice of values for the current page or nil if there are no values.
25062func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
25063	if page.rfrlr.IsEmpty() {
25064		return nil
25065	}
25066	return *page.rfrlr.Value
25067}
25068
25069// Creates a new instance of the RouteFilterRuleListResultPage type.
25070func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
25071	return RouteFilterRuleListResultPage{
25072		fn:    getNextPage,
25073		rfrlr: cur,
25074	}
25075}
25076
25077// RouteFilterRulePropertiesFormat route Filter Rule Resource.
25078type RouteFilterRulePropertiesFormat struct {
25079	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
25080	Access Access `json:"access,omitempty"`
25081	// RouteFilterRuleType - The rule type of the rule.
25082	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
25083	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
25084	Communities *[]string `json:"communities,omitempty"`
25085	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
25086	ProvisioningState *string `json:"provisioningState,omitempty"`
25087}
25088
25089// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
25090func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
25091	objectMap := make(map[string]interface{})
25092	if rfrpf.Access != "" {
25093		objectMap["access"] = rfrpf.Access
25094	}
25095	if rfrpf.RouteFilterRuleType != nil {
25096		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
25097	}
25098	if rfrpf.Communities != nil {
25099		objectMap["communities"] = rfrpf.Communities
25100	}
25101	return json.Marshal(objectMap)
25102}
25103
25104// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25105// long-running operation.
25106type RouteFilterRulesCreateOrUpdateFuture struct {
25107	azure.FutureAPI
25108	// Result returns the result of the asynchronous operation.
25109	// If the operation has not completed it will return an error.
25110	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
25111}
25112
25113// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25114func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25115	var azFuture azure.Future
25116	if err := json.Unmarshal(body, &azFuture); err != nil {
25117		return err
25118	}
25119	future.FutureAPI = &azFuture
25120	future.Result = future.result
25121	return nil
25122}
25123
25124// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
25125func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
25126	var done bool
25127	done, err = future.DoneWithContext(context.Background(), client)
25128	if err != nil {
25129		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25130		return
25131	}
25132	if !done {
25133		rfr.Response.Response = future.Response()
25134		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
25135		return
25136	}
25137	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25138	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
25139		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
25140		if err != nil {
25141			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
25142		}
25143	}
25144	return
25145}
25146
25147// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25148// operation.
25149type RouteFilterRulesDeleteFuture struct {
25150	azure.FutureAPI
25151	// Result returns the result of the asynchronous operation.
25152	// If the operation has not completed it will return an error.
25153	Result func(RouteFilterRulesClient) (autorest.Response, error)
25154}
25155
25156// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25157func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
25158	var azFuture azure.Future
25159	if err := json.Unmarshal(body, &azFuture); err != nil {
25160		return err
25161	}
25162	future.FutureAPI = &azFuture
25163	future.Result = future.result
25164	return nil
25165}
25166
25167// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
25168func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
25169	var done bool
25170	done, err = future.DoneWithContext(context.Background(), client)
25171	if err != nil {
25172		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
25173		return
25174	}
25175	if !done {
25176		ar.Response = future.Response()
25177		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
25178		return
25179	}
25180	ar.Response = future.Response()
25181	return
25182}
25183
25184// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25185// operation.
25186type RouteFilterRulesUpdateFuture struct {
25187	azure.FutureAPI
25188	// Result returns the result of the asynchronous operation.
25189	// If the operation has not completed it will return an error.
25190	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
25191}
25192
25193// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25194func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
25195	var azFuture azure.Future
25196	if err := json.Unmarshal(body, &azFuture); err != nil {
25197		return err
25198	}
25199	future.FutureAPI = &azFuture
25200	future.Result = future.result
25201	return nil
25202}
25203
25204// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
25205func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
25206	var done bool
25207	done, err = future.DoneWithContext(context.Background(), client)
25208	if err != nil {
25209		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
25210		return
25211	}
25212	if !done {
25213		rfr.Response.Response = future.Response()
25214		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
25215		return
25216	}
25217	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25218	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
25219		rfr, err = client.UpdateResponder(rfr.Response.Response)
25220		if err != nil {
25221			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
25222		}
25223	}
25224	return
25225}
25226
25227// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25228// long-running operation.
25229type RouteFiltersCreateOrUpdateFuture struct {
25230	azure.FutureAPI
25231	// Result returns the result of the asynchronous operation.
25232	// If the operation has not completed it will return an error.
25233	Result func(RouteFiltersClient) (RouteFilter, error)
25234}
25235
25236// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25237func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25238	var azFuture azure.Future
25239	if err := json.Unmarshal(body, &azFuture); err != nil {
25240		return err
25241	}
25242	future.FutureAPI = &azFuture
25243	future.Result = future.result
25244	return nil
25245}
25246
25247// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
25248func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
25249	var done bool
25250	done, err = future.DoneWithContext(context.Background(), client)
25251	if err != nil {
25252		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25253		return
25254	}
25255	if !done {
25256		rf.Response.Response = future.Response()
25257		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
25258		return
25259	}
25260	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25261	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
25262		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
25263		if err != nil {
25264			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
25265		}
25266	}
25267	return
25268}
25269
25270// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25271// operation.
25272type RouteFiltersDeleteFuture struct {
25273	azure.FutureAPI
25274	// Result returns the result of the asynchronous operation.
25275	// If the operation has not completed it will return an error.
25276	Result func(RouteFiltersClient) (autorest.Response, error)
25277}
25278
25279// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25280func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
25281	var azFuture azure.Future
25282	if err := json.Unmarshal(body, &azFuture); err != nil {
25283		return err
25284	}
25285	future.FutureAPI = &azFuture
25286	future.Result = future.result
25287	return nil
25288}
25289
25290// result is the default implementation for RouteFiltersDeleteFuture.Result.
25291func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
25292	var done bool
25293	done, err = future.DoneWithContext(context.Background(), client)
25294	if err != nil {
25295		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
25296		return
25297	}
25298	if !done {
25299		ar.Response = future.Response()
25300		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
25301		return
25302	}
25303	ar.Response = future.Response()
25304	return
25305}
25306
25307// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25308// operation.
25309type RouteFiltersUpdateFuture struct {
25310	azure.FutureAPI
25311	// Result returns the result of the asynchronous operation.
25312	// If the operation has not completed it will return an error.
25313	Result func(RouteFiltersClient) (RouteFilter, error)
25314}
25315
25316// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25317func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
25318	var azFuture azure.Future
25319	if err := json.Unmarshal(body, &azFuture); err != nil {
25320		return err
25321	}
25322	future.FutureAPI = &azFuture
25323	future.Result = future.result
25324	return nil
25325}
25326
25327// result is the default implementation for RouteFiltersUpdateFuture.Result.
25328func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
25329	var done bool
25330	done, err = future.DoneWithContext(context.Background(), client)
25331	if err != nil {
25332		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
25333		return
25334	}
25335	if !done {
25336		rf.Response.Response = future.Response()
25337		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
25338		return
25339	}
25340	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25341	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
25342		rf, err = client.UpdateResponder(rf.Response.Response)
25343		if err != nil {
25344			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
25345		}
25346	}
25347	return
25348}
25349
25350// RouteListResult response for the ListRoute API service call.
25351type RouteListResult struct {
25352	autorest.Response `json:"-"`
25353	// Value - Gets a list of routes in a resource group.
25354	Value *[]Route `json:"value,omitempty"`
25355	// NextLink - The URL to get the next set of results.
25356	NextLink *string `json:"nextLink,omitempty"`
25357}
25358
25359// RouteListResultIterator provides access to a complete listing of Route values.
25360type RouteListResultIterator struct {
25361	i    int
25362	page RouteListResultPage
25363}
25364
25365// NextWithContext advances to the next value.  If there was an error making
25366// the request the iterator does not advance and the error is returned.
25367func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
25368	if tracing.IsEnabled() {
25369		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
25370		defer func() {
25371			sc := -1
25372			if iter.Response().Response.Response != nil {
25373				sc = iter.Response().Response.Response.StatusCode
25374			}
25375			tracing.EndSpan(ctx, sc, err)
25376		}()
25377	}
25378	iter.i++
25379	if iter.i < len(iter.page.Values()) {
25380		return nil
25381	}
25382	err = iter.page.NextWithContext(ctx)
25383	if err != nil {
25384		iter.i--
25385		return err
25386	}
25387	iter.i = 0
25388	return nil
25389}
25390
25391// Next advances to the next value.  If there was an error making
25392// the request the iterator does not advance and the error is returned.
25393// Deprecated: Use NextWithContext() instead.
25394func (iter *RouteListResultIterator) Next() error {
25395	return iter.NextWithContext(context.Background())
25396}
25397
25398// NotDone returns true if the enumeration should be started or is not yet complete.
25399func (iter RouteListResultIterator) NotDone() bool {
25400	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25401}
25402
25403// Response returns the raw server response from the last page request.
25404func (iter RouteListResultIterator) Response() RouteListResult {
25405	return iter.page.Response()
25406}
25407
25408// Value returns the current value or a zero-initialized value if the
25409// iterator has advanced beyond the end of the collection.
25410func (iter RouteListResultIterator) Value() Route {
25411	if !iter.page.NotDone() {
25412		return Route{}
25413	}
25414	return iter.page.Values()[iter.i]
25415}
25416
25417// Creates a new instance of the RouteListResultIterator type.
25418func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
25419	return RouteListResultIterator{page: page}
25420}
25421
25422// IsEmpty returns true if the ListResult contains no values.
25423func (rlr RouteListResult) IsEmpty() bool {
25424	return rlr.Value == nil || len(*rlr.Value) == 0
25425}
25426
25427// hasNextLink returns true if the NextLink is not empty.
25428func (rlr RouteListResult) hasNextLink() bool {
25429	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
25430}
25431
25432// routeListResultPreparer prepares a request to retrieve the next set of results.
25433// It returns nil if no more results exist.
25434func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
25435	if !rlr.hasNextLink() {
25436		return nil, nil
25437	}
25438	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25439		autorest.AsJSON(),
25440		autorest.AsGet(),
25441		autorest.WithBaseURL(to.String(rlr.NextLink)))
25442}
25443
25444// RouteListResultPage contains a page of Route values.
25445type RouteListResultPage struct {
25446	fn  func(context.Context, RouteListResult) (RouteListResult, error)
25447	rlr RouteListResult
25448}
25449
25450// NextWithContext advances to the next page of values.  If there was an error making
25451// the request the page does not advance and the error is returned.
25452func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
25453	if tracing.IsEnabled() {
25454		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
25455		defer func() {
25456			sc := -1
25457			if page.Response().Response.Response != nil {
25458				sc = page.Response().Response.Response.StatusCode
25459			}
25460			tracing.EndSpan(ctx, sc, err)
25461		}()
25462	}
25463	for {
25464		next, err := page.fn(ctx, page.rlr)
25465		if err != nil {
25466			return err
25467		}
25468		page.rlr = next
25469		if !next.hasNextLink() || !next.IsEmpty() {
25470			break
25471		}
25472	}
25473	return nil
25474}
25475
25476// Next advances to the next page of values.  If there was an error making
25477// the request the page does not advance and the error is returned.
25478// Deprecated: Use NextWithContext() instead.
25479func (page *RouteListResultPage) Next() error {
25480	return page.NextWithContext(context.Background())
25481}
25482
25483// NotDone returns true if the page enumeration should be started or is not yet complete.
25484func (page RouteListResultPage) NotDone() bool {
25485	return !page.rlr.IsEmpty()
25486}
25487
25488// Response returns the raw server response from the last page request.
25489func (page RouteListResultPage) Response() RouteListResult {
25490	return page.rlr
25491}
25492
25493// Values returns the slice of values for the current page or nil if there are no values.
25494func (page RouteListResultPage) Values() []Route {
25495	if page.rlr.IsEmpty() {
25496		return nil
25497	}
25498	return *page.rlr.Value
25499}
25500
25501// Creates a new instance of the RouteListResultPage type.
25502func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
25503	return RouteListResultPage{
25504		fn:  getNextPage,
25505		rlr: cur,
25506	}
25507}
25508
25509// RoutePropertiesFormat route resource.
25510type RoutePropertiesFormat struct {
25511	// AddressPrefix - The destination CIDR to which the route applies.
25512	AddressPrefix *string `json:"addressPrefix,omitempty"`
25513	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
25514	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
25515	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
25516	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
25517	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25518	ProvisioningState *string `json:"provisioningState,omitempty"`
25519}
25520
25521// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25522// operation.
25523type RoutesCreateOrUpdateFuture struct {
25524	azure.FutureAPI
25525	// Result returns the result of the asynchronous operation.
25526	// If the operation has not completed it will return an error.
25527	Result func(RoutesClient) (Route, error)
25528}
25529
25530// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25531func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25532	var azFuture azure.Future
25533	if err := json.Unmarshal(body, &azFuture); err != nil {
25534		return err
25535	}
25536	future.FutureAPI = &azFuture
25537	future.Result = future.result
25538	return nil
25539}
25540
25541// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
25542func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
25543	var done bool
25544	done, err = future.DoneWithContext(context.Background(), client)
25545	if err != nil {
25546		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25547		return
25548	}
25549	if !done {
25550		r.Response.Response = future.Response()
25551		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
25552		return
25553	}
25554	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25555	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
25556		r, err = client.CreateOrUpdateResponder(r.Response.Response)
25557		if err != nil {
25558			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
25559		}
25560	}
25561	return
25562}
25563
25564// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
25565type RoutesDeleteFuture struct {
25566	azure.FutureAPI
25567	// Result returns the result of the asynchronous operation.
25568	// If the operation has not completed it will return an error.
25569	Result func(RoutesClient) (autorest.Response, error)
25570}
25571
25572// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25573func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
25574	var azFuture azure.Future
25575	if err := json.Unmarshal(body, &azFuture); err != nil {
25576		return err
25577	}
25578	future.FutureAPI = &azFuture
25579	future.Result = future.result
25580	return nil
25581}
25582
25583// result is the default implementation for RoutesDeleteFuture.Result.
25584func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
25585	var done bool
25586	done, err = future.DoneWithContext(context.Background(), client)
25587	if err != nil {
25588		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
25589		return
25590	}
25591	if !done {
25592		ar.Response = future.Response()
25593		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
25594		return
25595	}
25596	ar.Response = future.Response()
25597	return
25598}
25599
25600// RouteTable route table resource.
25601type RouteTable struct {
25602	autorest.Response `json:"-"`
25603	// RouteTablePropertiesFormat - Properties of the route table.
25604	*RouteTablePropertiesFormat `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 RouteTable.
25620func (rt RouteTable) MarshalJSON() ([]byte, error) {
25621	objectMap := make(map[string]interface{})
25622	if rt.RouteTablePropertiesFormat != nil {
25623		objectMap["properties"] = rt.RouteTablePropertiesFormat
25624	}
25625	if rt.Etag != nil {
25626		objectMap["etag"] = rt.Etag
25627	}
25628	if rt.ID != nil {
25629		objectMap["id"] = rt.ID
25630	}
25631	if rt.Location != nil {
25632		objectMap["location"] = rt.Location
25633	}
25634	if rt.Tags != nil {
25635		objectMap["tags"] = rt.Tags
25636	}
25637	return json.Marshal(objectMap)
25638}
25639
25640// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
25641func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat
25652				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
25653				if err != nil {
25654					return err
25655				}
25656				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
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				rt.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				rt.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				rt.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				rt.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				rt.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				rt.Tags = tags
25711			}
25712		}
25713	}
25714
25715	return nil
25716}
25717
25718// RouteTableListResult response for the ListRouteTable API service call.
25719type RouteTableListResult struct {
25720	autorest.Response `json:"-"`
25721	// Value - Gets a list of route tables in a resource group.
25722	Value *[]RouteTable `json:"value,omitempty"`
25723	// NextLink - The URL to get the next set of results.
25724	NextLink *string `json:"nextLink,omitempty"`
25725}
25726
25727// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
25728type RouteTableListResultIterator struct {
25729	i    int
25730	page RouteTableListResultPage
25731}
25732
25733// NextWithContext advances to the next value.  If there was an error making
25734// the request the iterator does not advance and the error is returned.
25735func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
25736	if tracing.IsEnabled() {
25737		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
25738		defer func() {
25739			sc := -1
25740			if iter.Response().Response.Response != nil {
25741				sc = iter.Response().Response.Response.StatusCode
25742			}
25743			tracing.EndSpan(ctx, sc, err)
25744		}()
25745	}
25746	iter.i++
25747	if iter.i < len(iter.page.Values()) {
25748		return nil
25749	}
25750	err = iter.page.NextWithContext(ctx)
25751	if err != nil {
25752		iter.i--
25753		return err
25754	}
25755	iter.i = 0
25756	return nil
25757}
25758
25759// Next advances to the next value.  If there was an error making
25760// the request the iterator does not advance and the error is returned.
25761// Deprecated: Use NextWithContext() instead.
25762func (iter *RouteTableListResultIterator) Next() error {
25763	return iter.NextWithContext(context.Background())
25764}
25765
25766// NotDone returns true if the enumeration should be started or is not yet complete.
25767func (iter RouteTableListResultIterator) NotDone() bool {
25768	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25769}
25770
25771// Response returns the raw server response from the last page request.
25772func (iter RouteTableListResultIterator) Response() RouteTableListResult {
25773	return iter.page.Response()
25774}
25775
25776// Value returns the current value or a zero-initialized value if the
25777// iterator has advanced beyond the end of the collection.
25778func (iter RouteTableListResultIterator) Value() RouteTable {
25779	if !iter.page.NotDone() {
25780		return RouteTable{}
25781	}
25782	return iter.page.Values()[iter.i]
25783}
25784
25785// Creates a new instance of the RouteTableListResultIterator type.
25786func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
25787	return RouteTableListResultIterator{page: page}
25788}
25789
25790// IsEmpty returns true if the ListResult contains no values.
25791func (rtlr RouteTableListResult) IsEmpty() bool {
25792	return rtlr.Value == nil || len(*rtlr.Value) == 0
25793}
25794
25795// hasNextLink returns true if the NextLink is not empty.
25796func (rtlr RouteTableListResult) hasNextLink() bool {
25797	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
25798}
25799
25800// routeTableListResultPreparer prepares a request to retrieve the next set of results.
25801// It returns nil if no more results exist.
25802func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
25803	if !rtlr.hasNextLink() {
25804		return nil, nil
25805	}
25806	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25807		autorest.AsJSON(),
25808		autorest.AsGet(),
25809		autorest.WithBaseURL(to.String(rtlr.NextLink)))
25810}
25811
25812// RouteTableListResultPage contains a page of RouteTable values.
25813type RouteTableListResultPage struct {
25814	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
25815	rtlr RouteTableListResult
25816}
25817
25818// NextWithContext advances to the next page of values.  If there was an error making
25819// the request the page does not advance and the error is returned.
25820func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
25821	if tracing.IsEnabled() {
25822		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
25823		defer func() {
25824			sc := -1
25825			if page.Response().Response.Response != nil {
25826				sc = page.Response().Response.Response.StatusCode
25827			}
25828			tracing.EndSpan(ctx, sc, err)
25829		}()
25830	}
25831	for {
25832		next, err := page.fn(ctx, page.rtlr)
25833		if err != nil {
25834			return err
25835		}
25836		page.rtlr = next
25837		if !next.hasNextLink() || !next.IsEmpty() {
25838			break
25839		}
25840	}
25841	return nil
25842}
25843
25844// Next advances to the next page of values.  If there was an error making
25845// the request the page does not advance and the error is returned.
25846// Deprecated: Use NextWithContext() instead.
25847func (page *RouteTableListResultPage) Next() error {
25848	return page.NextWithContext(context.Background())
25849}
25850
25851// NotDone returns true if the page enumeration should be started or is not yet complete.
25852func (page RouteTableListResultPage) NotDone() bool {
25853	return !page.rtlr.IsEmpty()
25854}
25855
25856// Response returns the raw server response from the last page request.
25857func (page RouteTableListResultPage) Response() RouteTableListResult {
25858	return page.rtlr
25859}
25860
25861// Values returns the slice of values for the current page or nil if there are no values.
25862func (page RouteTableListResultPage) Values() []RouteTable {
25863	if page.rtlr.IsEmpty() {
25864		return nil
25865	}
25866	return *page.rtlr.Value
25867}
25868
25869// Creates a new instance of the RouteTableListResultPage type.
25870func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
25871	return RouteTableListResultPage{
25872		fn:   getNextPage,
25873		rtlr: cur,
25874	}
25875}
25876
25877// RouteTablePropertiesFormat route Table resource.
25878type RouteTablePropertiesFormat struct {
25879	// Routes - Collection of routes contained within a route table.
25880	Routes *[]Route `json:"routes,omitempty"`
25881	// Subnets - READ-ONLY; A collection of references to subnets.
25882	Subnets *[]Subnet `json:"subnets,omitempty"`
25883	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
25884	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
25885	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25886	ProvisioningState *string `json:"provisioningState,omitempty"`
25887}
25888
25889// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
25890func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
25891	objectMap := make(map[string]interface{})
25892	if rtpf.Routes != nil {
25893		objectMap["routes"] = rtpf.Routes
25894	}
25895	if rtpf.DisableBgpRoutePropagation != nil {
25896		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
25897	}
25898	if rtpf.ProvisioningState != nil {
25899		objectMap["provisioningState"] = rtpf.ProvisioningState
25900	}
25901	return json.Marshal(objectMap)
25902}
25903
25904// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25905// long-running operation.
25906type RouteTablesCreateOrUpdateFuture struct {
25907	azure.FutureAPI
25908	// Result returns the result of the asynchronous operation.
25909	// If the operation has not completed it will return an error.
25910	Result func(RouteTablesClient) (RouteTable, error)
25911}
25912
25913// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25914func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25915	var azFuture azure.Future
25916	if err := json.Unmarshal(body, &azFuture); err != nil {
25917		return err
25918	}
25919	future.FutureAPI = &azFuture
25920	future.Result = future.result
25921	return nil
25922}
25923
25924// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
25925func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
25926	var done bool
25927	done, err = future.DoneWithContext(context.Background(), client)
25928	if err != nil {
25929		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25930		return
25931	}
25932	if !done {
25933		rt.Response.Response = future.Response()
25934		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
25935		return
25936	}
25937	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25938	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
25939		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
25940		if err != nil {
25941			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
25942		}
25943	}
25944	return
25945}
25946
25947// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25948// operation.
25949type RouteTablesDeleteFuture struct {
25950	azure.FutureAPI
25951	// Result returns the result of the asynchronous operation.
25952	// If the operation has not completed it will return an error.
25953	Result func(RouteTablesClient) (autorest.Response, error)
25954}
25955
25956// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25957func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
25958	var azFuture azure.Future
25959	if err := json.Unmarshal(body, &azFuture); err != nil {
25960		return err
25961	}
25962	future.FutureAPI = &azFuture
25963	future.Result = future.result
25964	return nil
25965}
25966
25967// result is the default implementation for RouteTablesDeleteFuture.Result.
25968func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
25969	var done bool
25970	done, err = future.DoneWithContext(context.Background(), client)
25971	if err != nil {
25972		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
25973		return
25974	}
25975	if !done {
25976		ar.Response = future.Response()
25977		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
25978		return
25979	}
25980	ar.Response = future.Response()
25981	return
25982}
25983
25984// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25985// operation.
25986type RouteTablesUpdateTagsFuture struct {
25987	azure.FutureAPI
25988	// Result returns the result of the asynchronous operation.
25989	// If the operation has not completed it will return an error.
25990	Result func(RouteTablesClient) (RouteTable, error)
25991}
25992
25993// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25994func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25995	var azFuture azure.Future
25996	if err := json.Unmarshal(body, &azFuture); err != nil {
25997		return err
25998	}
25999	future.FutureAPI = &azFuture
26000	future.Result = future.result
26001	return nil
26002}
26003
26004// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
26005func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
26006	var done bool
26007	done, err = future.DoneWithContext(context.Background(), client)
26008	if err != nil {
26009		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
26010		return
26011	}
26012	if !done {
26013		rt.Response.Response = future.Response()
26014		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
26015		return
26016	}
26017	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26018	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
26019		rt, err = client.UpdateTagsResponder(rt.Response.Response)
26020		if err != nil {
26021			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
26022		}
26023	}
26024	return
26025}
26026
26027// SecurityGroup networkSecurityGroup resource.
26028type SecurityGroup struct {
26029	autorest.Response `json:"-"`
26030	// SecurityGroupPropertiesFormat - Properties of the network security group.
26031	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
26032	// Etag - A unique read-only string that changes whenever the resource is updated.
26033	Etag *string `json:"etag,omitempty"`
26034	// ID - Resource ID.
26035	ID *string `json:"id,omitempty"`
26036	// Name - READ-ONLY; Resource name.
26037	Name *string `json:"name,omitempty"`
26038	// Type - READ-ONLY; Resource type.
26039	Type *string `json:"type,omitempty"`
26040	// Location - Resource location.
26041	Location *string `json:"location,omitempty"`
26042	// Tags - Resource tags.
26043	Tags map[string]*string `json:"tags"`
26044}
26045
26046// MarshalJSON is the custom marshaler for SecurityGroup.
26047func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
26048	objectMap := make(map[string]interface{})
26049	if sg.SecurityGroupPropertiesFormat != nil {
26050		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
26051	}
26052	if sg.Etag != nil {
26053		objectMap["etag"] = sg.Etag
26054	}
26055	if sg.ID != nil {
26056		objectMap["id"] = sg.ID
26057	}
26058	if sg.Location != nil {
26059		objectMap["location"] = sg.Location
26060	}
26061	if sg.Tags != nil {
26062		objectMap["tags"] = sg.Tags
26063	}
26064	return json.Marshal(objectMap)
26065}
26066
26067// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
26068func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
26069	var m map[string]*json.RawMessage
26070	err := json.Unmarshal(body, &m)
26071	if err != nil {
26072		return err
26073	}
26074	for k, v := range m {
26075		switch k {
26076		case "properties":
26077			if v != nil {
26078				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
26079				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
26080				if err != nil {
26081					return err
26082				}
26083				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
26084			}
26085		case "etag":
26086			if v != nil {
26087				var etag string
26088				err = json.Unmarshal(*v, &etag)
26089				if err != nil {
26090					return err
26091				}
26092				sg.Etag = &etag
26093			}
26094		case "id":
26095			if v != nil {
26096				var ID string
26097				err = json.Unmarshal(*v, &ID)
26098				if err != nil {
26099					return err
26100				}
26101				sg.ID = &ID
26102			}
26103		case "name":
26104			if v != nil {
26105				var name string
26106				err = json.Unmarshal(*v, &name)
26107				if err != nil {
26108					return err
26109				}
26110				sg.Name = &name
26111			}
26112		case "type":
26113			if v != nil {
26114				var typeVar string
26115				err = json.Unmarshal(*v, &typeVar)
26116				if err != nil {
26117					return err
26118				}
26119				sg.Type = &typeVar
26120			}
26121		case "location":
26122			if v != nil {
26123				var location string
26124				err = json.Unmarshal(*v, &location)
26125				if err != nil {
26126					return err
26127				}
26128				sg.Location = &location
26129			}
26130		case "tags":
26131			if v != nil {
26132				var tags map[string]*string
26133				err = json.Unmarshal(*v, &tags)
26134				if err != nil {
26135					return err
26136				}
26137				sg.Tags = tags
26138			}
26139		}
26140	}
26141
26142	return nil
26143}
26144
26145// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
26146type SecurityGroupListResult struct {
26147	autorest.Response `json:"-"`
26148	// Value - A list of NetworkSecurityGroup resources.
26149	Value *[]SecurityGroup `json:"value,omitempty"`
26150	// NextLink - The URL to get the next set of results.
26151	NextLink *string `json:"nextLink,omitempty"`
26152}
26153
26154// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
26155type SecurityGroupListResultIterator struct {
26156	i    int
26157	page SecurityGroupListResultPage
26158}
26159
26160// NextWithContext advances to the next value.  If there was an error making
26161// the request the iterator does not advance and the error is returned.
26162func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
26163	if tracing.IsEnabled() {
26164		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
26165		defer func() {
26166			sc := -1
26167			if iter.Response().Response.Response != nil {
26168				sc = iter.Response().Response.Response.StatusCode
26169			}
26170			tracing.EndSpan(ctx, sc, err)
26171		}()
26172	}
26173	iter.i++
26174	if iter.i < len(iter.page.Values()) {
26175		return nil
26176	}
26177	err = iter.page.NextWithContext(ctx)
26178	if err != nil {
26179		iter.i--
26180		return err
26181	}
26182	iter.i = 0
26183	return nil
26184}
26185
26186// Next advances to the next value.  If there was an error making
26187// the request the iterator does not advance and the error is returned.
26188// Deprecated: Use NextWithContext() instead.
26189func (iter *SecurityGroupListResultIterator) Next() error {
26190	return iter.NextWithContext(context.Background())
26191}
26192
26193// NotDone returns true if the enumeration should be started or is not yet complete.
26194func (iter SecurityGroupListResultIterator) NotDone() bool {
26195	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26196}
26197
26198// Response returns the raw server response from the last page request.
26199func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
26200	return iter.page.Response()
26201}
26202
26203// Value returns the current value or a zero-initialized value if the
26204// iterator has advanced beyond the end of the collection.
26205func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
26206	if !iter.page.NotDone() {
26207		return SecurityGroup{}
26208	}
26209	return iter.page.Values()[iter.i]
26210}
26211
26212// Creates a new instance of the SecurityGroupListResultIterator type.
26213func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
26214	return SecurityGroupListResultIterator{page: page}
26215}
26216
26217// IsEmpty returns true if the ListResult contains no values.
26218func (sglr SecurityGroupListResult) IsEmpty() bool {
26219	return sglr.Value == nil || len(*sglr.Value) == 0
26220}
26221
26222// hasNextLink returns true if the NextLink is not empty.
26223func (sglr SecurityGroupListResult) hasNextLink() bool {
26224	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
26225}
26226
26227// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
26228// It returns nil if no more results exist.
26229func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
26230	if !sglr.hasNextLink() {
26231		return nil, nil
26232	}
26233	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26234		autorest.AsJSON(),
26235		autorest.AsGet(),
26236		autorest.WithBaseURL(to.String(sglr.NextLink)))
26237}
26238
26239// SecurityGroupListResultPage contains a page of SecurityGroup values.
26240type SecurityGroupListResultPage struct {
26241	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
26242	sglr SecurityGroupListResult
26243}
26244
26245// NextWithContext advances to the next page of values.  If there was an error making
26246// the request the page does not advance and the error is returned.
26247func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
26248	if tracing.IsEnabled() {
26249		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
26250		defer func() {
26251			sc := -1
26252			if page.Response().Response.Response != nil {
26253				sc = page.Response().Response.Response.StatusCode
26254			}
26255			tracing.EndSpan(ctx, sc, err)
26256		}()
26257	}
26258	for {
26259		next, err := page.fn(ctx, page.sglr)
26260		if err != nil {
26261			return err
26262		}
26263		page.sglr = next
26264		if !next.hasNextLink() || !next.IsEmpty() {
26265			break
26266		}
26267	}
26268	return nil
26269}
26270
26271// Next advances to the next page of values.  If there was an error making
26272// the request the page does not advance and the error is returned.
26273// Deprecated: Use NextWithContext() instead.
26274func (page *SecurityGroupListResultPage) Next() error {
26275	return page.NextWithContext(context.Background())
26276}
26277
26278// NotDone returns true if the page enumeration should be started or is not yet complete.
26279func (page SecurityGroupListResultPage) NotDone() bool {
26280	return !page.sglr.IsEmpty()
26281}
26282
26283// Response returns the raw server response from the last page request.
26284func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
26285	return page.sglr
26286}
26287
26288// Values returns the slice of values for the current page or nil if there are no values.
26289func (page SecurityGroupListResultPage) Values() []SecurityGroup {
26290	if page.sglr.IsEmpty() {
26291		return nil
26292	}
26293	return *page.sglr.Value
26294}
26295
26296// Creates a new instance of the SecurityGroupListResultPage type.
26297func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
26298	return SecurityGroupListResultPage{
26299		fn:   getNextPage,
26300		sglr: cur,
26301	}
26302}
26303
26304// SecurityGroupNetworkInterface network interface and all its associated security rules.
26305type SecurityGroupNetworkInterface struct {
26306	// ID - ID of the network interface.
26307	ID *string `json:"id,omitempty"`
26308	// SecurityRuleAssociations - All security rules associated with the network interface.
26309	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
26310}
26311
26312// SecurityGroupPropertiesFormat network Security Group resource.
26313type SecurityGroupPropertiesFormat struct {
26314	// SecurityRules - A collection of security rules of the network security group.
26315	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
26316	// DefaultSecurityRules - The default security rules of network security group.
26317	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
26318	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
26319	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
26320	// Subnets - READ-ONLY; A collection of references to subnets.
26321	Subnets *[]Subnet `json:"subnets,omitempty"`
26322	// ResourceGUID - The resource GUID property of the network security group resource.
26323	ResourceGUID *string `json:"resourceGuid,omitempty"`
26324	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26325	ProvisioningState *string `json:"provisioningState,omitempty"`
26326}
26327
26328// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
26329func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
26330	objectMap := make(map[string]interface{})
26331	if sgpf.SecurityRules != nil {
26332		objectMap["securityRules"] = sgpf.SecurityRules
26333	}
26334	if sgpf.DefaultSecurityRules != nil {
26335		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
26336	}
26337	if sgpf.ResourceGUID != nil {
26338		objectMap["resourceGuid"] = sgpf.ResourceGUID
26339	}
26340	if sgpf.ProvisioningState != nil {
26341		objectMap["provisioningState"] = sgpf.ProvisioningState
26342	}
26343	return json.Marshal(objectMap)
26344}
26345
26346// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
26347type SecurityGroupResult struct {
26348	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
26349	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
26350	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
26351	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
26352}
26353
26354// MarshalJSON is the custom marshaler for SecurityGroupResult.
26355func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
26356	objectMap := make(map[string]interface{})
26357	if sgr.SecurityRuleAccessResult != "" {
26358		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
26359	}
26360	return json.Marshal(objectMap)
26361}
26362
26363// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26364// long-running operation.
26365type SecurityGroupsCreateOrUpdateFuture struct {
26366	azure.FutureAPI
26367	// Result returns the result of the asynchronous operation.
26368	// If the operation has not completed it will return an error.
26369	Result func(SecurityGroupsClient) (SecurityGroup, error)
26370}
26371
26372// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26373func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26374	var azFuture azure.Future
26375	if err := json.Unmarshal(body, &azFuture); err != nil {
26376		return err
26377	}
26378	future.FutureAPI = &azFuture
26379	future.Result = future.result
26380	return nil
26381}
26382
26383// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
26384func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
26385	var done bool
26386	done, err = future.DoneWithContext(context.Background(), client)
26387	if err != nil {
26388		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26389		return
26390	}
26391	if !done {
26392		sg.Response.Response = future.Response()
26393		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
26394		return
26395	}
26396	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26397	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
26398		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
26399		if err != nil {
26400			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
26401		}
26402	}
26403	return
26404}
26405
26406// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26407// operation.
26408type SecurityGroupsDeleteFuture struct {
26409	azure.FutureAPI
26410	// Result returns the result of the asynchronous operation.
26411	// If the operation has not completed it will return an error.
26412	Result func(SecurityGroupsClient) (autorest.Response, error)
26413}
26414
26415// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26416func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
26417	var azFuture azure.Future
26418	if err := json.Unmarshal(body, &azFuture); err != nil {
26419		return err
26420	}
26421	future.FutureAPI = &azFuture
26422	future.Result = future.result
26423	return nil
26424}
26425
26426// result is the default implementation for SecurityGroupsDeleteFuture.Result.
26427func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
26428	var done bool
26429	done, err = future.DoneWithContext(context.Background(), client)
26430	if err != nil {
26431		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
26432		return
26433	}
26434	if !done {
26435		ar.Response = future.Response()
26436		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
26437		return
26438	}
26439	ar.Response = future.Response()
26440	return
26441}
26442
26443// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
26444// long-running operation.
26445type SecurityGroupsUpdateTagsFuture struct {
26446	azure.FutureAPI
26447	// Result returns the result of the asynchronous operation.
26448	// If the operation has not completed it will return an error.
26449	Result func(SecurityGroupsClient) (SecurityGroup, error)
26450}
26451
26452// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26453func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
26454	var azFuture azure.Future
26455	if err := json.Unmarshal(body, &azFuture); err != nil {
26456		return err
26457	}
26458	future.FutureAPI = &azFuture
26459	future.Result = future.result
26460	return nil
26461}
26462
26463// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
26464func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
26465	var done bool
26466	done, err = future.DoneWithContext(context.Background(), client)
26467	if err != nil {
26468		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
26469		return
26470	}
26471	if !done {
26472		sg.Response.Response = future.Response()
26473		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
26474		return
26475	}
26476	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26477	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
26478		sg, err = client.UpdateTagsResponder(sg.Response.Response)
26479		if err != nil {
26480			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
26481		}
26482	}
26483	return
26484}
26485
26486// SecurityGroupViewParameters parameters that define the VM to check security groups for.
26487type SecurityGroupViewParameters struct {
26488	// TargetResourceID - ID of the target VM.
26489	TargetResourceID *string `json:"targetResourceId,omitempty"`
26490}
26491
26492// SecurityGroupViewResult the information about security rules applied to the specified VM.
26493type SecurityGroupViewResult struct {
26494	autorest.Response `json:"-"`
26495	// NetworkInterfaces - List of network interfaces on the specified VM.
26496	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
26497}
26498
26499// SecurityRule network security rule.
26500type SecurityRule struct {
26501	autorest.Response `json:"-"`
26502	// SecurityRulePropertiesFormat - Properties of the security rule.
26503	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
26504	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26505	Name *string `json:"name,omitempty"`
26506	// Etag - A unique read-only string that changes whenever the resource is updated.
26507	Etag *string `json:"etag,omitempty"`
26508	// ID - Resource ID.
26509	ID *string `json:"id,omitempty"`
26510}
26511
26512// MarshalJSON is the custom marshaler for SecurityRule.
26513func (sr SecurityRule) MarshalJSON() ([]byte, error) {
26514	objectMap := make(map[string]interface{})
26515	if sr.SecurityRulePropertiesFormat != nil {
26516		objectMap["properties"] = sr.SecurityRulePropertiesFormat
26517	}
26518	if sr.Name != nil {
26519		objectMap["name"] = sr.Name
26520	}
26521	if sr.Etag != nil {
26522		objectMap["etag"] = sr.Etag
26523	}
26524	if sr.ID != nil {
26525		objectMap["id"] = sr.ID
26526	}
26527	return json.Marshal(objectMap)
26528}
26529
26530// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
26531func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
26532	var m map[string]*json.RawMessage
26533	err := json.Unmarshal(body, &m)
26534	if err != nil {
26535		return err
26536	}
26537	for k, v := range m {
26538		switch k {
26539		case "properties":
26540			if v != nil {
26541				var securityRulePropertiesFormat SecurityRulePropertiesFormat
26542				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
26543				if err != nil {
26544					return err
26545				}
26546				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
26547			}
26548		case "name":
26549			if v != nil {
26550				var name string
26551				err = json.Unmarshal(*v, &name)
26552				if err != nil {
26553					return err
26554				}
26555				sr.Name = &name
26556			}
26557		case "etag":
26558			if v != nil {
26559				var etag string
26560				err = json.Unmarshal(*v, &etag)
26561				if err != nil {
26562					return err
26563				}
26564				sr.Etag = &etag
26565			}
26566		case "id":
26567			if v != nil {
26568				var ID string
26569				err = json.Unmarshal(*v, &ID)
26570				if err != nil {
26571					return err
26572				}
26573				sr.ID = &ID
26574			}
26575		}
26576	}
26577
26578	return nil
26579}
26580
26581// SecurityRuleAssociations all security rules associated with the network interface.
26582type SecurityRuleAssociations struct {
26583	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
26584	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
26585	// SubnetAssociation - Subnet and it's custom security rules.
26586	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
26587	// DefaultSecurityRules - Collection of default security rules of the network security group.
26588	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
26589	// EffectiveSecurityRules - Collection of effective security rules.
26590	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
26591}
26592
26593// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
26594// belongs to a network security group.
26595type SecurityRuleListResult struct {
26596	autorest.Response `json:"-"`
26597	// Value - The security rules in a network security group.
26598	Value *[]SecurityRule `json:"value,omitempty"`
26599	// NextLink - The URL to get the next set of results.
26600	NextLink *string `json:"nextLink,omitempty"`
26601}
26602
26603// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
26604type SecurityRuleListResultIterator struct {
26605	i    int
26606	page SecurityRuleListResultPage
26607}
26608
26609// NextWithContext advances to the next value.  If there was an error making
26610// the request the iterator does not advance and the error is returned.
26611func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
26612	if tracing.IsEnabled() {
26613		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
26614		defer func() {
26615			sc := -1
26616			if iter.Response().Response.Response != nil {
26617				sc = iter.Response().Response.Response.StatusCode
26618			}
26619			tracing.EndSpan(ctx, sc, err)
26620		}()
26621	}
26622	iter.i++
26623	if iter.i < len(iter.page.Values()) {
26624		return nil
26625	}
26626	err = iter.page.NextWithContext(ctx)
26627	if err != nil {
26628		iter.i--
26629		return err
26630	}
26631	iter.i = 0
26632	return nil
26633}
26634
26635// Next advances to the next value.  If there was an error making
26636// the request the iterator does not advance and the error is returned.
26637// Deprecated: Use NextWithContext() instead.
26638func (iter *SecurityRuleListResultIterator) Next() error {
26639	return iter.NextWithContext(context.Background())
26640}
26641
26642// NotDone returns true if the enumeration should be started or is not yet complete.
26643func (iter SecurityRuleListResultIterator) NotDone() bool {
26644	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26645}
26646
26647// Response returns the raw server response from the last page request.
26648func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
26649	return iter.page.Response()
26650}
26651
26652// Value returns the current value or a zero-initialized value if the
26653// iterator has advanced beyond the end of the collection.
26654func (iter SecurityRuleListResultIterator) Value() SecurityRule {
26655	if !iter.page.NotDone() {
26656		return SecurityRule{}
26657	}
26658	return iter.page.Values()[iter.i]
26659}
26660
26661// Creates a new instance of the SecurityRuleListResultIterator type.
26662func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
26663	return SecurityRuleListResultIterator{page: page}
26664}
26665
26666// IsEmpty returns true if the ListResult contains no values.
26667func (srlr SecurityRuleListResult) IsEmpty() bool {
26668	return srlr.Value == nil || len(*srlr.Value) == 0
26669}
26670
26671// hasNextLink returns true if the NextLink is not empty.
26672func (srlr SecurityRuleListResult) hasNextLink() bool {
26673	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
26674}
26675
26676// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
26677// It returns nil if no more results exist.
26678func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
26679	if !srlr.hasNextLink() {
26680		return nil, nil
26681	}
26682	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26683		autorest.AsJSON(),
26684		autorest.AsGet(),
26685		autorest.WithBaseURL(to.String(srlr.NextLink)))
26686}
26687
26688// SecurityRuleListResultPage contains a page of SecurityRule values.
26689type SecurityRuleListResultPage struct {
26690	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
26691	srlr SecurityRuleListResult
26692}
26693
26694// NextWithContext advances to the next page of values.  If there was an error making
26695// the request the page does not advance and the error is returned.
26696func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
26697	if tracing.IsEnabled() {
26698		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
26699		defer func() {
26700			sc := -1
26701			if page.Response().Response.Response != nil {
26702				sc = page.Response().Response.Response.StatusCode
26703			}
26704			tracing.EndSpan(ctx, sc, err)
26705		}()
26706	}
26707	for {
26708		next, err := page.fn(ctx, page.srlr)
26709		if err != nil {
26710			return err
26711		}
26712		page.srlr = next
26713		if !next.hasNextLink() || !next.IsEmpty() {
26714			break
26715		}
26716	}
26717	return nil
26718}
26719
26720// Next advances to the next page of values.  If there was an error making
26721// the request the page does not advance and the error is returned.
26722// Deprecated: Use NextWithContext() instead.
26723func (page *SecurityRuleListResultPage) Next() error {
26724	return page.NextWithContext(context.Background())
26725}
26726
26727// NotDone returns true if the page enumeration should be started or is not yet complete.
26728func (page SecurityRuleListResultPage) NotDone() bool {
26729	return !page.srlr.IsEmpty()
26730}
26731
26732// Response returns the raw server response from the last page request.
26733func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
26734	return page.srlr
26735}
26736
26737// Values returns the slice of values for the current page or nil if there are no values.
26738func (page SecurityRuleListResultPage) Values() []SecurityRule {
26739	if page.srlr.IsEmpty() {
26740		return nil
26741	}
26742	return *page.srlr.Value
26743}
26744
26745// Creates a new instance of the SecurityRuleListResultPage type.
26746func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
26747	return SecurityRuleListResultPage{
26748		fn:   getNextPage,
26749		srlr: cur,
26750	}
26751}
26752
26753// SecurityRulePropertiesFormat security rule resource.
26754type SecurityRulePropertiesFormat struct {
26755	// Description - A description for this rule. Restricted to 140 chars.
26756	Description *string `json:"description,omitempty"`
26757	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
26758	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
26759	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
26760	SourcePortRange *string `json:"sourcePortRange,omitempty"`
26761	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
26762	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
26763	// 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.
26764	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
26765	// SourceAddressPrefixes - The CIDR or source IP ranges.
26766	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
26767	// SourceApplicationSecurityGroups - The application security group specified as source.
26768	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
26769	// 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.
26770	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
26771	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
26772	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
26773	// DestinationApplicationSecurityGroups - The application security group specified as destination.
26774	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
26775	// SourcePortRanges - The source port ranges.
26776	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
26777	// DestinationPortRanges - The destination port ranges.
26778	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
26779	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
26780	Access SecurityRuleAccess `json:"access,omitempty"`
26781	// 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.
26782	Priority *int32 `json:"priority,omitempty"`
26783	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
26784	Direction SecurityRuleDirection `json:"direction,omitempty"`
26785	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26786	ProvisioningState *string `json:"provisioningState,omitempty"`
26787}
26788
26789// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26790// long-running operation.
26791type SecurityRulesCreateOrUpdateFuture struct {
26792	azure.FutureAPI
26793	// Result returns the result of the asynchronous operation.
26794	// If the operation has not completed it will return an error.
26795	Result func(SecurityRulesClient) (SecurityRule, error)
26796}
26797
26798// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26799func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26800	var azFuture azure.Future
26801	if err := json.Unmarshal(body, &azFuture); err != nil {
26802		return err
26803	}
26804	future.FutureAPI = &azFuture
26805	future.Result = future.result
26806	return nil
26807}
26808
26809// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
26810func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
26811	var done bool
26812	done, err = future.DoneWithContext(context.Background(), client)
26813	if err != nil {
26814		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26815		return
26816	}
26817	if !done {
26818		sr.Response.Response = future.Response()
26819		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
26820		return
26821	}
26822	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26823	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
26824		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
26825		if err != nil {
26826			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
26827		}
26828	}
26829	return
26830}
26831
26832// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26833// operation.
26834type SecurityRulesDeleteFuture struct {
26835	azure.FutureAPI
26836	// Result returns the result of the asynchronous operation.
26837	// If the operation has not completed it will return an error.
26838	Result func(SecurityRulesClient) (autorest.Response, error)
26839}
26840
26841// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26842func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
26843	var azFuture azure.Future
26844	if err := json.Unmarshal(body, &azFuture); err != nil {
26845		return err
26846	}
26847	future.FutureAPI = &azFuture
26848	future.Result = future.result
26849	return nil
26850}
26851
26852// result is the default implementation for SecurityRulesDeleteFuture.Result.
26853func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
26854	var done bool
26855	done, err = future.DoneWithContext(context.Background(), client)
26856	if err != nil {
26857		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
26858		return
26859	}
26860	if !done {
26861		ar.Response = future.Response()
26862		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
26863		return
26864	}
26865	ar.Response = future.Response()
26866	return
26867}
26868
26869// SecurityRulesEvaluationResult network security rules evaluation result.
26870type SecurityRulesEvaluationResult struct {
26871	// Name - Name of the network security rule.
26872	Name *string `json:"name,omitempty"`
26873	// ProtocolMatched - Value indicating whether protocol is matched.
26874	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
26875	// SourceMatched - Value indicating whether source is matched.
26876	SourceMatched *bool `json:"sourceMatched,omitempty"`
26877	// SourcePortMatched - Value indicating whether source port is matched.
26878	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
26879	// DestinationMatched - Value indicating whether destination is matched.
26880	DestinationMatched *bool `json:"destinationMatched,omitempty"`
26881	// DestinationPortMatched - Value indicating whether destination port is matched.
26882	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
26883}
26884
26885// ServiceAssociationLink serviceAssociationLink resource.
26886type ServiceAssociationLink struct {
26887	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
26888	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
26889	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
26890	Name *string `json:"name,omitempty"`
26891	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
26892	Etag *string `json:"etag,omitempty"`
26893	// Type - Resource type.
26894	Type *string `json:"type,omitempty"`
26895	// ID - Resource ID.
26896	ID *string `json:"id,omitempty"`
26897}
26898
26899// MarshalJSON is the custom marshaler for ServiceAssociationLink.
26900func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
26901	objectMap := make(map[string]interface{})
26902	if sal.ServiceAssociationLinkPropertiesFormat != nil {
26903		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
26904	}
26905	if sal.Name != nil {
26906		objectMap["name"] = sal.Name
26907	}
26908	if sal.Type != nil {
26909		objectMap["type"] = sal.Type
26910	}
26911	if sal.ID != nil {
26912		objectMap["id"] = sal.ID
26913	}
26914	return json.Marshal(objectMap)
26915}
26916
26917// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
26918func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
26919	var m map[string]*json.RawMessage
26920	err := json.Unmarshal(body, &m)
26921	if err != nil {
26922		return err
26923	}
26924	for k, v := range m {
26925		switch k {
26926		case "properties":
26927			if v != nil {
26928				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
26929				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
26930				if err != nil {
26931					return err
26932				}
26933				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
26934			}
26935		case "name":
26936			if v != nil {
26937				var name string
26938				err = json.Unmarshal(*v, &name)
26939				if err != nil {
26940					return err
26941				}
26942				sal.Name = &name
26943			}
26944		case "etag":
26945			if v != nil {
26946				var etag string
26947				err = json.Unmarshal(*v, &etag)
26948				if err != nil {
26949					return err
26950				}
26951				sal.Etag = &etag
26952			}
26953		case "type":
26954			if v != nil {
26955				var typeVar string
26956				err = json.Unmarshal(*v, &typeVar)
26957				if err != nil {
26958					return err
26959				}
26960				sal.Type = &typeVar
26961			}
26962		case "id":
26963			if v != nil {
26964				var ID string
26965				err = json.Unmarshal(*v, &ID)
26966				if err != nil {
26967					return err
26968				}
26969				sal.ID = &ID
26970			}
26971		}
26972	}
26973
26974	return nil
26975}
26976
26977// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
26978type ServiceAssociationLinkPropertiesFormat struct {
26979	// LinkedResourceType - Resource type of the linked resource.
26980	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
26981	// Link - Link to the external resource.
26982	Link *string `json:"link,omitempty"`
26983	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
26984	ProvisioningState *string `json:"provisioningState,omitempty"`
26985	// AllowDelete - If true, the resource can be deleted.
26986	AllowDelete *bool `json:"allowDelete,omitempty"`
26987	// Locations - A list of locations.
26988	Locations *[]string `json:"locations,omitempty"`
26989}
26990
26991// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
26992func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
26993	objectMap := make(map[string]interface{})
26994	if salpf.LinkedResourceType != nil {
26995		objectMap["linkedResourceType"] = salpf.LinkedResourceType
26996	}
26997	if salpf.Link != nil {
26998		objectMap["link"] = salpf.Link
26999	}
27000	if salpf.AllowDelete != nil {
27001		objectMap["allowDelete"] = salpf.AllowDelete
27002	}
27003	if salpf.Locations != nil {
27004		objectMap["locations"] = salpf.Locations
27005	}
27006	return json.Marshal(objectMap)
27007}
27008
27009// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
27010type ServiceAssociationLinksListResult struct {
27011	autorest.Response `json:"-"`
27012	// Value - The service association links in a subnet.
27013	Value *[]ServiceAssociationLink `json:"value,omitempty"`
27014	// NextLink - READ-ONLY; The URL to get the next set of results.
27015	NextLink *string `json:"nextLink,omitempty"`
27016}
27017
27018// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
27019func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
27020	objectMap := make(map[string]interface{})
27021	if sallr.Value != nil {
27022		objectMap["value"] = sallr.Value
27023	}
27024	return json.Marshal(objectMap)
27025}
27026
27027// ServiceDelegationPropertiesFormat properties of a service delegation.
27028type ServiceDelegationPropertiesFormat struct {
27029	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
27030	ServiceName *string `json:"serviceName,omitempty"`
27031	// Actions - Describes the actions permitted to the service upon delegation.
27032	Actions *[]string `json:"actions,omitempty"`
27033	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
27034	ProvisioningState *string `json:"provisioningState,omitempty"`
27035}
27036
27037// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
27038func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
27039	objectMap := make(map[string]interface{})
27040	if sdpf.ServiceName != nil {
27041		objectMap["serviceName"] = sdpf.ServiceName
27042	}
27043	if sdpf.Actions != nil {
27044		objectMap["actions"] = sdpf.Actions
27045	}
27046	return json.Marshal(objectMap)
27047}
27048
27049// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
27050// a long-running operation.
27051type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
27052	azure.FutureAPI
27053	// Result returns the result of the asynchronous operation.
27054	// If the operation has not completed it will return an error.
27055	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
27056}
27057
27058// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27059func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27060	var azFuture azure.Future
27061	if err := json.Unmarshal(body, &azFuture); err != nil {
27062		return err
27063	}
27064	future.FutureAPI = &azFuture
27065	future.Result = future.result
27066	return nil
27067}
27068
27069// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
27070func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
27071	var done bool
27072	done, err = future.DoneWithContext(context.Background(), client)
27073	if err != nil {
27074		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27075		return
27076	}
27077	if !done {
27078		sep.Response.Response = future.Response()
27079		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
27080		return
27081	}
27082	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27083	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
27084		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
27085		if err != nil {
27086			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
27087		}
27088	}
27089	return
27090}
27091
27092// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
27093// long-running operation.
27094type ServiceEndpointPoliciesDeleteFuture struct {
27095	azure.FutureAPI
27096	// Result returns the result of the asynchronous operation.
27097	// If the operation has not completed it will return an error.
27098	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
27099}
27100
27101// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27102func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
27103	var azFuture azure.Future
27104	if err := json.Unmarshal(body, &azFuture); err != nil {
27105		return err
27106	}
27107	future.FutureAPI = &azFuture
27108	future.Result = future.result
27109	return nil
27110}
27111
27112// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
27113func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
27114	var done bool
27115	done, err = future.DoneWithContext(context.Background(), client)
27116	if err != nil {
27117		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
27118		return
27119	}
27120	if !done {
27121		ar.Response = future.Response()
27122		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
27123		return
27124	}
27125	ar.Response = future.Response()
27126	return
27127}
27128
27129// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
27130// long-running operation.
27131type ServiceEndpointPoliciesUpdateFuture struct {
27132	azure.FutureAPI
27133	// Result returns the result of the asynchronous operation.
27134	// If the operation has not completed it will return an error.
27135	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
27136}
27137
27138// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27139func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
27140	var azFuture azure.Future
27141	if err := json.Unmarshal(body, &azFuture); err != nil {
27142		return err
27143	}
27144	future.FutureAPI = &azFuture
27145	future.Result = future.result
27146	return nil
27147}
27148
27149// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
27150func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
27151	var done bool
27152	done, err = future.DoneWithContext(context.Background(), client)
27153	if err != nil {
27154		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
27155		return
27156	}
27157	if !done {
27158		sep.Response.Response = future.Response()
27159		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
27160		return
27161	}
27162	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27163	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
27164		sep, err = client.UpdateResponder(sep.Response.Response)
27165		if err != nil {
27166			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
27167		}
27168	}
27169	return
27170}
27171
27172// ServiceEndpointPolicy service End point policy resource.
27173type ServiceEndpointPolicy struct {
27174	autorest.Response `json:"-"`
27175	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
27176	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
27177	// Etag - A unique read-only string that changes whenever the resource is updated.
27178	Etag *string `json:"etag,omitempty"`
27179	// ID - Resource ID.
27180	ID *string `json:"id,omitempty"`
27181	// Name - READ-ONLY; Resource name.
27182	Name *string `json:"name,omitempty"`
27183	// Type - READ-ONLY; Resource type.
27184	Type *string `json:"type,omitempty"`
27185	// Location - Resource location.
27186	Location *string `json:"location,omitempty"`
27187	// Tags - Resource tags.
27188	Tags map[string]*string `json:"tags"`
27189}
27190
27191// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
27192func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
27193	objectMap := make(map[string]interface{})
27194	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
27195		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
27196	}
27197	if sep.Etag != nil {
27198		objectMap["etag"] = sep.Etag
27199	}
27200	if sep.ID != nil {
27201		objectMap["id"] = sep.ID
27202	}
27203	if sep.Location != nil {
27204		objectMap["location"] = sep.Location
27205	}
27206	if sep.Tags != nil {
27207		objectMap["tags"] = sep.Tags
27208	}
27209	return json.Marshal(objectMap)
27210}
27211
27212// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
27213func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
27214	var m map[string]*json.RawMessage
27215	err := json.Unmarshal(body, &m)
27216	if err != nil {
27217		return err
27218	}
27219	for k, v := range m {
27220		switch k {
27221		case "properties":
27222			if v != nil {
27223				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
27224				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
27225				if err != nil {
27226					return err
27227				}
27228				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
27229			}
27230		case "etag":
27231			if v != nil {
27232				var etag string
27233				err = json.Unmarshal(*v, &etag)
27234				if err != nil {
27235					return err
27236				}
27237				sep.Etag = &etag
27238			}
27239		case "id":
27240			if v != nil {
27241				var ID string
27242				err = json.Unmarshal(*v, &ID)
27243				if err != nil {
27244					return err
27245				}
27246				sep.ID = &ID
27247			}
27248		case "name":
27249			if v != nil {
27250				var name string
27251				err = json.Unmarshal(*v, &name)
27252				if err != nil {
27253					return err
27254				}
27255				sep.Name = &name
27256			}
27257		case "type":
27258			if v != nil {
27259				var typeVar string
27260				err = json.Unmarshal(*v, &typeVar)
27261				if err != nil {
27262					return err
27263				}
27264				sep.Type = &typeVar
27265			}
27266		case "location":
27267			if v != nil {
27268				var location string
27269				err = json.Unmarshal(*v, &location)
27270				if err != nil {
27271					return err
27272				}
27273				sep.Location = &location
27274			}
27275		case "tags":
27276			if v != nil {
27277				var tags map[string]*string
27278				err = json.Unmarshal(*v, &tags)
27279				if err != nil {
27280					return err
27281				}
27282				sep.Tags = tags
27283			}
27284		}
27285	}
27286
27287	return nil
27288}
27289
27290// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
27291type ServiceEndpointPolicyDefinition struct {
27292	autorest.Response `json:"-"`
27293	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
27294	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
27295	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27296	Name *string `json:"name,omitempty"`
27297	// Etag - A unique read-only string that changes whenever the resource is updated.
27298	Etag *string `json:"etag,omitempty"`
27299	// ID - Resource ID.
27300	ID *string `json:"id,omitempty"`
27301}
27302
27303// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
27304func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
27305	objectMap := make(map[string]interface{})
27306	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
27307		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
27308	}
27309	if sepd.Name != nil {
27310		objectMap["name"] = sepd.Name
27311	}
27312	if sepd.Etag != nil {
27313		objectMap["etag"] = sepd.Etag
27314	}
27315	if sepd.ID != nil {
27316		objectMap["id"] = sepd.ID
27317	}
27318	return json.Marshal(objectMap)
27319}
27320
27321// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
27322func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
27323	var m map[string]*json.RawMessage
27324	err := json.Unmarshal(body, &m)
27325	if err != nil {
27326		return err
27327	}
27328	for k, v := range m {
27329		switch k {
27330		case "properties":
27331			if v != nil {
27332				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
27333				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
27334				if err != nil {
27335					return err
27336				}
27337				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
27338			}
27339		case "name":
27340			if v != nil {
27341				var name string
27342				err = json.Unmarshal(*v, &name)
27343				if err != nil {
27344					return err
27345				}
27346				sepd.Name = &name
27347			}
27348		case "etag":
27349			if v != nil {
27350				var etag string
27351				err = json.Unmarshal(*v, &etag)
27352				if err != nil {
27353					return err
27354				}
27355				sepd.Etag = &etag
27356			}
27357		case "id":
27358			if v != nil {
27359				var ID string
27360				err = json.Unmarshal(*v, &ID)
27361				if err != nil {
27362					return err
27363				}
27364				sepd.ID = &ID
27365			}
27366		}
27367	}
27368
27369	return nil
27370}
27371
27372// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
27373// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
27374type ServiceEndpointPolicyDefinitionListResult struct {
27375	autorest.Response `json:"-"`
27376	// Value - The service endpoint policy definition in a service endpoint policy.
27377	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
27378	// NextLink - The URL to get the next set of results.
27379	NextLink *string `json:"nextLink,omitempty"`
27380}
27381
27382// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
27383// ServiceEndpointPolicyDefinition values.
27384type ServiceEndpointPolicyDefinitionListResultIterator struct {
27385	i    int
27386	page ServiceEndpointPolicyDefinitionListResultPage
27387}
27388
27389// NextWithContext advances to the next value.  If there was an error making
27390// the request the iterator does not advance and the error is returned.
27391func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
27392	if tracing.IsEnabled() {
27393		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
27394		defer func() {
27395			sc := -1
27396			if iter.Response().Response.Response != nil {
27397				sc = iter.Response().Response.Response.StatusCode
27398			}
27399			tracing.EndSpan(ctx, sc, err)
27400		}()
27401	}
27402	iter.i++
27403	if iter.i < len(iter.page.Values()) {
27404		return nil
27405	}
27406	err = iter.page.NextWithContext(ctx)
27407	if err != nil {
27408		iter.i--
27409		return err
27410	}
27411	iter.i = 0
27412	return nil
27413}
27414
27415// Next advances to the next value.  If there was an error making
27416// the request the iterator does not advance and the error is returned.
27417// Deprecated: Use NextWithContext() instead.
27418func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
27419	return iter.NextWithContext(context.Background())
27420}
27421
27422// NotDone returns true if the enumeration should be started or is not yet complete.
27423func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
27424	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27425}
27426
27427// Response returns the raw server response from the last page request.
27428func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
27429	return iter.page.Response()
27430}
27431
27432// Value returns the current value or a zero-initialized value if the
27433// iterator has advanced beyond the end of the collection.
27434func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
27435	if !iter.page.NotDone() {
27436		return ServiceEndpointPolicyDefinition{}
27437	}
27438	return iter.page.Values()[iter.i]
27439}
27440
27441// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
27442func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
27443	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
27444}
27445
27446// IsEmpty returns true if the ListResult contains no values.
27447func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
27448	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
27449}
27450
27451// hasNextLink returns true if the NextLink is not empty.
27452func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
27453	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
27454}
27455
27456// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
27457// It returns nil if no more results exist.
27458func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
27459	if !sepdlr.hasNextLink() {
27460		return nil, nil
27461	}
27462	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27463		autorest.AsJSON(),
27464		autorest.AsGet(),
27465		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
27466}
27467
27468// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
27469type ServiceEndpointPolicyDefinitionListResultPage struct {
27470	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
27471	sepdlr ServiceEndpointPolicyDefinitionListResult
27472}
27473
27474// NextWithContext advances to the next page of values.  If there was an error making
27475// the request the page does not advance and the error is returned.
27476func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
27477	if tracing.IsEnabled() {
27478		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
27479		defer func() {
27480			sc := -1
27481			if page.Response().Response.Response != nil {
27482				sc = page.Response().Response.Response.StatusCode
27483			}
27484			tracing.EndSpan(ctx, sc, err)
27485		}()
27486	}
27487	for {
27488		next, err := page.fn(ctx, page.sepdlr)
27489		if err != nil {
27490			return err
27491		}
27492		page.sepdlr = next
27493		if !next.hasNextLink() || !next.IsEmpty() {
27494			break
27495		}
27496	}
27497	return nil
27498}
27499
27500// Next advances to the next page of values.  If there was an error making
27501// the request the page does not advance and the error is returned.
27502// Deprecated: Use NextWithContext() instead.
27503func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
27504	return page.NextWithContext(context.Background())
27505}
27506
27507// NotDone returns true if the page enumeration should be started or is not yet complete.
27508func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
27509	return !page.sepdlr.IsEmpty()
27510}
27511
27512// Response returns the raw server response from the last page request.
27513func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
27514	return page.sepdlr
27515}
27516
27517// Values returns the slice of values for the current page or nil if there are no values.
27518func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
27519	if page.sepdlr.IsEmpty() {
27520		return nil
27521	}
27522	return *page.sepdlr.Value
27523}
27524
27525// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
27526func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
27527	return ServiceEndpointPolicyDefinitionListResultPage{
27528		fn:     getNextPage,
27529		sepdlr: cur,
27530	}
27531}
27532
27533// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
27534type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
27535	// Description - A description for this rule. Restricted to 140 chars.
27536	Description *string `json:"description,omitempty"`
27537	// Service - Service endpoint name.
27538	Service *string `json:"service,omitempty"`
27539	// ServiceResources - A list of service resources.
27540	ServiceResources *[]string `json:"serviceResources,omitempty"`
27541	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27542	ProvisioningState *string `json:"provisioningState,omitempty"`
27543}
27544
27545// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
27546func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
27547	objectMap := make(map[string]interface{})
27548	if sepdpf.Description != nil {
27549		objectMap["description"] = sepdpf.Description
27550	}
27551	if sepdpf.Service != nil {
27552		objectMap["service"] = sepdpf.Service
27553	}
27554	if sepdpf.ServiceResources != nil {
27555		objectMap["serviceResources"] = sepdpf.ServiceResources
27556	}
27557	return json.Marshal(objectMap)
27558}
27559
27560// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
27561// results of a long-running operation.
27562type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
27563	azure.FutureAPI
27564	// Result returns the result of the asynchronous operation.
27565	// If the operation has not completed it will return an error.
27566	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
27567}
27568
27569// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27570func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27571	var azFuture azure.Future
27572	if err := json.Unmarshal(body, &azFuture); err != nil {
27573		return err
27574	}
27575	future.FutureAPI = &azFuture
27576	future.Result = future.result
27577	return nil
27578}
27579
27580// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
27581func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
27582	var done bool
27583	done, err = future.DoneWithContext(context.Background(), client)
27584	if err != nil {
27585		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27586		return
27587	}
27588	if !done {
27589		sepd.Response.Response = future.Response()
27590		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
27591		return
27592	}
27593	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27594	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
27595		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
27596		if err != nil {
27597			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
27598		}
27599	}
27600	return
27601}
27602
27603// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
27604// a long-running operation.
27605type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
27606	azure.FutureAPI
27607	// Result returns the result of the asynchronous operation.
27608	// If the operation has not completed it will return an error.
27609	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
27610}
27611
27612// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27613func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
27614	var azFuture azure.Future
27615	if err := json.Unmarshal(body, &azFuture); err != nil {
27616		return err
27617	}
27618	future.FutureAPI = &azFuture
27619	future.Result = future.result
27620	return nil
27621}
27622
27623// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
27624func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
27625	var done bool
27626	done, err = future.DoneWithContext(context.Background(), client)
27627	if err != nil {
27628		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
27629		return
27630	}
27631	if !done {
27632		ar.Response = future.Response()
27633		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
27634		return
27635	}
27636	ar.Response = future.Response()
27637	return
27638}
27639
27640// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
27641type ServiceEndpointPolicyListResult struct {
27642	autorest.Response `json:"-"`
27643	// Value - A list of ServiceEndpointPolicy resources.
27644	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
27645	// NextLink - READ-ONLY; The URL to get the next set of results.
27646	NextLink *string `json:"nextLink,omitempty"`
27647}
27648
27649// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
27650func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
27651	objectMap := make(map[string]interface{})
27652	if seplr.Value != nil {
27653		objectMap["value"] = seplr.Value
27654	}
27655	return json.Marshal(objectMap)
27656}
27657
27658// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
27659// values.
27660type ServiceEndpointPolicyListResultIterator struct {
27661	i    int
27662	page ServiceEndpointPolicyListResultPage
27663}
27664
27665// NextWithContext advances to the next value.  If there was an error making
27666// the request the iterator does not advance and the error is returned.
27667func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
27668	if tracing.IsEnabled() {
27669		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
27670		defer func() {
27671			sc := -1
27672			if iter.Response().Response.Response != nil {
27673				sc = iter.Response().Response.Response.StatusCode
27674			}
27675			tracing.EndSpan(ctx, sc, err)
27676		}()
27677	}
27678	iter.i++
27679	if iter.i < len(iter.page.Values()) {
27680		return nil
27681	}
27682	err = iter.page.NextWithContext(ctx)
27683	if err != nil {
27684		iter.i--
27685		return err
27686	}
27687	iter.i = 0
27688	return nil
27689}
27690
27691// Next advances to the next value.  If there was an error making
27692// the request the iterator does not advance and the error is returned.
27693// Deprecated: Use NextWithContext() instead.
27694func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
27695	return iter.NextWithContext(context.Background())
27696}
27697
27698// NotDone returns true if the enumeration should be started or is not yet complete.
27699func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
27700	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27701}
27702
27703// Response returns the raw server response from the last page request.
27704func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
27705	return iter.page.Response()
27706}
27707
27708// Value returns the current value or a zero-initialized value if the
27709// iterator has advanced beyond the end of the collection.
27710func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
27711	if !iter.page.NotDone() {
27712		return ServiceEndpointPolicy{}
27713	}
27714	return iter.page.Values()[iter.i]
27715}
27716
27717// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
27718func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
27719	return ServiceEndpointPolicyListResultIterator{page: page}
27720}
27721
27722// IsEmpty returns true if the ListResult contains no values.
27723func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
27724	return seplr.Value == nil || len(*seplr.Value) == 0
27725}
27726
27727// hasNextLink returns true if the NextLink is not empty.
27728func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
27729	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
27730}
27731
27732// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
27733// It returns nil if no more results exist.
27734func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
27735	if !seplr.hasNextLink() {
27736		return nil, nil
27737	}
27738	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27739		autorest.AsJSON(),
27740		autorest.AsGet(),
27741		autorest.WithBaseURL(to.String(seplr.NextLink)))
27742}
27743
27744// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
27745type ServiceEndpointPolicyListResultPage struct {
27746	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
27747	seplr ServiceEndpointPolicyListResult
27748}
27749
27750// NextWithContext advances to the next page of values.  If there was an error making
27751// the request the page does not advance and the error is returned.
27752func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
27753	if tracing.IsEnabled() {
27754		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
27755		defer func() {
27756			sc := -1
27757			if page.Response().Response.Response != nil {
27758				sc = page.Response().Response.Response.StatusCode
27759			}
27760			tracing.EndSpan(ctx, sc, err)
27761		}()
27762	}
27763	for {
27764		next, err := page.fn(ctx, page.seplr)
27765		if err != nil {
27766			return err
27767		}
27768		page.seplr = next
27769		if !next.hasNextLink() || !next.IsEmpty() {
27770			break
27771		}
27772	}
27773	return nil
27774}
27775
27776// Next advances to the next page of values.  If there was an error making
27777// the request the page does not advance and the error is returned.
27778// Deprecated: Use NextWithContext() instead.
27779func (page *ServiceEndpointPolicyListResultPage) Next() error {
27780	return page.NextWithContext(context.Background())
27781}
27782
27783// NotDone returns true if the page enumeration should be started or is not yet complete.
27784func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
27785	return !page.seplr.IsEmpty()
27786}
27787
27788// Response returns the raw server response from the last page request.
27789func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
27790	return page.seplr
27791}
27792
27793// Values returns the slice of values for the current page or nil if there are no values.
27794func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
27795	if page.seplr.IsEmpty() {
27796		return nil
27797	}
27798	return *page.seplr.Value
27799}
27800
27801// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
27802func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
27803	return ServiceEndpointPolicyListResultPage{
27804		fn:    getNextPage,
27805		seplr: cur,
27806	}
27807}
27808
27809// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
27810type ServiceEndpointPolicyPropertiesFormat struct {
27811	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
27812	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
27813	// Subnets - READ-ONLY; A collection of references to subnets.
27814	Subnets *[]Subnet `json:"subnets,omitempty"`
27815	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
27816	ResourceGUID *string `json:"resourceGuid,omitempty"`
27817	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27818	ProvisioningState *string `json:"provisioningState,omitempty"`
27819}
27820
27821// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
27822func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
27823	objectMap := make(map[string]interface{})
27824	if seppf.ServiceEndpointPolicyDefinitions != nil {
27825		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
27826	}
27827	return json.Marshal(objectMap)
27828}
27829
27830// ServiceEndpointPropertiesFormat the service endpoint properties.
27831type ServiceEndpointPropertiesFormat struct {
27832	// Service - The type of the endpoint service.
27833	Service *string `json:"service,omitempty"`
27834	// Locations - A list of locations.
27835	Locations *[]string `json:"locations,omitempty"`
27836	// ProvisioningState - The provisioning state of the resource.
27837	ProvisioningState *string `json:"provisioningState,omitempty"`
27838}
27839
27840// ServiceTagInformation the service tag information.
27841type ServiceTagInformation struct {
27842	// Properties - READ-ONLY; Properties of the service tag information.
27843	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
27844	// Name - READ-ONLY; The name of service tag.
27845	Name *string `json:"name,omitempty"`
27846	// ID - READ-ONLY; The ID of service tag.
27847	ID *string `json:"id,omitempty"`
27848}
27849
27850// MarshalJSON is the custom marshaler for ServiceTagInformation.
27851func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) {
27852	objectMap := make(map[string]interface{})
27853	return json.Marshal(objectMap)
27854}
27855
27856// ServiceTagInformationPropertiesFormat properties of the service tag information.
27857type ServiceTagInformationPropertiesFormat struct {
27858	// ChangeNumber - READ-ONLY; The iteration number of service tag.
27859	ChangeNumber *string `json:"changeNumber,omitempty"`
27860	// Region - READ-ONLY; The region of service tag.
27861	Region *string `json:"region,omitempty"`
27862	// SystemService - READ-ONLY; The name of system service.
27863	SystemService *string `json:"systemService,omitempty"`
27864	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
27865	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
27866}
27867
27868// MarshalJSON is the custom marshaler for ServiceTagInformationPropertiesFormat.
27869func (stipf ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) {
27870	objectMap := make(map[string]interface{})
27871	return json.Marshal(objectMap)
27872}
27873
27874// ServiceTagsListResult response for the ListServiceTags API service call.
27875type ServiceTagsListResult struct {
27876	autorest.Response `json:"-"`
27877	// Name - READ-ONLY; The name of the cloud.
27878	Name *string `json:"name,omitempty"`
27879	// ID - READ-ONLY; The ID of the cloud.
27880	ID *string `json:"id,omitempty"`
27881	// Type - READ-ONLY; The azure resource type.
27882	Type *string `json:"type,omitempty"`
27883	// ChangeNumber - READ-ONLY; The iteration number.
27884	ChangeNumber *string `json:"changeNumber,omitempty"`
27885	// Cloud - READ-ONLY; The name of the cloud.
27886	Cloud *string `json:"cloud,omitempty"`
27887	// Values - READ-ONLY; The list of service tag information resources.
27888	Values *[]ServiceTagInformation `json:"values,omitempty"`
27889}
27890
27891// MarshalJSON is the custom marshaler for ServiceTagsListResult.
27892func (stlr ServiceTagsListResult) MarshalJSON() ([]byte, error) {
27893	objectMap := make(map[string]interface{})
27894	return json.Marshal(objectMap)
27895}
27896
27897// String ...
27898type String struct {
27899	autorest.Response `json:"-"`
27900	Value             *string `json:"value,omitempty"`
27901}
27902
27903// Subnet subnet in a virtual network resource.
27904type Subnet struct {
27905	autorest.Response `json:"-"`
27906	// SubnetPropertiesFormat - Properties of the subnet.
27907	*SubnetPropertiesFormat `json:"properties,omitempty"`
27908	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27909	Name *string `json:"name,omitempty"`
27910	// Etag - A unique read-only string that changes whenever the resource is updated.
27911	Etag *string `json:"etag,omitempty"`
27912	// ID - Resource ID.
27913	ID *string `json:"id,omitempty"`
27914}
27915
27916// MarshalJSON is the custom marshaler for Subnet.
27917func (s Subnet) MarshalJSON() ([]byte, error) {
27918	objectMap := make(map[string]interface{})
27919	if s.SubnetPropertiesFormat != nil {
27920		objectMap["properties"] = s.SubnetPropertiesFormat
27921	}
27922	if s.Name != nil {
27923		objectMap["name"] = s.Name
27924	}
27925	if s.Etag != nil {
27926		objectMap["etag"] = s.Etag
27927	}
27928	if s.ID != nil {
27929		objectMap["id"] = s.ID
27930	}
27931	return json.Marshal(objectMap)
27932}
27933
27934// UnmarshalJSON is the custom unmarshaler for Subnet struct.
27935func (s *Subnet) UnmarshalJSON(body []byte) error {
27936	var m map[string]*json.RawMessage
27937	err := json.Unmarshal(body, &m)
27938	if err != nil {
27939		return err
27940	}
27941	for k, v := range m {
27942		switch k {
27943		case "properties":
27944			if v != nil {
27945				var subnetPropertiesFormat SubnetPropertiesFormat
27946				err = json.Unmarshal(*v, &subnetPropertiesFormat)
27947				if err != nil {
27948					return err
27949				}
27950				s.SubnetPropertiesFormat = &subnetPropertiesFormat
27951			}
27952		case "name":
27953			if v != nil {
27954				var name string
27955				err = json.Unmarshal(*v, &name)
27956				if err != nil {
27957					return err
27958				}
27959				s.Name = &name
27960			}
27961		case "etag":
27962			if v != nil {
27963				var etag string
27964				err = json.Unmarshal(*v, &etag)
27965				if err != nil {
27966					return err
27967				}
27968				s.Etag = &etag
27969			}
27970		case "id":
27971			if v != nil {
27972				var ID string
27973				err = json.Unmarshal(*v, &ID)
27974				if err != nil {
27975					return err
27976				}
27977				s.ID = &ID
27978			}
27979		}
27980	}
27981
27982	return nil
27983}
27984
27985// SubnetAssociation subnet and it's custom security rules.
27986type SubnetAssociation struct {
27987	// ID - READ-ONLY; Subnet ID.
27988	ID *string `json:"id,omitempty"`
27989	// SecurityRules - Collection of custom security rules.
27990	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
27991}
27992
27993// MarshalJSON is the custom marshaler for SubnetAssociation.
27994func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
27995	objectMap := make(map[string]interface{})
27996	if sa.SecurityRules != nil {
27997		objectMap["securityRules"] = sa.SecurityRules
27998	}
27999	return json.Marshal(objectMap)
28000}
28001
28002// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
28003// network.
28004type SubnetListResult struct {
28005	autorest.Response `json:"-"`
28006	// Value - The subnets in a virtual network.
28007	Value *[]Subnet `json:"value,omitempty"`
28008	// NextLink - The URL to get the next set of results.
28009	NextLink *string `json:"nextLink,omitempty"`
28010}
28011
28012// SubnetListResultIterator provides access to a complete listing of Subnet values.
28013type SubnetListResultIterator struct {
28014	i    int
28015	page SubnetListResultPage
28016}
28017
28018// NextWithContext advances to the next value.  If there was an error making
28019// the request the iterator does not advance and the error is returned.
28020func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
28021	if tracing.IsEnabled() {
28022		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
28023		defer func() {
28024			sc := -1
28025			if iter.Response().Response.Response != nil {
28026				sc = iter.Response().Response.Response.StatusCode
28027			}
28028			tracing.EndSpan(ctx, sc, err)
28029		}()
28030	}
28031	iter.i++
28032	if iter.i < len(iter.page.Values()) {
28033		return nil
28034	}
28035	err = iter.page.NextWithContext(ctx)
28036	if err != nil {
28037		iter.i--
28038		return err
28039	}
28040	iter.i = 0
28041	return nil
28042}
28043
28044// Next advances to the next value.  If there was an error making
28045// the request the iterator does not advance and the error is returned.
28046// Deprecated: Use NextWithContext() instead.
28047func (iter *SubnetListResultIterator) Next() error {
28048	return iter.NextWithContext(context.Background())
28049}
28050
28051// NotDone returns true if the enumeration should be started or is not yet complete.
28052func (iter SubnetListResultIterator) NotDone() bool {
28053	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28054}
28055
28056// Response returns the raw server response from the last page request.
28057func (iter SubnetListResultIterator) Response() SubnetListResult {
28058	return iter.page.Response()
28059}
28060
28061// Value returns the current value or a zero-initialized value if the
28062// iterator has advanced beyond the end of the collection.
28063func (iter SubnetListResultIterator) Value() Subnet {
28064	if !iter.page.NotDone() {
28065		return Subnet{}
28066	}
28067	return iter.page.Values()[iter.i]
28068}
28069
28070// Creates a new instance of the SubnetListResultIterator type.
28071func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
28072	return SubnetListResultIterator{page: page}
28073}
28074
28075// IsEmpty returns true if the ListResult contains no values.
28076func (slr SubnetListResult) IsEmpty() bool {
28077	return slr.Value == nil || len(*slr.Value) == 0
28078}
28079
28080// hasNextLink returns true if the NextLink is not empty.
28081func (slr SubnetListResult) hasNextLink() bool {
28082	return slr.NextLink != nil && len(*slr.NextLink) != 0
28083}
28084
28085// subnetListResultPreparer prepares a request to retrieve the next set of results.
28086// It returns nil if no more results exist.
28087func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
28088	if !slr.hasNextLink() {
28089		return nil, nil
28090	}
28091	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28092		autorest.AsJSON(),
28093		autorest.AsGet(),
28094		autorest.WithBaseURL(to.String(slr.NextLink)))
28095}
28096
28097// SubnetListResultPage contains a page of Subnet values.
28098type SubnetListResultPage struct {
28099	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
28100	slr SubnetListResult
28101}
28102
28103// NextWithContext advances to the next page of values.  If there was an error making
28104// the request the page does not advance and the error is returned.
28105func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
28106	if tracing.IsEnabled() {
28107		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
28108		defer func() {
28109			sc := -1
28110			if page.Response().Response.Response != nil {
28111				sc = page.Response().Response.Response.StatusCode
28112			}
28113			tracing.EndSpan(ctx, sc, err)
28114		}()
28115	}
28116	for {
28117		next, err := page.fn(ctx, page.slr)
28118		if err != nil {
28119			return err
28120		}
28121		page.slr = next
28122		if !next.hasNextLink() || !next.IsEmpty() {
28123			break
28124		}
28125	}
28126	return nil
28127}
28128
28129// Next advances to the next page of values.  If there was an error making
28130// the request the page does not advance and the error is returned.
28131// Deprecated: Use NextWithContext() instead.
28132func (page *SubnetListResultPage) Next() error {
28133	return page.NextWithContext(context.Background())
28134}
28135
28136// NotDone returns true if the page enumeration should be started or is not yet complete.
28137func (page SubnetListResultPage) NotDone() bool {
28138	return !page.slr.IsEmpty()
28139}
28140
28141// Response returns the raw server response from the last page request.
28142func (page SubnetListResultPage) Response() SubnetListResult {
28143	return page.slr
28144}
28145
28146// Values returns the slice of values for the current page or nil if there are no values.
28147func (page SubnetListResultPage) Values() []Subnet {
28148	if page.slr.IsEmpty() {
28149		return nil
28150	}
28151	return *page.slr.Value
28152}
28153
28154// Creates a new instance of the SubnetListResultPage type.
28155func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
28156	return SubnetListResultPage{
28157		fn:  getNextPage,
28158		slr: cur,
28159	}
28160}
28161
28162// SubnetPropertiesFormat properties of the subnet.
28163type SubnetPropertiesFormat struct {
28164	// AddressPrefix - The address prefix for the subnet.
28165	AddressPrefix *string `json:"addressPrefix,omitempty"`
28166	// AddressPrefixes - List of address prefixes for the subnet.
28167	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28168	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
28169	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
28170	// RouteTable - The reference of the RouteTable resource.
28171	RouteTable *RouteTable `json:"routeTable,omitempty"`
28172	// NatGateway - Nat gateway associated with this subnet.
28173	NatGateway *SubResource `json:"natGateway,omitempty"`
28174	// ServiceEndpoints - An array of service endpoints.
28175	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
28176	// ServiceEndpointPolicies - An array of service endpoint policies.
28177	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
28178	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
28179	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
28180	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
28181	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
28182	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
28183	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
28184	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
28185	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
28186	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
28187	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
28188	// Delegations - Gets an array of references to the delegations on the subnet.
28189	Delegations *[]Delegation `json:"delegations,omitempty"`
28190	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
28191	Purpose *string `json:"purpose,omitempty"`
28192	// ProvisioningState - The provisioning state of the resource.
28193	ProvisioningState *string `json:"provisioningState,omitempty"`
28194	// PrivateEndpointNetworkPolicies - Enable or Disable private end point on the subnet.
28195	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
28196	// PrivateLinkServiceNetworkPolicies - Enable or Disable private link service on the subnet.
28197	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
28198}
28199
28200// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
28201func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
28202	objectMap := make(map[string]interface{})
28203	if spf.AddressPrefix != nil {
28204		objectMap["addressPrefix"] = spf.AddressPrefix
28205	}
28206	if spf.AddressPrefixes != nil {
28207		objectMap["addressPrefixes"] = spf.AddressPrefixes
28208	}
28209	if spf.NetworkSecurityGroup != nil {
28210		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
28211	}
28212	if spf.RouteTable != nil {
28213		objectMap["routeTable"] = spf.RouteTable
28214	}
28215	if spf.NatGateway != nil {
28216		objectMap["natGateway"] = spf.NatGateway
28217	}
28218	if spf.ServiceEndpoints != nil {
28219		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
28220	}
28221	if spf.ServiceEndpointPolicies != nil {
28222		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
28223	}
28224	if spf.ResourceNavigationLinks != nil {
28225		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
28226	}
28227	if spf.ServiceAssociationLinks != nil {
28228		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
28229	}
28230	if spf.Delegations != nil {
28231		objectMap["delegations"] = spf.Delegations
28232	}
28233	if spf.ProvisioningState != nil {
28234		objectMap["provisioningState"] = spf.ProvisioningState
28235	}
28236	if spf.PrivateEndpointNetworkPolicies != nil {
28237		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
28238	}
28239	if spf.PrivateLinkServiceNetworkPolicies != nil {
28240		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
28241	}
28242	return json.Marshal(objectMap)
28243}
28244
28245// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
28246// operation.
28247type SubnetsCreateOrUpdateFuture struct {
28248	azure.FutureAPI
28249	// Result returns the result of the asynchronous operation.
28250	// If the operation has not completed it will return an error.
28251	Result func(SubnetsClient) (Subnet, error)
28252}
28253
28254// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28255func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28256	var azFuture azure.Future
28257	if err := json.Unmarshal(body, &azFuture); err != nil {
28258		return err
28259	}
28260	future.FutureAPI = &azFuture
28261	future.Result = future.result
28262	return nil
28263}
28264
28265// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
28266func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
28267	var done bool
28268	done, err = future.DoneWithContext(context.Background(), client)
28269	if err != nil {
28270		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28271		return
28272	}
28273	if !done {
28274		s.Response.Response = future.Response()
28275		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
28276		return
28277	}
28278	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28279	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
28280		s, err = client.CreateOrUpdateResponder(s.Response.Response)
28281		if err != nil {
28282			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
28283		}
28284	}
28285	return
28286}
28287
28288// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28289// operation.
28290type SubnetsDeleteFuture struct {
28291	azure.FutureAPI
28292	// Result returns the result of the asynchronous operation.
28293	// If the operation has not completed it will return an error.
28294	Result func(SubnetsClient) (autorest.Response, error)
28295}
28296
28297// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28298func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
28299	var azFuture azure.Future
28300	if err := json.Unmarshal(body, &azFuture); err != nil {
28301		return err
28302	}
28303	future.FutureAPI = &azFuture
28304	future.Result = future.result
28305	return nil
28306}
28307
28308// result is the default implementation for SubnetsDeleteFuture.Result.
28309func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
28310	var done bool
28311	done, err = future.DoneWithContext(context.Background(), client)
28312	if err != nil {
28313		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
28314		return
28315	}
28316	if !done {
28317		ar.Response = future.Response()
28318		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
28319		return
28320	}
28321	ar.Response = future.Response()
28322	return
28323}
28324
28325// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
28326// long-running operation.
28327type SubnetsPrepareNetworkPoliciesFuture struct {
28328	azure.FutureAPI
28329	// Result returns the result of the asynchronous operation.
28330	// If the operation has not completed it will return an error.
28331	Result func(SubnetsClient) (autorest.Response, error)
28332}
28333
28334// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28335func (future *SubnetsPrepareNetworkPoliciesFuture) UnmarshalJSON(body []byte) error {
28336	var azFuture azure.Future
28337	if err := json.Unmarshal(body, &azFuture); err != nil {
28338		return err
28339	}
28340	future.FutureAPI = &azFuture
28341	future.Result = future.result
28342	return nil
28343}
28344
28345// result is the default implementation for SubnetsPrepareNetworkPoliciesFuture.Result.
28346func (future *SubnetsPrepareNetworkPoliciesFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
28347	var done bool
28348	done, err = future.DoneWithContext(context.Background(), client)
28349	if err != nil {
28350		err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
28351		return
28352	}
28353	if !done {
28354		ar.Response = future.Response()
28355		err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
28356		return
28357	}
28358	ar.Response = future.Response()
28359	return
28360}
28361
28362// SubResource reference to another subresource.
28363type SubResource struct {
28364	// ID - Resource ID.
28365	ID *string `json:"id,omitempty"`
28366}
28367
28368// TagsObject tags object for patch operations.
28369type TagsObject struct {
28370	// Tags - Resource tags.
28371	Tags map[string]*string `json:"tags"`
28372}
28373
28374// MarshalJSON is the custom marshaler for TagsObject.
28375func (toVar TagsObject) MarshalJSON() ([]byte, error) {
28376	objectMap := make(map[string]interface{})
28377	if toVar.Tags != nil {
28378		objectMap["tags"] = toVar.Tags
28379	}
28380	return json.Marshal(objectMap)
28381}
28382
28383// Topology topology of the specified resource group.
28384type Topology struct {
28385	autorest.Response `json:"-"`
28386	// ID - READ-ONLY; GUID representing the operation id.
28387	ID *string `json:"id,omitempty"`
28388	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
28389	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
28390	// LastModified - READ-ONLY; The datetime when the topology was last modified.
28391	LastModified *date.Time `json:"lastModified,omitempty"`
28392	// Resources - A list of topology resources.
28393	Resources *[]TopologyResource `json:"resources,omitempty"`
28394}
28395
28396// MarshalJSON is the custom marshaler for Topology.
28397func (t Topology) MarshalJSON() ([]byte, error) {
28398	objectMap := make(map[string]interface{})
28399	if t.Resources != nil {
28400		objectMap["resources"] = t.Resources
28401	}
28402	return json.Marshal(objectMap)
28403}
28404
28405// TopologyAssociation resources that have an association with the parent resource.
28406type TopologyAssociation struct {
28407	// Name - The name of the resource that is associated with the parent resource.
28408	Name *string `json:"name,omitempty"`
28409	// ResourceID - The ID of the resource that is associated with the parent resource.
28410	ResourceID *string `json:"resourceId,omitempty"`
28411	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
28412	AssociationType AssociationType `json:"associationType,omitempty"`
28413}
28414
28415// TopologyParameters parameters that define the representation of topology.
28416type TopologyParameters struct {
28417	// TargetResourceGroupName - The name of the target resource group to perform topology on.
28418	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
28419	// TargetVirtualNetwork - The reference of the Virtual Network resource.
28420	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
28421	// TargetSubnet - The reference of the Subnet resource.
28422	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
28423}
28424
28425// TopologyResource the network resource topology information for the given resource group.
28426type TopologyResource struct {
28427	// Name - Name of the resource.
28428	Name *string `json:"name,omitempty"`
28429	// ID - ID of the resource.
28430	ID *string `json:"id,omitempty"`
28431	// Location - Resource location.
28432	Location *string `json:"location,omitempty"`
28433	// Associations - Holds the associations the resource has with other resources in the resource group.
28434	Associations *[]TopologyAssociation `json:"associations,omitempty"`
28435}
28436
28437// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
28438type TrafficAnalyticsConfigurationProperties struct {
28439	// Enabled - Flag to enable/disable traffic analytics.
28440	Enabled *bool `json:"enabled,omitempty"`
28441	// WorkspaceID - The resource guid of the attached workspace.
28442	WorkspaceID *string `json:"workspaceId,omitempty"`
28443	// WorkspaceRegion - The location of the attached workspace.
28444	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
28445	// WorkspaceResourceID - Resource Id of the attached workspace.
28446	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
28447	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
28448	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
28449}
28450
28451// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
28452type TrafficAnalyticsProperties struct {
28453	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
28454	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
28455}
28456
28457// TroubleshootingDetails information gained from troubleshooting of specified resource.
28458type TroubleshootingDetails struct {
28459	// ID - The id of the get troubleshoot operation.
28460	ID *string `json:"id,omitempty"`
28461	// ReasonType - Reason type of failure.
28462	ReasonType *string `json:"reasonType,omitempty"`
28463	// Summary - A summary of troubleshooting.
28464	Summary *string `json:"summary,omitempty"`
28465	// Detail - Details on troubleshooting results.
28466	Detail *string `json:"detail,omitempty"`
28467	// RecommendedActions - List of recommended actions.
28468	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
28469}
28470
28471// TroubleshootingParameters parameters that define the resource to troubleshoot.
28472type TroubleshootingParameters struct {
28473	// TargetResourceID - The target resource to troubleshoot.
28474	TargetResourceID *string `json:"targetResourceId,omitempty"`
28475	// TroubleshootingProperties - Properties of the troubleshooting resource.
28476	*TroubleshootingProperties `json:"properties,omitempty"`
28477}
28478
28479// MarshalJSON is the custom marshaler for TroubleshootingParameters.
28480func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
28481	objectMap := make(map[string]interface{})
28482	if tp.TargetResourceID != nil {
28483		objectMap["targetResourceId"] = tp.TargetResourceID
28484	}
28485	if tp.TroubleshootingProperties != nil {
28486		objectMap["properties"] = tp.TroubleshootingProperties
28487	}
28488	return json.Marshal(objectMap)
28489}
28490
28491// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
28492func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
28493	var m map[string]*json.RawMessage
28494	err := json.Unmarshal(body, &m)
28495	if err != nil {
28496		return err
28497	}
28498	for k, v := range m {
28499		switch k {
28500		case "targetResourceId":
28501			if v != nil {
28502				var targetResourceID string
28503				err = json.Unmarshal(*v, &targetResourceID)
28504				if err != nil {
28505					return err
28506				}
28507				tp.TargetResourceID = &targetResourceID
28508			}
28509		case "properties":
28510			if v != nil {
28511				var troubleshootingProperties TroubleshootingProperties
28512				err = json.Unmarshal(*v, &troubleshootingProperties)
28513				if err != nil {
28514					return err
28515				}
28516				tp.TroubleshootingProperties = &troubleshootingProperties
28517			}
28518		}
28519	}
28520
28521	return nil
28522}
28523
28524// TroubleshootingProperties storage location provided for troubleshoot.
28525type TroubleshootingProperties struct {
28526	// StorageID - The ID for the storage account to save the troubleshoot result.
28527	StorageID *string `json:"storageId,omitempty"`
28528	// StoragePath - The path to the blob to save the troubleshoot result in.
28529	StoragePath *string `json:"storagePath,omitempty"`
28530}
28531
28532// TroubleshootingRecommendedActions recommended actions based on discovered issues.
28533type TroubleshootingRecommendedActions struct {
28534	// ActionID - ID of the recommended action.
28535	ActionID *string `json:"actionId,omitempty"`
28536	// ActionText - Description of recommended actions.
28537	ActionText *string `json:"actionText,omitempty"`
28538	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
28539	ActionURI *string `json:"actionUri,omitempty"`
28540	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
28541	ActionURIText *string `json:"actionUriText,omitempty"`
28542}
28543
28544// TroubleshootingResult troubleshooting information gained from specified resource.
28545type TroubleshootingResult struct {
28546	autorest.Response `json:"-"`
28547	// StartTime - The start time of the troubleshooting.
28548	StartTime *date.Time `json:"startTime,omitempty"`
28549	// EndTime - The end time of the troubleshooting.
28550	EndTime *date.Time `json:"endTime,omitempty"`
28551	// Code - The result code of the troubleshooting.
28552	Code *string `json:"code,omitempty"`
28553	// Results - Information from troubleshooting.
28554	Results *[]TroubleshootingDetails `json:"results,omitempty"`
28555}
28556
28557// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
28558type TunnelConnectionHealth struct {
28559	// Tunnel - READ-ONLY; Tunnel name.
28560	Tunnel *string `json:"tunnel,omitempty"`
28561	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
28562	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
28563	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
28564	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
28565	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
28566	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
28567	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
28568	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
28569}
28570
28571// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
28572func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
28573	objectMap := make(map[string]interface{})
28574	return json.Marshal(objectMap)
28575}
28576
28577// Usage describes network resource usage.
28578type Usage struct {
28579	// ID - READ-ONLY; Resource identifier.
28580	ID *string `json:"id,omitempty"`
28581	// Unit - An enum describing the unit of measurement.
28582	Unit *string `json:"unit,omitempty"`
28583	// CurrentValue - The current value of the usage.
28584	CurrentValue *int64 `json:"currentValue,omitempty"`
28585	// Limit - The limit of usage.
28586	Limit *int64 `json:"limit,omitempty"`
28587	// Name - The name of the type of usage.
28588	Name *UsageName `json:"name,omitempty"`
28589}
28590
28591// MarshalJSON is the custom marshaler for Usage.
28592func (u Usage) MarshalJSON() ([]byte, error) {
28593	objectMap := make(map[string]interface{})
28594	if u.Unit != nil {
28595		objectMap["unit"] = u.Unit
28596	}
28597	if u.CurrentValue != nil {
28598		objectMap["currentValue"] = u.CurrentValue
28599	}
28600	if u.Limit != nil {
28601		objectMap["limit"] = u.Limit
28602	}
28603	if u.Name != nil {
28604		objectMap["name"] = u.Name
28605	}
28606	return json.Marshal(objectMap)
28607}
28608
28609// UsageName the usage names.
28610type UsageName struct {
28611	// Value - A string describing the resource name.
28612	Value *string `json:"value,omitempty"`
28613	// LocalizedValue - A localized string describing the resource name.
28614	LocalizedValue *string `json:"localizedValue,omitempty"`
28615}
28616
28617// UsagesListResult the list usages operation response.
28618type UsagesListResult struct {
28619	autorest.Response `json:"-"`
28620	// Value - The list network resource usages.
28621	Value *[]Usage `json:"value,omitempty"`
28622	// NextLink - URL to get the next set of results.
28623	NextLink *string `json:"nextLink,omitempty"`
28624}
28625
28626// UsagesListResultIterator provides access to a complete listing of Usage values.
28627type UsagesListResultIterator struct {
28628	i    int
28629	page UsagesListResultPage
28630}
28631
28632// NextWithContext advances to the next value.  If there was an error making
28633// the request the iterator does not advance and the error is returned.
28634func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
28635	if tracing.IsEnabled() {
28636		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
28637		defer func() {
28638			sc := -1
28639			if iter.Response().Response.Response != nil {
28640				sc = iter.Response().Response.Response.StatusCode
28641			}
28642			tracing.EndSpan(ctx, sc, err)
28643		}()
28644	}
28645	iter.i++
28646	if iter.i < len(iter.page.Values()) {
28647		return nil
28648	}
28649	err = iter.page.NextWithContext(ctx)
28650	if err != nil {
28651		iter.i--
28652		return err
28653	}
28654	iter.i = 0
28655	return nil
28656}
28657
28658// Next advances to the next value.  If there was an error making
28659// the request the iterator does not advance and the error is returned.
28660// Deprecated: Use NextWithContext() instead.
28661func (iter *UsagesListResultIterator) Next() error {
28662	return iter.NextWithContext(context.Background())
28663}
28664
28665// NotDone returns true if the enumeration should be started or is not yet complete.
28666func (iter UsagesListResultIterator) NotDone() bool {
28667	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28668}
28669
28670// Response returns the raw server response from the last page request.
28671func (iter UsagesListResultIterator) Response() UsagesListResult {
28672	return iter.page.Response()
28673}
28674
28675// Value returns the current value or a zero-initialized value if the
28676// iterator has advanced beyond the end of the collection.
28677func (iter UsagesListResultIterator) Value() Usage {
28678	if !iter.page.NotDone() {
28679		return Usage{}
28680	}
28681	return iter.page.Values()[iter.i]
28682}
28683
28684// Creates a new instance of the UsagesListResultIterator type.
28685func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
28686	return UsagesListResultIterator{page: page}
28687}
28688
28689// IsEmpty returns true if the ListResult contains no values.
28690func (ulr UsagesListResult) IsEmpty() bool {
28691	return ulr.Value == nil || len(*ulr.Value) == 0
28692}
28693
28694// hasNextLink returns true if the NextLink is not empty.
28695func (ulr UsagesListResult) hasNextLink() bool {
28696	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
28697}
28698
28699// usagesListResultPreparer prepares a request to retrieve the next set of results.
28700// It returns nil if no more results exist.
28701func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
28702	if !ulr.hasNextLink() {
28703		return nil, nil
28704	}
28705	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28706		autorest.AsJSON(),
28707		autorest.AsGet(),
28708		autorest.WithBaseURL(to.String(ulr.NextLink)))
28709}
28710
28711// UsagesListResultPage contains a page of Usage values.
28712type UsagesListResultPage struct {
28713	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
28714	ulr UsagesListResult
28715}
28716
28717// NextWithContext advances to the next page of values.  If there was an error making
28718// the request the page does not advance and the error is returned.
28719func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
28720	if tracing.IsEnabled() {
28721		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
28722		defer func() {
28723			sc := -1
28724			if page.Response().Response.Response != nil {
28725				sc = page.Response().Response.Response.StatusCode
28726			}
28727			tracing.EndSpan(ctx, sc, err)
28728		}()
28729	}
28730	for {
28731		next, err := page.fn(ctx, page.ulr)
28732		if err != nil {
28733			return err
28734		}
28735		page.ulr = next
28736		if !next.hasNextLink() || !next.IsEmpty() {
28737			break
28738		}
28739	}
28740	return nil
28741}
28742
28743// Next advances to the next page of values.  If there was an error making
28744// the request the page does not advance and the error is returned.
28745// Deprecated: Use NextWithContext() instead.
28746func (page *UsagesListResultPage) Next() error {
28747	return page.NextWithContext(context.Background())
28748}
28749
28750// NotDone returns true if the page enumeration should be started or is not yet complete.
28751func (page UsagesListResultPage) NotDone() bool {
28752	return !page.ulr.IsEmpty()
28753}
28754
28755// Response returns the raw server response from the last page request.
28756func (page UsagesListResultPage) Response() UsagesListResult {
28757	return page.ulr
28758}
28759
28760// Values returns the slice of values for the current page or nil if there are no values.
28761func (page UsagesListResultPage) Values() []Usage {
28762	if page.ulr.IsEmpty() {
28763		return nil
28764	}
28765	return *page.ulr.Value
28766}
28767
28768// Creates a new instance of the UsagesListResultPage type.
28769func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
28770	return UsagesListResultPage{
28771		fn:  getNextPage,
28772		ulr: cur,
28773	}
28774}
28775
28776// VerificationIPFlowParameters parameters that define the IP flow to be verified.
28777type VerificationIPFlowParameters struct {
28778	// TargetResourceID - The ID of the target resource to perform next-hop on.
28779	TargetResourceID *string `json:"targetResourceId,omitempty"`
28780	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
28781	Direction Direction `json:"direction,omitempty"`
28782	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
28783	Protocol IPFlowProtocol `json:"protocol,omitempty"`
28784	// 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.
28785	LocalPort *string `json:"localPort,omitempty"`
28786	// 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.
28787	RemotePort *string `json:"remotePort,omitempty"`
28788	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
28789	LocalIPAddress *string `json:"localIPAddress,omitempty"`
28790	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
28791	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
28792	// 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).
28793	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
28794}
28795
28796// VerificationIPFlowResult results of IP flow verification on the target resource.
28797type VerificationIPFlowResult struct {
28798	autorest.Response `json:"-"`
28799	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
28800	Access Access `json:"access,omitempty"`
28801	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
28802	RuleName *string `json:"ruleName,omitempty"`
28803}
28804
28805// VirtualHub virtualHub Resource.
28806type VirtualHub struct {
28807	autorest.Response `json:"-"`
28808	// VirtualHubProperties - Properties of the virtual hub.
28809	*VirtualHubProperties `json:"properties,omitempty"`
28810	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
28811	Etag *string `json:"etag,omitempty"`
28812	// ID - Resource ID.
28813	ID *string `json:"id,omitempty"`
28814	// Name - READ-ONLY; Resource name.
28815	Name *string `json:"name,omitempty"`
28816	// Type - READ-ONLY; Resource type.
28817	Type *string `json:"type,omitempty"`
28818	// Location - Resource location.
28819	Location *string `json:"location,omitempty"`
28820	// Tags - Resource tags.
28821	Tags map[string]*string `json:"tags"`
28822}
28823
28824// MarshalJSON is the custom marshaler for VirtualHub.
28825func (vh VirtualHub) MarshalJSON() ([]byte, error) {
28826	objectMap := make(map[string]interface{})
28827	if vh.VirtualHubProperties != nil {
28828		objectMap["properties"] = vh.VirtualHubProperties
28829	}
28830	if vh.ID != nil {
28831		objectMap["id"] = vh.ID
28832	}
28833	if vh.Location != nil {
28834		objectMap["location"] = vh.Location
28835	}
28836	if vh.Tags != nil {
28837		objectMap["tags"] = vh.Tags
28838	}
28839	return json.Marshal(objectMap)
28840}
28841
28842// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
28843func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
28844	var m map[string]*json.RawMessage
28845	err := json.Unmarshal(body, &m)
28846	if err != nil {
28847		return err
28848	}
28849	for k, v := range m {
28850		switch k {
28851		case "properties":
28852			if v != nil {
28853				var virtualHubProperties VirtualHubProperties
28854				err = json.Unmarshal(*v, &virtualHubProperties)
28855				if err != nil {
28856					return err
28857				}
28858				vh.VirtualHubProperties = &virtualHubProperties
28859			}
28860		case "etag":
28861			if v != nil {
28862				var etag string
28863				err = json.Unmarshal(*v, &etag)
28864				if err != nil {
28865					return err
28866				}
28867				vh.Etag = &etag
28868			}
28869		case "id":
28870			if v != nil {
28871				var ID string
28872				err = json.Unmarshal(*v, &ID)
28873				if err != nil {
28874					return err
28875				}
28876				vh.ID = &ID
28877			}
28878		case "name":
28879			if v != nil {
28880				var name string
28881				err = json.Unmarshal(*v, &name)
28882				if err != nil {
28883					return err
28884				}
28885				vh.Name = &name
28886			}
28887		case "type":
28888			if v != nil {
28889				var typeVar string
28890				err = json.Unmarshal(*v, &typeVar)
28891				if err != nil {
28892					return err
28893				}
28894				vh.Type = &typeVar
28895			}
28896		case "location":
28897			if v != nil {
28898				var location string
28899				err = json.Unmarshal(*v, &location)
28900				if err != nil {
28901					return err
28902				}
28903				vh.Location = &location
28904			}
28905		case "tags":
28906			if v != nil {
28907				var tags map[string]*string
28908				err = json.Unmarshal(*v, &tags)
28909				if err != nil {
28910					return err
28911				}
28912				vh.Tags = tags
28913			}
28914		}
28915	}
28916
28917	return nil
28918}
28919
28920// VirtualHubID virtual Hub identifier.
28921type VirtualHubID struct {
28922	// 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.
28923	ID *string `json:"id,omitempty"`
28924}
28925
28926// VirtualHubProperties parameters for VirtualHub.
28927type VirtualHubProperties struct {
28928	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
28929	VirtualWan *SubResource `json:"virtualWan,omitempty"`
28930	// VpnGateway - The VpnGateway associated with this VirtualHub.
28931	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
28932	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
28933	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
28934	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
28935	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
28936	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
28937	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
28938	// AddressPrefix - Address-prefix for this VirtualHub.
28939	AddressPrefix *string `json:"addressPrefix,omitempty"`
28940	// RouteTable - The routeTable associated with this virtual hub.
28941	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
28942	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28943	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28944}
28945
28946// VirtualHubRoute virtualHub route.
28947type VirtualHubRoute struct {
28948	// AddressPrefixes - List of all addressPrefixes.
28949	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28950	// NextHopIPAddress - NextHop ip address.
28951	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
28952}
28953
28954// VirtualHubRouteTable virtualHub route table.
28955type VirtualHubRouteTable struct {
28956	// Routes - List of all routes.
28957	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
28958}
28959
28960// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28961// long-running operation.
28962type VirtualHubsCreateOrUpdateFuture struct {
28963	azure.FutureAPI
28964	// Result returns the result of the asynchronous operation.
28965	// If the operation has not completed it will return an error.
28966	Result func(VirtualHubsClient) (VirtualHub, error)
28967}
28968
28969// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28970func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28971	var azFuture azure.Future
28972	if err := json.Unmarshal(body, &azFuture); err != nil {
28973		return err
28974	}
28975	future.FutureAPI = &azFuture
28976	future.Result = future.result
28977	return nil
28978}
28979
28980// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
28981func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
28982	var done bool
28983	done, err = future.DoneWithContext(context.Background(), client)
28984	if err != nil {
28985		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28986		return
28987	}
28988	if !done {
28989		vh.Response.Response = future.Response()
28990		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
28991		return
28992	}
28993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28994	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
28995		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
28996		if err != nil {
28997			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
28998		}
28999	}
29000	return
29001}
29002
29003// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29004// operation.
29005type VirtualHubsDeleteFuture struct {
29006	azure.FutureAPI
29007	// Result returns the result of the asynchronous operation.
29008	// If the operation has not completed it will return an error.
29009	Result func(VirtualHubsClient) (autorest.Response, error)
29010}
29011
29012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29013func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
29014	var azFuture azure.Future
29015	if err := json.Unmarshal(body, &azFuture); err != nil {
29016		return err
29017	}
29018	future.FutureAPI = &azFuture
29019	future.Result = future.result
29020	return nil
29021}
29022
29023// result is the default implementation for VirtualHubsDeleteFuture.Result.
29024func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
29025	var done bool
29026	done, err = future.DoneWithContext(context.Background(), client)
29027	if err != nil {
29028		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
29029		return
29030	}
29031	if !done {
29032		ar.Response = future.Response()
29033		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
29034		return
29035	}
29036	ar.Response = future.Response()
29037	return
29038}
29039
29040// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29041// operation.
29042type VirtualHubsUpdateTagsFuture struct {
29043	azure.FutureAPI
29044	// Result returns the result of the asynchronous operation.
29045	// If the operation has not completed it will return an error.
29046	Result func(VirtualHubsClient) (VirtualHub, error)
29047}
29048
29049// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29050func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29051	var azFuture azure.Future
29052	if err := json.Unmarshal(body, &azFuture); err != nil {
29053		return err
29054	}
29055	future.FutureAPI = &azFuture
29056	future.Result = future.result
29057	return nil
29058}
29059
29060// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
29061func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
29062	var done bool
29063	done, err = future.DoneWithContext(context.Background(), client)
29064	if err != nil {
29065		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29066		return
29067	}
29068	if !done {
29069		vh.Response.Response = future.Response()
29070		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
29071		return
29072	}
29073	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29074	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
29075		vh, err = client.UpdateTagsResponder(vh.Response.Response)
29076		if err != nil {
29077			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
29078		}
29079	}
29080	return
29081}
29082
29083// VirtualNetwork virtual Network resource.
29084type VirtualNetwork struct {
29085	autorest.Response `json:"-"`
29086	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
29087	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
29088	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29089	Etag *string `json:"etag,omitempty"`
29090	// ID - Resource ID.
29091	ID *string `json:"id,omitempty"`
29092	// Name - READ-ONLY; Resource name.
29093	Name *string `json:"name,omitempty"`
29094	// Type - READ-ONLY; Resource type.
29095	Type *string `json:"type,omitempty"`
29096	// Location - Resource location.
29097	Location *string `json:"location,omitempty"`
29098	// Tags - Resource tags.
29099	Tags map[string]*string `json:"tags"`
29100}
29101
29102// MarshalJSON is the custom marshaler for VirtualNetwork.
29103func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
29104	objectMap := make(map[string]interface{})
29105	if vn.VirtualNetworkPropertiesFormat != nil {
29106		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
29107	}
29108	if vn.Etag != nil {
29109		objectMap["etag"] = vn.Etag
29110	}
29111	if vn.ID != nil {
29112		objectMap["id"] = vn.ID
29113	}
29114	if vn.Location != nil {
29115		objectMap["location"] = vn.Location
29116	}
29117	if vn.Tags != nil {
29118		objectMap["tags"] = vn.Tags
29119	}
29120	return json.Marshal(objectMap)
29121}
29122
29123// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
29124func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
29125	var m map[string]*json.RawMessage
29126	err := json.Unmarshal(body, &m)
29127	if err != nil {
29128		return err
29129	}
29130	for k, v := range m {
29131		switch k {
29132		case "properties":
29133			if v != nil {
29134				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
29135				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
29136				if err != nil {
29137					return err
29138				}
29139				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
29140			}
29141		case "etag":
29142			if v != nil {
29143				var etag string
29144				err = json.Unmarshal(*v, &etag)
29145				if err != nil {
29146					return err
29147				}
29148				vn.Etag = &etag
29149			}
29150		case "id":
29151			if v != nil {
29152				var ID string
29153				err = json.Unmarshal(*v, &ID)
29154				if err != nil {
29155					return err
29156				}
29157				vn.ID = &ID
29158			}
29159		case "name":
29160			if v != nil {
29161				var name string
29162				err = json.Unmarshal(*v, &name)
29163				if err != nil {
29164					return err
29165				}
29166				vn.Name = &name
29167			}
29168		case "type":
29169			if v != nil {
29170				var typeVar string
29171				err = json.Unmarshal(*v, &typeVar)
29172				if err != nil {
29173					return err
29174				}
29175				vn.Type = &typeVar
29176			}
29177		case "location":
29178			if v != nil {
29179				var location string
29180				err = json.Unmarshal(*v, &location)
29181				if err != nil {
29182					return err
29183				}
29184				vn.Location = &location
29185			}
29186		case "tags":
29187			if v != nil {
29188				var tags map[string]*string
29189				err = json.Unmarshal(*v, &tags)
29190				if err != nil {
29191					return err
29192				}
29193				vn.Tags = tags
29194			}
29195		}
29196	}
29197
29198	return nil
29199}
29200
29201// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
29202// resource.
29203type VirtualNetworkConnectionGatewayReference struct {
29204	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
29205	ID *string `json:"id,omitempty"`
29206}
29207
29208// VirtualNetworkGateway a common class for general resource information.
29209type VirtualNetworkGateway struct {
29210	autorest.Response `json:"-"`
29211	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
29212	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
29213	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29214	Etag *string `json:"etag,omitempty"`
29215	// ID - Resource ID.
29216	ID *string `json:"id,omitempty"`
29217	// Name - READ-ONLY; Resource name.
29218	Name *string `json:"name,omitempty"`
29219	// Type - READ-ONLY; Resource type.
29220	Type *string `json:"type,omitempty"`
29221	// Location - Resource location.
29222	Location *string `json:"location,omitempty"`
29223	// Tags - Resource tags.
29224	Tags map[string]*string `json:"tags"`
29225}
29226
29227// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
29228func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
29229	objectMap := make(map[string]interface{})
29230	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
29231		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
29232	}
29233	if vng.Etag != nil {
29234		objectMap["etag"] = vng.Etag
29235	}
29236	if vng.ID != nil {
29237		objectMap["id"] = vng.ID
29238	}
29239	if vng.Location != nil {
29240		objectMap["location"] = vng.Location
29241	}
29242	if vng.Tags != nil {
29243		objectMap["tags"] = vng.Tags
29244	}
29245	return json.Marshal(objectMap)
29246}
29247
29248// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
29249func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
29250	var m map[string]*json.RawMessage
29251	err := json.Unmarshal(body, &m)
29252	if err != nil {
29253		return err
29254	}
29255	for k, v := range m {
29256		switch k {
29257		case "properties":
29258			if v != nil {
29259				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
29260				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
29261				if err != nil {
29262					return err
29263				}
29264				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
29265			}
29266		case "etag":
29267			if v != nil {
29268				var etag string
29269				err = json.Unmarshal(*v, &etag)
29270				if err != nil {
29271					return err
29272				}
29273				vng.Etag = &etag
29274			}
29275		case "id":
29276			if v != nil {
29277				var ID string
29278				err = json.Unmarshal(*v, &ID)
29279				if err != nil {
29280					return err
29281				}
29282				vng.ID = &ID
29283			}
29284		case "name":
29285			if v != nil {
29286				var name string
29287				err = json.Unmarshal(*v, &name)
29288				if err != nil {
29289					return err
29290				}
29291				vng.Name = &name
29292			}
29293		case "type":
29294			if v != nil {
29295				var typeVar string
29296				err = json.Unmarshal(*v, &typeVar)
29297				if err != nil {
29298					return err
29299				}
29300				vng.Type = &typeVar
29301			}
29302		case "location":
29303			if v != nil {
29304				var location string
29305				err = json.Unmarshal(*v, &location)
29306				if err != nil {
29307					return err
29308				}
29309				vng.Location = &location
29310			}
29311		case "tags":
29312			if v != nil {
29313				var tags map[string]*string
29314				err = json.Unmarshal(*v, &tags)
29315				if err != nil {
29316					return err
29317				}
29318				vng.Tags = tags
29319			}
29320		}
29321	}
29322
29323	return nil
29324}
29325
29326// VirtualNetworkGatewayConnection a common class for general resource information.
29327type VirtualNetworkGatewayConnection struct {
29328	autorest.Response `json:"-"`
29329	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
29330	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
29331	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29332	Etag *string `json:"etag,omitempty"`
29333	// ID - Resource ID.
29334	ID *string `json:"id,omitempty"`
29335	// Name - READ-ONLY; Resource name.
29336	Name *string `json:"name,omitempty"`
29337	// Type - READ-ONLY; Resource type.
29338	Type *string `json:"type,omitempty"`
29339	// Location - Resource location.
29340	Location *string `json:"location,omitempty"`
29341	// Tags - Resource tags.
29342	Tags map[string]*string `json:"tags"`
29343}
29344
29345// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
29346func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
29347	objectMap := make(map[string]interface{})
29348	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
29349		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
29350	}
29351	if vngc.Etag != nil {
29352		objectMap["etag"] = vngc.Etag
29353	}
29354	if vngc.ID != nil {
29355		objectMap["id"] = vngc.ID
29356	}
29357	if vngc.Location != nil {
29358		objectMap["location"] = vngc.Location
29359	}
29360	if vngc.Tags != nil {
29361		objectMap["tags"] = vngc.Tags
29362	}
29363	return json.Marshal(objectMap)
29364}
29365
29366// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
29367func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
29368	var m map[string]*json.RawMessage
29369	err := json.Unmarshal(body, &m)
29370	if err != nil {
29371		return err
29372	}
29373	for k, v := range m {
29374		switch k {
29375		case "properties":
29376			if v != nil {
29377				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
29378				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
29379				if err != nil {
29380					return err
29381				}
29382				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
29383			}
29384		case "etag":
29385			if v != nil {
29386				var etag string
29387				err = json.Unmarshal(*v, &etag)
29388				if err != nil {
29389					return err
29390				}
29391				vngc.Etag = &etag
29392			}
29393		case "id":
29394			if v != nil {
29395				var ID string
29396				err = json.Unmarshal(*v, &ID)
29397				if err != nil {
29398					return err
29399				}
29400				vngc.ID = &ID
29401			}
29402		case "name":
29403			if v != nil {
29404				var name string
29405				err = json.Unmarshal(*v, &name)
29406				if err != nil {
29407					return err
29408				}
29409				vngc.Name = &name
29410			}
29411		case "type":
29412			if v != nil {
29413				var typeVar string
29414				err = json.Unmarshal(*v, &typeVar)
29415				if err != nil {
29416					return err
29417				}
29418				vngc.Type = &typeVar
29419			}
29420		case "location":
29421			if v != nil {
29422				var location string
29423				err = json.Unmarshal(*v, &location)
29424				if err != nil {
29425					return err
29426				}
29427				vngc.Location = &location
29428			}
29429		case "tags":
29430			if v != nil {
29431				var tags map[string]*string
29432				err = json.Unmarshal(*v, &tags)
29433				if err != nil {
29434					return err
29435				}
29436				vngc.Tags = tags
29437			}
29438		}
29439	}
29440
29441	return nil
29442}
29443
29444// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
29445type VirtualNetworkGatewayConnectionListEntity struct {
29446	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
29447	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
29448	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29449	Etag *string `json:"etag,omitempty"`
29450	// ID - Resource ID.
29451	ID *string `json:"id,omitempty"`
29452	// Name - READ-ONLY; Resource name.
29453	Name *string `json:"name,omitempty"`
29454	// Type - READ-ONLY; Resource type.
29455	Type *string `json:"type,omitempty"`
29456	// Location - Resource location.
29457	Location *string `json:"location,omitempty"`
29458	// Tags - Resource tags.
29459	Tags map[string]*string `json:"tags"`
29460}
29461
29462// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
29463func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
29464	objectMap := make(map[string]interface{})
29465	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
29466		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
29467	}
29468	if vngcle.Etag != nil {
29469		objectMap["etag"] = vngcle.Etag
29470	}
29471	if vngcle.ID != nil {
29472		objectMap["id"] = vngcle.ID
29473	}
29474	if vngcle.Location != nil {
29475		objectMap["location"] = vngcle.Location
29476	}
29477	if vngcle.Tags != nil {
29478		objectMap["tags"] = vngcle.Tags
29479	}
29480	return json.Marshal(objectMap)
29481}
29482
29483// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
29484func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
29485	var m map[string]*json.RawMessage
29486	err := json.Unmarshal(body, &m)
29487	if err != nil {
29488		return err
29489	}
29490	for k, v := range m {
29491		switch k {
29492		case "properties":
29493			if v != nil {
29494				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
29495				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
29496				if err != nil {
29497					return err
29498				}
29499				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
29500			}
29501		case "etag":
29502			if v != nil {
29503				var etag string
29504				err = json.Unmarshal(*v, &etag)
29505				if err != nil {
29506					return err
29507				}
29508				vngcle.Etag = &etag
29509			}
29510		case "id":
29511			if v != nil {
29512				var ID string
29513				err = json.Unmarshal(*v, &ID)
29514				if err != nil {
29515					return err
29516				}
29517				vngcle.ID = &ID
29518			}
29519		case "name":
29520			if v != nil {
29521				var name string
29522				err = json.Unmarshal(*v, &name)
29523				if err != nil {
29524					return err
29525				}
29526				vngcle.Name = &name
29527			}
29528		case "type":
29529			if v != nil {
29530				var typeVar string
29531				err = json.Unmarshal(*v, &typeVar)
29532				if err != nil {
29533					return err
29534				}
29535				vngcle.Type = &typeVar
29536			}
29537		case "location":
29538			if v != nil {
29539				var location string
29540				err = json.Unmarshal(*v, &location)
29541				if err != nil {
29542					return err
29543				}
29544				vngcle.Location = &location
29545			}
29546		case "tags":
29547			if v != nil {
29548				var tags map[string]*string
29549				err = json.Unmarshal(*v, &tags)
29550				if err != nil {
29551					return err
29552				}
29553				vngcle.Tags = tags
29554			}
29555		}
29556	}
29557
29558	return nil
29559}
29560
29561// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
29562type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
29563	// AuthorizationKey - The authorizationKey.
29564	AuthorizationKey *string `json:"authorizationKey,omitempty"`
29565	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
29566	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
29567	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
29568	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
29569	// LocalNetworkGateway2 - The reference to local network gateway resource.
29570	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
29571	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
29572	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
29573	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
29574	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
29575	// RoutingWeight - The routing weight.
29576	RoutingWeight *int32 `json:"routingWeight,omitempty"`
29577	// SharedKey - The IPSec shared key.
29578	SharedKey *string `json:"sharedKey,omitempty"`
29579	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
29580	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
29581	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
29582	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
29583	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
29584	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29585	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
29586	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29587	// Peer - The reference to peerings resource.
29588	Peer *SubResource `json:"peer,omitempty"`
29589	// EnableBgp - EnableBgp flag.
29590	EnableBgp *bool `json:"enableBgp,omitempty"`
29591	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
29592	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
29593	// IpsecPolicies - The IPSec Policies to be considered by this connection.
29594	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
29595	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
29596	ResourceGUID *string `json:"resourceGuid,omitempty"`
29597	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29598	ProvisioningState *string `json:"provisioningState,omitempty"`
29599	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
29600	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
29601}
29602
29603// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
29604func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
29605	objectMap := make(map[string]interface{})
29606	if vngclepf.AuthorizationKey != nil {
29607		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
29608	}
29609	if vngclepf.VirtualNetworkGateway1 != nil {
29610		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
29611	}
29612	if vngclepf.VirtualNetworkGateway2 != nil {
29613		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
29614	}
29615	if vngclepf.LocalNetworkGateway2 != nil {
29616		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
29617	}
29618	if vngclepf.ConnectionType != "" {
29619		objectMap["connectionType"] = vngclepf.ConnectionType
29620	}
29621	if vngclepf.ConnectionProtocol != "" {
29622		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
29623	}
29624	if vngclepf.RoutingWeight != nil {
29625		objectMap["routingWeight"] = vngclepf.RoutingWeight
29626	}
29627	if vngclepf.SharedKey != nil {
29628		objectMap["sharedKey"] = vngclepf.SharedKey
29629	}
29630	if vngclepf.Peer != nil {
29631		objectMap["peer"] = vngclepf.Peer
29632	}
29633	if vngclepf.EnableBgp != nil {
29634		objectMap["enableBgp"] = vngclepf.EnableBgp
29635	}
29636	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
29637		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
29638	}
29639	if vngclepf.IpsecPolicies != nil {
29640		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
29641	}
29642	if vngclepf.ResourceGUID != nil {
29643		objectMap["resourceGuid"] = vngclepf.ResourceGUID
29644	}
29645	if vngclepf.ExpressRouteGatewayBypass != nil {
29646		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
29647	}
29648	return json.Marshal(objectMap)
29649}
29650
29651// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
29652// service call.
29653type VirtualNetworkGatewayConnectionListResult struct {
29654	autorest.Response `json:"-"`
29655	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
29656	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
29657	// NextLink - READ-ONLY; The URL to get the next set of results.
29658	NextLink *string `json:"nextLink,omitempty"`
29659}
29660
29661// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
29662func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
29663	objectMap := make(map[string]interface{})
29664	if vngclr.Value != nil {
29665		objectMap["value"] = vngclr.Value
29666	}
29667	return json.Marshal(objectMap)
29668}
29669
29670// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
29671// VirtualNetworkGatewayConnection values.
29672type VirtualNetworkGatewayConnectionListResultIterator struct {
29673	i    int
29674	page VirtualNetworkGatewayConnectionListResultPage
29675}
29676
29677// NextWithContext advances to the next value.  If there was an error making
29678// the request the iterator does not advance and the error is returned.
29679func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
29680	if tracing.IsEnabled() {
29681		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
29682		defer func() {
29683			sc := -1
29684			if iter.Response().Response.Response != nil {
29685				sc = iter.Response().Response.Response.StatusCode
29686			}
29687			tracing.EndSpan(ctx, sc, err)
29688		}()
29689	}
29690	iter.i++
29691	if iter.i < len(iter.page.Values()) {
29692		return nil
29693	}
29694	err = iter.page.NextWithContext(ctx)
29695	if err != nil {
29696		iter.i--
29697		return err
29698	}
29699	iter.i = 0
29700	return nil
29701}
29702
29703// Next advances to the next value.  If there was an error making
29704// the request the iterator does not advance and the error is returned.
29705// Deprecated: Use NextWithContext() instead.
29706func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
29707	return iter.NextWithContext(context.Background())
29708}
29709
29710// NotDone returns true if the enumeration should be started or is not yet complete.
29711func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
29712	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29713}
29714
29715// Response returns the raw server response from the last page request.
29716func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
29717	return iter.page.Response()
29718}
29719
29720// Value returns the current value or a zero-initialized value if the
29721// iterator has advanced beyond the end of the collection.
29722func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
29723	if !iter.page.NotDone() {
29724		return VirtualNetworkGatewayConnection{}
29725	}
29726	return iter.page.Values()[iter.i]
29727}
29728
29729// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
29730func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
29731	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
29732}
29733
29734// IsEmpty returns true if the ListResult contains no values.
29735func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
29736	return vngclr.Value == nil || len(*vngclr.Value) == 0
29737}
29738
29739// hasNextLink returns true if the NextLink is not empty.
29740func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
29741	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
29742}
29743
29744// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
29745// It returns nil if no more results exist.
29746func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
29747	if !vngclr.hasNextLink() {
29748		return nil, nil
29749	}
29750	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29751		autorest.AsJSON(),
29752		autorest.AsGet(),
29753		autorest.WithBaseURL(to.String(vngclr.NextLink)))
29754}
29755
29756// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
29757type VirtualNetworkGatewayConnectionListResultPage struct {
29758	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
29759	vngclr VirtualNetworkGatewayConnectionListResult
29760}
29761
29762// NextWithContext advances to the next page of values.  If there was an error making
29763// the request the page does not advance and the error is returned.
29764func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
29765	if tracing.IsEnabled() {
29766		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
29767		defer func() {
29768			sc := -1
29769			if page.Response().Response.Response != nil {
29770				sc = page.Response().Response.Response.StatusCode
29771			}
29772			tracing.EndSpan(ctx, sc, err)
29773		}()
29774	}
29775	for {
29776		next, err := page.fn(ctx, page.vngclr)
29777		if err != nil {
29778			return err
29779		}
29780		page.vngclr = next
29781		if !next.hasNextLink() || !next.IsEmpty() {
29782			break
29783		}
29784	}
29785	return nil
29786}
29787
29788// Next advances to the next page of values.  If there was an error making
29789// the request the page does not advance and the error is returned.
29790// Deprecated: Use NextWithContext() instead.
29791func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
29792	return page.NextWithContext(context.Background())
29793}
29794
29795// NotDone returns true if the page enumeration should be started or is not yet complete.
29796func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
29797	return !page.vngclr.IsEmpty()
29798}
29799
29800// Response returns the raw server response from the last page request.
29801func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
29802	return page.vngclr
29803}
29804
29805// Values returns the slice of values for the current page or nil if there are no values.
29806func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
29807	if page.vngclr.IsEmpty() {
29808		return nil
29809	}
29810	return *page.vngclr.Value
29811}
29812
29813// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
29814func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
29815	return VirtualNetworkGatewayConnectionListResultPage{
29816		fn:     getNextPage,
29817		vngclr: cur,
29818	}
29819}
29820
29821// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
29822type VirtualNetworkGatewayConnectionPropertiesFormat struct {
29823	// AuthorizationKey - The authorizationKey.
29824	AuthorizationKey *string `json:"authorizationKey,omitempty"`
29825	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
29826	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
29827	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
29828	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
29829	// LocalNetworkGateway2 - The reference to local network gateway resource.
29830	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
29831	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
29832	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
29833	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
29834	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
29835	// RoutingWeight - The routing weight.
29836	RoutingWeight *int32 `json:"routingWeight,omitempty"`
29837	// SharedKey - The IPSec shared key.
29838	SharedKey *string `json:"sharedKey,omitempty"`
29839	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
29840	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
29841	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
29842	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
29843	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
29844	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29845	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
29846	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29847	// Peer - The reference to peerings resource.
29848	Peer *SubResource `json:"peer,omitempty"`
29849	// EnableBgp - EnableBgp flag.
29850	EnableBgp *bool `json:"enableBgp,omitempty"`
29851	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
29852	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
29853	// IpsecPolicies - The IPSec Policies to be considered by this connection.
29854	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
29855	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
29856	ResourceGUID *string `json:"resourceGuid,omitempty"`
29857	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29858	ProvisioningState *string `json:"provisioningState,omitempty"`
29859	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
29860	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
29861}
29862
29863// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
29864func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
29865	objectMap := make(map[string]interface{})
29866	if vngcpf.AuthorizationKey != nil {
29867		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
29868	}
29869	if vngcpf.VirtualNetworkGateway1 != nil {
29870		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
29871	}
29872	if vngcpf.VirtualNetworkGateway2 != nil {
29873		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
29874	}
29875	if vngcpf.LocalNetworkGateway2 != nil {
29876		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
29877	}
29878	if vngcpf.ConnectionType != "" {
29879		objectMap["connectionType"] = vngcpf.ConnectionType
29880	}
29881	if vngcpf.ConnectionProtocol != "" {
29882		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
29883	}
29884	if vngcpf.RoutingWeight != nil {
29885		objectMap["routingWeight"] = vngcpf.RoutingWeight
29886	}
29887	if vngcpf.SharedKey != nil {
29888		objectMap["sharedKey"] = vngcpf.SharedKey
29889	}
29890	if vngcpf.Peer != nil {
29891		objectMap["peer"] = vngcpf.Peer
29892	}
29893	if vngcpf.EnableBgp != nil {
29894		objectMap["enableBgp"] = vngcpf.EnableBgp
29895	}
29896	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
29897		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
29898	}
29899	if vngcpf.IpsecPolicies != nil {
29900		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
29901	}
29902	if vngcpf.ResourceGUID != nil {
29903		objectMap["resourceGuid"] = vngcpf.ResourceGUID
29904	}
29905	if vngcpf.ExpressRouteGatewayBypass != nil {
29906		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
29907	}
29908	return json.Marshal(objectMap)
29909}
29910
29911// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
29912// results of a long-running operation.
29913type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
29914	azure.FutureAPI
29915	// Result returns the result of the asynchronous operation.
29916	// If the operation has not completed it will return an error.
29917	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
29918}
29919
29920// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29921func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29922	var azFuture azure.Future
29923	if err := json.Unmarshal(body, &azFuture); err != nil {
29924		return err
29925	}
29926	future.FutureAPI = &azFuture
29927	future.Result = future.result
29928	return nil
29929}
29930
29931// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
29932func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
29933	var done bool
29934	done, err = future.DoneWithContext(context.Background(), client)
29935	if err != nil {
29936		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29937		return
29938	}
29939	if !done {
29940		vngc.Response.Response = future.Response()
29941		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
29942		return
29943	}
29944	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29945	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
29946		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
29947		if err != nil {
29948			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
29949		}
29950	}
29951	return
29952}
29953
29954// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
29955// a long-running operation.
29956type VirtualNetworkGatewayConnectionsDeleteFuture struct {
29957	azure.FutureAPI
29958	// Result returns the result of the asynchronous operation.
29959	// If the operation has not completed it will return an error.
29960	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
29961}
29962
29963// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29964func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
29965	var azFuture azure.Future
29966	if err := json.Unmarshal(body, &azFuture); err != nil {
29967		return err
29968	}
29969	future.FutureAPI = &azFuture
29970	future.Result = future.result
29971	return nil
29972}
29973
29974// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
29975func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
29976	var done bool
29977	done, err = future.DoneWithContext(context.Background(), client)
29978	if err != nil {
29979		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
29980		return
29981	}
29982	if !done {
29983		ar.Response = future.Response()
29984		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
29985		return
29986	}
29987	ar.Response = future.Response()
29988	return
29989}
29990
29991// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
29992// results of a long-running operation.
29993type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
29994	azure.FutureAPI
29995	// Result returns the result of the asynchronous operation.
29996	// If the operation has not completed it will return an error.
29997	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
29998}
29999
30000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30001func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
30002	var azFuture azure.Future
30003	if err := json.Unmarshal(body, &azFuture); err != nil {
30004		return err
30005	}
30006	future.FutureAPI = &azFuture
30007	future.Result = future.result
30008	return nil
30009}
30010
30011// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
30012func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
30013	var done bool
30014	done, err = future.DoneWithContext(context.Background(), client)
30015	if err != nil {
30016		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
30017		return
30018	}
30019	if !done {
30020		crsk.Response.Response = future.Response()
30021		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
30022		return
30023	}
30024	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30025	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
30026		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
30027		if err != nil {
30028			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
30029		}
30030	}
30031	return
30032}
30033
30034// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
30035// results of a long-running operation.
30036type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
30037	azure.FutureAPI
30038	// Result returns the result of the asynchronous operation.
30039	// If the operation has not completed it will return an error.
30040	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
30041}
30042
30043// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30044func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
30045	var azFuture azure.Future
30046	if err := json.Unmarshal(body, &azFuture); err != nil {
30047		return err
30048	}
30049	future.FutureAPI = &azFuture
30050	future.Result = future.result
30051	return nil
30052}
30053
30054// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
30055func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
30056	var done bool
30057	done, err = future.DoneWithContext(context.Background(), client)
30058	if err != nil {
30059		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
30060		return
30061	}
30062	if !done {
30063		csk.Response.Response = future.Response()
30064		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
30065		return
30066	}
30067	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30068	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
30069		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
30070		if err != nil {
30071			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
30072		}
30073	}
30074	return
30075}
30076
30077// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
30078// results of a long-running operation.
30079type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
30080	azure.FutureAPI
30081	// Result returns the result of the asynchronous operation.
30082	// If the operation has not completed it will return an error.
30083	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
30084}
30085
30086// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30087func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30088	var azFuture azure.Future
30089	if err := json.Unmarshal(body, &azFuture); err != nil {
30090		return err
30091	}
30092	future.FutureAPI = &azFuture
30093	future.Result = future.result
30094	return nil
30095}
30096
30097// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
30098func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
30099	var done bool
30100	done, err = future.DoneWithContext(context.Background(), client)
30101	if err != nil {
30102		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30103		return
30104	}
30105	if !done {
30106		vngc.Response.Response = future.Response()
30107		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
30108		return
30109	}
30110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30111	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
30112		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
30113		if err != nil {
30114			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
30115		}
30116	}
30117	return
30118}
30119
30120// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
30121type VirtualNetworkGatewayIPConfiguration struct {
30122	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
30123	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
30124	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30125	Name *string `json:"name,omitempty"`
30126	// Etag - A unique read-only string that changes whenever the resource is updated.
30127	Etag *string `json:"etag,omitempty"`
30128	// ID - Resource ID.
30129	ID *string `json:"id,omitempty"`
30130}
30131
30132// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
30133func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
30134	objectMap := make(map[string]interface{})
30135	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
30136		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
30137	}
30138	if vngic.Name != nil {
30139		objectMap["name"] = vngic.Name
30140	}
30141	if vngic.Etag != nil {
30142		objectMap["etag"] = vngic.Etag
30143	}
30144	if vngic.ID != nil {
30145		objectMap["id"] = vngic.ID
30146	}
30147	return json.Marshal(objectMap)
30148}
30149
30150// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
30151func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
30152	var m map[string]*json.RawMessage
30153	err := json.Unmarshal(body, &m)
30154	if err != nil {
30155		return err
30156	}
30157	for k, v := range m {
30158		switch k {
30159		case "properties":
30160			if v != nil {
30161				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
30162				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
30163				if err != nil {
30164					return err
30165				}
30166				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
30167			}
30168		case "name":
30169			if v != nil {
30170				var name string
30171				err = json.Unmarshal(*v, &name)
30172				if err != nil {
30173					return err
30174				}
30175				vngic.Name = &name
30176			}
30177		case "etag":
30178			if v != nil {
30179				var etag string
30180				err = json.Unmarshal(*v, &etag)
30181				if err != nil {
30182					return err
30183				}
30184				vngic.Etag = &etag
30185			}
30186		case "id":
30187			if v != nil {
30188				var ID string
30189				err = json.Unmarshal(*v, &ID)
30190				if err != nil {
30191					return err
30192				}
30193				vngic.ID = &ID
30194			}
30195		}
30196	}
30197
30198	return nil
30199}
30200
30201// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
30202type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
30203	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
30204	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
30205	// Subnet - The reference of the subnet resource.
30206	Subnet *SubResource `json:"subnet,omitempty"`
30207	// PublicIPAddress - The reference of the public IP resource.
30208	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
30209	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30210	ProvisioningState *string `json:"provisioningState,omitempty"`
30211}
30212
30213// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
30214func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
30215	objectMap := make(map[string]interface{})
30216	if vngicpf.PrivateIPAllocationMethod != "" {
30217		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
30218	}
30219	if vngicpf.Subnet != nil {
30220		objectMap["subnet"] = vngicpf.Subnet
30221	}
30222	if vngicpf.PublicIPAddress != nil {
30223		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
30224	}
30225	return json.Marshal(objectMap)
30226}
30227
30228// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
30229// service call.
30230type VirtualNetworkGatewayListConnectionsResult struct {
30231	autorest.Response `json:"-"`
30232	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
30233	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
30234	// NextLink - READ-ONLY; The URL to get the next set of results.
30235	NextLink *string `json:"nextLink,omitempty"`
30236}
30237
30238// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
30239func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
30240	objectMap := make(map[string]interface{})
30241	if vnglcr.Value != nil {
30242		objectMap["value"] = vnglcr.Value
30243	}
30244	return json.Marshal(objectMap)
30245}
30246
30247// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
30248// VirtualNetworkGatewayConnectionListEntity values.
30249type VirtualNetworkGatewayListConnectionsResultIterator struct {
30250	i    int
30251	page VirtualNetworkGatewayListConnectionsResultPage
30252}
30253
30254// NextWithContext advances to the next value.  If there was an error making
30255// the request the iterator does not advance and the error is returned.
30256func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
30257	if tracing.IsEnabled() {
30258		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
30259		defer func() {
30260			sc := -1
30261			if iter.Response().Response.Response != nil {
30262				sc = iter.Response().Response.Response.StatusCode
30263			}
30264			tracing.EndSpan(ctx, sc, err)
30265		}()
30266	}
30267	iter.i++
30268	if iter.i < len(iter.page.Values()) {
30269		return nil
30270	}
30271	err = iter.page.NextWithContext(ctx)
30272	if err != nil {
30273		iter.i--
30274		return err
30275	}
30276	iter.i = 0
30277	return nil
30278}
30279
30280// Next advances to the next value.  If there was an error making
30281// the request the iterator does not advance and the error is returned.
30282// Deprecated: Use NextWithContext() instead.
30283func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
30284	return iter.NextWithContext(context.Background())
30285}
30286
30287// NotDone returns true if the enumeration should be started or is not yet complete.
30288func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
30289	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30290}
30291
30292// Response returns the raw server response from the last page request.
30293func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
30294	return iter.page.Response()
30295}
30296
30297// Value returns the current value or a zero-initialized value if the
30298// iterator has advanced beyond the end of the collection.
30299func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
30300	if !iter.page.NotDone() {
30301		return VirtualNetworkGatewayConnectionListEntity{}
30302	}
30303	return iter.page.Values()[iter.i]
30304}
30305
30306// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
30307func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
30308	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
30309}
30310
30311// IsEmpty returns true if the ListResult contains no values.
30312func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
30313	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
30314}
30315
30316// hasNextLink returns true if the NextLink is not empty.
30317func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
30318	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
30319}
30320
30321// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
30322// It returns nil if no more results exist.
30323func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
30324	if !vnglcr.hasNextLink() {
30325		return nil, nil
30326	}
30327	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30328		autorest.AsJSON(),
30329		autorest.AsGet(),
30330		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
30331}
30332
30333// VirtualNetworkGatewayListConnectionsResultPage contains a page of
30334// VirtualNetworkGatewayConnectionListEntity values.
30335type VirtualNetworkGatewayListConnectionsResultPage struct {
30336	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
30337	vnglcr VirtualNetworkGatewayListConnectionsResult
30338}
30339
30340// NextWithContext advances to the next page of values.  If there was an error making
30341// the request the page does not advance and the error is returned.
30342func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
30343	if tracing.IsEnabled() {
30344		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
30345		defer func() {
30346			sc := -1
30347			if page.Response().Response.Response != nil {
30348				sc = page.Response().Response.Response.StatusCode
30349			}
30350			tracing.EndSpan(ctx, sc, err)
30351		}()
30352	}
30353	for {
30354		next, err := page.fn(ctx, page.vnglcr)
30355		if err != nil {
30356			return err
30357		}
30358		page.vnglcr = next
30359		if !next.hasNextLink() || !next.IsEmpty() {
30360			break
30361		}
30362	}
30363	return nil
30364}
30365
30366// Next advances to the next page of values.  If there was an error making
30367// the request the page does not advance and the error is returned.
30368// Deprecated: Use NextWithContext() instead.
30369func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
30370	return page.NextWithContext(context.Background())
30371}
30372
30373// NotDone returns true if the page enumeration should be started or is not yet complete.
30374func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
30375	return !page.vnglcr.IsEmpty()
30376}
30377
30378// Response returns the raw server response from the last page request.
30379func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
30380	return page.vnglcr
30381}
30382
30383// Values returns the slice of values for the current page or nil if there are no values.
30384func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
30385	if page.vnglcr.IsEmpty() {
30386		return nil
30387	}
30388	return *page.vnglcr.Value
30389}
30390
30391// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
30392func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
30393	return VirtualNetworkGatewayListConnectionsResultPage{
30394		fn:     getNextPage,
30395		vnglcr: cur,
30396	}
30397}
30398
30399// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
30400type VirtualNetworkGatewayListResult struct {
30401	autorest.Response `json:"-"`
30402	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
30403	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
30404	// NextLink - READ-ONLY; The URL to get the next set of results.
30405	NextLink *string `json:"nextLink,omitempty"`
30406}
30407
30408// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
30409func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
30410	objectMap := make(map[string]interface{})
30411	if vnglr.Value != nil {
30412		objectMap["value"] = vnglr.Value
30413	}
30414	return json.Marshal(objectMap)
30415}
30416
30417// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
30418// values.
30419type VirtualNetworkGatewayListResultIterator struct {
30420	i    int
30421	page VirtualNetworkGatewayListResultPage
30422}
30423
30424// NextWithContext advances to the next value.  If there was an error making
30425// the request the iterator does not advance and the error is returned.
30426func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
30427	if tracing.IsEnabled() {
30428		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
30429		defer func() {
30430			sc := -1
30431			if iter.Response().Response.Response != nil {
30432				sc = iter.Response().Response.Response.StatusCode
30433			}
30434			tracing.EndSpan(ctx, sc, err)
30435		}()
30436	}
30437	iter.i++
30438	if iter.i < len(iter.page.Values()) {
30439		return nil
30440	}
30441	err = iter.page.NextWithContext(ctx)
30442	if err != nil {
30443		iter.i--
30444		return err
30445	}
30446	iter.i = 0
30447	return nil
30448}
30449
30450// Next advances to the next value.  If there was an error making
30451// the request the iterator does not advance and the error is returned.
30452// Deprecated: Use NextWithContext() instead.
30453func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
30454	return iter.NextWithContext(context.Background())
30455}
30456
30457// NotDone returns true if the enumeration should be started or is not yet complete.
30458func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
30459	return iter.page.NotDone() && iter.i < len(iter.page.Values())
30460}
30461
30462// Response returns the raw server response from the last page request.
30463func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
30464	return iter.page.Response()
30465}
30466
30467// Value returns the current value or a zero-initialized value if the
30468// iterator has advanced beyond the end of the collection.
30469func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
30470	if !iter.page.NotDone() {
30471		return VirtualNetworkGateway{}
30472	}
30473	return iter.page.Values()[iter.i]
30474}
30475
30476// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
30477func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
30478	return VirtualNetworkGatewayListResultIterator{page: page}
30479}
30480
30481// IsEmpty returns true if the ListResult contains no values.
30482func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
30483	return vnglr.Value == nil || len(*vnglr.Value) == 0
30484}
30485
30486// hasNextLink returns true if the NextLink is not empty.
30487func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
30488	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
30489}
30490
30491// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
30492// It returns nil if no more results exist.
30493func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
30494	if !vnglr.hasNextLink() {
30495		return nil, nil
30496	}
30497	return autorest.Prepare((&http.Request{}).WithContext(ctx),
30498		autorest.AsJSON(),
30499		autorest.AsGet(),
30500		autorest.WithBaseURL(to.String(vnglr.NextLink)))
30501}
30502
30503// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
30504type VirtualNetworkGatewayListResultPage struct {
30505	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
30506	vnglr VirtualNetworkGatewayListResult
30507}
30508
30509// NextWithContext advances to the next page of values.  If there was an error making
30510// the request the page does not advance and the error is returned.
30511func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
30512	if tracing.IsEnabled() {
30513		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
30514		defer func() {
30515			sc := -1
30516			if page.Response().Response.Response != nil {
30517				sc = page.Response().Response.Response.StatusCode
30518			}
30519			tracing.EndSpan(ctx, sc, err)
30520		}()
30521	}
30522	for {
30523		next, err := page.fn(ctx, page.vnglr)
30524		if err != nil {
30525			return err
30526		}
30527		page.vnglr = next
30528		if !next.hasNextLink() || !next.IsEmpty() {
30529			break
30530		}
30531	}
30532	return nil
30533}
30534
30535// Next advances to the next page of values.  If there was an error making
30536// the request the page does not advance and the error is returned.
30537// Deprecated: Use NextWithContext() instead.
30538func (page *VirtualNetworkGatewayListResultPage) Next() error {
30539	return page.NextWithContext(context.Background())
30540}
30541
30542// NotDone returns true if the page enumeration should be started or is not yet complete.
30543func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
30544	return !page.vnglr.IsEmpty()
30545}
30546
30547// Response returns the raw server response from the last page request.
30548func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
30549	return page.vnglr
30550}
30551
30552// Values returns the slice of values for the current page or nil if there are no values.
30553func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
30554	if page.vnglr.IsEmpty() {
30555		return nil
30556	}
30557	return *page.vnglr.Value
30558}
30559
30560// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
30561func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
30562	return VirtualNetworkGatewayListResultPage{
30563		fn:    getNextPage,
30564		vnglr: cur,
30565	}
30566}
30567
30568// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
30569type VirtualNetworkGatewayPropertiesFormat struct {
30570	// IPConfigurations - IP configurations for virtual network gateway.
30571	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
30572	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
30573	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
30574	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
30575	VpnType VpnType `json:"vpnType,omitempty"`
30576	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
30577	EnableBgp *bool `json:"enableBgp,omitempty"`
30578	// ActiveActive - ActiveActive flag.
30579	ActiveActive *bool `json:"activeActive,omitempty"`
30580	// 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.
30581	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
30582	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
30583	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
30584	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
30585	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
30586	// BgpSettings - Virtual network gateway's BGP speaker settings.
30587	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
30588	// CustomRoutes - The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient.
30589	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
30590	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
30591	ResourceGUID *string `json:"resourceGuid,omitempty"`
30592	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
30593	ProvisioningState *string `json:"provisioningState,omitempty"`
30594}
30595
30596// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
30597func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
30598	objectMap := make(map[string]interface{})
30599	if vngpf.IPConfigurations != nil {
30600		objectMap["ipConfigurations"] = vngpf.IPConfigurations
30601	}
30602	if vngpf.GatewayType != "" {
30603		objectMap["gatewayType"] = vngpf.GatewayType
30604	}
30605	if vngpf.VpnType != "" {
30606		objectMap["vpnType"] = vngpf.VpnType
30607	}
30608	if vngpf.EnableBgp != nil {
30609		objectMap["enableBgp"] = vngpf.EnableBgp
30610	}
30611	if vngpf.ActiveActive != nil {
30612		objectMap["activeActive"] = vngpf.ActiveActive
30613	}
30614	if vngpf.GatewayDefaultSite != nil {
30615		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
30616	}
30617	if vngpf.Sku != nil {
30618		objectMap["sku"] = vngpf.Sku
30619	}
30620	if vngpf.VpnClientConfiguration != nil {
30621		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
30622	}
30623	if vngpf.BgpSettings != nil {
30624		objectMap["bgpSettings"] = vngpf.BgpSettings
30625	}
30626	if vngpf.CustomRoutes != nil {
30627		objectMap["customRoutes"] = vngpf.CustomRoutes
30628	}
30629	if vngpf.ResourceGUID != nil {
30630		objectMap["resourceGuid"] = vngpf.ResourceGUID
30631	}
30632	return json.Marshal(objectMap)
30633}
30634
30635// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30636// long-running operation.
30637type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
30638	azure.FutureAPI
30639	// Result returns the result of the asynchronous operation.
30640	// If the operation has not completed it will return an error.
30641	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
30642}
30643
30644// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30645func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30646	var azFuture azure.Future
30647	if err := json.Unmarshal(body, &azFuture); err != nil {
30648		return err
30649	}
30650	future.FutureAPI = &azFuture
30651	future.Result = future.result
30652	return nil
30653}
30654
30655// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
30656func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
30657	var done bool
30658	done, err = future.DoneWithContext(context.Background(), client)
30659	if err != nil {
30660		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30661		return
30662	}
30663	if !done {
30664		vng.Response.Response = future.Response()
30665		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
30666		return
30667	}
30668	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30669	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
30670		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
30671		if err != nil {
30672			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
30673		}
30674	}
30675	return
30676}
30677
30678// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
30679// long-running operation.
30680type VirtualNetworkGatewaysDeleteFuture struct {
30681	azure.FutureAPI
30682	// Result returns the result of the asynchronous operation.
30683	// If the operation has not completed it will return an error.
30684	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
30685}
30686
30687// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30688func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
30689	var azFuture azure.Future
30690	if err := json.Unmarshal(body, &azFuture); err != nil {
30691		return err
30692	}
30693	future.FutureAPI = &azFuture
30694	future.Result = future.result
30695	return nil
30696}
30697
30698// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
30699func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
30700	var done bool
30701	done, err = future.DoneWithContext(context.Background(), client)
30702	if err != nil {
30703		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
30704		return
30705	}
30706	if !done {
30707		ar.Response = future.Response()
30708		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
30709		return
30710	}
30711	ar.Response = future.Response()
30712	return
30713}
30714
30715// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
30716// results of a long-running operation.
30717type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
30718	azure.FutureAPI
30719	// Result returns the result of the asynchronous operation.
30720	// If the operation has not completed it will return an error.
30721	Result func(VirtualNetworkGatewaysClient) (String, error)
30722}
30723
30724// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30725func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
30726	var azFuture azure.Future
30727	if err := json.Unmarshal(body, &azFuture); err != nil {
30728		return err
30729	}
30730	future.FutureAPI = &azFuture
30731	future.Result = future.result
30732	return nil
30733}
30734
30735// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
30736func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
30737	var done bool
30738	done, err = future.DoneWithContext(context.Background(), client)
30739	if err != nil {
30740		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
30741		return
30742	}
30743	if !done {
30744		s.Response.Response = future.Response()
30745		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
30746		return
30747	}
30748	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30749	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
30750		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
30751		if err != nil {
30752			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
30753		}
30754	}
30755	return
30756}
30757
30758// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
30759// of a long-running operation.
30760type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
30761	azure.FutureAPI
30762	// Result returns the result of the asynchronous operation.
30763	// If the operation has not completed it will return an error.
30764	Result func(VirtualNetworkGatewaysClient) (String, error)
30765}
30766
30767// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30768func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
30769	var azFuture azure.Future
30770	if err := json.Unmarshal(body, &azFuture); err != nil {
30771		return err
30772	}
30773	future.FutureAPI = &azFuture
30774	future.Result = future.result
30775	return nil
30776}
30777
30778// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
30779func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
30780	var done bool
30781	done, err = future.DoneWithContext(context.Background(), client)
30782	if err != nil {
30783		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
30784		return
30785	}
30786	if !done {
30787		s.Response.Response = future.Response()
30788		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
30789		return
30790	}
30791	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30792	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
30793		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
30794		if err != nil {
30795			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
30796		}
30797	}
30798	return
30799}
30800
30801// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
30802// of a long-running operation.
30803type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
30804	azure.FutureAPI
30805	// Result returns the result of the asynchronous operation.
30806	// If the operation has not completed it will return an error.
30807	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
30808}
30809
30810// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30811func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
30812	var azFuture azure.Future
30813	if err := json.Unmarshal(body, &azFuture); err != nil {
30814		return err
30815	}
30816	future.FutureAPI = &azFuture
30817	future.Result = future.result
30818	return nil
30819}
30820
30821// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
30822func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
30823	var done bool
30824	done, err = future.DoneWithContext(context.Background(), client)
30825	if err != nil {
30826		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
30827		return
30828	}
30829	if !done {
30830		grlr.Response.Response = future.Response()
30831		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
30832		return
30833	}
30834	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30835	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
30836		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
30837		if err != nil {
30838			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
30839		}
30840	}
30841	return
30842}
30843
30844// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
30845// a long-running operation.
30846type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
30847	azure.FutureAPI
30848	// Result returns the result of the asynchronous operation.
30849	// If the operation has not completed it will return an error.
30850	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
30851}
30852
30853// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30854func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
30855	var azFuture azure.Future
30856	if err := json.Unmarshal(body, &azFuture); err != nil {
30857		return err
30858	}
30859	future.FutureAPI = &azFuture
30860	future.Result = future.result
30861	return nil
30862}
30863
30864// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
30865func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
30866	var done bool
30867	done, err = future.DoneWithContext(context.Background(), client)
30868	if err != nil {
30869		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
30870		return
30871	}
30872	if !done {
30873		bpslr.Response.Response = future.Response()
30874		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
30875		return
30876	}
30877	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30878	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
30879		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
30880		if err != nil {
30881			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
30882		}
30883	}
30884	return
30885}
30886
30887// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
30888// a long-running operation.
30889type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
30890	azure.FutureAPI
30891	// Result returns the result of the asynchronous operation.
30892	// If the operation has not completed it will return an error.
30893	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
30894}
30895
30896// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30897func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
30898	var azFuture azure.Future
30899	if err := json.Unmarshal(body, &azFuture); err != nil {
30900		return err
30901	}
30902	future.FutureAPI = &azFuture
30903	future.Result = future.result
30904	return nil
30905}
30906
30907// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
30908func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
30909	var done bool
30910	done, err = future.DoneWithContext(context.Background(), client)
30911	if err != nil {
30912		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
30913		return
30914	}
30915	if !done {
30916		grlr.Response.Response = future.Response()
30917		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
30918		return
30919	}
30920	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30921	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
30922		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
30923		if err != nil {
30924			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
30925		}
30926	}
30927	return
30928}
30929
30930// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
30931// the results of a long-running operation.
30932type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
30933	azure.FutureAPI
30934	// Result returns the result of the asynchronous operation.
30935	// If the operation has not completed it will return an error.
30936	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
30937}
30938
30939// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30940func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) UnmarshalJSON(body []byte) error {
30941	var azFuture azure.Future
30942	if err := json.Unmarshal(body, &azFuture); err != nil {
30943		return err
30944	}
30945	future.FutureAPI = &azFuture
30946	future.Result = future.result
30947	return nil
30948}
30949
30950// result is the default implementation for VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture.Result.
30951func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) {
30952	var done bool
30953	done, err = future.DoneWithContext(context.Background(), client)
30954	if err != nil {
30955		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure")
30956		return
30957	}
30958	if !done {
30959		vcchdlr.Response.Response = future.Response()
30960		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture")
30961		return
30962	}
30963	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30964	if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent {
30965		vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response)
30966		if err != nil {
30967			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request")
30968		}
30969	}
30970	return
30971}
30972
30973// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
30974// results of a long-running operation.
30975type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
30976	azure.FutureAPI
30977	// Result returns the result of the asynchronous operation.
30978	// If the operation has not completed it will return an error.
30979	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
30980}
30981
30982// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30983func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
30984	var azFuture azure.Future
30985	if err := json.Unmarshal(body, &azFuture); err != nil {
30986		return err
30987	}
30988	future.FutureAPI = &azFuture
30989	future.Result = future.result
30990	return nil
30991}
30992
30993// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
30994func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
30995	var done bool
30996	done, err = future.DoneWithContext(context.Background(), client)
30997	if err != nil {
30998		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
30999		return
31000	}
31001	if !done {
31002		vcipp.Response.Response = future.Response()
31003		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
31004		return
31005	}
31006	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31007	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
31008		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
31009		if err != nil {
31010			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
31011		}
31012	}
31013	return
31014}
31015
31016// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
31017// results of a long-running operation.
31018type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
31019	azure.FutureAPI
31020	// Result returns the result of the asynchronous operation.
31021	// If the operation has not completed it will return an error.
31022	Result func(VirtualNetworkGatewaysClient) (String, error)
31023}
31024
31025// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31026func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
31027	var azFuture azure.Future
31028	if err := json.Unmarshal(body, &azFuture); err != nil {
31029		return err
31030	}
31031	future.FutureAPI = &azFuture
31032	future.Result = future.result
31033	return nil
31034}
31035
31036// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
31037func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
31038	var done bool
31039	done, err = future.DoneWithContext(context.Background(), client)
31040	if err != nil {
31041		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
31042		return
31043	}
31044	if !done {
31045		s.Response.Response = future.Response()
31046		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
31047		return
31048	}
31049	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31050	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
31051		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
31052		if err != nil {
31053			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
31054		}
31055	}
31056	return
31057}
31058
31059// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
31060type VirtualNetworkGatewaySku struct {
31061	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
31062	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
31063	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
31064	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
31065	// Capacity - The capacity.
31066	Capacity *int32 `json:"capacity,omitempty"`
31067}
31068
31069// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
31070// long-running operation.
31071type VirtualNetworkGatewaysResetFuture struct {
31072	azure.FutureAPI
31073	// Result returns the result of the asynchronous operation.
31074	// If the operation has not completed it will return an error.
31075	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
31076}
31077
31078// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31079func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
31080	var azFuture azure.Future
31081	if err := json.Unmarshal(body, &azFuture); err != nil {
31082		return err
31083	}
31084	future.FutureAPI = &azFuture
31085	future.Result = future.result
31086	return nil
31087}
31088
31089// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
31090func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
31091	var done bool
31092	done, err = future.DoneWithContext(context.Background(), client)
31093	if err != nil {
31094		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
31095		return
31096	}
31097	if !done {
31098		vng.Response.Response = future.Response()
31099		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
31100		return
31101	}
31102	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31103	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
31104		vng, err = client.ResetResponder(vng.Response.Response)
31105		if err != nil {
31106			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
31107		}
31108	}
31109	return
31110}
31111
31112// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
31113// results of a long-running operation.
31114type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
31115	azure.FutureAPI
31116	// Result returns the result of the asynchronous operation.
31117	// If the operation has not completed it will return an error.
31118	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
31119}
31120
31121// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31122func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
31123	var azFuture azure.Future
31124	if err := json.Unmarshal(body, &azFuture); err != nil {
31125		return err
31126	}
31127	future.FutureAPI = &azFuture
31128	future.Result = future.result
31129	return nil
31130}
31131
31132// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
31133func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
31134	var done bool
31135	done, err = future.DoneWithContext(context.Background(), client)
31136	if err != nil {
31137		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
31138		return
31139	}
31140	if !done {
31141		ar.Response = future.Response()
31142		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
31143		return
31144	}
31145	ar.Response = future.Response()
31146	return
31147}
31148
31149// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
31150// results of a long-running operation.
31151type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
31152	azure.FutureAPI
31153	// Result returns the result of the asynchronous operation.
31154	// If the operation has not completed it will return an error.
31155	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
31156}
31157
31158// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31159func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
31160	var azFuture azure.Future
31161	if err := json.Unmarshal(body, &azFuture); err != nil {
31162		return err
31163	}
31164	future.FutureAPI = &azFuture
31165	future.Result = future.result
31166	return nil
31167}
31168
31169// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
31170func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
31171	var done bool
31172	done, err = future.DoneWithContext(context.Background(), client)
31173	if err != nil {
31174		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
31175		return
31176	}
31177	if !done {
31178		vcipp.Response.Response = future.Response()
31179		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
31180		return
31181	}
31182	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31183	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
31184		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
31185		if err != nil {
31186			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
31187		}
31188	}
31189	return
31190}
31191
31192// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
31193// long-running operation.
31194type VirtualNetworkGatewaysUpdateTagsFuture struct {
31195	azure.FutureAPI
31196	// Result returns the result of the asynchronous operation.
31197	// If the operation has not completed it will return an error.
31198	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
31199}
31200
31201// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31202func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
31203	var azFuture azure.Future
31204	if err := json.Unmarshal(body, &azFuture); err != nil {
31205		return err
31206	}
31207	future.FutureAPI = &azFuture
31208	future.Result = future.result
31209	return nil
31210}
31211
31212// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
31213func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
31214	var done bool
31215	done, err = future.DoneWithContext(context.Background(), client)
31216	if err != nil {
31217		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
31218		return
31219	}
31220	if !done {
31221		vng.Response.Response = future.Response()
31222		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
31223		return
31224	}
31225	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31226	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
31227		vng, err = client.UpdateTagsResponder(vng.Response.Response)
31228		if err != nil {
31229			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
31230		}
31231	}
31232	return
31233}
31234
31235// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
31236type VirtualNetworkListResult struct {
31237	autorest.Response `json:"-"`
31238	// Value - Gets a list of VirtualNetwork resources in a resource group.
31239	Value *[]VirtualNetwork `json:"value,omitempty"`
31240	// NextLink - The URL to get the next set of results.
31241	NextLink *string `json:"nextLink,omitempty"`
31242}
31243
31244// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
31245type VirtualNetworkListResultIterator struct {
31246	i    int
31247	page VirtualNetworkListResultPage
31248}
31249
31250// NextWithContext advances to the next value.  If there was an error making
31251// the request the iterator does not advance and the error is returned.
31252func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
31253	if tracing.IsEnabled() {
31254		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
31255		defer func() {
31256			sc := -1
31257			if iter.Response().Response.Response != nil {
31258				sc = iter.Response().Response.Response.StatusCode
31259			}
31260			tracing.EndSpan(ctx, sc, err)
31261		}()
31262	}
31263	iter.i++
31264	if iter.i < len(iter.page.Values()) {
31265		return nil
31266	}
31267	err = iter.page.NextWithContext(ctx)
31268	if err != nil {
31269		iter.i--
31270		return err
31271	}
31272	iter.i = 0
31273	return nil
31274}
31275
31276// Next advances to the next value.  If there was an error making
31277// the request the iterator does not advance and the error is returned.
31278// Deprecated: Use NextWithContext() instead.
31279func (iter *VirtualNetworkListResultIterator) Next() error {
31280	return iter.NextWithContext(context.Background())
31281}
31282
31283// NotDone returns true if the enumeration should be started or is not yet complete.
31284func (iter VirtualNetworkListResultIterator) NotDone() bool {
31285	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31286}
31287
31288// Response returns the raw server response from the last page request.
31289func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
31290	return iter.page.Response()
31291}
31292
31293// Value returns the current value or a zero-initialized value if the
31294// iterator has advanced beyond the end of the collection.
31295func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
31296	if !iter.page.NotDone() {
31297		return VirtualNetwork{}
31298	}
31299	return iter.page.Values()[iter.i]
31300}
31301
31302// Creates a new instance of the VirtualNetworkListResultIterator type.
31303func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
31304	return VirtualNetworkListResultIterator{page: page}
31305}
31306
31307// IsEmpty returns true if the ListResult contains no values.
31308func (vnlr VirtualNetworkListResult) IsEmpty() bool {
31309	return vnlr.Value == nil || len(*vnlr.Value) == 0
31310}
31311
31312// hasNextLink returns true if the NextLink is not empty.
31313func (vnlr VirtualNetworkListResult) hasNextLink() bool {
31314	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
31315}
31316
31317// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
31318// It returns nil if no more results exist.
31319func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
31320	if !vnlr.hasNextLink() {
31321		return nil, nil
31322	}
31323	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31324		autorest.AsJSON(),
31325		autorest.AsGet(),
31326		autorest.WithBaseURL(to.String(vnlr.NextLink)))
31327}
31328
31329// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
31330type VirtualNetworkListResultPage struct {
31331	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
31332	vnlr VirtualNetworkListResult
31333}
31334
31335// NextWithContext advances to the next page of values.  If there was an error making
31336// the request the page does not advance and the error is returned.
31337func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
31338	if tracing.IsEnabled() {
31339		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
31340		defer func() {
31341			sc := -1
31342			if page.Response().Response.Response != nil {
31343				sc = page.Response().Response.Response.StatusCode
31344			}
31345			tracing.EndSpan(ctx, sc, err)
31346		}()
31347	}
31348	for {
31349		next, err := page.fn(ctx, page.vnlr)
31350		if err != nil {
31351			return err
31352		}
31353		page.vnlr = next
31354		if !next.hasNextLink() || !next.IsEmpty() {
31355			break
31356		}
31357	}
31358	return nil
31359}
31360
31361// Next advances to the next page of values.  If there was an error making
31362// the request the page does not advance and the error is returned.
31363// Deprecated: Use NextWithContext() instead.
31364func (page *VirtualNetworkListResultPage) Next() error {
31365	return page.NextWithContext(context.Background())
31366}
31367
31368// NotDone returns true if the page enumeration should be started or is not yet complete.
31369func (page VirtualNetworkListResultPage) NotDone() bool {
31370	return !page.vnlr.IsEmpty()
31371}
31372
31373// Response returns the raw server response from the last page request.
31374func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
31375	return page.vnlr
31376}
31377
31378// Values returns the slice of values for the current page or nil if there are no values.
31379func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
31380	if page.vnlr.IsEmpty() {
31381		return nil
31382	}
31383	return *page.vnlr.Value
31384}
31385
31386// Creates a new instance of the VirtualNetworkListResultPage type.
31387func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
31388	return VirtualNetworkListResultPage{
31389		fn:   getNextPage,
31390		vnlr: cur,
31391	}
31392}
31393
31394// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
31395type VirtualNetworkListUsageResult struct {
31396	autorest.Response `json:"-"`
31397	// Value - READ-ONLY; VirtualNetwork usage stats.
31398	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
31399	// NextLink - The URL to get the next set of results.
31400	NextLink *string `json:"nextLink,omitempty"`
31401}
31402
31403// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
31404func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
31405	objectMap := make(map[string]interface{})
31406	if vnlur.NextLink != nil {
31407		objectMap["nextLink"] = vnlur.NextLink
31408	}
31409	return json.Marshal(objectMap)
31410}
31411
31412// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
31413// values.
31414type VirtualNetworkListUsageResultIterator struct {
31415	i    int
31416	page VirtualNetworkListUsageResultPage
31417}
31418
31419// NextWithContext advances to the next value.  If there was an error making
31420// the request the iterator does not advance and the error is returned.
31421func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
31422	if tracing.IsEnabled() {
31423		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
31424		defer func() {
31425			sc := -1
31426			if iter.Response().Response.Response != nil {
31427				sc = iter.Response().Response.Response.StatusCode
31428			}
31429			tracing.EndSpan(ctx, sc, err)
31430		}()
31431	}
31432	iter.i++
31433	if iter.i < len(iter.page.Values()) {
31434		return nil
31435	}
31436	err = iter.page.NextWithContext(ctx)
31437	if err != nil {
31438		iter.i--
31439		return err
31440	}
31441	iter.i = 0
31442	return nil
31443}
31444
31445// Next advances to the next value.  If there was an error making
31446// the request the iterator does not advance and the error is returned.
31447// Deprecated: Use NextWithContext() instead.
31448func (iter *VirtualNetworkListUsageResultIterator) Next() error {
31449	return iter.NextWithContext(context.Background())
31450}
31451
31452// NotDone returns true if the enumeration should be started or is not yet complete.
31453func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
31454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31455}
31456
31457// Response returns the raw server response from the last page request.
31458func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
31459	return iter.page.Response()
31460}
31461
31462// Value returns the current value or a zero-initialized value if the
31463// iterator has advanced beyond the end of the collection.
31464func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
31465	if !iter.page.NotDone() {
31466		return VirtualNetworkUsage{}
31467	}
31468	return iter.page.Values()[iter.i]
31469}
31470
31471// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
31472func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
31473	return VirtualNetworkListUsageResultIterator{page: page}
31474}
31475
31476// IsEmpty returns true if the ListResult contains no values.
31477func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
31478	return vnlur.Value == nil || len(*vnlur.Value) == 0
31479}
31480
31481// hasNextLink returns true if the NextLink is not empty.
31482func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
31483	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
31484}
31485
31486// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
31487// It returns nil if no more results exist.
31488func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
31489	if !vnlur.hasNextLink() {
31490		return nil, nil
31491	}
31492	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31493		autorest.AsJSON(),
31494		autorest.AsGet(),
31495		autorest.WithBaseURL(to.String(vnlur.NextLink)))
31496}
31497
31498// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
31499type VirtualNetworkListUsageResultPage struct {
31500	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
31501	vnlur VirtualNetworkListUsageResult
31502}
31503
31504// NextWithContext advances to the next page of values.  If there was an error making
31505// the request the page does not advance and the error is returned.
31506func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
31507	if tracing.IsEnabled() {
31508		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
31509		defer func() {
31510			sc := -1
31511			if page.Response().Response.Response != nil {
31512				sc = page.Response().Response.Response.StatusCode
31513			}
31514			tracing.EndSpan(ctx, sc, err)
31515		}()
31516	}
31517	for {
31518		next, err := page.fn(ctx, page.vnlur)
31519		if err != nil {
31520			return err
31521		}
31522		page.vnlur = next
31523		if !next.hasNextLink() || !next.IsEmpty() {
31524			break
31525		}
31526	}
31527	return nil
31528}
31529
31530// Next advances to the next page of values.  If there was an error making
31531// the request the page does not advance and the error is returned.
31532// Deprecated: Use NextWithContext() instead.
31533func (page *VirtualNetworkListUsageResultPage) Next() error {
31534	return page.NextWithContext(context.Background())
31535}
31536
31537// NotDone returns true if the page enumeration should be started or is not yet complete.
31538func (page VirtualNetworkListUsageResultPage) NotDone() bool {
31539	return !page.vnlur.IsEmpty()
31540}
31541
31542// Response returns the raw server response from the last page request.
31543func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
31544	return page.vnlur
31545}
31546
31547// Values returns the slice of values for the current page or nil if there are no values.
31548func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
31549	if page.vnlur.IsEmpty() {
31550		return nil
31551	}
31552	return *page.vnlur.Value
31553}
31554
31555// Creates a new instance of the VirtualNetworkListUsageResultPage type.
31556func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
31557	return VirtualNetworkListUsageResultPage{
31558		fn:    getNextPage,
31559		vnlur: cur,
31560	}
31561}
31562
31563// VirtualNetworkPeering peerings in a virtual network resource.
31564type VirtualNetworkPeering struct {
31565	autorest.Response `json:"-"`
31566	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
31567	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
31568	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
31569	Name *string `json:"name,omitempty"`
31570	// Etag - A unique read-only string that changes whenever the resource is updated.
31571	Etag *string `json:"etag,omitempty"`
31572	// ID - Resource ID.
31573	ID *string `json:"id,omitempty"`
31574}
31575
31576// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
31577func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
31578	objectMap := make(map[string]interface{})
31579	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
31580		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
31581	}
31582	if vnp.Name != nil {
31583		objectMap["name"] = vnp.Name
31584	}
31585	if vnp.Etag != nil {
31586		objectMap["etag"] = vnp.Etag
31587	}
31588	if vnp.ID != nil {
31589		objectMap["id"] = vnp.ID
31590	}
31591	return json.Marshal(objectMap)
31592}
31593
31594// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
31595func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
31596	var m map[string]*json.RawMessage
31597	err := json.Unmarshal(body, &m)
31598	if err != nil {
31599		return err
31600	}
31601	for k, v := range m {
31602		switch k {
31603		case "properties":
31604			if v != nil {
31605				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
31606				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
31607				if err != nil {
31608					return err
31609				}
31610				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
31611			}
31612		case "name":
31613			if v != nil {
31614				var name string
31615				err = json.Unmarshal(*v, &name)
31616				if err != nil {
31617					return err
31618				}
31619				vnp.Name = &name
31620			}
31621		case "etag":
31622			if v != nil {
31623				var etag string
31624				err = json.Unmarshal(*v, &etag)
31625				if err != nil {
31626					return err
31627				}
31628				vnp.Etag = &etag
31629			}
31630		case "id":
31631			if v != nil {
31632				var ID string
31633				err = json.Unmarshal(*v, &ID)
31634				if err != nil {
31635					return err
31636				}
31637				vnp.ID = &ID
31638			}
31639		}
31640	}
31641
31642	return nil
31643}
31644
31645// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
31646// belong to a virtual network.
31647type VirtualNetworkPeeringListResult struct {
31648	autorest.Response `json:"-"`
31649	// Value - The peerings in a virtual network.
31650	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
31651	// NextLink - The URL to get the next set of results.
31652	NextLink *string `json:"nextLink,omitempty"`
31653}
31654
31655// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
31656// values.
31657type VirtualNetworkPeeringListResultIterator struct {
31658	i    int
31659	page VirtualNetworkPeeringListResultPage
31660}
31661
31662// NextWithContext advances to the next value.  If there was an error making
31663// the request the iterator does not advance and the error is returned.
31664func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
31665	if tracing.IsEnabled() {
31666		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
31667		defer func() {
31668			sc := -1
31669			if iter.Response().Response.Response != nil {
31670				sc = iter.Response().Response.Response.StatusCode
31671			}
31672			tracing.EndSpan(ctx, sc, err)
31673		}()
31674	}
31675	iter.i++
31676	if iter.i < len(iter.page.Values()) {
31677		return nil
31678	}
31679	err = iter.page.NextWithContext(ctx)
31680	if err != nil {
31681		iter.i--
31682		return err
31683	}
31684	iter.i = 0
31685	return nil
31686}
31687
31688// Next advances to the next value.  If there was an error making
31689// the request the iterator does not advance and the error is returned.
31690// Deprecated: Use NextWithContext() instead.
31691func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
31692	return iter.NextWithContext(context.Background())
31693}
31694
31695// NotDone returns true if the enumeration should be started or is not yet complete.
31696func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
31697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31698}
31699
31700// Response returns the raw server response from the last page request.
31701func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
31702	return iter.page.Response()
31703}
31704
31705// Value returns the current value or a zero-initialized value if the
31706// iterator has advanced beyond the end of the collection.
31707func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
31708	if !iter.page.NotDone() {
31709		return VirtualNetworkPeering{}
31710	}
31711	return iter.page.Values()[iter.i]
31712}
31713
31714// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
31715func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
31716	return VirtualNetworkPeeringListResultIterator{page: page}
31717}
31718
31719// IsEmpty returns true if the ListResult contains no values.
31720func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
31721	return vnplr.Value == nil || len(*vnplr.Value) == 0
31722}
31723
31724// hasNextLink returns true if the NextLink is not empty.
31725func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
31726	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
31727}
31728
31729// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
31730// It returns nil if no more results exist.
31731func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
31732	if !vnplr.hasNextLink() {
31733		return nil, nil
31734	}
31735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31736		autorest.AsJSON(),
31737		autorest.AsGet(),
31738		autorest.WithBaseURL(to.String(vnplr.NextLink)))
31739}
31740
31741// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
31742type VirtualNetworkPeeringListResultPage struct {
31743	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
31744	vnplr VirtualNetworkPeeringListResult
31745}
31746
31747// NextWithContext advances to the next page of values.  If there was an error making
31748// the request the page does not advance and the error is returned.
31749func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
31750	if tracing.IsEnabled() {
31751		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
31752		defer func() {
31753			sc := -1
31754			if page.Response().Response.Response != nil {
31755				sc = page.Response().Response.Response.StatusCode
31756			}
31757			tracing.EndSpan(ctx, sc, err)
31758		}()
31759	}
31760	for {
31761		next, err := page.fn(ctx, page.vnplr)
31762		if err != nil {
31763			return err
31764		}
31765		page.vnplr = next
31766		if !next.hasNextLink() || !next.IsEmpty() {
31767			break
31768		}
31769	}
31770	return nil
31771}
31772
31773// Next advances to the next page of values.  If there was an error making
31774// the request the page does not advance and the error is returned.
31775// Deprecated: Use NextWithContext() instead.
31776func (page *VirtualNetworkPeeringListResultPage) Next() error {
31777	return page.NextWithContext(context.Background())
31778}
31779
31780// NotDone returns true if the page enumeration should be started or is not yet complete.
31781func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
31782	return !page.vnplr.IsEmpty()
31783}
31784
31785// Response returns the raw server response from the last page request.
31786func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
31787	return page.vnplr
31788}
31789
31790// Values returns the slice of values for the current page or nil if there are no values.
31791func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
31792	if page.vnplr.IsEmpty() {
31793		return nil
31794	}
31795	return *page.vnplr.Value
31796}
31797
31798// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
31799func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
31800	return VirtualNetworkPeeringListResultPage{
31801		fn:    getNextPage,
31802		vnplr: cur,
31803	}
31804}
31805
31806// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
31807type VirtualNetworkPeeringPropertiesFormat struct {
31808	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
31809	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
31810	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
31811	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
31812	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
31813	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
31814	// 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.
31815	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
31816	// 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).
31817	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
31818	// RemoteAddressSpace - The reference of the remote virtual network address space.
31819	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
31820	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
31821	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
31822	// ProvisioningState - The provisioning state of the resource.
31823	ProvisioningState *string `json:"provisioningState,omitempty"`
31824}
31825
31826// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31827// long-running operation.
31828type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
31829	azure.FutureAPI
31830	// Result returns the result of the asynchronous operation.
31831	// If the operation has not completed it will return an error.
31832	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
31833}
31834
31835// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31836func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31837	var azFuture azure.Future
31838	if err := json.Unmarshal(body, &azFuture); err != nil {
31839		return err
31840	}
31841	future.FutureAPI = &azFuture
31842	future.Result = future.result
31843	return nil
31844}
31845
31846// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
31847func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
31848	var done bool
31849	done, err = future.DoneWithContext(context.Background(), client)
31850	if err != nil {
31851		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31852		return
31853	}
31854	if !done {
31855		vnp.Response.Response = future.Response()
31856		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
31857		return
31858	}
31859	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31860	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
31861		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
31862		if err != nil {
31863			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
31864		}
31865	}
31866	return
31867}
31868
31869// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
31870// long-running operation.
31871type VirtualNetworkPeeringsDeleteFuture struct {
31872	azure.FutureAPI
31873	// Result returns the result of the asynchronous operation.
31874	// If the operation has not completed it will return an error.
31875	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
31876}
31877
31878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31879func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
31880	var azFuture azure.Future
31881	if err := json.Unmarshal(body, &azFuture); err != nil {
31882		return err
31883	}
31884	future.FutureAPI = &azFuture
31885	future.Result = future.result
31886	return nil
31887}
31888
31889// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
31890func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
31891	var done bool
31892	done, err = future.DoneWithContext(context.Background(), client)
31893	if err != nil {
31894		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
31895		return
31896	}
31897	if !done {
31898		ar.Response = future.Response()
31899		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
31900		return
31901	}
31902	ar.Response = future.Response()
31903	return
31904}
31905
31906// VirtualNetworkPropertiesFormat properties of the virtual network.
31907type VirtualNetworkPropertiesFormat struct {
31908	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
31909	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
31910	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
31911	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
31912	// Subnets - A list of subnets in a Virtual Network.
31913	Subnets *[]Subnet `json:"subnets,omitempty"`
31914	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
31915	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
31916	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
31917	ResourceGUID *string `json:"resourceGuid,omitempty"`
31918	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
31919	ProvisioningState *string `json:"provisioningState,omitempty"`
31920	// 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.
31921	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
31922	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
31923	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
31924	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
31925	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
31926}
31927
31928// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
31929// long-running operation.
31930type VirtualNetworksCreateOrUpdateFuture struct {
31931	azure.FutureAPI
31932	// Result returns the result of the asynchronous operation.
31933	// If the operation has not completed it will return an error.
31934	Result func(VirtualNetworksClient) (VirtualNetwork, error)
31935}
31936
31937// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31938func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
31939	var azFuture azure.Future
31940	if err := json.Unmarshal(body, &azFuture); err != nil {
31941		return err
31942	}
31943	future.FutureAPI = &azFuture
31944	future.Result = future.result
31945	return nil
31946}
31947
31948// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
31949func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
31950	var done bool
31951	done, err = future.DoneWithContext(context.Background(), client)
31952	if err != nil {
31953		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
31954		return
31955	}
31956	if !done {
31957		vn.Response.Response = future.Response()
31958		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
31959		return
31960	}
31961	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31962	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
31963		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
31964		if err != nil {
31965			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
31966		}
31967	}
31968	return
31969}
31970
31971// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
31972// operation.
31973type VirtualNetworksDeleteFuture struct {
31974	azure.FutureAPI
31975	// Result returns the result of the asynchronous operation.
31976	// If the operation has not completed it will return an error.
31977	Result func(VirtualNetworksClient) (autorest.Response, error)
31978}
31979
31980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31981func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
31982	var azFuture azure.Future
31983	if err := json.Unmarshal(body, &azFuture); err != nil {
31984		return err
31985	}
31986	future.FutureAPI = &azFuture
31987	future.Result = future.result
31988	return nil
31989}
31990
31991// result is the default implementation for VirtualNetworksDeleteFuture.Result.
31992func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
31993	var done bool
31994	done, err = future.DoneWithContext(context.Background(), client)
31995	if err != nil {
31996		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
31997		return
31998	}
31999	if !done {
32000		ar.Response = future.Response()
32001		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
32002		return
32003	}
32004	ar.Response = future.Response()
32005	return
32006}
32007
32008// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
32009// long-running operation.
32010type VirtualNetworksUpdateTagsFuture struct {
32011	azure.FutureAPI
32012	// Result returns the result of the asynchronous operation.
32013	// If the operation has not completed it will return an error.
32014	Result func(VirtualNetworksClient) (VirtualNetwork, error)
32015}
32016
32017// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32018func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
32019	var azFuture azure.Future
32020	if err := json.Unmarshal(body, &azFuture); err != nil {
32021		return err
32022	}
32023	future.FutureAPI = &azFuture
32024	future.Result = future.result
32025	return nil
32026}
32027
32028// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
32029func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
32030	var done bool
32031	done, err = future.DoneWithContext(context.Background(), client)
32032	if err != nil {
32033		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
32034		return
32035	}
32036	if !done {
32037		vn.Response.Response = future.Response()
32038		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
32039		return
32040	}
32041	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32042	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
32043		vn, err = client.UpdateTagsResponder(vn.Response.Response)
32044		if err != nil {
32045			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
32046		}
32047	}
32048	return
32049}
32050
32051// VirtualNetworkTap virtual Network Tap resource.
32052type VirtualNetworkTap struct {
32053	autorest.Response `json:"-"`
32054	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
32055	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
32056	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
32057	Etag *string `json:"etag,omitempty"`
32058	// ID - Resource ID.
32059	ID *string `json:"id,omitempty"`
32060	// Name - READ-ONLY; Resource name.
32061	Name *string `json:"name,omitempty"`
32062	// Type - READ-ONLY; Resource type.
32063	Type *string `json:"type,omitempty"`
32064	// Location - Resource location.
32065	Location *string `json:"location,omitempty"`
32066	// Tags - Resource tags.
32067	Tags map[string]*string `json:"tags"`
32068}
32069
32070// MarshalJSON is the custom marshaler for VirtualNetworkTap.
32071func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
32072	objectMap := make(map[string]interface{})
32073	if vnt.VirtualNetworkTapPropertiesFormat != nil {
32074		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
32075	}
32076	if vnt.Etag != nil {
32077		objectMap["etag"] = vnt.Etag
32078	}
32079	if vnt.ID != nil {
32080		objectMap["id"] = vnt.ID
32081	}
32082	if vnt.Location != nil {
32083		objectMap["location"] = vnt.Location
32084	}
32085	if vnt.Tags != nil {
32086		objectMap["tags"] = vnt.Tags
32087	}
32088	return json.Marshal(objectMap)
32089}
32090
32091// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
32092func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
32093	var m map[string]*json.RawMessage
32094	err := json.Unmarshal(body, &m)
32095	if err != nil {
32096		return err
32097	}
32098	for k, v := range m {
32099		switch k {
32100		case "properties":
32101			if v != nil {
32102				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
32103				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
32104				if err != nil {
32105					return err
32106				}
32107				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
32108			}
32109		case "etag":
32110			if v != nil {
32111				var etag string
32112				err = json.Unmarshal(*v, &etag)
32113				if err != nil {
32114					return err
32115				}
32116				vnt.Etag = &etag
32117			}
32118		case "id":
32119			if v != nil {
32120				var ID string
32121				err = json.Unmarshal(*v, &ID)
32122				if err != nil {
32123					return err
32124				}
32125				vnt.ID = &ID
32126			}
32127		case "name":
32128			if v != nil {
32129				var name string
32130				err = json.Unmarshal(*v, &name)
32131				if err != nil {
32132					return err
32133				}
32134				vnt.Name = &name
32135			}
32136		case "type":
32137			if v != nil {
32138				var typeVar string
32139				err = json.Unmarshal(*v, &typeVar)
32140				if err != nil {
32141					return err
32142				}
32143				vnt.Type = &typeVar
32144			}
32145		case "location":
32146			if v != nil {
32147				var location string
32148				err = json.Unmarshal(*v, &location)
32149				if err != nil {
32150					return err
32151				}
32152				vnt.Location = &location
32153			}
32154		case "tags":
32155			if v != nil {
32156				var tags map[string]*string
32157				err = json.Unmarshal(*v, &tags)
32158				if err != nil {
32159					return err
32160				}
32161				vnt.Tags = tags
32162			}
32163		}
32164	}
32165
32166	return nil
32167}
32168
32169// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
32170type VirtualNetworkTapListResult struct {
32171	autorest.Response `json:"-"`
32172	// Value - A list of VirtualNetworkTaps in a resource group.
32173	Value *[]VirtualNetworkTap `json:"value,omitempty"`
32174	// NextLink - The URL to get the next set of results.
32175	NextLink *string `json:"nextLink,omitempty"`
32176}
32177
32178// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
32179type VirtualNetworkTapListResultIterator struct {
32180	i    int
32181	page VirtualNetworkTapListResultPage
32182}
32183
32184// NextWithContext advances to the next value.  If there was an error making
32185// the request the iterator does not advance and the error is returned.
32186func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
32187	if tracing.IsEnabled() {
32188		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
32189		defer func() {
32190			sc := -1
32191			if iter.Response().Response.Response != nil {
32192				sc = iter.Response().Response.Response.StatusCode
32193			}
32194			tracing.EndSpan(ctx, sc, err)
32195		}()
32196	}
32197	iter.i++
32198	if iter.i < len(iter.page.Values()) {
32199		return nil
32200	}
32201	err = iter.page.NextWithContext(ctx)
32202	if err != nil {
32203		iter.i--
32204		return err
32205	}
32206	iter.i = 0
32207	return nil
32208}
32209
32210// Next advances to the next value.  If there was an error making
32211// the request the iterator does not advance and the error is returned.
32212// Deprecated: Use NextWithContext() instead.
32213func (iter *VirtualNetworkTapListResultIterator) Next() error {
32214	return iter.NextWithContext(context.Background())
32215}
32216
32217// NotDone returns true if the enumeration should be started or is not yet complete.
32218func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
32219	return iter.page.NotDone() && iter.i < len(iter.page.Values())
32220}
32221
32222// Response returns the raw server response from the last page request.
32223func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
32224	return iter.page.Response()
32225}
32226
32227// Value returns the current value or a zero-initialized value if the
32228// iterator has advanced beyond the end of the collection.
32229func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
32230	if !iter.page.NotDone() {
32231		return VirtualNetworkTap{}
32232	}
32233	return iter.page.Values()[iter.i]
32234}
32235
32236// Creates a new instance of the VirtualNetworkTapListResultIterator type.
32237func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
32238	return VirtualNetworkTapListResultIterator{page: page}
32239}
32240
32241// IsEmpty returns true if the ListResult contains no values.
32242func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
32243	return vntlr.Value == nil || len(*vntlr.Value) == 0
32244}
32245
32246// hasNextLink returns true if the NextLink is not empty.
32247func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
32248	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
32249}
32250
32251// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
32252// It returns nil if no more results exist.
32253func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
32254	if !vntlr.hasNextLink() {
32255		return nil, nil
32256	}
32257	return autorest.Prepare((&http.Request{}).WithContext(ctx),
32258		autorest.AsJSON(),
32259		autorest.AsGet(),
32260		autorest.WithBaseURL(to.String(vntlr.NextLink)))
32261}
32262
32263// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
32264type VirtualNetworkTapListResultPage struct {
32265	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
32266	vntlr VirtualNetworkTapListResult
32267}
32268
32269// NextWithContext advances to the next page of values.  If there was an error making
32270// the request the page does not advance and the error is returned.
32271func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
32272	if tracing.IsEnabled() {
32273		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
32274		defer func() {
32275			sc := -1
32276			if page.Response().Response.Response != nil {
32277				sc = page.Response().Response.Response.StatusCode
32278			}
32279			tracing.EndSpan(ctx, sc, err)
32280		}()
32281	}
32282	for {
32283		next, err := page.fn(ctx, page.vntlr)
32284		if err != nil {
32285			return err
32286		}
32287		page.vntlr = next
32288		if !next.hasNextLink() || !next.IsEmpty() {
32289			break
32290		}
32291	}
32292	return nil
32293}
32294
32295// Next advances to the next page of values.  If there was an error making
32296// the request the page does not advance and the error is returned.
32297// Deprecated: Use NextWithContext() instead.
32298func (page *VirtualNetworkTapListResultPage) Next() error {
32299	return page.NextWithContext(context.Background())
32300}
32301
32302// NotDone returns true if the page enumeration should be started or is not yet complete.
32303func (page VirtualNetworkTapListResultPage) NotDone() bool {
32304	return !page.vntlr.IsEmpty()
32305}
32306
32307// Response returns the raw server response from the last page request.
32308func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
32309	return page.vntlr
32310}
32311
32312// Values returns the slice of values for the current page or nil if there are no values.
32313func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
32314	if page.vntlr.IsEmpty() {
32315		return nil
32316	}
32317	return *page.vntlr.Value
32318}
32319
32320// Creates a new instance of the VirtualNetworkTapListResultPage type.
32321func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
32322	return VirtualNetworkTapListResultPage{
32323		fn:    getNextPage,
32324		vntlr: cur,
32325	}
32326}
32327
32328// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
32329type VirtualNetworkTapPropertiesFormat struct {
32330	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
32331	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
32332	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
32333	ResourceGUID *string `json:"resourceGuid,omitempty"`
32334	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
32335	ProvisioningState *string `json:"provisioningState,omitempty"`
32336	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
32337	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
32338	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
32339	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
32340	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
32341	DestinationPort *int32 `json:"destinationPort,omitempty"`
32342}
32343
32344// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
32345func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
32346	objectMap := make(map[string]interface{})
32347	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
32348		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
32349	}
32350	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
32351		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
32352	}
32353	if vntpf.DestinationPort != nil {
32354		objectMap["destinationPort"] = vntpf.DestinationPort
32355	}
32356	return json.Marshal(objectMap)
32357}
32358
32359// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32360// long-running operation.
32361type VirtualNetworkTapsCreateOrUpdateFuture struct {
32362	azure.FutureAPI
32363	// Result returns the result of the asynchronous operation.
32364	// If the operation has not completed it will return an error.
32365	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
32366}
32367
32368// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32369func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32370	var azFuture azure.Future
32371	if err := json.Unmarshal(body, &azFuture); err != nil {
32372		return err
32373	}
32374	future.FutureAPI = &azFuture
32375	future.Result = future.result
32376	return nil
32377}
32378
32379// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
32380func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
32381	var done bool
32382	done, err = future.DoneWithContext(context.Background(), client)
32383	if err != nil {
32384		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32385		return
32386	}
32387	if !done {
32388		vnt.Response.Response = future.Response()
32389		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
32390		return
32391	}
32392	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32393	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
32394		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
32395		if err != nil {
32396			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
32397		}
32398	}
32399	return
32400}
32401
32402// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
32403// long-running operation.
32404type VirtualNetworkTapsDeleteFuture struct {
32405	azure.FutureAPI
32406	// Result returns the result of the asynchronous operation.
32407	// If the operation has not completed it will return an error.
32408	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
32409}
32410
32411// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32412func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
32413	var azFuture azure.Future
32414	if err := json.Unmarshal(body, &azFuture); err != nil {
32415		return err
32416	}
32417	future.FutureAPI = &azFuture
32418	future.Result = future.result
32419	return nil
32420}
32421
32422// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
32423func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
32424	var done bool
32425	done, err = future.DoneWithContext(context.Background(), client)
32426	if err != nil {
32427		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
32428		return
32429	}
32430	if !done {
32431		ar.Response = future.Response()
32432		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
32433		return
32434	}
32435	ar.Response = future.Response()
32436	return
32437}
32438
32439// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
32440// long-running operation.
32441type VirtualNetworkTapsUpdateTagsFuture struct {
32442	azure.FutureAPI
32443	// Result returns the result of the asynchronous operation.
32444	// If the operation has not completed it will return an error.
32445	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
32446}
32447
32448// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32449func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
32450	var azFuture azure.Future
32451	if err := json.Unmarshal(body, &azFuture); err != nil {
32452		return err
32453	}
32454	future.FutureAPI = &azFuture
32455	future.Result = future.result
32456	return nil
32457}
32458
32459// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
32460func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
32461	var done bool
32462	done, err = future.DoneWithContext(context.Background(), client)
32463	if err != nil {
32464		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
32465		return
32466	}
32467	if !done {
32468		vnt.Response.Response = future.Response()
32469		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
32470		return
32471	}
32472	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32473	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
32474		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
32475		if err != nil {
32476			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
32477		}
32478	}
32479	return
32480}
32481
32482// VirtualNetworkUsage usage details for subnet.
32483type VirtualNetworkUsage struct {
32484	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
32485	CurrentValue *float64 `json:"currentValue,omitempty"`
32486	// ID - READ-ONLY; Subnet identifier.
32487	ID *string `json:"id,omitempty"`
32488	// Limit - READ-ONLY; Indicates the size of the subnet.
32489	Limit *float64 `json:"limit,omitempty"`
32490	// Name - READ-ONLY; The name containing common and localized value for usage.
32491	Name *VirtualNetworkUsageName `json:"name,omitempty"`
32492	// Unit - READ-ONLY; Usage units. Returns 'Count'.
32493	Unit *string `json:"unit,omitempty"`
32494}
32495
32496// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
32497func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
32498	objectMap := make(map[string]interface{})
32499	return json.Marshal(objectMap)
32500}
32501
32502// VirtualNetworkUsageName usage strings container.
32503type VirtualNetworkUsageName struct {
32504	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
32505	LocalizedValue *string `json:"localizedValue,omitempty"`
32506	// Value - READ-ONLY; Subnet size and usage string.
32507	Value *string `json:"value,omitempty"`
32508}
32509
32510// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
32511func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
32512	objectMap := make(map[string]interface{})
32513	return json.Marshal(objectMap)
32514}
32515
32516// VirtualWAN virtualWAN Resource.
32517type VirtualWAN struct {
32518	autorest.Response `json:"-"`
32519	// VirtualWanProperties - Properties of the virtual WAN.
32520	*VirtualWanProperties `json:"properties,omitempty"`
32521	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
32522	Etag *string `json:"etag,omitempty"`
32523	// ID - Resource ID.
32524	ID *string `json:"id,omitempty"`
32525	// Name - READ-ONLY; Resource name.
32526	Name *string `json:"name,omitempty"`
32527	// Type - READ-ONLY; Resource type.
32528	Type *string `json:"type,omitempty"`
32529	// Location - Resource location.
32530	Location *string `json:"location,omitempty"`
32531	// Tags - Resource tags.
32532	Tags map[string]*string `json:"tags"`
32533}
32534
32535// MarshalJSON is the custom marshaler for VirtualWAN.
32536func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
32537	objectMap := make(map[string]interface{})
32538	if vw.VirtualWanProperties != nil {
32539		objectMap["properties"] = vw.VirtualWanProperties
32540	}
32541	if vw.ID != nil {
32542		objectMap["id"] = vw.ID
32543	}
32544	if vw.Location != nil {
32545		objectMap["location"] = vw.Location
32546	}
32547	if vw.Tags != nil {
32548		objectMap["tags"] = vw.Tags
32549	}
32550	return json.Marshal(objectMap)
32551}
32552
32553// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
32554func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
32555	var m map[string]*json.RawMessage
32556	err := json.Unmarshal(body, &m)
32557	if err != nil {
32558		return err
32559	}
32560	for k, v := range m {
32561		switch k {
32562		case "properties":
32563			if v != nil {
32564				var virtualWanProperties VirtualWanProperties
32565				err = json.Unmarshal(*v, &virtualWanProperties)
32566				if err != nil {
32567					return err
32568				}
32569				vw.VirtualWanProperties = &virtualWanProperties
32570			}
32571		case "etag":
32572			if v != nil {
32573				var etag string
32574				err = json.Unmarshal(*v, &etag)
32575				if err != nil {
32576					return err
32577				}
32578				vw.Etag = &etag
32579			}
32580		case "id":
32581			if v != nil {
32582				var ID string
32583				err = json.Unmarshal(*v, &ID)
32584				if err != nil {
32585					return err
32586				}
32587				vw.ID = &ID
32588			}
32589		case "name":
32590			if v != nil {
32591				var name string
32592				err = json.Unmarshal(*v, &name)
32593				if err != nil {
32594					return err
32595				}
32596				vw.Name = &name
32597			}
32598		case "type":
32599			if v != nil {
32600				var typeVar string
32601				err = json.Unmarshal(*v, &typeVar)
32602				if err != nil {
32603					return err
32604				}
32605				vw.Type = &typeVar
32606			}
32607		case "location":
32608			if v != nil {
32609				var location string
32610				err = json.Unmarshal(*v, &location)
32611				if err != nil {
32612					return err
32613				}
32614				vw.Location = &location
32615			}
32616		case "tags":
32617			if v != nil {
32618				var tags map[string]*string
32619				err = json.Unmarshal(*v, &tags)
32620				if err != nil {
32621					return err
32622				}
32623				vw.Tags = tags
32624			}
32625		}
32626	}
32627
32628	return nil
32629}
32630
32631// VirtualWanProperties parameters for VirtualWAN.
32632type VirtualWanProperties struct {
32633	// DisableVpnEncryption - Vpn encryption to be disabled or not.
32634	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
32635	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
32636	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
32637	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
32638	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
32639	// SecurityProviderName - The Security Provider name.
32640	SecurityProviderName *string `json:"securityProviderName,omitempty"`
32641	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
32642	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
32643	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
32644	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
32645	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
32646	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
32647	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
32648	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
32649	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
32650	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
32651}
32652
32653// MarshalJSON is the custom marshaler for VirtualWanProperties.
32654func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
32655	objectMap := make(map[string]interface{})
32656	if vwp.DisableVpnEncryption != nil {
32657		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
32658	}
32659	if vwp.SecurityProviderName != nil {
32660		objectMap["securityProviderName"] = vwp.SecurityProviderName
32661	}
32662	if vwp.AllowBranchToBranchTraffic != nil {
32663		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
32664	}
32665	if vwp.AllowVnetToVnetTraffic != nil {
32666		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
32667	}
32668	if vwp.Office365LocalBreakoutCategory != "" {
32669		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
32670	}
32671	if vwp.P2SVpnServerConfigurations != nil {
32672		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
32673	}
32674	if vwp.ProvisioningState != "" {
32675		objectMap["provisioningState"] = vwp.ProvisioningState
32676	}
32677	return json.Marshal(objectMap)
32678}
32679
32680// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
32681// long-running operation.
32682type VirtualWansCreateOrUpdateFuture struct {
32683	azure.FutureAPI
32684	// Result returns the result of the asynchronous operation.
32685	// If the operation has not completed it will return an error.
32686	Result func(VirtualWansClient) (VirtualWAN, error)
32687}
32688
32689// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32690func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
32691	var azFuture azure.Future
32692	if err := json.Unmarshal(body, &azFuture); err != nil {
32693		return err
32694	}
32695	future.FutureAPI = &azFuture
32696	future.Result = future.result
32697	return nil
32698}
32699
32700// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
32701func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
32702	var done bool
32703	done, err = future.DoneWithContext(context.Background(), client)
32704	if err != nil {
32705		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
32706		return
32707	}
32708	if !done {
32709		vw.Response.Response = future.Response()
32710		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
32711		return
32712	}
32713	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32714	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
32715		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
32716		if err != nil {
32717			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
32718		}
32719	}
32720	return
32721}
32722
32723// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
32724// operation.
32725type VirtualWansDeleteFuture struct {
32726	azure.FutureAPI
32727	// Result returns the result of the asynchronous operation.
32728	// If the operation has not completed it will return an error.
32729	Result func(VirtualWansClient) (autorest.Response, error)
32730}
32731
32732// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32733func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
32734	var azFuture azure.Future
32735	if err := json.Unmarshal(body, &azFuture); err != nil {
32736		return err
32737	}
32738	future.FutureAPI = &azFuture
32739	future.Result = future.result
32740	return nil
32741}
32742
32743// result is the default implementation for VirtualWansDeleteFuture.Result.
32744func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
32745	var done bool
32746	done, err = future.DoneWithContext(context.Background(), client)
32747	if err != nil {
32748		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
32749		return
32750	}
32751	if !done {
32752		ar.Response = future.Response()
32753		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
32754		return
32755	}
32756	ar.Response = future.Response()
32757	return
32758}
32759
32760// VirtualWanSecurityProvider collection of SecurityProviders.
32761type VirtualWanSecurityProvider struct {
32762	// Name - Name of the security provider.
32763	Name *string `json:"name,omitempty"`
32764	// URL - Url of the security provider.
32765	URL *string `json:"url,omitempty"`
32766	// Type - Name of the security provider. Possible values include: 'External', 'Native'
32767	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
32768}
32769
32770// VirtualWanSecurityProviders collection of SecurityProviders.
32771type VirtualWanSecurityProviders struct {
32772	autorest.Response `json:"-"`
32773	// SupportedProviders - List of VirtualWAN security providers.
32774	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
32775}
32776
32777// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
32778// operation.
32779type VirtualWansUpdateTagsFuture struct {
32780	azure.FutureAPI
32781	// Result returns the result of the asynchronous operation.
32782	// If the operation has not completed it will return an error.
32783	Result func(VirtualWansClient) (VirtualWAN, error)
32784}
32785
32786// UnmarshalJSON is the custom unmarshaller for CreateFuture.
32787func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
32788	var azFuture azure.Future
32789	if err := json.Unmarshal(body, &azFuture); err != nil {
32790		return err
32791	}
32792	future.FutureAPI = &azFuture
32793	future.Result = future.result
32794	return nil
32795}
32796
32797// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
32798func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
32799	var done bool
32800	done, err = future.DoneWithContext(context.Background(), client)
32801	if err != nil {
32802		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
32803		return
32804	}
32805	if !done {
32806		vw.Response.Response = future.Response()
32807		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
32808		return
32809	}
32810	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
32811	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
32812		vw, err = client.UpdateTagsResponder(vw.Response.Response)
32813		if err != nil {
32814			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
32815		}
32816	}
32817	return
32818}
32819
32820// VpnClientConfiguration vpnClientConfiguration for P2S client.
32821type VpnClientConfiguration struct {
32822	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
32823	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
32824	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
32825	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
32826	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
32827	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
32828	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
32829	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
32830	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
32831	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
32832	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
32833	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
32834	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
32835	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
32836	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
32837	AadTenant *string `json:"aadTenant,omitempty"`
32838	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
32839	AadAudience *string `json:"aadAudience,omitempty"`
32840	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
32841	AadIssuer *string `json:"aadIssuer,omitempty"`
32842}
32843
32844// VpnClientConnectionHealth vpnClientConnectionHealth properties.
32845type VpnClientConnectionHealth struct {
32846	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
32847	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
32848	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
32849	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
32850	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
32851	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
32852	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
32853	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
32854}
32855
32856// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
32857func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
32858	objectMap := make(map[string]interface{})
32859	if vcch.VpnClientConnectionsCount != nil {
32860		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
32861	}
32862	if vcch.AllocatedIPAddresses != nil {
32863		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
32864	}
32865	return json.Marshal(objectMap)
32866}
32867
32868// VpnClientConnectionHealthDetail VPN client connection health detail.
32869type VpnClientConnectionHealthDetail struct {
32870	// VpnConnectionID - READ-ONLY; The vpn client Id.
32871	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
32872	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
32873	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
32874	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
32875	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
32876	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
32877	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
32878	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
32879	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
32880	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
32881	VpnUserName *string `json:"vpnUserName,omitempty"`
32882	// MaxBandwidth - READ-ONLY; The max band width.
32883	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
32884	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
32885	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
32886	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
32887	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
32888	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
32889	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
32890	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
32891	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
32892	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
32893	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
32894}
32895
32896// MarshalJSON is the custom marshaler for VpnClientConnectionHealthDetail.
32897func (vcchd VpnClientConnectionHealthDetail) MarshalJSON() ([]byte, error) {
32898	objectMap := make(map[string]interface{})
32899	return json.Marshal(objectMap)
32900}
32901
32902// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
32903type VpnClientConnectionHealthDetailListResult struct {
32904	autorest.Response `json:"-"`
32905	// Value - List of vpn client connection health.
32906	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
32907}
32908
32909// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
32910type VpnClientIPsecParameters struct {
32911	autorest.Response `json:"-"`
32912	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
32913	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
32914	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
32915	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
32916	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
32917	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
32918	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
32919	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
32920	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
32921	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
32922	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
32923	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
32924	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
32925	DhGroup DhGroup `json:"dhGroup,omitempty"`
32926	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
32927	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
32928}
32929
32930// VpnClientParameters vpn Client Parameters for package generation.
32931type VpnClientParameters struct {
32932	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
32933	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
32934	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
32935	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
32936	// 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.
32937	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
32938	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
32939	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
32940}
32941
32942// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
32943type VpnClientRevokedCertificate struct {
32944	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
32945	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
32946	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
32947	Name *string `json:"name,omitempty"`
32948	// Etag - A unique read-only string that changes whenever the resource is updated.
32949	Etag *string `json:"etag,omitempty"`
32950	// ID - Resource ID.
32951	ID *string `json:"id,omitempty"`
32952}
32953
32954// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
32955func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
32956	objectMap := make(map[string]interface{})
32957	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
32958		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
32959	}
32960	if vcrc.Name != nil {
32961		objectMap["name"] = vcrc.Name
32962	}
32963	if vcrc.Etag != nil {
32964		objectMap["etag"] = vcrc.Etag
32965	}
32966	if vcrc.ID != nil {
32967		objectMap["id"] = vcrc.ID
32968	}
32969	return json.Marshal(objectMap)
32970}
32971
32972// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
32973func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
32974	var m map[string]*json.RawMessage
32975	err := json.Unmarshal(body, &m)
32976	if err != nil {
32977		return err
32978	}
32979	for k, v := range m {
32980		switch k {
32981		case "properties":
32982			if v != nil {
32983				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
32984				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
32985				if err != nil {
32986					return err
32987				}
32988				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
32989			}
32990		case "name":
32991			if v != nil {
32992				var name string
32993				err = json.Unmarshal(*v, &name)
32994				if err != nil {
32995					return err
32996				}
32997				vcrc.Name = &name
32998			}
32999		case "etag":
33000			if v != nil {
33001				var etag string
33002				err = json.Unmarshal(*v, &etag)
33003				if err != nil {
33004					return err
33005				}
33006				vcrc.Etag = &etag
33007			}
33008		case "id":
33009			if v != nil {
33010				var ID string
33011				err = json.Unmarshal(*v, &ID)
33012				if err != nil {
33013					return err
33014				}
33015				vcrc.ID = &ID
33016			}
33017		}
33018	}
33019
33020	return nil
33021}
33022
33023// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
33024// network gateway.
33025type VpnClientRevokedCertificatePropertiesFormat struct {
33026	// Thumbprint - The revoked VPN client certificate thumbprint.
33027	Thumbprint *string `json:"thumbprint,omitempty"`
33028	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
33029	ProvisioningState *string `json:"provisioningState,omitempty"`
33030}
33031
33032// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
33033func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
33034	objectMap := make(map[string]interface{})
33035	if vcrcpf.Thumbprint != nil {
33036		objectMap["thumbprint"] = vcrcpf.Thumbprint
33037	}
33038	return json.Marshal(objectMap)
33039}
33040
33041// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
33042type VpnClientRootCertificate struct {
33043	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
33044	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
33045	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33046	Name *string `json:"name,omitempty"`
33047	// Etag - A unique read-only string that changes whenever the resource is updated.
33048	Etag *string `json:"etag,omitempty"`
33049	// ID - Resource ID.
33050	ID *string `json:"id,omitempty"`
33051}
33052
33053// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
33054func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
33055	objectMap := make(map[string]interface{})
33056	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
33057		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
33058	}
33059	if vcrc.Name != nil {
33060		objectMap["name"] = vcrc.Name
33061	}
33062	if vcrc.Etag != nil {
33063		objectMap["etag"] = vcrc.Etag
33064	}
33065	if vcrc.ID != nil {
33066		objectMap["id"] = vcrc.ID
33067	}
33068	return json.Marshal(objectMap)
33069}
33070
33071// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
33072func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
33073	var m map[string]*json.RawMessage
33074	err := json.Unmarshal(body, &m)
33075	if err != nil {
33076		return err
33077	}
33078	for k, v := range m {
33079		switch k {
33080		case "properties":
33081			if v != nil {
33082				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
33083				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
33084				if err != nil {
33085					return err
33086				}
33087				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
33088			}
33089		case "name":
33090			if v != nil {
33091				var name string
33092				err = json.Unmarshal(*v, &name)
33093				if err != nil {
33094					return err
33095				}
33096				vcrc.Name = &name
33097			}
33098		case "etag":
33099			if v != nil {
33100				var etag string
33101				err = json.Unmarshal(*v, &etag)
33102				if err != nil {
33103					return err
33104				}
33105				vcrc.Etag = &etag
33106			}
33107		case "id":
33108			if v != nil {
33109				var ID string
33110				err = json.Unmarshal(*v, &ID)
33111				if err != nil {
33112					return err
33113				}
33114				vcrc.ID = &ID
33115			}
33116		}
33117	}
33118
33119	return nil
33120}
33121
33122// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
33123type VpnClientRootCertificatePropertiesFormat struct {
33124	// PublicCertData - The certificate public data.
33125	PublicCertData *string `json:"publicCertData,omitempty"`
33126	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
33127	ProvisioningState *string `json:"provisioningState,omitempty"`
33128}
33129
33130// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
33131func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
33132	objectMap := make(map[string]interface{})
33133	if vcrcpf.PublicCertData != nil {
33134		objectMap["publicCertData"] = vcrcpf.PublicCertData
33135	}
33136	return json.Marshal(objectMap)
33137}
33138
33139// VpnConnection vpnConnection Resource.
33140type VpnConnection struct {
33141	autorest.Response `json:"-"`
33142	// VpnConnectionProperties - Properties of the VPN connection.
33143	*VpnConnectionProperties `json:"properties,omitempty"`
33144	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
33145	Name *string `json:"name,omitempty"`
33146	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
33147	Etag *string `json:"etag,omitempty"`
33148	// ID - Resource ID.
33149	ID *string `json:"id,omitempty"`
33150}
33151
33152// MarshalJSON is the custom marshaler for VpnConnection.
33153func (vc VpnConnection) MarshalJSON() ([]byte, error) {
33154	objectMap := make(map[string]interface{})
33155	if vc.VpnConnectionProperties != nil {
33156		objectMap["properties"] = vc.VpnConnectionProperties
33157	}
33158	if vc.Name != nil {
33159		objectMap["name"] = vc.Name
33160	}
33161	if vc.ID != nil {
33162		objectMap["id"] = vc.ID
33163	}
33164	return json.Marshal(objectMap)
33165}
33166
33167// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
33168func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
33169	var m map[string]*json.RawMessage
33170	err := json.Unmarshal(body, &m)
33171	if err != nil {
33172		return err
33173	}
33174	for k, v := range m {
33175		switch k {
33176		case "properties":
33177			if v != nil {
33178				var vpnConnectionProperties VpnConnectionProperties
33179				err = json.Unmarshal(*v, &vpnConnectionProperties)
33180				if err != nil {
33181					return err
33182				}
33183				vc.VpnConnectionProperties = &vpnConnectionProperties
33184			}
33185		case "name":
33186			if v != nil {
33187				var name string
33188				err = json.Unmarshal(*v, &name)
33189				if err != nil {
33190					return err
33191				}
33192				vc.Name = &name
33193			}
33194		case "etag":
33195			if v != nil {
33196				var etag string
33197				err = json.Unmarshal(*v, &etag)
33198				if err != nil {
33199					return err
33200				}
33201				vc.Etag = &etag
33202			}
33203		case "id":
33204			if v != nil {
33205				var ID string
33206				err = json.Unmarshal(*v, &ID)
33207				if err != nil {
33208					return err
33209				}
33210				vc.ID = &ID
33211			}
33212		}
33213	}
33214
33215	return nil
33216}
33217
33218// VpnConnectionProperties parameters for VpnConnection.
33219type VpnConnectionProperties struct {
33220	// RemoteVpnSite - Id of the connected vpn site.
33221	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
33222	// RoutingWeight - Routing weight for vpn connection.
33223	RoutingWeight *int32 `json:"routingWeight,omitempty"`
33224	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
33225	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
33226	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
33227	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
33228	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
33229	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
33230	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
33231	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
33232	// ConnectionBandwidth - Expected bandwidth in MBPS.
33233	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
33234	// SharedKey - SharedKey for the vpn connection.
33235	SharedKey *string `json:"sharedKey,omitempty"`
33236	// EnableBgp - EnableBgp flag.
33237	EnableBgp *bool `json:"enableBgp,omitempty"`
33238	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
33239	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
33240	// IpsecPolicies - The IPSec Policies to be considered by this connection.
33241	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
33242	// EnableRateLimiting - EnableBgp flag.
33243	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
33244	// EnableInternetSecurity - Enable internet security.
33245	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
33246	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
33247	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
33248	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33249	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33250}
33251
33252// MarshalJSON is the custom marshaler for VpnConnectionProperties.
33253func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
33254	objectMap := make(map[string]interface{})
33255	if vcp.RemoteVpnSite != nil {
33256		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
33257	}
33258	if vcp.RoutingWeight != nil {
33259		objectMap["routingWeight"] = vcp.RoutingWeight
33260	}
33261	if vcp.ConnectionStatus != "" {
33262		objectMap["connectionStatus"] = vcp.ConnectionStatus
33263	}
33264	if vcp.VpnConnectionProtocolType != "" {
33265		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
33266	}
33267	if vcp.ConnectionBandwidth != nil {
33268		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
33269	}
33270	if vcp.SharedKey != nil {
33271		objectMap["sharedKey"] = vcp.SharedKey
33272	}
33273	if vcp.EnableBgp != nil {
33274		objectMap["enableBgp"] = vcp.EnableBgp
33275	}
33276	if vcp.UsePolicyBasedTrafficSelectors != nil {
33277		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
33278	}
33279	if vcp.IpsecPolicies != nil {
33280		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
33281	}
33282	if vcp.EnableRateLimiting != nil {
33283		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
33284	}
33285	if vcp.EnableInternetSecurity != nil {
33286		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
33287	}
33288	if vcp.UseLocalAzureIPAddress != nil {
33289		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
33290	}
33291	if vcp.ProvisioningState != "" {
33292		objectMap["provisioningState"] = vcp.ProvisioningState
33293	}
33294	return json.Marshal(objectMap)
33295}
33296
33297// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33298// long-running operation.
33299type VpnConnectionsCreateOrUpdateFuture struct {
33300	azure.FutureAPI
33301	// Result returns the result of the asynchronous operation.
33302	// If the operation has not completed it will return an error.
33303	Result func(VpnConnectionsClient) (VpnConnection, error)
33304}
33305
33306// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33307func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33308	var azFuture azure.Future
33309	if err := json.Unmarshal(body, &azFuture); err != nil {
33310		return err
33311	}
33312	future.FutureAPI = &azFuture
33313	future.Result = future.result
33314	return nil
33315}
33316
33317// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
33318func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
33319	var done bool
33320	done, err = future.DoneWithContext(context.Background(), client)
33321	if err != nil {
33322		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33323		return
33324	}
33325	if !done {
33326		vc.Response.Response = future.Response()
33327		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
33328		return
33329	}
33330	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33331	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
33332		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
33333		if err != nil {
33334			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
33335		}
33336	}
33337	return
33338}
33339
33340// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33341// operation.
33342type VpnConnectionsDeleteFuture struct {
33343	azure.FutureAPI
33344	// Result returns the result of the asynchronous operation.
33345	// If the operation has not completed it will return an error.
33346	Result func(VpnConnectionsClient) (autorest.Response, error)
33347}
33348
33349// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33350func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
33351	var azFuture azure.Future
33352	if err := json.Unmarshal(body, &azFuture); err != nil {
33353		return err
33354	}
33355	future.FutureAPI = &azFuture
33356	future.Result = future.result
33357	return nil
33358}
33359
33360// result is the default implementation for VpnConnectionsDeleteFuture.Result.
33361func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
33362	var done bool
33363	done, err = future.DoneWithContext(context.Background(), client)
33364	if err != nil {
33365		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
33366		return
33367	}
33368	if !done {
33369		ar.Response = future.Response()
33370		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
33371		return
33372	}
33373	ar.Response = future.Response()
33374	return
33375}
33376
33377// VpnDeviceScriptParameters vpn device configuration script generation parameters.
33378type VpnDeviceScriptParameters struct {
33379	// Vendor - The vendor for the vpn device.
33380	Vendor *string `json:"vendor,omitempty"`
33381	// DeviceFamily - The device family for the vpn device.
33382	DeviceFamily *string `json:"deviceFamily,omitempty"`
33383	// FirmwareVersion - The firmware version for the vpn device.
33384	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
33385}
33386
33387// VpnGateway vpnGateway Resource.
33388type VpnGateway struct {
33389	autorest.Response `json:"-"`
33390	// VpnGatewayProperties - Properties of the VPN gateway.
33391	*VpnGatewayProperties `json:"properties,omitempty"`
33392	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
33393	Etag *string `json:"etag,omitempty"`
33394	// ID - Resource ID.
33395	ID *string `json:"id,omitempty"`
33396	// Name - READ-ONLY; Resource name.
33397	Name *string `json:"name,omitempty"`
33398	// Type - READ-ONLY; Resource type.
33399	Type *string `json:"type,omitempty"`
33400	// Location - Resource location.
33401	Location *string `json:"location,omitempty"`
33402	// Tags - Resource tags.
33403	Tags map[string]*string `json:"tags"`
33404}
33405
33406// MarshalJSON is the custom marshaler for VpnGateway.
33407func (vg VpnGateway) MarshalJSON() ([]byte, error) {
33408	objectMap := make(map[string]interface{})
33409	if vg.VpnGatewayProperties != nil {
33410		objectMap["properties"] = vg.VpnGatewayProperties
33411	}
33412	if vg.ID != nil {
33413		objectMap["id"] = vg.ID
33414	}
33415	if vg.Location != nil {
33416		objectMap["location"] = vg.Location
33417	}
33418	if vg.Tags != nil {
33419		objectMap["tags"] = vg.Tags
33420	}
33421	return json.Marshal(objectMap)
33422}
33423
33424// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
33425func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
33426	var m map[string]*json.RawMessage
33427	err := json.Unmarshal(body, &m)
33428	if err != nil {
33429		return err
33430	}
33431	for k, v := range m {
33432		switch k {
33433		case "properties":
33434			if v != nil {
33435				var vpnGatewayProperties VpnGatewayProperties
33436				err = json.Unmarshal(*v, &vpnGatewayProperties)
33437				if err != nil {
33438					return err
33439				}
33440				vg.VpnGatewayProperties = &vpnGatewayProperties
33441			}
33442		case "etag":
33443			if v != nil {
33444				var etag string
33445				err = json.Unmarshal(*v, &etag)
33446				if err != nil {
33447					return err
33448				}
33449				vg.Etag = &etag
33450			}
33451		case "id":
33452			if v != nil {
33453				var ID string
33454				err = json.Unmarshal(*v, &ID)
33455				if err != nil {
33456					return err
33457				}
33458				vg.ID = &ID
33459			}
33460		case "name":
33461			if v != nil {
33462				var name string
33463				err = json.Unmarshal(*v, &name)
33464				if err != nil {
33465					return err
33466				}
33467				vg.Name = &name
33468			}
33469		case "type":
33470			if v != nil {
33471				var typeVar string
33472				err = json.Unmarshal(*v, &typeVar)
33473				if err != nil {
33474					return err
33475				}
33476				vg.Type = &typeVar
33477			}
33478		case "location":
33479			if v != nil {
33480				var location string
33481				err = json.Unmarshal(*v, &location)
33482				if err != nil {
33483					return err
33484				}
33485				vg.Location = &location
33486			}
33487		case "tags":
33488			if v != nil {
33489				var tags map[string]*string
33490				err = json.Unmarshal(*v, &tags)
33491				if err != nil {
33492					return err
33493				}
33494				vg.Tags = tags
33495			}
33496		}
33497	}
33498
33499	return nil
33500}
33501
33502// VpnGatewayProperties parameters for VpnGateway.
33503type VpnGatewayProperties struct {
33504	// VirtualHub - The VirtualHub to which the gateway belongs.
33505	VirtualHub *SubResource `json:"virtualHub,omitempty"`
33506	// Connections - List of all vpn connections to the gateway.
33507	Connections *[]VpnConnection `json:"connections,omitempty"`
33508	// BgpSettings - Local network gateway's BGP speaker settings.
33509	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
33510	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33511	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33512	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
33513	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
33514}
33515
33516// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
33517// long-running operation.
33518type VpnGatewaysCreateOrUpdateFuture struct {
33519	azure.FutureAPI
33520	// Result returns the result of the asynchronous operation.
33521	// If the operation has not completed it will return an error.
33522	Result func(VpnGatewaysClient) (VpnGateway, error)
33523}
33524
33525// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33526func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33527	var azFuture azure.Future
33528	if err := json.Unmarshal(body, &azFuture); err != nil {
33529		return err
33530	}
33531	future.FutureAPI = &azFuture
33532	future.Result = future.result
33533	return nil
33534}
33535
33536// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
33537func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
33538	var done bool
33539	done, err = future.DoneWithContext(context.Background(), client)
33540	if err != nil {
33541		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33542		return
33543	}
33544	if !done {
33545		vg.Response.Response = future.Response()
33546		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
33547		return
33548	}
33549	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33550	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
33551		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
33552		if err != nil {
33553			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
33554		}
33555	}
33556	return
33557}
33558
33559// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33560// operation.
33561type VpnGatewaysDeleteFuture struct {
33562	azure.FutureAPI
33563	// Result returns the result of the asynchronous operation.
33564	// If the operation has not completed it will return an error.
33565	Result func(VpnGatewaysClient) (autorest.Response, error)
33566}
33567
33568// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33569func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
33570	var azFuture azure.Future
33571	if err := json.Unmarshal(body, &azFuture); err != nil {
33572		return err
33573	}
33574	future.FutureAPI = &azFuture
33575	future.Result = future.result
33576	return nil
33577}
33578
33579// result is the default implementation for VpnGatewaysDeleteFuture.Result.
33580func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
33581	var done bool
33582	done, err = future.DoneWithContext(context.Background(), client)
33583	if err != nil {
33584		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
33585		return
33586	}
33587	if !done {
33588		ar.Response = future.Response()
33589		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
33590		return
33591	}
33592	ar.Response = future.Response()
33593	return
33594}
33595
33596// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
33597// operation.
33598type VpnGatewaysResetFuture struct {
33599	azure.FutureAPI
33600	// Result returns the result of the asynchronous operation.
33601	// If the operation has not completed it will return an error.
33602	Result func(VpnGatewaysClient) (VpnGateway, error)
33603}
33604
33605// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33606func (future *VpnGatewaysResetFuture) UnmarshalJSON(body []byte) error {
33607	var azFuture azure.Future
33608	if err := json.Unmarshal(body, &azFuture); err != nil {
33609		return err
33610	}
33611	future.FutureAPI = &azFuture
33612	future.Result = future.result
33613	return nil
33614}
33615
33616// result is the default implementation for VpnGatewaysResetFuture.Result.
33617func (future *VpnGatewaysResetFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
33618	var done bool
33619	done, err = future.DoneWithContext(context.Background(), client)
33620	if err != nil {
33621		err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure")
33622		return
33623	}
33624	if !done {
33625		vg.Response.Response = future.Response()
33626		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture")
33627		return
33628	}
33629	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33630	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
33631		vg, err = client.ResetResponder(vg.Response.Response)
33632		if err != nil {
33633			err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request")
33634		}
33635	}
33636	return
33637}
33638
33639// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
33640// operation.
33641type VpnGatewaysUpdateTagsFuture struct {
33642	azure.FutureAPI
33643	// Result returns the result of the asynchronous operation.
33644	// If the operation has not completed it will return an error.
33645	Result func(VpnGatewaysClient) (VpnGateway, error)
33646}
33647
33648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33649func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
33650	var azFuture azure.Future
33651	if err := json.Unmarshal(body, &azFuture); err != nil {
33652		return err
33653	}
33654	future.FutureAPI = &azFuture
33655	future.Result = future.result
33656	return nil
33657}
33658
33659// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
33660func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
33661	var done bool
33662	done, err = future.DoneWithContext(context.Background(), client)
33663	if err != nil {
33664		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
33665		return
33666	}
33667	if !done {
33668		vg.Response.Response = future.Response()
33669		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
33670		return
33671	}
33672	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33673	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
33674		vg, err = client.UpdateTagsResponder(vg.Response.Response)
33675		if err != nil {
33676			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
33677		}
33678	}
33679	return
33680}
33681
33682// VpnProfileResponse vpn Profile Response for package generation.
33683type VpnProfileResponse struct {
33684	autorest.Response `json:"-"`
33685	// ProfileURL - URL to the VPN profile.
33686	ProfileURL *string `json:"profileUrl,omitempty"`
33687}
33688
33689// VpnSite vpnSite Resource.
33690type VpnSite struct {
33691	autorest.Response `json:"-"`
33692	// VpnSiteProperties - Properties of the VPN site.
33693	*VpnSiteProperties `json:"properties,omitempty"`
33694	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
33695	Etag *string `json:"etag,omitempty"`
33696	// ID - Resource ID.
33697	ID *string `json:"id,omitempty"`
33698	// Name - READ-ONLY; Resource name.
33699	Name *string `json:"name,omitempty"`
33700	// Type - READ-ONLY; Resource type.
33701	Type *string `json:"type,omitempty"`
33702	// Location - Resource location.
33703	Location *string `json:"location,omitempty"`
33704	// Tags - Resource tags.
33705	Tags map[string]*string `json:"tags"`
33706}
33707
33708// MarshalJSON is the custom marshaler for VpnSite.
33709func (vs VpnSite) MarshalJSON() ([]byte, error) {
33710	objectMap := make(map[string]interface{})
33711	if vs.VpnSiteProperties != nil {
33712		objectMap["properties"] = vs.VpnSiteProperties
33713	}
33714	if vs.ID != nil {
33715		objectMap["id"] = vs.ID
33716	}
33717	if vs.Location != nil {
33718		objectMap["location"] = vs.Location
33719	}
33720	if vs.Tags != nil {
33721		objectMap["tags"] = vs.Tags
33722	}
33723	return json.Marshal(objectMap)
33724}
33725
33726// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
33727func (vs *VpnSite) UnmarshalJSON(body []byte) error {
33728	var m map[string]*json.RawMessage
33729	err := json.Unmarshal(body, &m)
33730	if err != nil {
33731		return err
33732	}
33733	for k, v := range m {
33734		switch k {
33735		case "properties":
33736			if v != nil {
33737				var vpnSiteProperties VpnSiteProperties
33738				err = json.Unmarshal(*v, &vpnSiteProperties)
33739				if err != nil {
33740					return err
33741				}
33742				vs.VpnSiteProperties = &vpnSiteProperties
33743			}
33744		case "etag":
33745			if v != nil {
33746				var etag string
33747				err = json.Unmarshal(*v, &etag)
33748				if err != nil {
33749					return err
33750				}
33751				vs.Etag = &etag
33752			}
33753		case "id":
33754			if v != nil {
33755				var ID string
33756				err = json.Unmarshal(*v, &ID)
33757				if err != nil {
33758					return err
33759				}
33760				vs.ID = &ID
33761			}
33762		case "name":
33763			if v != nil {
33764				var name string
33765				err = json.Unmarshal(*v, &name)
33766				if err != nil {
33767					return err
33768				}
33769				vs.Name = &name
33770			}
33771		case "type":
33772			if v != nil {
33773				var typeVar string
33774				err = json.Unmarshal(*v, &typeVar)
33775				if err != nil {
33776					return err
33777				}
33778				vs.Type = &typeVar
33779			}
33780		case "location":
33781			if v != nil {
33782				var location string
33783				err = json.Unmarshal(*v, &location)
33784				if err != nil {
33785					return err
33786				}
33787				vs.Location = &location
33788			}
33789		case "tags":
33790			if v != nil {
33791				var tags map[string]*string
33792				err = json.Unmarshal(*v, &tags)
33793				if err != nil {
33794					return err
33795				}
33796				vs.Tags = tags
33797			}
33798		}
33799	}
33800
33801	return nil
33802}
33803
33804// VpnSiteID vpnSite Resource.
33805type VpnSiteID struct {
33806	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
33807	VpnSite *string `json:"vpnSite,omitempty"`
33808}
33809
33810// MarshalJSON is the custom marshaler for VpnSiteID.
33811func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
33812	objectMap := make(map[string]interface{})
33813	return json.Marshal(objectMap)
33814}
33815
33816// VpnSiteProperties parameters for VpnSite.
33817type VpnSiteProperties struct {
33818	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
33819	VirtualWan *SubResource `json:"virtualWan,omitempty"`
33820	// DeviceProperties - The device properties.
33821	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
33822	// IPAddress - The ip-address for the vpn-site.
33823	IPAddress *string `json:"ipAddress,omitempty"`
33824	// SiteKey - The key for vpn-site that can be used for connections.
33825	SiteKey *string `json:"siteKey,omitempty"`
33826	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
33827	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
33828	// BgpProperties - The set of bgp properties.
33829	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
33830	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
33831	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
33832	// IsSecuritySite - IsSecuritySite flag.
33833	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
33834}
33835
33836// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
33837// long-running operation.
33838type VpnSitesConfigurationDownloadFuture struct {
33839	azure.FutureAPI
33840	// Result returns the result of the asynchronous operation.
33841	// If the operation has not completed it will return an error.
33842	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
33843}
33844
33845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33846func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
33847	var azFuture azure.Future
33848	if err := json.Unmarshal(body, &azFuture); err != nil {
33849		return err
33850	}
33851	future.FutureAPI = &azFuture
33852	future.Result = future.result
33853	return nil
33854}
33855
33856// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
33857func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
33858	var done bool
33859	done, err = future.DoneWithContext(context.Background(), client)
33860	if err != nil {
33861		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
33862		return
33863	}
33864	if !done {
33865		ar.Response = future.Response()
33866		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
33867		return
33868	}
33869	ar.Response = future.Response()
33870	return
33871}
33872
33873// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
33874// operation.
33875type VpnSitesCreateOrUpdateFuture struct {
33876	azure.FutureAPI
33877	// Result returns the result of the asynchronous operation.
33878	// If the operation has not completed it will return an error.
33879	Result func(VpnSitesClient) (VpnSite, error)
33880}
33881
33882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33883func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
33884	var azFuture azure.Future
33885	if err := json.Unmarshal(body, &azFuture); err != nil {
33886		return err
33887	}
33888	future.FutureAPI = &azFuture
33889	future.Result = future.result
33890	return nil
33891}
33892
33893// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
33894func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
33895	var done bool
33896	done, err = future.DoneWithContext(context.Background(), client)
33897	if err != nil {
33898		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
33899		return
33900	}
33901	if !done {
33902		vs.Response.Response = future.Response()
33903		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
33904		return
33905	}
33906	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33907	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
33908		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
33909		if err != nil {
33910			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
33911		}
33912	}
33913	return
33914}
33915
33916// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
33917// operation.
33918type VpnSitesDeleteFuture struct {
33919	azure.FutureAPI
33920	// Result returns the result of the asynchronous operation.
33921	// If the operation has not completed it will return an error.
33922	Result func(VpnSitesClient) (autorest.Response, error)
33923}
33924
33925// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33926func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
33927	var azFuture azure.Future
33928	if err := json.Unmarshal(body, &azFuture); err != nil {
33929		return err
33930	}
33931	future.FutureAPI = &azFuture
33932	future.Result = future.result
33933	return nil
33934}
33935
33936// result is the default implementation for VpnSitesDeleteFuture.Result.
33937func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
33938	var done bool
33939	done, err = future.DoneWithContext(context.Background(), client)
33940	if err != nil {
33941		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
33942		return
33943	}
33944	if !done {
33945		ar.Response = future.Response()
33946		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
33947		return
33948	}
33949	ar.Response = future.Response()
33950	return
33951}
33952
33953// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
33954// operation.
33955type VpnSitesUpdateTagsFuture struct {
33956	azure.FutureAPI
33957	// Result returns the result of the asynchronous operation.
33958	// If the operation has not completed it will return an error.
33959	Result func(VpnSitesClient) (VpnSite, error)
33960}
33961
33962// UnmarshalJSON is the custom unmarshaller for CreateFuture.
33963func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
33964	var azFuture azure.Future
33965	if err := json.Unmarshal(body, &azFuture); err != nil {
33966		return err
33967	}
33968	future.FutureAPI = &azFuture
33969	future.Result = future.result
33970	return nil
33971}
33972
33973// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
33974func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
33975	var done bool
33976	done, err = future.DoneWithContext(context.Background(), client)
33977	if err != nil {
33978		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
33979		return
33980	}
33981	if !done {
33982		vs.Response.Response = future.Response()
33983		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
33984		return
33985	}
33986	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
33987	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
33988		vs, err = client.UpdateTagsResponder(vs.Response.Response)
33989		if err != nil {
33990			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
33991		}
33992	}
33993	return
33994}
33995
33996// Watcher network watcher in a resource group.
33997type Watcher struct {
33998	autorest.Response `json:"-"`
33999	// Etag - A unique read-only string that changes whenever the resource is updated.
34000	Etag *string `json:"etag,omitempty"`
34001	// WatcherPropertiesFormat - Properties of the network watcher.
34002	*WatcherPropertiesFormat `json:"properties,omitempty"`
34003	// ID - Resource ID.
34004	ID *string `json:"id,omitempty"`
34005	// Name - READ-ONLY; Resource name.
34006	Name *string `json:"name,omitempty"`
34007	// Type - READ-ONLY; Resource type.
34008	Type *string `json:"type,omitempty"`
34009	// Location - Resource location.
34010	Location *string `json:"location,omitempty"`
34011	// Tags - Resource tags.
34012	Tags map[string]*string `json:"tags"`
34013}
34014
34015// MarshalJSON is the custom marshaler for Watcher.
34016func (w Watcher) MarshalJSON() ([]byte, error) {
34017	objectMap := make(map[string]interface{})
34018	if w.Etag != nil {
34019		objectMap["etag"] = w.Etag
34020	}
34021	if w.WatcherPropertiesFormat != nil {
34022		objectMap["properties"] = w.WatcherPropertiesFormat
34023	}
34024	if w.ID != nil {
34025		objectMap["id"] = w.ID
34026	}
34027	if w.Location != nil {
34028		objectMap["location"] = w.Location
34029	}
34030	if w.Tags != nil {
34031		objectMap["tags"] = w.Tags
34032	}
34033	return json.Marshal(objectMap)
34034}
34035
34036// UnmarshalJSON is the custom unmarshaler for Watcher struct.
34037func (w *Watcher) UnmarshalJSON(body []byte) error {
34038	var m map[string]*json.RawMessage
34039	err := json.Unmarshal(body, &m)
34040	if err != nil {
34041		return err
34042	}
34043	for k, v := range m {
34044		switch k {
34045		case "etag":
34046			if v != nil {
34047				var etag string
34048				err = json.Unmarshal(*v, &etag)
34049				if err != nil {
34050					return err
34051				}
34052				w.Etag = &etag
34053			}
34054		case "properties":
34055			if v != nil {
34056				var watcherPropertiesFormat WatcherPropertiesFormat
34057				err = json.Unmarshal(*v, &watcherPropertiesFormat)
34058				if err != nil {
34059					return err
34060				}
34061				w.WatcherPropertiesFormat = &watcherPropertiesFormat
34062			}
34063		case "id":
34064			if v != nil {
34065				var ID string
34066				err = json.Unmarshal(*v, &ID)
34067				if err != nil {
34068					return err
34069				}
34070				w.ID = &ID
34071			}
34072		case "name":
34073			if v != nil {
34074				var name string
34075				err = json.Unmarshal(*v, &name)
34076				if err != nil {
34077					return err
34078				}
34079				w.Name = &name
34080			}
34081		case "type":
34082			if v != nil {
34083				var typeVar string
34084				err = json.Unmarshal(*v, &typeVar)
34085				if err != nil {
34086					return err
34087				}
34088				w.Type = &typeVar
34089			}
34090		case "location":
34091			if v != nil {
34092				var location string
34093				err = json.Unmarshal(*v, &location)
34094				if err != nil {
34095					return err
34096				}
34097				w.Location = &location
34098			}
34099		case "tags":
34100			if v != nil {
34101				var tags map[string]*string
34102				err = json.Unmarshal(*v, &tags)
34103				if err != nil {
34104					return err
34105				}
34106				w.Tags = tags
34107			}
34108		}
34109	}
34110
34111	return nil
34112}
34113
34114// WatcherListResult response for ListNetworkWatchers API service call.
34115type WatcherListResult struct {
34116	autorest.Response `json:"-"`
34117	// Value - List of network watcher resources.
34118	Value *[]Watcher `json:"value,omitempty"`
34119}
34120
34121// WatcherPropertiesFormat the network watcher properties.
34122type WatcherPropertiesFormat struct {
34123	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
34124	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
34125}
34126
34127// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
34128// long-running operation.
34129type WatchersCheckConnectivityFuture struct {
34130	azure.FutureAPI
34131	// Result returns the result of the asynchronous operation.
34132	// If the operation has not completed it will return an error.
34133	Result func(WatchersClient) (ConnectivityInformation, error)
34134}
34135
34136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34137func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
34138	var azFuture azure.Future
34139	if err := json.Unmarshal(body, &azFuture); err != nil {
34140		return err
34141	}
34142	future.FutureAPI = &azFuture
34143	future.Result = future.result
34144	return nil
34145}
34146
34147// result is the default implementation for WatchersCheckConnectivityFuture.Result.
34148func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
34149	var done bool
34150	done, err = future.DoneWithContext(context.Background(), client)
34151	if err != nil {
34152		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
34153		return
34154	}
34155	if !done {
34156		ci.Response.Response = future.Response()
34157		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
34158		return
34159	}
34160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34161	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
34162		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
34163		if err != nil {
34164			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
34165		}
34166	}
34167	return
34168}
34169
34170// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
34171// operation.
34172type WatchersDeleteFuture struct {
34173	azure.FutureAPI
34174	// Result returns the result of the asynchronous operation.
34175	// If the operation has not completed it will return an error.
34176	Result func(WatchersClient) (autorest.Response, error)
34177}
34178
34179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34180func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
34181	var azFuture azure.Future
34182	if err := json.Unmarshal(body, &azFuture); err != nil {
34183		return err
34184	}
34185	future.FutureAPI = &azFuture
34186	future.Result = future.result
34187	return nil
34188}
34189
34190// result is the default implementation for WatchersDeleteFuture.Result.
34191func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
34192	var done bool
34193	done, err = future.DoneWithContext(context.Background(), client)
34194	if err != nil {
34195		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
34196		return
34197	}
34198	if !done {
34199		ar.Response = future.Response()
34200		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
34201		return
34202	}
34203	ar.Response = future.Response()
34204	return
34205}
34206
34207// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
34208// long-running operation.
34209type WatchersGetAzureReachabilityReportFuture struct {
34210	azure.FutureAPI
34211	// Result returns the result of the asynchronous operation.
34212	// If the operation has not completed it will return an error.
34213	Result func(WatchersClient) (AzureReachabilityReport, error)
34214}
34215
34216// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34217func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
34218	var azFuture azure.Future
34219	if err := json.Unmarshal(body, &azFuture); err != nil {
34220		return err
34221	}
34222	future.FutureAPI = &azFuture
34223	future.Result = future.result
34224	return nil
34225}
34226
34227// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
34228func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
34229	var done bool
34230	done, err = future.DoneWithContext(context.Background(), client)
34231	if err != nil {
34232		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
34233		return
34234	}
34235	if !done {
34236		arr.Response.Response = future.Response()
34237		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
34238		return
34239	}
34240	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34241	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
34242		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
34243		if err != nil {
34244			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
34245		}
34246	}
34247	return
34248}
34249
34250// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
34251// long-running operation.
34252type WatchersGetFlowLogStatusFuture struct {
34253	azure.FutureAPI
34254	// Result returns the result of the asynchronous operation.
34255	// If the operation has not completed it will return an error.
34256	Result func(WatchersClient) (FlowLogInformation, error)
34257}
34258
34259// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34260func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
34261	var azFuture azure.Future
34262	if err := json.Unmarshal(body, &azFuture); err != nil {
34263		return err
34264	}
34265	future.FutureAPI = &azFuture
34266	future.Result = future.result
34267	return nil
34268}
34269
34270// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
34271func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
34272	var done bool
34273	done, err = future.DoneWithContext(context.Background(), client)
34274	if err != nil {
34275		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
34276		return
34277	}
34278	if !done {
34279		fli.Response.Response = future.Response()
34280		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
34281		return
34282	}
34283	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34284	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
34285		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
34286		if err != nil {
34287			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
34288		}
34289	}
34290	return
34291}
34292
34293// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
34294// of a long-running operation.
34295type WatchersGetNetworkConfigurationDiagnosticFuture struct {
34296	azure.FutureAPI
34297	// Result returns the result of the asynchronous operation.
34298	// If the operation has not completed it will return an error.
34299	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
34300}
34301
34302// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34303func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
34304	var azFuture azure.Future
34305	if err := json.Unmarshal(body, &azFuture); err != nil {
34306		return err
34307	}
34308	future.FutureAPI = &azFuture
34309	future.Result = future.result
34310	return nil
34311}
34312
34313// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
34314func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
34315	var done bool
34316	done, err = future.DoneWithContext(context.Background(), client)
34317	if err != nil {
34318		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
34319		return
34320	}
34321	if !done {
34322		cdr.Response.Response = future.Response()
34323		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
34324		return
34325	}
34326	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34327	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
34328		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
34329		if err != nil {
34330			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
34331		}
34332	}
34333	return
34334}
34335
34336// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
34337// operation.
34338type WatchersGetNextHopFuture struct {
34339	azure.FutureAPI
34340	// Result returns the result of the asynchronous operation.
34341	// If the operation has not completed it will return an error.
34342	Result func(WatchersClient) (NextHopResult, error)
34343}
34344
34345// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34346func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
34347	var azFuture azure.Future
34348	if err := json.Unmarshal(body, &azFuture); err != nil {
34349		return err
34350	}
34351	future.FutureAPI = &azFuture
34352	future.Result = future.result
34353	return nil
34354}
34355
34356// result is the default implementation for WatchersGetNextHopFuture.Result.
34357func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
34358	var done bool
34359	done, err = future.DoneWithContext(context.Background(), client)
34360	if err != nil {
34361		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
34362		return
34363	}
34364	if !done {
34365		nhr.Response.Response = future.Response()
34366		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
34367		return
34368	}
34369	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34370	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
34371		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
34372		if err != nil {
34373			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
34374		}
34375	}
34376	return
34377}
34378
34379// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
34380// long-running operation.
34381type WatchersGetTroubleshootingFuture struct {
34382	azure.FutureAPI
34383	// Result returns the result of the asynchronous operation.
34384	// If the operation has not completed it will return an error.
34385	Result func(WatchersClient) (TroubleshootingResult, error)
34386}
34387
34388// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34389func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
34390	var azFuture azure.Future
34391	if err := json.Unmarshal(body, &azFuture); err != nil {
34392		return err
34393	}
34394	future.FutureAPI = &azFuture
34395	future.Result = future.result
34396	return nil
34397}
34398
34399// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
34400func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
34401	var done bool
34402	done, err = future.DoneWithContext(context.Background(), client)
34403	if err != nil {
34404		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
34405		return
34406	}
34407	if !done {
34408		tr.Response.Response = future.Response()
34409		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
34410		return
34411	}
34412	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34413	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
34414		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
34415		if err != nil {
34416			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
34417		}
34418	}
34419	return
34420}
34421
34422// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
34423// long-running operation.
34424type WatchersGetTroubleshootingResultFuture struct {
34425	azure.FutureAPI
34426	// Result returns the result of the asynchronous operation.
34427	// If the operation has not completed it will return an error.
34428	Result func(WatchersClient) (TroubleshootingResult, error)
34429}
34430
34431// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34432func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
34433	var azFuture azure.Future
34434	if err := json.Unmarshal(body, &azFuture); err != nil {
34435		return err
34436	}
34437	future.FutureAPI = &azFuture
34438	future.Result = future.result
34439	return nil
34440}
34441
34442// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
34443func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
34444	var done bool
34445	done, err = future.DoneWithContext(context.Background(), client)
34446	if err != nil {
34447		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
34448		return
34449	}
34450	if !done {
34451		tr.Response.Response = future.Response()
34452		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
34453		return
34454	}
34455	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34456	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
34457		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
34458		if err != nil {
34459			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
34460		}
34461	}
34462	return
34463}
34464
34465// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
34466// long-running operation.
34467type WatchersGetVMSecurityRulesFuture struct {
34468	azure.FutureAPI
34469	// Result returns the result of the asynchronous operation.
34470	// If the operation has not completed it will return an error.
34471	Result func(WatchersClient) (SecurityGroupViewResult, error)
34472}
34473
34474// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34475func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
34476	var azFuture azure.Future
34477	if err := json.Unmarshal(body, &azFuture); err != nil {
34478		return err
34479	}
34480	future.FutureAPI = &azFuture
34481	future.Result = future.result
34482	return nil
34483}
34484
34485// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
34486func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
34487	var done bool
34488	done, err = future.DoneWithContext(context.Background(), client)
34489	if err != nil {
34490		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
34491		return
34492	}
34493	if !done {
34494		sgvr.Response.Response = future.Response()
34495		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
34496		return
34497	}
34498	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34499	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
34500		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
34501		if err != nil {
34502			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
34503		}
34504	}
34505	return
34506}
34507
34508// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
34509// long-running operation.
34510type WatchersListAvailableProvidersFuture struct {
34511	azure.FutureAPI
34512	// Result returns the result of the asynchronous operation.
34513	// If the operation has not completed it will return an error.
34514	Result func(WatchersClient) (AvailableProvidersList, error)
34515}
34516
34517// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34518func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
34519	var azFuture azure.Future
34520	if err := json.Unmarshal(body, &azFuture); err != nil {
34521		return err
34522	}
34523	future.FutureAPI = &azFuture
34524	future.Result = future.result
34525	return nil
34526}
34527
34528// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
34529func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
34530	var done bool
34531	done, err = future.DoneWithContext(context.Background(), client)
34532	if err != nil {
34533		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
34534		return
34535	}
34536	if !done {
34537		apl.Response.Response = future.Response()
34538		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
34539		return
34540	}
34541	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34542	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
34543		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
34544		if err != nil {
34545			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
34546		}
34547	}
34548	return
34549}
34550
34551// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
34552// long-running operation.
34553type WatchersSetFlowLogConfigurationFuture struct {
34554	azure.FutureAPI
34555	// Result returns the result of the asynchronous operation.
34556	// If the operation has not completed it will return an error.
34557	Result func(WatchersClient) (FlowLogInformation, error)
34558}
34559
34560// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34561func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
34562	var azFuture azure.Future
34563	if err := json.Unmarshal(body, &azFuture); err != nil {
34564		return err
34565	}
34566	future.FutureAPI = &azFuture
34567	future.Result = future.result
34568	return nil
34569}
34570
34571// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
34572func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
34573	var done bool
34574	done, err = future.DoneWithContext(context.Background(), client)
34575	if err != nil {
34576		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
34577		return
34578	}
34579	if !done {
34580		fli.Response.Response = future.Response()
34581		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
34582		return
34583	}
34584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34585	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
34586		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
34587		if err != nil {
34588			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
34589		}
34590	}
34591	return
34592}
34593
34594// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
34595// operation.
34596type WatchersVerifyIPFlowFuture struct {
34597	azure.FutureAPI
34598	// Result returns the result of the asynchronous operation.
34599	// If the operation has not completed it will return an error.
34600	Result func(WatchersClient) (VerificationIPFlowResult, error)
34601}
34602
34603// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34604func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
34605	var azFuture azure.Future
34606	if err := json.Unmarshal(body, &azFuture); err != nil {
34607		return err
34608	}
34609	future.FutureAPI = &azFuture
34610	future.Result = future.result
34611	return nil
34612}
34613
34614// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
34615func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
34616	var done bool
34617	done, err = future.DoneWithContext(context.Background(), client)
34618	if err != nil {
34619		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
34620		return
34621	}
34622	if !done {
34623		vifr.Response.Response = future.Response()
34624		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
34625		return
34626	}
34627	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
34628	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
34629		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
34630		if err != nil {
34631			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
34632		}
34633	}
34634	return
34635}
34636
34637// WebApplicationFirewallCustomRule defines contents of a web application rule.
34638type WebApplicationFirewallCustomRule struct {
34639	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
34640	Name *string `json:"name,omitempty"`
34641	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
34642	Etag *string `json:"etag,omitempty"`
34643	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
34644	Priority *int32 `json:"priority,omitempty"`
34645	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
34646	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
34647	// MatchConditions - List of match conditions.
34648	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
34649	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
34650	Action WebApplicationFirewallAction `json:"action,omitempty"`
34651}
34652
34653// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
34654func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
34655	objectMap := make(map[string]interface{})
34656	if wafcr.Name != nil {
34657		objectMap["name"] = wafcr.Name
34658	}
34659	if wafcr.Priority != nil {
34660		objectMap["priority"] = wafcr.Priority
34661	}
34662	if wafcr.RuleType != "" {
34663		objectMap["ruleType"] = wafcr.RuleType
34664	}
34665	if wafcr.MatchConditions != nil {
34666		objectMap["matchConditions"] = wafcr.MatchConditions
34667	}
34668	if wafcr.Action != "" {
34669		objectMap["action"] = wafcr.Action
34670	}
34671	return json.Marshal(objectMap)
34672}
34673
34674// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
34675// long-running operation.
34676type WebApplicationFirewallPoliciesDeleteFuture struct {
34677	azure.FutureAPI
34678	// Result returns the result of the asynchronous operation.
34679	// If the operation has not completed it will return an error.
34680	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
34681}
34682
34683// UnmarshalJSON is the custom unmarshaller for CreateFuture.
34684func (future *WebApplicationFirewallPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
34685	var azFuture azure.Future
34686	if err := json.Unmarshal(body, &azFuture); err != nil {
34687		return err
34688	}
34689	future.FutureAPI = &azFuture
34690	future.Result = future.result
34691	return nil
34692}
34693
34694// result is the default implementation for WebApplicationFirewallPoliciesDeleteFuture.Result.
34695func (future *WebApplicationFirewallPoliciesDeleteFuture) result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
34696	var done bool
34697	done, err = future.DoneWithContext(context.Background(), client)
34698	if err != nil {
34699		err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
34700		return
34701	}
34702	if !done {
34703		ar.Response = future.Response()
34704		err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
34705		return
34706	}
34707	ar.Response = future.Response()
34708	return
34709}
34710
34711// WebApplicationFirewallPolicy defines web application firewall policy.
34712type WebApplicationFirewallPolicy struct {
34713	autorest.Response `json:"-"`
34714	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
34715	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
34716	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
34717	Etag *string `json:"etag,omitempty"`
34718	// ID - Resource ID.
34719	ID *string `json:"id,omitempty"`
34720	// Name - READ-ONLY; Resource name.
34721	Name *string `json:"name,omitempty"`
34722	// Type - READ-ONLY; Resource type.
34723	Type *string `json:"type,omitempty"`
34724	// Location - Resource location.
34725	Location *string `json:"location,omitempty"`
34726	// Tags - Resource tags.
34727	Tags map[string]*string `json:"tags"`
34728}
34729
34730// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
34731func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
34732	objectMap := make(map[string]interface{})
34733	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
34734		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
34735	}
34736	if wafp.Etag != nil {
34737		objectMap["etag"] = wafp.Etag
34738	}
34739	if wafp.ID != nil {
34740		objectMap["id"] = wafp.ID
34741	}
34742	if wafp.Location != nil {
34743		objectMap["location"] = wafp.Location
34744	}
34745	if wafp.Tags != nil {
34746		objectMap["tags"] = wafp.Tags
34747	}
34748	return json.Marshal(objectMap)
34749}
34750
34751// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
34752func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
34753	var m map[string]*json.RawMessage
34754	err := json.Unmarshal(body, &m)
34755	if err != nil {
34756		return err
34757	}
34758	for k, v := range m {
34759		switch k {
34760		case "properties":
34761			if v != nil {
34762				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
34763				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
34764				if err != nil {
34765					return err
34766				}
34767				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
34768			}
34769		case "etag":
34770			if v != nil {
34771				var etag string
34772				err = json.Unmarshal(*v, &etag)
34773				if err != nil {
34774					return err
34775				}
34776				wafp.Etag = &etag
34777			}
34778		case "id":
34779			if v != nil {
34780				var ID string
34781				err = json.Unmarshal(*v, &ID)
34782				if err != nil {
34783					return err
34784				}
34785				wafp.ID = &ID
34786			}
34787		case "name":
34788			if v != nil {
34789				var name string
34790				err = json.Unmarshal(*v, &name)
34791				if err != nil {
34792					return err
34793				}
34794				wafp.Name = &name
34795			}
34796		case "type":
34797			if v != nil {
34798				var typeVar string
34799				err = json.Unmarshal(*v, &typeVar)
34800				if err != nil {
34801					return err
34802				}
34803				wafp.Type = &typeVar
34804			}
34805		case "location":
34806			if v != nil {
34807				var location string
34808				err = json.Unmarshal(*v, &location)
34809				if err != nil {
34810					return err
34811				}
34812				wafp.Location = &location
34813			}
34814		case "tags":
34815			if v != nil {
34816				var tags map[string]*string
34817				err = json.Unmarshal(*v, &tags)
34818				if err != nil {
34819					return err
34820				}
34821				wafp.Tags = tags
34822			}
34823		}
34824	}
34825
34826	return nil
34827}
34828
34829// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
34830// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
34831type WebApplicationFirewallPolicyListResult struct {
34832	autorest.Response `json:"-"`
34833	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
34834	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
34835	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
34836	NextLink *string `json:"nextLink,omitempty"`
34837}
34838
34839// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyListResult.
34840func (wafplr WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) {
34841	objectMap := make(map[string]interface{})
34842	return json.Marshal(objectMap)
34843}
34844
34845// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
34846// WebApplicationFirewallPolicy values.
34847type WebApplicationFirewallPolicyListResultIterator struct {
34848	i    int
34849	page WebApplicationFirewallPolicyListResultPage
34850}
34851
34852// NextWithContext advances to the next value.  If there was an error making
34853// the request the iterator does not advance and the error is returned.
34854func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
34855	if tracing.IsEnabled() {
34856		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
34857		defer func() {
34858			sc := -1
34859			if iter.Response().Response.Response != nil {
34860				sc = iter.Response().Response.Response.StatusCode
34861			}
34862			tracing.EndSpan(ctx, sc, err)
34863		}()
34864	}
34865	iter.i++
34866	if iter.i < len(iter.page.Values()) {
34867		return nil
34868	}
34869	err = iter.page.NextWithContext(ctx)
34870	if err != nil {
34871		iter.i--
34872		return err
34873	}
34874	iter.i = 0
34875	return nil
34876}
34877
34878// Next advances to the next value.  If there was an error making
34879// the request the iterator does not advance and the error is returned.
34880// Deprecated: Use NextWithContext() instead.
34881func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
34882	return iter.NextWithContext(context.Background())
34883}
34884
34885// NotDone returns true if the enumeration should be started or is not yet complete.
34886func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
34887	return iter.page.NotDone() && iter.i < len(iter.page.Values())
34888}
34889
34890// Response returns the raw server response from the last page request.
34891func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
34892	return iter.page.Response()
34893}
34894
34895// Value returns the current value or a zero-initialized value if the
34896// iterator has advanced beyond the end of the collection.
34897func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
34898	if !iter.page.NotDone() {
34899		return WebApplicationFirewallPolicy{}
34900	}
34901	return iter.page.Values()[iter.i]
34902}
34903
34904// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
34905func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
34906	return WebApplicationFirewallPolicyListResultIterator{page: page}
34907}
34908
34909// IsEmpty returns true if the ListResult contains no values.
34910func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
34911	return wafplr.Value == nil || len(*wafplr.Value) == 0
34912}
34913
34914// hasNextLink returns true if the NextLink is not empty.
34915func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
34916	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
34917}
34918
34919// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
34920// It returns nil if no more results exist.
34921func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
34922	if !wafplr.hasNextLink() {
34923		return nil, nil
34924	}
34925	return autorest.Prepare((&http.Request{}).WithContext(ctx),
34926		autorest.AsJSON(),
34927		autorest.AsGet(),
34928		autorest.WithBaseURL(to.String(wafplr.NextLink)))
34929}
34930
34931// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
34932type WebApplicationFirewallPolicyListResultPage struct {
34933	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
34934	wafplr WebApplicationFirewallPolicyListResult
34935}
34936
34937// NextWithContext advances to the next page of values.  If there was an error making
34938// the request the page does not advance and the error is returned.
34939func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
34940	if tracing.IsEnabled() {
34941		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
34942		defer func() {
34943			sc := -1
34944			if page.Response().Response.Response != nil {
34945				sc = page.Response().Response.Response.StatusCode
34946			}
34947			tracing.EndSpan(ctx, sc, err)
34948		}()
34949	}
34950	for {
34951		next, err := page.fn(ctx, page.wafplr)
34952		if err != nil {
34953			return err
34954		}
34955		page.wafplr = next
34956		if !next.hasNextLink() || !next.IsEmpty() {
34957			break
34958		}
34959	}
34960	return nil
34961}
34962
34963// Next advances to the next page of values.  If there was an error making
34964// the request the page does not advance and the error is returned.
34965// Deprecated: Use NextWithContext() instead.
34966func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
34967	return page.NextWithContext(context.Background())
34968}
34969
34970// NotDone returns true if the page enumeration should be started or is not yet complete.
34971func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
34972	return !page.wafplr.IsEmpty()
34973}
34974
34975// Response returns the raw server response from the last page request.
34976func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
34977	return page.wafplr
34978}
34979
34980// Values returns the slice of values for the current page or nil if there are no values.
34981func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
34982	if page.wafplr.IsEmpty() {
34983		return nil
34984	}
34985	return *page.wafplr.Value
34986}
34987
34988// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
34989func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
34990	return WebApplicationFirewallPolicyListResultPage{
34991		fn:     getNextPage,
34992		wafplr: cur,
34993	}
34994}
34995
34996// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
34997type WebApplicationFirewallPolicyPropertiesFormat struct {
34998	// PolicySettings - Describes policySettings for policy.
34999	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
35000	// CustomRules - Describes custom rules inside the policy.
35001	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
35002	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
35003	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
35004	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
35005	ProvisioningState *string `json:"provisioningState,omitempty"`
35006	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
35007	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
35008}
35009
35010// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
35011func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
35012	objectMap := make(map[string]interface{})
35013	if wafppf.PolicySettings != nil {
35014		objectMap["policySettings"] = wafppf.PolicySettings
35015	}
35016	if wafppf.CustomRules != nil {
35017		objectMap["customRules"] = wafppf.CustomRules
35018	}
35019	return json.Marshal(objectMap)
35020}
35021